/* ==========================================================================
   HUNISCOPE AI — GLOBAL DESIGN TOKENS & ISOLATED LAYOUT (HEADER & FOOTER)
   Theme: Hijau Emerald & Navy Dongker (Gradasi Cerah - Gelap)
   ========================================================================== */

:root {
  /* Navy Dongker Spectrum (Gelap ke Cerah) */
  --hs-navy-deepest: #051021;
  --hs-navy-dark: #0a1f3d;
  --hs-navy-mid: #11325e;
  --hs-navy-bright: #1d4e89;

  /* Hijau Emerald Spectrum (Gelap ke Cerah) */
  --hs-emerald-dark: #046c4e;
  --hs-emerald: #10b981;
  --hs-emerald-bright: #34d399;
  --hs-emerald-soft: #d1fae5;

  /* Brand Gradients (Gradasi Cerah - Gelap) */
  --hs-grad-brand: linear-gradient(135deg, #10b981 0%, #0d4a58 48%, #071933 100%);
  --hs-grad-header: linear-gradient(95deg, #051021 0%, #0b2549 58%, #065f46 100%);
  --hs-grad-emerald-btn: linear-gradient(135deg, #34d399 0%, #059669 55%, #064e3b 100%);
  --hs-grad-navy-card: linear-gradient(160deg, #11325e 0%, #081830 100%);
  --hs-grad-footer: linear-gradient(180deg, #0a1f3d 0%, #040c18 100%);

  /* Neutral & Surface Tokens */
  --hs-bg: #f3f7f6;
  --hs-surface: #ffffff;
  --hs-text: #0b192c;
  --hs-muted: #52647a;
  --hs-border: #d9e4e2;
  --hs-shadow-sm: 0 2px 10px rgba(5, 16, 33, 0.06);
  --hs-shadow-md: 0 10px 28px rgba(5, 16, 33, 0.14);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--hs-bg);
  color: var(--hs-text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   1. GLOBAL HEADER / NAVBAR (ISOLATED)
   ========================================================================== */
.hs-navbar {
  background: var(--hs-grad-header);
  border-bottom: 1px solid rgba(52, 211, 153, 0.25);
  position: sticky;
  top: 0;
  z-index: 1200;
  box-shadow: 0 4px 18px rgba(5, 16, 33, 0.24);
}

.hs-nav-container {
  max-width: 1380px;
  margin: 0 auto;
  padding: 0 20px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

/* Brand Logo */
.hs-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #ffffff;
  font-weight: 800;
  font-size: 1.22rem;
  letter-spacing: -0.3px;
  flex-shrink: 0;
}

.hs-brand span:first-child {
  background: linear-gradient(90deg, #ffffff 0%, #6ee7b7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hs-brand-badge {
  background: linear-gradient(135deg, #34d399 0%, #059669 100%);
  color: #04151f;
  font-size: 0.66rem;
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 800;
  letter-spacing: 0.6px;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
}

/* Navigation Menu */
.hs-nav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.hs-nav-link {
  text-decoration: none;
  color: #e2e8f0;
  font-size: 0.89rem;
  font-weight: 600;
  padding: 8px 13px;
  border-radius: 8px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  border: 1px solid transparent;
  background: transparent;
  white-space: nowrap;
}

.hs-nav-link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #6ee7b7;
}

.hs-nav-link.active {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.28) 0%, rgba(17, 50, 94, 0.65) 100%);
  color: #6ee7b7;
  border-color: rgba(52, 211, 153, 0.45);
}

/* Dropdown Menu: Seputar Properti */
.hs-dropdown {
  position: relative;
}

.hs-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 265px;
  background: var(--hs-surface);
  border: 1px solid var(--hs-border);
  border-top: 3px solid var(--hs-emerald);
  border-radius: 12px;
  box-shadow: var(--hs-shadow-md);
  padding: 8px;
  z-index: 1300;
}

.hs-dropdown::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 10px;
}

.hs-dropdown:hover .hs-dropdown-menu,
.hs-dropdown.open .hs-dropdown-menu {
  display: block;
}

.hs-dropdown-item {
  display: block;
  padding: 9px 12px;
  text-decoration: none;
  color: var(--hs-navy-dark);
  font-size: 0.87rem;
  font-weight: 700;
  border-radius: 8px;
  transition: all 0.15s ease;
}

.hs-dropdown-item:hover {
  background: linear-gradient(90deg, #ecfdf5 0%, #eff6ff 100%);
  color: var(--hs-emerald-dark);
  padding-left: 16px;
}

.hs-dropdown-item small {
  display: block;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--hs-muted);
  margin-top: 1px;
}

/* Searchbar Header */
.hs-nav-search {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(110, 231, 183, 0.3);
  border-radius: 99px;
  padding: 5px 13px;
  width: 225px;
  transition: all 0.2s ease;
}

.hs-nav-search:focus-within {
  background: rgba(5, 16, 33, 0.65);
  border-color: var(--hs-emerald-bright);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.hs-nav-search input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 0.83rem;
  width: 100%;
  color: #ffffff;
}

.hs-nav-search input::placeholder {
  color: #cbd5e1;
}

.hs-nav-search button {
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--hs-emerald-bright);
  font-size: 0.9rem;
  padding-left: 6px;
}

/* Auth & Role Status Area */
.hs-nav-auth {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.hs-role-pill {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 99px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.hs-role-pill.pembeli {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.22) 0%, rgba(6, 95, 70, 0.55) 100%);
  color: #6ee7b7;
  border: 1px solid rgba(52, 211, 153, 0.45);
}

.hs-role-pill.pengembang {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25) 0%, rgba(17, 50, 94, 0.75) 100%);
  color: #fcd34d;
  border: 1px solid rgba(251, 191, 36, 0.45);
}

.hs-btn-login {
  background: var(--hs-grad-emerald-btn);
  color: #ffffff;
  border: 1px solid rgba(110, 231, 183, 0.35);
  padding: 7px 13px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.2s ease, transform 0.15s ease;
  white-space: nowrap;
}

.hs-btn-login:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.hs-btn-logout {
  background: rgba(239, 68, 68, 0.18);
  color: #fca5a5;
  border: 1px solid rgba(248, 113, 113, 0.4);
  padding: 7px 11px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
  white-space: nowrap;
}

.hs-btn-logout:hover {
  background: rgba(239, 68, 68, 0.32);
  color: #ffffff;
}

/* ==========================================================================
   2. GLOBAL FOOTER (ISOLATED)
   ========================================================================== */
.hs-footer {
  background: var(--hs-grad-footer);
  color: #cbd5e1;
  border-top: 3px solid var(--hs-emerald);
  padding: 44px 20px 24px;
  margin-top: 64px;
  font-size: 0.88rem;
}

.hs-footer-inner {
  max-width: 1320px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2.2fr 1fr 1fr;
  gap: 36px;
}

.hs-footer h4 {
  color: #6ee7b7;
  margin-bottom: 12px;
  font-size: 1rem;
  font-weight: 700;
}

.hs-footer p {
  color: #94a3b8;
  line-height: 1.65;
  max-width: 480px;
}

.hs-footer a {
  color: #cbd5e1;
  text-decoration: none;
  display: block;
  margin-bottom: 8px;
  transition: color 0.15s ease, padding-left 0.15s ease;
}

.hs-footer a:hover {
  color: var(--hs-emerald-bright);
  padding-left: 4px;
}

.hs-footer-bottom {
  max-width: 1320px;
  margin: 30px auto 0;
  padding-top: 18px;
  border-top: 1px solid rgba(52, 211, 153, 0.18);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.8rem;
  color: #94a3b8;
}

/* ==========================================================================
   3. RESPONSIVE HEADER & FOOTER
   ========================================================================== */
@media (max-width: 1140px) {
  .hs-nav-search {
    width: 170px;
  }
}

@media (max-width: 960px) {
  .hs-nav-container {
    height: auto;
    flex-wrap: wrap;
    padding: 12px 16px;
  }

  .hs-nav-menu {
    order: 3;
    width: 100%;
    overflow-x: auto;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  .hs-nav-search {
    display: none;
  }

  .hs-footer-inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}
