/* ══════════════════════════════════════════════════════
   SITE HEADER — Navy & Gold theme (matches landing page)
   ══════════════════════════════════════════════════════ */

header { all: unset; display: block; }

.site-header {
  position: sticky; top: 0; z-index: 200;
  box-shadow: 0 1px 0 var(--border), 0 2px 20px rgba(28,56,41,0.06);
}

/* ── Brand bar ─────────────────────────────────────── */
.header-brand-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 32px; gap: 16px;
}

.header-branding {
  display: flex; align-items: center; gap: 14px;
}

.header-seal {
  width: 58px; height: 58px; flex-shrink: 0;
}
.header-seal svg { width: 100%; height: 100%; }

/* Restyle seal SVG colors to gold-on-navy */
.header-seal circle[fill] { fill: rgba(201,168,76,0.15); }
.header-seal circle[stroke] { stroke: rgba(201,168,76,0.6); }
.header-seal text { fill: #C9A84C; }

.header-brand-text {
  display: flex; flex-direction: column; gap: 1px;
}
.header-republic {
  font-size: 11px; font-style: italic;
  color: var(--text-muted); font-family: var(--sans);
}
.header-dept {
  font-size: 21px; font-weight: 800; line-height: 1.15;
  color: var(--accent); font-family: var(--serif); letter-spacing: -0.2px;
}
.header-division {
  font-size: 12px; font-weight: 500;
  color: var(--gold); font-family: var(--sans); letter-spacing: 0.04em;
}

.header-clock-wrap {
  text-align: right; flex-shrink: 0;
}
.header-clock-label {
  font-size: 11px; font-weight: 600; letter-spacing: 0.06em;
  color: var(--text-muted); font-family: var(--sans);
  text-transform: uppercase;
}
.header-clock {
  font-size: 13px; font-weight: 700;
  color: var(--accent); font-family: var(--mono); margin-top: 3px;
}

/* ── Nav bar ────────────────────────────────────────── */
.navbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.navbar-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center;
  padding: 0 32px; height: 48px; gap: 8px;
}

/* ── Nav list ─────────────────────────────────────── */
.navbar-links {
  list-style: none; display: flex; align-items: center;
  gap: 1px; flex: 1; height: 100%; min-width: 0;
}

/* ── Nav link ─────────────────────────────────────── */
.nav-link {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 13px; height: 48px;
  font-size: 12px; font-weight: 650; letter-spacing: 0.035em;
  color: var(--text-dim);
  text-decoration: none; cursor: pointer;
  background: none; border: none; border-bottom: 3px solid transparent;
  transition: all var(--transition);
  white-space: nowrap; font-family: var(--sans);
  box-sizing: border-box;
}
.nav-link svg { flex-shrink: 0; opacity: 0.7; }
.nav-link:hover {
  color: var(--accent);
  background: var(--accent-glow);
  border-bottom-color: rgba(26,61,43,0.25);
}
.nav-link.active {
  color: var(--accent);
  background: var(--gold-glow);
  border-bottom-color: var(--gold);
}
.nav-link.active svg { opacity: 1; color: var(--accent); }

/* ── Dropdown trigger ─────────────────────────────── */
.nav-dropdown-wrap { position: relative; height: 100%; display: flex; align-items: center; }

.dropdown-chevron {
  margin-left: 2px;
  transition: transform var(--transition);
}
.nav-dropdown-trigger[aria-expanded="true"] .dropdown-chevron {
  transform: rotate(180deg);
}
.nav-dropdown-trigger[aria-expanded="true"] {
  color: var(--accent);
  background: var(--gold-glow);
  border-bottom-color: var(--gold);
}

/* ── Dropdown panel ──────────────────────────────── */
.nav-dropdown {
  display: none;
  position: absolute; top: calc(100% + 4px); left: 0;
  min-width: 260px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  padding: 6px;
  z-index: 300;
  animation: dropdownIn 160ms ease;
}
.nav-dropdown.open { display: block; }

@keyframes dropdownIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.dropdown-header {
  font-family: var(--mono); font-size: 10px; font-weight: 700;
  letter-spacing: 0.1em; color: var(--text-muted);
  padding: 8px 12px 6px; text-transform: uppercase;
}

.dropdown-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 8px;
  text-decoration: none; color: var(--text);
  transition: all var(--transition); cursor: pointer;
}
.nav-dropdown button.dropdown-item { width: 100%; border: 0; font-family: var(--sans); text-align: left; }
.dropdown-item:hover { background: var(--surface-2); }
.dropdown-item.active { background: var(--gold-glow); }
.dropdown-item.active strong { color: var(--accent); }

.dropdown-icon {
  font-size: 20px; width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-2); border-radius: 8px; flex-shrink: 0;
}
.dropdown-item strong { display: block; font-size: 13px; font-weight: 600; }
.dropdown-item small  { display: block; font-size: 11px; color: var(--text-muted); margin-top: 1px; }

/* ── Right section ─────────────────────────────────── */
.navbar-right { margin-left: auto; display: flex; align-items: center; flex-shrink: 0; padding-left: 10px; border-left: 1px solid var(--border); }

@media (max-width: 1120px) {
  .nav-link { padding-inline: 10px; }
  .btn-nav--search kbd { display: none; }
}

/* Admin tools trigger button */
.btn-nav--admin-tools {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px; border-radius: 8px;
  font-size: 12px; font-weight: 700; font-family: var(--mono);
  background: rgba(201,168,76,0.10); border: 1px solid rgba(201,168,76,0.30);
  color: #7a5c1e; cursor: pointer; white-space: nowrap;
  transition: all 0.18s; letter-spacing: 0.03em;
}
.btn-nav--admin-tools:hover,
.btn-nav--admin-tools[aria-expanded="true"] {
  background: rgba(201,168,76,0.20); border-color: rgba(201,168,76,0.5);
}

/* Danger item in dropdown */
.dropdown-item--danger strong { color: var(--danger); }
.dropdown-item--danger .dropdown-icon { filter: grayscale(0); }

/* ── Hamburger (mobile) ─────────────────────────────── */
.hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer;
  padding: 4px; border-radius: 6px;
}
.hamburger span {
  display: block; width: 20px; height: 2px;
  background: var(--text-dim); border-radius: 2px;
  transition: all var(--transition);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Issuances Sub-tabs ─────────────────────────────── */
.issuance-subtabs {
  display: none;
  gap: 2px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 24px;
}
.issuance-subtabs.visible { display: flex; }

.issuance-tab {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 18px;
  font-size: 13px; font-weight: 600; color: var(--text-muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
  margin-bottom: -2px; font-family: var(--sans);
}
.issuance-tab:hover { color: var(--text); }
.issuance-tab.active {
  color: var(--accent);
  border-bottom-color: var(--gold);
}
.itab-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; opacity: 0.5;
}
.issuance-tab.active .itab-dot { opacity: 1; }

/* ── Issuance panel hero ────────────────────────────── */
.ipanel-hero {
  display: flex; align-items: center; gap: 16px;
  padding: 22px 28px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-mid) 100%);
  border: 1px solid rgba(201,168,76,0.3);
  border-radius: 14px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(201,168,76,0.15);
  position: relative; overflow: hidden;
}
.ipanel-hero::after {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 140px; height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201,168,76,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.ipanel-icon {
  font-size: 36px; flex-shrink: 0;
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(201,168,76,0.12); border-radius: 14px;
  border: 1px solid rgba(201,168,76,0.25);
}
.ipanel-title { font-size: 18px; font-weight: 800; color: #fff; margin-bottom: 3px; }
.ipanel-desc  { font-size: 12px; color: rgba(255,255,255,0.45); letter-spacing: 0.02em; }
.ipanel-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; flex-shrink: 0; }

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 768px) {
  .header-inner { padding: 8px 16px; }
  .header-dept { font-size: 16px; }
  .header-seal { width: 44px; height: 44px; }
  .header-clock-wrap { display: none; }

  .navbar-inner { padding: 0 16px; }

  .navbar-links {
    display: none; flex-direction: column; align-items: stretch;
    position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--border);
    padding: 8px 12px 12px; gap: 2px;
    box-shadow: var(--shadow-md);
    z-index: 199;
  }
  .navbar-links.mobile-open { display: flex; }
  .nav-link { height: auto; padding: 10px 14px; border-bottom: none; border-radius: 8px; }
  .nav-link:hover, .nav-link.active { border-bottom: none; }

  .nav-dropdown {
    position: static; box-shadow: none; border: 1px solid var(--border);
    animation: none; margin-top: 4px;
  }

  .hamburger { display: flex; }
  .app { padding: 0 16px 60px; }
}/* ─── DoTS Navbar Button ─────────────────────────────────── */
.btn-nav--dots {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 13px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-hi);
  background: var(--surface);
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-nav--dots:hover,
.btn-nav--dots[aria-expanded="true"] {
  border-color: var(--accent);
  background: var(--accent-glow);
  color: var(--accent);
}
.btn-nav--dots[aria-expanded="true"] {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ─── DoTS Panel ─────────────────────────────────────────── */
.dots-panel {
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  z-index: 300;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 12px 40px rgba(10, 24, 16, 0.12), 0 2px 8px rgba(10, 24, 16, 0.06);
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease, transform 200ms ease;
}
.dots-panel.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.dots-panel-inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 24px 32px;
  display: flex;
  gap: 32px;
  align-items: flex-start;
}

/* ─── Left: brand + search ───────────────────────────────── */
.dots-panel-left {
  flex: 0 0 300px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.dots-panel-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dots-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.dots-panel-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}
.dots-panel-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.dots-search-label {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 7px;
}

.dots-search-row {
  display: flex;
  gap: 0;
  border: 1.5px solid var(--border-hi);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.dots-search-row:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(26,61,43,0.08);
}

.dots-search-input {
  flex: 1;
  padding: 9px 12px;
  border: none;
  outline: none;
  background: var(--surface);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text);
  min-width: 0;
}
.dots-search-input::placeholder {
  color: var(--text-light);
}

.dots-search-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 9px 14px;
  background: var(--accent);
  color: #fff;
  border: none;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}
.dots-search-btn:hover { background: var(--accent-mid); }

/* ─── Divider ────────────────────────────────────────────── */
.dots-panel-divider {
  width: 1px;
  background: var(--border);
  align-self: stretch;
  flex-shrink: 0;
}

/* ─── Right: quick links ─────────────────────────────────── */
.dots-panel-right {
  flex: 1;
  min-width: 0;
}

.dots-links-label {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.dots-links-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dots-link-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  text-decoration: none;
  color: var(--text);
  transition: all var(--transition);
}
.dots-link-card:hover {
  border-color: var(--accent);
  background: var(--accent-glow);
  transform: translateX(2px);
}

.dots-link-icon {
  font-size: 18px;
  flex-shrink: 0;
  line-height: 1;
}

.dots-link-text {
  flex: 1;
  min-width: 0;
}
.dots-link-text strong {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}
.dots-link-text small {
  font-size: 11px;
  color: var(--text-muted);
}

.dots-link-arrow {
  color: var(--text-muted);
  flex-shrink: 0;
  transition: color var(--transition), transform var(--transition);
}
.dots-link-card:hover .dots-link-arrow {
  color: var(--accent);
  transform: translate(2px, -2px);
}

/* ─── Backdrop ───────────────────────────────────────────── */
.dots-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 299;
}
.dots-backdrop.active { display: block; }

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 720px) {
  .dots-panel-inner {
    flex-direction: column;
    gap: 20px;
    padding: 20px 16px;
  }
  .dots-panel-left { flex: none; width: 100%; }
  .dots-panel-divider { width: 100%; height: 1px; align-self: auto; }
  .btn-nav--dots span:not(svg) { display: none; }
}
