/* ==========================================================================
   SIMS Design System: Global Top Navigation, Layout & Footer
   Branding: Navy Blue Beige Wedding Dark (#FCF1D0 Main)
   Rule F.6 Compliant: Modular stylesheet (<300 lines)
   Rule 2 Compliant: Zero emoji
   ========================================================================== */

.app-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* 1. Global Top Header (Sticky Midnight Glass) */
.top-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  height: 68px;
  background: rgba(1, 7, 54, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  min-width: auto;
  flex-shrink: 0;
}
.brand-badge {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, #0D1C42, #22396F);
  border: 1px solid rgba(252, 241, 208, 0.35);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FCF1D0;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}
.brand-title { display: flex; flex-direction: column; }
.brand-title h1 {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #FFFFFF;
  line-height: 1.1;
}
.brand-title span {
  font-size: 10px;
  color: var(--text-beige);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 700;
}

/* Header Center Navigation */
.header-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}
.header-nav::-webkit-scrollbar { display: none; }
.nav-link-item a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  color: rgba(252, 241, 208, 0.70);
  text-decoration: none;
  font-weight: 500;
  font-size: 13px;
  white-space: nowrap;
  transition: var(--transition-fast);
}
.nav-link-item a:hover {
  color: #FFFFFF;
  background: rgba(252, 241, 208, 0.08);
}
.nav-link-item.active a {
  color: #FFFFFF;
  font-weight: 700;
  background: rgba(252, 241, 208, 0.16);
  border: 1px solid rgba(252, 241, 208, 0.35);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
.nav-link-item.active a i { color: var(--accent-gold, #F59E0B); }

/* Header Right: User Controls */
.header-controls {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: auto;
  flex-shrink: 0;
  justify-content: flex-end;
}
.ctrl-btn {
  position: relative;
  background: rgba(13, 28, 66, 0.75);
  border: 1px solid var(--border-subtle);
  color: var(--text-beige);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
}
.ctrl-btn:hover {
  background: rgba(34, 57, 111, 0.9);
  border-color: var(--border-hover);
  color: #FFFFFF;
}
.badge-counter {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--accent-danger);
  color: #FFFFFF;
  font-size: 10px;
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  box-shadow: 0 0 8px var(--accent-danger-glow);
}

/* Dropdown Menu Component */
.dropdown-wrapper { position: relative; }
.dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 240px;
  background: rgba(13, 28, 66, 0.95);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 8px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6);
  display: none;
  flex-direction: column;
  gap: 4px;
  z-index: 1050;
}
.dropdown-wrapper.open .dropdown-menu {
  display: flex;
  animation: fadeInDown 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-beige);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: var(--transition-fast);
}
.dropdown-item:hover {
  background: rgba(252, 241, 208, 0.12);
  color: #FFFFFF;
}
.dropdown-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 4px 0;
}

.profile-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(13, 28, 66, 0.75);
  border: 1px solid var(--border-subtle);
  padding: 4px 12px 4px 4px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition-fast);
}
.profile-trigger:hover {
  border-color: var(--border-hover);
  background: rgba(34, 57, 111, 0.9);
}
.profile-avatar {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #0D1C42, #22396F);
  border: 1px solid rgba(252, 241, 208, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #FCF1D0;
}
.profile-name {
  font-size: 13px;
  font-weight: 600;
  color: #FFFFFF;
}

/* 2. Main Content Wrapper */
.main-wrapper {
  flex: 1;
  padding: 32px 36px;
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
}
.page-header-strip, .header-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  gap: 16px;
  flex-wrap: wrap;
}
.page-headline h2, .greeting h2 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #FFFFFF;
}
.page-headline p, .greeting p {
  color: var(--text-muted);
  font-size: 13.5px;
  margin-top: 3px;
}
.quick-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* 3. Global Footer */
.app-footer {
  border-top: 1px solid var(--border-subtle);
  background: rgba(1, 7, 54, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 24px 36px;
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-dim);
  flex-wrap: wrap;
  gap: 16px;
}
.footer-links { display: flex; align-items: center; gap: 20px; }
.footer-links a { color: var(--text-muted); text-decoration: none; transition: var(--transition-fast); }
.footer-links a:hover { color: #FFFFFF; }
@media (max-width: 1100px) {
  .top-header { padding: 0 16px; }
  .main-wrapper { padding: 20px 16px; }
  .nav-link-item a { padding: 5px 8px; font-size: 12px; gap: 4px; }
}
@media (max-width: 768px) {
  .header-nav { display: none; }
}
