/* ═══════════════════════════════════════════════════════════════════
   PORTAL STYLESHEET — index.html specific styles
   Requires: styles.css
═══════════════════════════════════════════════════════════════════ */

/* ── PORTAL LAYOUT ──────────────────────────────────────────────── */
.layout { display: flex; height: 100vh; overflow: hidden; }

body { height: 100%; }
html, body { height: 100%; }

/* Portal main overrides */
.main {
  overflow-y: auto;
  height: 100vh;
}

/* ── SIDEBAR LOGO (full-width in portal) ────────────────────────── */
.sidebar-logo img { width: 100%; }

/* ── NAV HOME ITEM ──────────────────────────────────────────────── */
.nav-home {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; margin: 4px 8px; border-radius: var(--rs);
  color: var(--sidebar-txt); font-size: 13px; font-weight: 500;
  cursor: pointer; transition: all 0.14s;
}
.nav-home:hover, .nav-home.active { background: rgba(255,255,255,0.08); color: #fff; }
.nav-home .nh-icon { font-size: 14px; }

/* ── L1 SECTION HEADERS ─────────────────────────────────────────── */
.nav-l1-hdr {
  font-size: 9.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.8px; color: rgba(145,158,171,0.55);
  padding: 14px 20px 5px; user-select: none;
}
.nav-l1-hdr:not(:first-of-type) { margin-top: 6px; }

/* ── L2 EXPANDABLE ROWS ─────────────────────────────────────────── */
.nav-l2 {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 12px; margin: 1px 8px; border-radius: var(--rs);
  color: var(--sidebar-txt); font-size: 13px; font-weight: 500;
  cursor: pointer; transition: all 0.14s; user-select: none;
}
.nav-l2:hover { background: rgba(255,255,255,0.06); color: #fff; }
.nav-l2.active { background: rgba(255,255,255,0.1); color: #fff; }
.nav-l2-icon {
  width: 22px; height: 22px; border-radius: 6px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800;
}
.nav-l2-label { flex: 1; }
.nav-l2-arrow {
  font-size: 9px; color: rgba(145,158,171,0.4);
  transition: transform 0.2s; flex-shrink: 0;
}
.nav-l2.open .nav-l2-arrow { transform: rotate(90deg); }
.nav-l2.featured { color: #81C784; }
.nav-l2.featured:hover, .nav-l2.featured.active { background: rgba(46,125,50,0.2); color: #A5D6A7; }

/* ── L3 DOCUMENT LIST ───────────────────────────────────────────── */
.nav-l3-wrap { display: none; padding: 2px 8px 4px 8px; }
.nav-l3-wrap.open { display: block; }
.nav-l3 {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px 6px 28px; border-radius: 6px;
  color: rgba(145,158,171,0.7); font-size: 12px; font-weight: 400;
  cursor: pointer; transition: all 0.14s;
}
.nav-l3:hover { background: rgba(255,255,255,0.05); color: var(--sidebar-txt); }
.nav-l3.active { color: #fff; background: rgba(255,255,255,0.08); }
.nav-l3::before { content: '·'; color: rgba(145,158,171,0.3); flex-shrink: 0; }

/* ── NAV DIVIDER ────────────────────────────────────────────────── */
.nav-divider { height: 1px; background: rgba(255,255,255,0.05); margin: 6px 12px; }

/* ── WELCOME HERO ───────────────────────────────────────────────── */
.welcome-hero {
  background: linear-gradient(135deg, #161C24 0%, #1a2535 100%);
  border-radius: var(--r); padding: 36px 40px; margin-bottom: 24px;
  display: flex; align-items: center; gap: 32px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.16);
}
.hero-logo img { height: 48px; filter: brightness(0) invert(1); flex-shrink: 0; }
.hero-divider { width: 1px; height: 56px; background: rgba(255,255,255,0.12); flex-shrink: 0; }
.hero-text h1 { font-size: 24px; font-weight: 800; color: #fff; margin-bottom: 8px; }
.hero-text p { font-size: 14px; color: rgba(255,255,255,0.55); line-height: 1.6; max-width: 560px; }

/* ── STATS ROW (portal) ─────────────────────────────────────────── */
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.stat-card {
  background: var(--card); border-radius: var(--r); padding: 20px 22px;
  box-shadow: var(--shadow); cursor: pointer; transition: all 0.16s;
  border-left: 4px solid transparent;
  display: flex; flex-direction: column; gap: 10px;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(0,0,0,0.1); }
.stat-card-top { display: flex; align-items: center; gap: 12px; }
.stat-card-icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 800; flex-shrink: 0;
}
.stat-card-title { font-size: 14px; font-weight: 700; color: var(--txt1); }
.stat-card-desc  { font-size: 12px; color: var(--txt2); line-height: 1.45; }
.stat-card-count { margin-top: 4px; font-size: 11px; color: var(--txt2); }
.stat-card-count strong { font-size: 18px; font-weight: 800; color: var(--txt1); margin-right: 4px; }

/* ── FEATURED DX CARD ───────────────────────────────────────────── */
.featured-wrap { margin-bottom: 24px; }
.featured-card {
  background: linear-gradient(135deg, #1B5E20 0%, #2E7D32 100%);
  border-radius: var(--r); padding: 24px 28px;
  display: flex; align-items: center; gap: 20px;
  cursor: pointer; transition: all 0.16s; box-shadow: var(--shadow);
}
.featured-card:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(46,125,50,0.3); }
.featured-badge {
  background: rgba(255,255,255,0.15); border-radius: var(--rs);
  padding: 8px 14px; font-size: 11px; font-weight: 700;
  color: rgba(255,255,255,0.8); text-transform: uppercase; letter-spacing: 0.6px;
  white-space: nowrap; flex-shrink: 0;
}
.featured-info { flex: 1; }
.featured-info h2 { font-size: 18px; font-weight: 800; color: #fff; margin-bottom: 5px; }
.featured-info p  { font-size: 13px; color: rgba(255,255,255,0.65); line-height: 1.5; }
.featured-arrow { font-size: 22px; color: rgba(255,255,255,0.5); flex-shrink: 0; }

/* ── QUICK ACCESS GRID ──────────────────────────────────────────── */
.qa-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.qa-item {
  display: flex; align-items: center; gap: 14px;
  background: var(--bg); border-radius: var(--rs);
  padding: 14px 16px; cursor: pointer; transition: all 0.14s;
  border: 1px solid var(--border);
}
.qa-item:hover { background: var(--card); border-color: var(--green); transform: translateX(2px); }
.qa-icon {
  width: 34px; height: 34px; border-radius: 8px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 14px;
}
.qa-label { font-size: 13px; font-weight: 600; color: var(--txt1); margin-bottom: 2px; }
.qa-sub   { font-size: 11px; color: var(--txt2); }

/* ── SECTION PAGE HEADER ────────────────────────────────────────── */
.sec-hdr {
  background: var(--card); border-radius: var(--r); padding: 24px 28px;
  box-shadow: var(--shadow); margin-bottom: 20px;
  border-left: 4px solid transparent;
}
.sec-hdr-top { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.sec-hdr-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 800;
}
.sec-hdr-title { font-size: 20px; font-weight: 800; color: var(--txt1); }
.sec-hdr-desc  { font-size: 13.5px; color: var(--txt2); line-height: 1.6; }

/* ── DOCUMENT GRID ──────────────────────────────────────────────── */
.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.doc-card {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--bg); border-radius: var(--rs);
  padding: 14px 16px; cursor: pointer; transition: all 0.14s;
  border: 1px solid var(--border);
}
.doc-card:hover { background: var(--card); border-color: var(--green); }
.doc-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.doc-name { font-size: 13px; font-weight: 600; color: var(--txt1); margin-bottom: 3px; line-height: 1.35; }
.doc-type { font-size: 11px; color: var(--txt2); font-weight: 500; text-transform: uppercase; letter-spacing: 0.4px; }

/* ── SUB-SECTION GRID ───────────────────────────────────────────── */
.sub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.sub-card {
  background: var(--card); border-radius: var(--rs);
  padding: 18px 20px; cursor: pointer; transition: all 0.15s;
  box-shadow: var(--shadow); border-top: 3px solid transparent;
}
.sub-card:hover { transform: translateY(-2px); }
.sub-card-lbl  { font-size: 13px; font-weight: 700; color: var(--txt1); margin-bottom: 4px; }
.sub-card-info { font-size: 12px; color: var(--txt2); }

/* ── PILL VARIANTS (portal) ─────────────────────────────────────── */
.pill-blue   { background: #EFF6FF; color: #1D4ED8; }
.pill-green  { background: #F0FDF4; color: #15803D; }
.pill-orange { background: #FFF7ED; color: #C2410C; }
.pill-grey   { background: #F1F5F9; color: #475569; }

/* ── COMING SOON PAGE ───────────────────────────────────────────── */
.coming-soon { text-align: center; padding: 80px 40px; color: var(--txt2); }
.coming-soon-icon { font-size: 48px; margin-bottom: 16px; opacity: 0.35; }
.coming-soon h3 { font-size: 18px; font-weight: 700; color: var(--txt1); margin-bottom: 8px; }
.coming-soon p  { font-size: 14px; line-height: 1.6; max-width: 380px; margin: 0 auto; }

/* ── PORTAL-SPECIFIC RESPONSIVE ─────────────────────────────────── */
@media (max-width: 720px) {
  .stats-row { grid-template-columns: 1fr 1fr; }
  .welcome-hero { flex-direction: column; align-items: flex-start; gap: 16px; padding: 24px; }
  .hero-divider { display: none; }
}
