/* HHBM Auth & Landing — modern portal styles */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

:root {
  --ap-green-900: #1b5e20;
  --ap-green-700: #2e7d32;
  --ap-green-500: #43a047;
  --ap-green-100: #e8f5e9;
  --ap-gold: #f9a825;
  --ap-navy: #0d2137;
  --ap-text: #1f2937;
  --ap-muted: #6b7280;
  --ap-border: #e5e7eb;
  --ap-white: #ffffff;
  --ap-shadow: 0 20px 50px rgba(13, 33, 55, 0.12);
  --ap-radius: 16px;
}

* { box-sizing: border-box; }

body.ap-auth-body,
body.ap-landing-body {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  color: var(--ap-text);
  background: #f3f6f4;
  min-height: 100vh;
}

/* ========== AUTH SPLIT LAYOUT ========== */
.ap-auth-wrap {
  display: flex;
  min-height: 100vh;
}

.ap-auth-brand {
  flex: 1.1;
  background: linear-gradient(145deg, var(--ap-navy) 0%, #123524 45%, var(--ap-green-700) 100%);
  color: #fff;
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.ap-auth-brand::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(67, 160, 71, 0.35) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(249, 168, 37, 0.15) 0%, transparent 40%);
  pointer-events: none;
}

.ap-auth-brand-inner {
  position: relative;
  z-index: 1;
  max-width: 480px;
  margin: 0 auto;
}

.ap-auth-brand img.ap-tn-logo {
  width: 88px;
  height: auto;
  margin-bottom: 24px;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,.2));
}

.ap-auth-brand h1 {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 8px;
}

.ap-auth-brand .ap-dept {
  font-size: 1rem;
  opacity: 0.9;
  margin-bottom: 32px;
  font-weight: 500;
}

.ap-feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ap-feature-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  font-size: 0.95rem;
  opacity: 0.92;
}

.ap-feature-list li i {
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,.12);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--ap-gold);
}

.ap-auth-form-side {
  flex: 0.9;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  background: linear-gradient(180deg, #f8faf9 0%, #eef3ef 100%);
}

.ap-auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--ap-white);
  border-radius: var(--ap-radius);
  box-shadow: var(--ap-shadow);
  padding: 36px 32px;
  border: 1px solid var(--ap-border);
}

.ap-auth-card h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--ap-green-900);
  margin: 0 0 6px;
  text-align: center;
}

.ap-auth-card .ap-subtitle {
  text-align: center;
  color: var(--ap-muted);
  font-size: 0.875rem;
  margin-bottom: 28px;
}

.ap-field {
  margin-bottom: 18px;
}

.ap-field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ap-text);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.ap-field input[type="text"],
.ap-field input[type="password"] {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--ap-border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color .2s, box-shadow .2s;
}

.ap-field input:focus {
  outline: none;
  border-color: var(--ap-green-500);
  box-shadow: 0 0 0 3px rgba(67, 160, 71, 0.15);
}

.ap-captcha-row {
  display: flex;
  gap: 12px;
  align-items: center;
}

.ap-captcha-row img {
  border-radius: 8px;
  border: 1px solid var(--ap-border);
  flex-shrink: 0;
}

.ap-captcha-row input {
  flex: 1;
}

.ap-btn-primary {
  width: 100%;
  padding: 13px 20px;
  background: linear-gradient(135deg, var(--ap-green-700), var(--ap-green-500));
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
  box-shadow: 0 4px 14px rgba(46, 125, 50, 0.35);
}

.ap-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(46, 125, 50, 0.4);
}

.ap-btn-secondary {
  background: transparent;
  border: 1px solid var(--ap-green-700);
  color: var(--ap-green-700);
  padding: 10px 16px;
  border-radius: 10px;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.875rem;
}

.ap-auth-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
  font-size: 0.85rem;
}

.ap-auth-links a {
  color: var(--ap-green-700);
  text-decoration: none;
  font-weight: 500;
}

.ap-auth-links a:hover {
  text-decoration: underline;
}

.ap-error {
  background: #fef2f2;
  color: #b91c1c;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.875rem;
  margin-top: 16px;
  text-align: center;
}

.ap-msg-ok {
  color: var(--ap-green-700);
  font-size: 0.875rem;
  text-align: center;
  margin-top: 12px;
}

/* ========== LANDING PAGE ========== */
.ap-landing-header {
  background: var(--ap-white);
  box-shadow: 0 2px 16px rgba(0,0,0,.06);
  position: sticky;
  top: 0;
  z-index: 100;
}

.ap-landing-header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.ap-landing-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.ap-landing-brand img {
  height: 64px;
  width: auto;
}

.ap-landing-brand-text h1 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ap-green-900);
  margin: 0;
  line-height: 1.3;
}

.ap-landing-brand-text p {
  margin: 2px 0 0;
  font-size: 0.8rem;
  color: var(--ap-muted);
}

.ap-landing-nav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--ap-green-700), var(--ap-green-500));
  color: #fff !important;
  text-decoration: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 4px 12px rgba(46,125,50,.3);
  transition: transform .15s;
}

.ap-landing-nav a:hover {
  transform: translateY(-1px);
  color: #fff;
}

.ap-landing-hero {
  background: linear-gradient(135deg, var(--ap-green-900) 0%, var(--ap-green-700) 100%);
  color: #fff;
  padding: 40px 24px 48px;
  text-align: center;
}

.ap-landing-hero h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 8px;
}

.ap-landing-hero p {
  opacity: 0.9;
  margin: 0;
  font-size: 1rem;
}

.ap-landing-main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 28px 24px 48px;
}

.ap-report-card {
  background: var(--ap-white);
  border-radius: var(--ap-radius);
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  border: 1px solid var(--ap-border);
  overflow: hidden;
}

.ap-report-card-header {
  background: linear-gradient(135deg, var(--ap-green-800, #2e7d32), var(--ap-green-500));
  color: #fff;
  padding: 16px 24px;
  font-weight: 600;
  font-size: 1.05rem;
}

.ap-report-card-body {
  padding: 24px;
}

.ap-landing-footer {
  text-align: center;
  padding: 20px;
  color: var(--ap-muted);
  font-size: 0.8rem;
  border-top: 1px solid var(--ap-border);
  background: var(--ap-white);
}

/* ========== PUBLIC PORTAL v2 ========== */
.ap-landing-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.ap-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  color: var(--ap-green-700) !important;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.82rem;
  background: var(--ap-green-100);
  box-shadow: none !important;
}

.ap-nav-link:hover {
  background: #dcedc8;
  transform: none;
  color: var(--ap-green-900) !important;
}

.ap-nav-highlight {
  background: linear-gradient(135deg, #1565c0, #42a5f5) !important;
  color: #fff !important;
}

.ap-nav-highlight:hover {
  color: #fff !important;
  background: linear-gradient(135deg, #0d47a1, #1565c0) !important;
}

.ap-nav-login {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: linear-gradient(135deg, var(--ap-green-700), var(--ap-green-500));
  color: #fff !important;
  text-decoration: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 4px 12px rgba(46,125,50,.3);
}

.ap-landing-hero-v2 {
  padding: 36px 24px 40px;
}

.ap-landing-hero-compact {
  padding: 18px 24px 22px;
}

.ap-hero-eyebrow {
  margin: 0 0 6px;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.82;
}

.ap-landing-hero-compact h2 {
  font-size: 1.35rem;
  margin: 0;
}

.ap-hero-inner {
  max-width: 720px;
  margin: 0 auto;
}

.ap-section {
  margin-bottom: 40px;
}

.ap-section-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ap-green-900);
  margin: 0 0 6px;
}

.ap-section-title i {
  color: var(--ap-green-700);
  margin-right: 8px;
}

.ap-section-note {
  font-size: 0.85rem;
  color: var(--ap-muted);
  margin: 0 0 20px;
}

.ap-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.ap-kpi-card {
  background: var(--ap-white);
  border-radius: var(--ap-radius);
  padding: 20px;
  border: 1px solid var(--ap-border);
  box-shadow: 0 4px 16px rgba(0,0,0,.04);
}

.ap-kpi-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--ap-green-100);
  color: var(--ap-green-700);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 12px;
}

.ap-kpi-label {
  font-size: 0.8rem;
  color: var(--ap-muted);
  font-weight: 500;
}

.ap-kpi-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--ap-navy);
  line-height: 1.2;
  margin: 4px 0;
}

.ap-kpi-sub {
  font-size: 0.75rem;
  color: var(--ap-muted);
}

.ap-portal-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.ap-portal-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px;
  background: var(--ap-white);
  border: 1px solid var(--ap-border);
  border-radius: 12px;
  text-decoration: none !important;
  color: inherit;
  transition: transform .15s, box-shadow .15s;
}

.ap-portal-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
  border-color: var(--ap-green-500);
}

.ap-portal-card strong {
  font-size: 0.95rem;
  color: var(--ap-green-900);
}

.ap-portal-card span:last-child {
  font-size: 0.78rem;
  color: var(--ap-muted);
}

.ap-portal-card-accent {
  border-color: #90caf9;
  background: linear-gradient(135deg, #e3f2fd 0%, #fff 100%);
}

.ap-portal-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--ap-green-100);
  color: var(--ap-green-700);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.ap-portal-card-accent .ap-portal-icon {
  background: #bbdefb;
  color: #1565c0;
}

.ap-breadcrumb {
  font-size: 0.85rem;
  padding: 4px 0;
}

.ap-bc-link {
  color: var(--ap-green-700);
  text-decoration: none;
  font-weight: 600;
}

.ap-bc-link:hover {
  text-decoration: underline;
}

.ap-bc-sep {
  color: var(--ap-muted);
  margin: 0 4px;
}

.ap-bc-current {
  color: var(--ap-text);
  font-weight: 600;
}

.ap-drill-link {
  color: var(--ap-green-700);
  font-weight: 600;
  text-decoration: none;
}

.ap-drill-link:hover {
  text-decoration: underline;
}

.ap-total-row {
  background: var(--ap-green-100) !important;
}

/* ========== PUBLIC OVERVIEW — Angular-style dashboard ========== */
.ap-overview-root {
  --ov-primary: #1565c0;
  --ov-teal: #00838f;
  --ov-green: #2e7d32;
  --ov-gold: #f57c00;
  --ov-surface: #ffffff;
  --ov-muted: #64748b;
  --ov-border: #e2e8f0;
  --ov-shadow: 0 10px 40px rgba(15, 23, 42, 0.08);
  margin-bottom: 48px;
}

.ap-overview-root .material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  vertical-align: middle;
  line-height: 1;
}

.ap-overview-root .material-symbols-outlined.filled {
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.ap-overview-shell {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.ap-overview-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 32px;
  border-radius: 20px;
  background: linear-gradient(135deg, #0d2137 0%, #1b4332 52%, #2e7d32 100%);
  color: #fff;
  box-shadow: var(--ov-shadow);
  position: relative;
  overflow: hidden;
}

.ap-overview-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 85% 15%, rgba(255, 255, 255, 0.14) 0%, transparent 42%),
    radial-gradient(circle at 10% 90%, rgba(249, 168, 37, 0.18) 0%, transparent 38%);
  pointer-events: none;
}

.ap-overview-hero-copy,
.ap-overview-as-on {
  position: relative;
  z-index: 1;
}

.ap-overview-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 12px;
}

.ap-overview-hero-copy h2 {
  margin: 0 0 8px;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 700;
}

.ap-overview-hero-copy p {
  margin: 0;
  max-width: 560px;
  opacity: 0.88;
  font-size: 0.95rem;
  line-height: 1.55;
}

.ap-overview-as-on {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  min-width: 180px;
}

.ap-overview-as-on label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.75;
  margin-bottom: 2px;
}

.ap-overview-as-on strong {
  font-size: 1rem;
  font-weight: 600;
}

.ap-overview-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.ap-stat-card {
  background: var(--ov-surface);
  border: 1px solid var(--ov-border);
  border-radius: 18px;
  padding: 22px 20px 20px;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.ap-stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
}

.ap-stat-card--green::before { background: linear-gradient(90deg, #2e7d32, #66bb6a); }
.ap-stat-card--teal::before { background: linear-gradient(90deg, #00838f, #26c6da); }
.ap-stat-card--blue::before { background: linear-gradient(90deg, #1565c0, #42a5f5); }
.ap-stat-card--gold::before { background: linear-gradient(90deg, #ef6c00, #ffb74d); }

.ap-stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--ov-shadow);
}

.ap-stat-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.ap-stat-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}

.ap-stat-card--green .ap-stat-icon { background: #e8f5e9; color: #2e7d32; }
.ap-stat-card--teal .ap-stat-icon { background: #e0f7fa; color: #00838f; }
.ap-stat-card--blue .ap-stat-icon { background: #e3f2fd; color: #1565c0; }
.ap-stat-card--gold .ap-stat-icon { background: #fff3e0; color: #ef6c00; }

.ap-stat-tag {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ov-muted);
}

.ap-stat-value {
  font-size: clamp(1.6rem, 2.2vw, 2rem);
  font-weight: 700;
  color: #0f172a;
  line-height: 1.15;
  margin-bottom: 6px;
  font-variant-numeric: tabular-nums;
}

.ap-stat-label {
  margin: 0;
  font-size: 0.82rem;
  color: var(--ov-muted);
  line-height: 1.4;
}

.ap-overview-panel {
  background: var(--ov-surface);
  border: 1px solid var(--ov-border);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.04);
}

.ap-overview-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.ap-overview-toolbar h3 {
  margin: 0 0 4px;
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
}

.ap-overview-toolbar p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--ov-muted);
}

.ap-overview-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: min(100%, 280px);
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--ov-border);
  background: #f8fafc;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.ap-overview-search:focus-within {
  border-color: #94a3b8;
  box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.12);
  background: #fff;
}

.ap-overview-search input {
  border: 0;
  outline: 0;
  background: transparent;
  width: 100%;
  font-family: inherit;
  font-size: 0.9rem;
  color: #0f172a;
}

.ap-overview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.ap-quick-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid var(--ov-border);
  background: #fff;
  text-decoration: none !important;
  color: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.ap-quick-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
}

.ap-quick-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.4rem;
}

.ap-quick-card--green .ap-quick-card-icon { background: #e8f5e9; color: #2e7d32; }
.ap-quick-card--green:hover { border-color: #81c784; }
.ap-quick-card--teal .ap-quick-card-icon { background: #e0f7fa; color: #00838f; }
.ap-quick-card--teal:hover { border-color: #4dd0e1; }
.ap-quick-card--blue .ap-quick-card-icon { background: #e3f2fd; color: #1565c0; }
.ap-quick-card--blue:hover { border-color: #64b5f6; }
.ap-quick-card--purple .ap-quick-card-icon { background: #ede7f6; color: #5e35b1; }
.ap-quick-card--purple:hover { border-color: #b39ddb; }
.ap-quick-card--orange .ap-quick-card-icon { background: #fff3e0; color: #ef6c00; }
.ap-quick-card--orange:hover { border-color: #ffb74d; }
.ap-quick-card--navy .ap-quick-card-icon { background: #eceff1; color: #0d2137; }
.ap-quick-card--navy:hover { border-color: #90a4ae; }

.ap-quick-card-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.ap-quick-card-body strong {
  font-size: 0.92rem;
  color: #0f172a;
  font-weight: 600;
}

.ap-quick-card-body span {
  font-size: 0.78rem;
  color: var(--ov-muted);
  line-height: 1.35;
}

.ap-quick-card-arrow {
  color: #94a3b8;
  transition: transform 0.18s ease, color 0.18s ease;
}

.ap-quick-card:hover .ap-quick-card-arrow {
  transform: translateX(4px);
  color: #475569;
}

.ap-section-modern {
  margin-bottom: 40px;
}

.ap-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.ap-section-head .ap-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.2rem;
}

.ap-section-badge {
  padding: 8px 14px;
  border-radius: 999px;
  background: #e8f5e9;
  color: #1b5e20;
  font-size: 0.78rem;
  font-weight: 600;
}

.ap-report-card-modern {
  border-radius: 18px;
  overflow: hidden;
}

.ap-modern-table thead {
  background: #f8fafc;
}

.ap-modern-table thead th {
  border-bottom: 1px solid var(--ov-border);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ov-muted);
  font-weight: 600;
  padding: 14px 16px;
}

.ap-modern-table tbody td {
  padding: 14px 16px;
  vertical-align: middle;
}

@media (max-width: 1100px) {
  .ap-overview-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ap-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .ap-overview-hero {
    padding: 22px 20px;
  }
  .ap-overview-stats,
  .ap-overview-grid {
    grid-template-columns: 1fr;
  }
  .ap-overview-panel {
    padding: 18px;
  }
}

@media (max-width: 900px) {
  .ap-landing-nav {
    width: 100%;
    justify-content: flex-start;
  }
  .ap-auth-wrap {
    flex-direction: column;
  }
  .ap-auth-brand {
    padding: 32px 24px;
    min-height: auto;
  }
  .ap-auth-brand h1 {
    font-size: 1.35rem;
  }
  .ap-feature-list {
    display: none;
  }
}

/* ========== PUBLIC WEBSITE (simple overview) ========== */
.ap-site-section {
  margin-bottom: 36px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--ap-border);
}

.ap-site-section:last-of-type {
  border-bottom: 0;
}

.ap-site-intro h2 {
  margin: 0 0 4px;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--ap-green-900);
}

.ap-site-muted {
  margin: 0 0 16px;
  color: var(--ap-muted);
  font-size: 0.88rem;
}

.ap-site-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.ap-site-stat {
  background: #fff;
  border: 1px solid var(--ap-border);
  border-radius: 8px;
  padding: 16px;
  text-align: center;
}

.ap-site-stat-label {
  display: block;
  font-size: 0.78rem;
  color: var(--ap-muted);
  margin-bottom: 6px;
}

.ap-site-stat strong {
  display: block;
  font-size: 1.35rem;
  color: var(--ap-navy);
  font-weight: 700;
}

.ap-site-links h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 10px;
  color: var(--ap-text);
}

.ap-site-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ap-site-link {
  display: inline-block;
  padding: 10px 16px;
  border: 1px solid var(--ap-border);
  border-radius: 6px;
  background: #fff;
  color: var(--ap-green-900) !important;
  text-decoration: none !important;
  font-size: 0.88rem;
  font-weight: 500;
}

.ap-site-link:hover {
  border-color: var(--ap-green-500);
  background: var(--ap-green-100);
}

.ap-site-link-primary {
  background: var(--ap-green-700);
  border-color: var(--ap-green-700);
  color: #fff !important;
}

.ap-site-link-primary:hover {
  background: var(--ap-green-900);
  border-color: var(--ap-green-900);
  color: #fff !important;
}

.ap-site-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
  margin-bottom: 14px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--ap-border);
  border-radius: 8px;
}

.ap-site-filter {
  min-width: 140px;
}

.ap-site-filter-grow {
  flex: 1;
  min-width: 180px;
}

.ap-site-filter-actions {
  display: flex;
  gap: 6px;
  align-items: flex-end;
}

.ap-site-filter label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ap-muted);
  margin-bottom: 4px;
  text-transform: uppercase;
}

.ap-site-table-wrap {
  background: #fff;
  border: 1px solid var(--ap-border);
  border-radius: 8px;
  overflow: auto;
}

.ap-site-table {
  margin: 0;
  font-size: 0.85rem;
}

.ap-site-table thead th {
  background: #f8faf9;
  white-space: nowrap;
}

.ap-site-pagination {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
}

@media (max-width: 900px) {
  .ap-site-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .ap-site-stats {
    grid-template-columns: 1fr;
  }
  .ap-site-filter {
    width: 100%;
    min-width: 0;
  }
}
