/* ================================================================
   SAHATE TMS — Portal (index.html) Styles — Light Theme
   ================================================================ */

/* ── Force Dark Hero Styling for Portal Login Page Only ── */
.portal-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  background: #081A12;
  color: #F0F5F2;
}

/* Hero Section */
.portal-hero {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Building background photo */
.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('../img/hero-bg.jpg');
  background-size: cover;
  background-position: center;
  filter: brightness(0.45);
  transform: scale(1.05);
  transition: transform 8s ease;
  display: block;
}
.portal-hero:hover .hero-bg {
  transform: scale(1.0);
}

/* Dark green gradient overlay on hero image */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(8, 26, 18, 0.92) 0%,
    rgba(13, 43, 30, 0.75) 50%,
    rgba(8, 26, 18, 0.88) 100%
  );
}

/* Subtle grid pattern */
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(34, 197, 94, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 197, 94, 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

/* ── Portal Navbar ── */
.portal-nav {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2.5rem;
  background: rgba(8, 26, 18, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(52, 100, 68, 0.25);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.portal-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.portal-logo-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.portal-logo-icon svg {
  width: 24px;
  height: 24px;
}

.portal-logo-text {
  display: flex;
  flex-direction: column;
}

.portal-logo-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  color: #F0F5F2;
  letter-spacing: 0.05em;
  line-height: 1.1;
}

.portal-logo-sub {
  font-size: 0.6875rem;
  color: #E85D04;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.portal-nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.portal-nav-links a {
  font-size: 0.875rem;
  font-weight: 600;
  color: #B8CFC0;
  transition: color 0.2s ease;
  position: relative;
}
.portal-nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: #E85D04;
  border-radius: 2px;
  transition: width 0.2s ease;
}
.portal-nav-links a:hover {
  color: #FFFFFF;
}
.portal-nav-links a:hover::after {
  width: 100%;
}

/* ── Hero Content Layout ── */
.portal-hero-content {
  position: relative;
  z-index: 5;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 3rem 2.5rem;
  gap: 3rem;
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
}

/* ── Hero Left: Welcome Text ── */
.hero-left {
  flex: 1;
  max-width: 580px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(232, 93, 4, 0.15);
  border: 1px solid rgba(232, 93, 4, 0.35);
  border-radius: 99px;
  padding: 0.35rem 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #E85D04;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  animation: slideUp 0.6s var(--ease-out) 0.1s both;
}

.hero-kicker-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #E85D04;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 900;
  line-height: 1.1;
  color: #FFFFFF;
  margin-bottom: 1.25rem;
  animation: slideUp 0.6s var(--ease-out) 0.2s both;
}

.hero-title span {
  color: #E85D04;
  position: relative;
}

.hero-subtitle {
  font-size: 1.0625rem;
  color: #B8CFC0;
  line-height: 1.7;
  max-width: 480px;
  margin-bottom: 2rem;
  animation: slideUp 0.6s var(--ease-out) 0.3s both;
}

.hero-stats {
  display: flex;
  gap: 2rem;
  margin-bottom: 2.5rem;
  animation: slideUp 0.6s var(--ease-out) 0.4s both;
}

.hero-stat {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.hero-stat-value {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
  color: #E85D04;
  line-height: 1;
}

.hero-stat-label {
  font-size: 0.75rem;
  color: #7A9E8A;
  font-weight: 500;
  letter-spacing: 0.05em;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  animation: slideUp 0.6s var(--ease-out) 0.5s both;
}

.btn-hero-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.875rem 1.75rem;
  background: #E85D04;
  color: #fff;
  border-radius: 10px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(232, 93, 4, 0.35);
  transition: all 0.25s ease;
  border: 2px solid #E85D04;
}
.btn-hero-primary:hover {
  background: #F07030;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(232, 93, 4, 0.45);
}

.btn-hero-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.875rem 1.75rem;
  background: transparent;
  color: #F0F5F2;
  border-radius: 10px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.25s ease;
  border: 2px solid rgba(240, 245, 242, 0.25);
}
.btn-hero-outline:hover {
  background: rgba(240, 245, 242, 0.1);
  border-color: rgba(240, 245, 242, 0.5);
  transform: translateY(-2px);
}

/* ── Hero Right: Login Box ── */
.hero-right {
  flex-shrink: 0;
  width: 100%;
  max-width: 420px;
  animation: slideUp 0.7s var(--ease-spring) 0.3s both;
}

.login-card {
  background: #FFFFFF;
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow:
    0 4px 6px rgba(13, 43, 30, 0.04),
    0 12px 40px rgba(13, 43, 30, 0.12),
    0 0 0 1px rgba(13, 43, 30, 0.06);
  color: #0D2B1E;
}

.login-card-header {
  text-align: left;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid #F0F5F2;
  padding-bottom: 1.25rem;
}

.login-card-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
  color: #0D2B1E;
  margin-bottom: 0.375rem;
}

.login-card-sub {
  font-size: 0.875rem;
  color: #4A7C59;
  line-height: 1.6;
}

/* Login Form */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.login-card .form-label {
  color: #163D2A;
  font-weight: 600;
  font-size: 0.875rem;
}

.login-card .form-control {
  background: #F8FBFA;
  border: 1.5px solid #D1E5D9;
  color: #0D2B1E;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  transition: all 0.2s ease;
}

.login-card .form-control::placeholder {
  color: #94B8A4;
}

.login-card .form-control:focus {
  border-color: #E85D04;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(232, 93, 4, 0.12);
  outline: none;
}

.pw-toggle-btn {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94B8A4;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  padding: 0;
}
.pw-toggle-btn:hover { color: #0D2B1E; }

.login-btn-submit {
  width: 100%;
  padding: 0.875rem;
  background: #0D2B1E;
  color: #fff;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  box-shadow: 0 4px 14px rgba(13, 43, 30, 0.25);
}
.login-btn-submit:hover {
  background: #1E5236;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(13, 43, 30, 0.3);
}
.login-btn-submit:active {
  transform: translateY(0);
}

.forgot-password-link {
  font-size: 0.8125rem;
  color: #4A7C59;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
}
.forgot-password-link:hover {
  color: #E85D04;
}

.login-error-msg {
  background: #FEE2E2;
  border: 1px solid #FCA5A5;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 0.8125rem;
  color: #B91C1C;
  text-align: center;
  margin-top: 0.5rem;
}

/* ── Building Clickable Badge ── */
.building-link {
  position: absolute;
  bottom: 2rem;
  right: 2.5rem;
  z-index: 5;
  cursor: pointer;
  animation: slideUp 0.6s var(--ease-out) 0.6s both;
}

.building-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(13, 43, 30, 0.15);
  border-radius: 12px;
  padding: 0.75rem 1.25rem;
  transition: all 0.25s ease;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(13, 43, 30, 0.08);
}
.building-badge:hover {
  background: rgba(255, 255, 255, 1);
  border-color: #E85D04;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(13, 43, 30, 0.12);
}

.building-badge-icon {
  width: 36px;
  height: 36px;
  background: #0D2B1E;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.building-badge-text { display: flex; flex-direction: column; }
.building-badge-label { font-size: 0.6875rem; font-weight: 700; color: #E85D04; text-transform: uppercase; letter-spacing: 0.1em; }
.building-badge-url   { font-size: 0.8125rem; font-weight: 600; color: #0D2B1E; }

/* ── Scroll indicator ── */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: #4A7C59;
  font-size: 0.75rem;
  font-weight: 500;
  animation: slideUp 0.6s var(--ease-out) 0.8s both;
}

.scroll-arrow {
  animation: scrollBounce 2s ease-in-out infinite;
  color: #4A7C59;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

/* ── Portal Footer ── */
.portal-footer {
  position: relative;
  z-index: 5;
  background: rgba(255, 255, 255, 0.9);
  border-top: 1px solid rgba(13, 43, 30, 0.1);
  padding: 1.25rem 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  backdrop-filter: blur(12px);
}

.portal-footer p {
  font-size: 0.8125rem;
  color: #4A7C59;
  font-weight: 500;
}

.portal-footer-links {
  display: flex;
  gap: 1.5rem;
}

.portal-footer-links a {
  font-size: 0.8125rem;
  color: #4A7C59;
  font-weight: 500;
  transition: color 0.2s ease;
}
.portal-footer-links a:hover { color: #E85D04; }

/* ── Animation keyframes ── */
@keyframes slideUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive: Portal ── */
@media (max-width: 900px) {
  .portal-hero-content {
    flex-direction: column;
    align-items: flex-start;
    padding: 2rem 1.5rem;
    justify-content: center;
    min-height: calc(100vh - 70px);
  }

  .hero-right {
    max-width: 100%;
    width: 100%;
  }

  .portal-nav {
    padding: 1rem 1.5rem;
  }

  .portal-nav-links { display: none; }

  .hero-title { font-size: 2rem; }
  .hero-stats { gap: 1.5rem; }

  .building-link {
    display: none;
  }

  .scroll-indicator { display: none; }

  .portal-footer {
    flex-direction: column;
    text-align: center;
    padding: 1rem 1.5rem;
  }
}

@media (max-width: 480px) {
  .hero-left { max-width: 100%; }
  .hero-stats { flex-wrap: wrap; gap: 1rem; }
  .hero-actions { flex-direction: column; }
  .btn-hero-primary, .btn-hero-outline { justify-content: center; }
}
