/* =========================================
   HFX.today — Shared Design System
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=DM+Mono:wght@400;500&display=swap');

:root {
  /* Brand */
  --brand-navy:   #0D1B2A;
  --brand-blue:   #1565C0;
  --brand-sky:    #2196F3;
  --brand-gold:   #F5A623;
  --brand-teal:   #00897B;
  --brand-red:    #D32F2F;
  --brand-green:  #388E3C;

  /* Surface */
  --bg-base:    #F0F4F8;
  --bg-card:    #FFFFFF;
  --bg-subtle:  #E8EEF5;
  --bg-dark:    #0D1B2A;

  /* Text */
  --text-primary:   #0D1B2A;
  --text-secondary: #4A6080;
  --text-muted:     #7A94B0;
  --text-inverse:   #FFFFFF;

  /* Border */
  --border-light: #DDE4EE;
  --border-mid:   #B8C8DC;

  /* Radius */
  --r-sm:  8px;
  --r-md:  14px;
  --r-lg:  20px;
  --r-xl:  28px;
  --r-pill: 999px;

  /* Shadow */
  --shadow-sm: 0 1px 4px rgba(13,27,42,0.06), 0 1px 2px rgba(13,27,42,0.04);
  --shadow-md: 0 4px 16px rgba(13,27,42,0.10), 0 1px 4px rgba(13,27,42,0.06);
  --shadow-lg: 0 12px 40px rgba(13,27,42,0.14), 0 4px 12px rgba(13,27,42,0.08);

  /* Transitions */
  --t-fast: 0.15s ease;
  --t-mid:  0.25s ease;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── TOPBAR ── */
.topbar {
  background: var(--brand-navy);
  padding: 0 0;
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 2px 20px rgba(0,0,0,0.35);
}

.topbar-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.logo {
  font-weight: 800;
  font-size: 1.3rem;
  color: #fff;
  text-decoration: none;
  letter-spacing: -0.5px;
  white-space: nowrap;
  flex-shrink: 0;
}

.logo em {
  color: var(--brand-gold);
  font-style: normal;
}

.nav-scroll {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1;
}

.nav-scroll::-webkit-scrollbar { display: none; }

.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--r-pill);
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  transition: all var(--t-fast);
}

.nav-link:hover { background: rgba(255,255,255,0.1); color: #fff; }
.nav-link.active { background: var(--brand-blue); color: #fff; }

.nav-link .icon { font-size: 0.95rem; }

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.topbar-time {
  font-family: 'DM Mono', monospace;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.45);
}

/* ── ALERT STRIP ── */
.alert-strip {
  background: var(--brand-red);
  color: #fff;
  padding: 8px 24px;
  font-size: 0.8rem;
  font-weight: 600;
  display: none;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}

.alert-strip.show { display: flex; }

.alert-strip-text {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.alert-strip-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 0 4px;
  flex-shrink: 0;
}

/* ── PAGE WRAPPER ── */
.page-wrap {
  max-width: 1320px;
  margin: 0 auto;
  padding: 28px 24px 80px;
}

/* ── SECTION HEADING ── */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
}

.section-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title::before {
  content: '';
  width: 3px;
  height: 14px;
  background: var(--brand-sky);
  border-radius: 2px;
  display: inline-block;
}

.section-link {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--brand-sky);
  text-decoration: none;
}

.section-link:hover { text-decoration: underline; }

/* ── CARD BASE ── */
.card {
  background: var(--bg-card);
  border-radius: var(--r-md);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card-pad { padding: 20px 22px; }

.card-header {
  padding: 16px 22px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.card-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── GRID SYSTEM ── */
.grid { display: grid; gap: 16px; }
.g-2 { grid-template-columns: repeat(2, 1fr); }
.g-3 { grid-template-columns: repeat(3, 1fr); }
.g-4 { grid-template-columns: repeat(4, 1fr); }
.g-2-1 { grid-template-columns: 2fr 1fr; }
.g-1-2 { grid-template-columns: 1fr 2fr; }
.g-3-1 { grid-template-columns: 3fr 1fr; }

/* ── BADGE ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.badge-blue   { background: #E3F2FD; color: #1565C0; }
.badge-green  { background: #E8F5E9; color: #2E7D32; }
.badge-gold   { background: #FFF8E1; color: #F57F17; }
.badge-red    { background: #FFEBEE; color: #C62828; }
.badge-teal   { background: #E0F2F1; color: #00695C; }
.badge-muted  { background: var(--bg-subtle); color: var(--text-secondary); }
.badge-navy   { background: var(--brand-navy); color: #fff; }

/* ── STATUS DOT ── */
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.dot-green  { background: #22c55e; }
.dot-gold   { background: #eab308; }
.dot-red    { background: #ef4444; }
.dot-muted  { background: #94a3b8; }

/* ── BUTTON ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 20px;
  border-radius: var(--r-pill);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  border: none;
  transition: all var(--t-fast);
  white-space: nowrap;
}

.btn-primary {
  background: var(--brand-blue);
  color: #fff;
}

.btn-primary:hover { background: #1976D2; transform: translateY(-1px); box-shadow: var(--shadow-md); }

.btn-ghost {
  background: transparent;
  color: var(--brand-sky);
  border: 1.5px solid var(--border-light);
}

.btn-ghost:hover { border-color: var(--brand-sky); background: #E3F2FD; }

.btn-gold {
  background: var(--brand-gold);
  color: var(--brand-navy);
}

.btn-gold:hover { background: #e8960e; transform: translateY(-1px); box-shadow: var(--shadow-md); }

/* ── TABS ── */
.tab-row {
  display: flex;
  gap: 6px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.tab-pill {
  padding: 6px 16px;
  border-radius: var(--r-pill);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid var(--border-light);
  background: var(--bg-card);
  color: var(--text-secondary);
  transition: all var(--t-fast);
}

.tab-pill.active { background: var(--brand-navy); border-color: var(--brand-navy); color: #fff; }
.tab-pill:hover:not(.active) { border-color: var(--brand-sky); color: var(--brand-sky); }

/* ── DIVIDER ── */
.divider { height: 1px; background: var(--border-light); margin: 0; }

/* ── LOADING SKELETON ── */
.skel {
  background: linear-gradient(90deg, var(--border-light) 0%, var(--bg-subtle) 50%, var(--border-light) 100%);
  background-size: 200% 100%;
  animation: skel-shimmer 1.6s infinite;
  border-radius: 6px;
}

@keyframes skel-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── SEARCH INPUT ── */
.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-wrap input {
  width: 100%;
  padding: 11px 16px 11px 42px;
  border: 1.5px solid var(--border-light);
  border-radius: var(--r-pill);
  font-family: inherit;
  font-size: 0.88rem;
  color: var(--text-primary);
  background: var(--bg-card);
  outline: none;
  transition: border-color var(--t-fast);
}

.search-wrap input:focus { border-color: var(--brand-sky); box-shadow: 0 0 0 3px rgba(33,150,243,0.12); }

.search-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  font-size: 1rem;
  pointer-events: none;
}

/* ── FOOTER ── */
.site-footer {
  background: var(--brand-navy);
  padding: 48px 24px 32px;
  margin-top: 60px;
}

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

.footer-logo {
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 10px;
}

.footer-logo em { color: var(--brand-gold); font-style: normal; }

.footer-desc {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.45);
  line-height: 1.7;
  margin-bottom: 16px;
}

.footer-col-title {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  margin-bottom: 12px;
}

.footer-links { list-style: none; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: rgba(255,255,255,0.55); text-decoration: none; font-size: 0.82rem; transition: color var(--t-fast); }
.footer-links a:hover { color: var(--brand-gold); }

.footer-bottom {
  max-width: 1320px;
  margin: 32px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.3);
  flex-wrap: wrap;
  gap: 8px;
}

.footer-bottom a { color: rgba(255,255,255,0.4); }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .g-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .g-2, .g-3, .g-4, .g-2-1, .g-1-2, .g-3-1 { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
  .page-wrap { padding: 20px 16px 60px; }
  .topbar-inner { padding: 0 16px; gap: 12px; }
}
