/* ===== App Shell ===== */
.app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ===== Header ===== */
.header {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background: var(--header-gradient);
  color: var(--color-text-inverse);
  box-shadow: var(--shadow-header);
}

/* Subtle gold accent line at header bottom */
.header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--color-gold-dark) 20%,
    var(--color-gold) 50%,
    var(--color-gold-dark) 80%,
    transparent 100%
  );
  opacity: 0.6;
  z-index: 1;
}

.header__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  padding: 0 var(--space-6);
}

.header__brand {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

/* Refined logo container with gold ring */
.header__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--logo-size);
  height: var(--logo-size);
  font-size: 1.4rem;
  background: var(--logo-bg);
  border: 1.5px solid var(--logo-border);
  border-radius: var(--radius-lg);
  flex-shrink: 0;
  position: relative;
  transition: all var(--transition-normal);
}
.header__logo:hover {
  border-color: var(--color-gold);
  box-shadow: var(--shadow-nav-glow);
}

.header__title {
  font-family: var(--font-heading);
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
  color: var(--color-text-inverse);
  line-height: 1.2;
  letter-spacing: 0.01em;
}

.header__subtitle {
  font-size: 0.65rem;
  opacity: 0.55;
  font-weight: var(--fw-normal);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-gold-light);
}

.header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

/* ===== Desktop Navigation ===== */
.nav {
  display: flex;
  align-items: stretch;
  padding: 0 var(--space-5);
  background: var(--nav-bg);
  backdrop-filter: var(--nav-bg-blur);
  -webkit-backdrop-filter: var(--nav-bg-blur);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  position: relative;
}
.nav::-webkit-scrollbar { display: none; }

.nav__list {
  display: flex;
  align-items: stretch;
  gap: var(--space-1);
  width: 100%;
  padding: var(--space-1) 0;
}

/* Nav section separators */
.nav__separator {
  width: 1px;
  background: linear-gradient(180deg, transparent 20%, rgba(212, 175, 55, 0.25) 50%, transparent 80%);
  margin: 6px 8px;
  flex-shrink: 0;
}

/* Nav section labels (desktop) */
.nav__group-label {
  display: flex;
  align-items: center;
  padding: 0 var(--space-3) 0 var(--space-2);
  font-size: 0.6rem;
  font-weight: var(--fw-semibold);
  color: rgba(212, 175, 55, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  white-space: nowrap;
  user-select: none;
}

/* Nav links */
.nav__link {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  color: var(--nav-link-color);
  white-space: nowrap;
  transition: all var(--transition-fast);
  border-radius: var(--radius-md);
  border-bottom: none;
  position: relative;
  text-decoration: none;
}

.nav__link:hover {
  color: rgba(255, 255, 255, 0.95);
  background: var(--nav-hover-bg);
}

/* Active state — pill with gold accent */
.nav__link.is-active {
  color: var(--nav-link-active-color);
  background: var(--nav-active-bg);
  font-weight: var(--fw-semibold);
  box-shadow: inset 0 -2px 0 var(--nav-active-border);
}

.nav__link.is-active .nav__icon {
  filter: drop-shadow(0 0 4px var(--color-gold-glow));
}

.nav__icon {
  font-size: var(--fs-sm);
  line-height: 1;
  transition: filter var(--transition-fast);
}

/* ===== Hamburger ===== */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--space-2);
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: background var(--transition-fast);
}
.hamburger:hover {
  background: rgba(255, 255, 255, 0.1);
}
.hamburger__line {
  width: 22px;
  height: 2px;
  background: var(--color-text-inverse);
  border-radius: 2px;
  transition: all var(--transition-normal);
  transform-origin: center;
}

/* Hamburger open state animation */
.hamburger.is-open .hamburger__line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger.is-open .hamburger__line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.hamburger.is-open .hamburger__line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===== Mobile Navigation Drawer ===== */
.mobile-nav {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: var(--z-modal-backdrop);
  animation: fadeIn 0.25s ease;
}
.mobile-nav.is-open { display: block; }

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.mobile-nav__panel {
  width: var(--drawer-width);
  height: 100%;
  background: var(--color-surface);
  box-shadow: var(--shadow-drawer);
  overflow-y: auto;
  animation: slideRight 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

@keyframes slideRight {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}

/* Mobile drawer header */
.mobile-nav__header {
  background: var(--drawer-header-bg);
  padding: var(--space-6) var(--space-5) var(--space-5);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  position: relative;
  flex-shrink: 0;
}
.mobile-nav__header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: var(--space-5);
  right: var(--space-5);
  height: 1px;
  background: linear-gradient(90deg, var(--color-gold-dark), var(--color-gold), var(--color-gold-dark));
  opacity: 0.4;
}

.mobile-nav__header-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  font-size: 1.2rem;
  background: var(--logo-bg);
  border: 1.5px solid var(--logo-border);
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

.mobile-nav__header-text {
  flex: 1;
  min-width: 0;
}

.mobile-nav__header-title {
  font-family: var(--font-heading);
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  color: var(--color-text-inverse);
  line-height: 1.2;
}

.mobile-nav__header-subtitle {
  font-size: 0.6rem;
  color: var(--color-gold-light);
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Mobile nav body */
.mobile-nav__body {
  flex: 1;
  padding: var(--space-3) 0;
  overflow-y: auto;
}

/* Section labels */
.mobile-nav__label {
  font-size: 0.6rem;
  font-weight: var(--fw-bold);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: var(--space-4) var(--space-5) var(--space-2);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.mobile-nav__label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border-light);
}

/* Section dividers */
.mobile-nav__divider {
  height: 1px;
  background: var(--color-border-light);
  margin: var(--space-2) var(--space-5);
}

/* Mobile nav links */
.mobile-nav__link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-5);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--color-text);
  margin: 2px var(--space-3);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  text-decoration: none;
  border-left: 3px solid transparent;
  position: relative;
}
.mobile-nav__link:hover {
  background: var(--color-surface-alt);
  color: var(--color-secondary);
}

.mobile-nav__link .mobile-nav__icon {
  font-size: var(--fs-base);
  width: 28px;
  text-align: center;
  flex-shrink: 0;
}

/* Active state — gold left accent + warm background */
.mobile-nav__link.is-active {
  background: var(--drawer-active-bg);
  border-left-color: var(--drawer-active-border);
  color: var(--color-secondary);
  font-weight: var(--fw-semibold);
}

/* Mobile nav footer */
.mobile-nav__footer {
  padding: var(--space-4) var(--space-5);
  border-top: 1px solid var(--color-border-light);
  flex-shrink: 0;
}
.mobile-nav__footer-text {
  font-size: 0.6rem;
  color: var(--color-text-muted);
  text-align: center;
  letter-spacing: 0.02em;
}

/* ===== Main Content ===== */
.main {
  flex: 1;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-6);
}

/* ===== Page Header ===== */
.page-header {
  margin-bottom: var(--space-8);
  position: relative;
}

.page-header__title {
  font-size: var(--fs-2xl);
  margin-bottom: var(--space-2);
  color: var(--color-text);
  letter-spacing: -0.01em;
}

.page-header__desc {
  color: var(--color-text-secondary);
  font-size: var(--fs-sm);
  line-height: var(--lh-relaxed);
}

/* ===== Footer ===== */
.footer {
  padding: var(--space-4) var(--space-6);
  text-align: center;
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  border-top: 1px solid var(--color-border-light);
}
