/* ============================================================================
   ESPOK CLIENT CYBER SECURITY PORTAL — UNIFIED EDR & EMAIL SECURITY STYLES
   Palette: Deep Navy (#072337) & Soft Teal (#78C2BF / #469d99)
   ============================================================================ */

:root {
  --navy-950: #041521;
  --navy-900: #072337;
  --navy-800: #0d3553;
  --navy-700: #16486b;
  --teal-300: #a3dad8;
  --teal-400: #78C2BF;
  --teal-500: #469d99;
  --teal-600: #337d79;
  --slate-50:  #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-500: #64748b;
  --slate-700: #334155;
  --slate-900: #0f172a;
  --green-500: #10b981;
  --green-600: #059669;
  --amber-500: #f59e0b;
  --red-500:   #ef4444;
  --radius-lg: 14px;
  --radius-md: 10px;
  --shadow-sm: 0 1px 3px rgba(7, 35, 55, 0.07);
  --shadow-md: 0 6px 20px rgba(7, 35, 55, 0.08);
  --shadow-xl: 0 20px 45px rgba(4, 21, 33, 0.35);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: #f0f4f8;
  color: var(--slate-900);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

.hidden {
  display: none !important;
}

.print-only {
  display: none;
}

/* ============================================================================
   LOGIN SCREEN (Same URL Client Authentication Gate)
   ============================================================================ */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 20% 20%, #0d3553 0%, #072337 55%, #041521 100%);
  position: relative;
  padding: 24px;
}

.login-bg-pattern {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(120, 194, 191, 0.12) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

.login-container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 460px;
}

.login-card {
  background: #ffffff;
  border-radius: 18px;
  padding: 36px 34px;
  box-shadow: var(--shadow-xl);
  border-top: 5px solid var(--teal-400);
}

.login-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
}

.espok-logo-lockup {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  user-select: none;
}

.login-logo-lockup {
  background: var(--navy-900);
  padding: 12px 20px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(7, 35, 55, 0.18);
}

.espok-emblem-svg {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.espok-wordmark {
  font-size: 27px;
  font-weight: 900;
  letter-spacing: 1.2px;
  color: #ffffff;
  line-height: 1;
  font-family: 'Inter', sans-serif;
}

.header-divider {
  width: 1px;
  height: 36px;
  background: rgba(120, 194, 191, 0.3);
  margin: 0 4px;
}

.brand-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  color: var(--teal-600);
  text-transform: uppercase;
}

.brand-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--navy-900);
  letter-spacing: -0.02em;
}

.login-subtitle {
  font-size: 13.5px;
  color: var(--slate-500);
  margin-bottom: 22px;
  line-height: 1.55;
}

.login-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  padding: 11px 14px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 16px;
}

.login-form .form-group {
  margin-bottom: 18px;
}

.login-form label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--navy-900);
  margin-bottom: 6px;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 13px;
  width: 18px;
  height: 18px;
  color: var(--slate-500);
  pointer-events: none;
}

.input-wrapper input {
  width: 100%;
  padding: 12px 14px 12px 40px;
  font-size: 14px;
  border: 1.5px solid var(--slate-200);
  border-radius: 10px;
  outline: none;
  transition: all 0.18s ease;
  color: var(--slate-900);
  background: var(--slate-50);
}

.input-wrapper input:focus {
  border-color: var(--teal-500);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(120, 194, 191, 0.22);
}

.pwd-toggle {
  position: absolute;
  right: 10px;
  background: transparent;
  border: none;
  font-size: 12px;
  font-weight: 600;
  color: var(--teal-600);
  cursor: pointer;
  padding: 4px 8px;
}

.btn-login {
  width: 100%;
  margin-top: 6px;
  padding: 13px 18px;
  background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-800) 100%);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-login:hover {
  background: linear-gradient(135deg, var(--navy-800) 0%, var(--teal-600) 100%);
  transform: translateY(-1px);
}

.login-security-badges {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--slate-200);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sec-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--slate-700);
  background: var(--slate-100);
  padding: 5px 10px;
  border-radius: 999px;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.dot-teal { background: var(--teal-500); }
.dot-green { background: var(--green-500); }
.dot-navy { background: var(--navy-900); }
.dot-amber { background: var(--amber-500); }
.dot-purple { background: #8b5cf6; }
.dot-red { background: var(--red-500); }

.login-footer {
  text-align: center;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  margin-top: 18px;
}

/* ============================================================================
   MAIN SHELL LAYOUT + LEFT SIDEBAR (Deep Navy #072337 + Teal #78C2BF)
   ============================================================================ */
.dashboard-shell {
  display: grid;
  grid-template-columns: 224px 1fr;
  min-height: 100vh;
  background: #F0F9F9;
}

.sidebar {
  background: linear-gradient(180deg, #072337 0%, #051929 100%);
  color: #d7eceb;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px 14px 18px 14px;
  user-select: none;
  border-right: 1px solid rgba(120, 194, 191, 0.15);
}

.brand-logo {
  padding: 4px 8px 24px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.sidebar-nav .nav-item {
  width: 100%;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 7px;
  color: #c5dce0;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s, color 0.15s;
}

.sidebar-nav .nav-item:hover {
  background: rgba(120, 194, 191, 0.12);
  color: #ffffff;
}

.sidebar-nav .nav-item.active {
  background: #0e3854;
  color: #ffffff;
  font-weight: 600;
  box-shadow: inset 3.5px 0 0 #78C2BF;
}

.sidebar-nav .nav-item.active .nav-icon {
  color: #78C2BF;
  opacity: 1;
}

.nav-icon {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
  opacity: 0.9;
}

.sidebar-bottom {
  padding: 0 8px;
  font-size: 12.5px;
  color: #b7d2d6;
}

.sidebar-divider {
  height: 1px;
  background: rgba(120, 194, 191, 0.18);
  margin: 14px 0;
}

.sidebar-services {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: #d2e7e9;
}

.sidebar-company strong {
  display: block;
  color: #78C2BF;
  font-size: 12.5px;
  font-weight: 700;
  margin-bottom: 4px;
}

.sidebar-company p {
  font-size: 12px;
  line-height: 1.45;
  color: #b7d2d6;
}

.company-link {
  display: inline-block;
  margin-top: 8px;
  color: #78C2BF;
  text-decoration: none;
  font-weight: 600;
  font-size: 12.5px;
}

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

.main-area {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
  background: #F0F9F9;
}

/* ============================================================================
   PORTAL HEADER & NAVIGATION
   ============================================================================ */
.portal-header {
  background: linear-gradient(90deg, var(--navy-950) 0%, var(--navy-900) 60%, var(--navy-800) 100%);
  color: #ffffff;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  border-bottom: 3px solid var(--teal-400);
}

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

.brand-logo-sm {
  width: 40px;
  height: 40px;
}

.header-kicker {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--teal-400);
  text-transform: uppercase;
}

.header-company-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-company {
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(16, 185, 129, 0.45);
  color: #6ee7b7;
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  letter-spacing: 0.05em;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 7px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.header-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.control-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.control-group label {
  font-size: 12px;
  color: var(--teal-300);
  font-weight: 600;
}

.portal-select {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border: 1px solid rgba(120, 194, 191, 0.38);
  border-radius: 8px;
  padding: 7px 11px;
  font-size: 12.5px;
  font-weight: 600;
  outline: none;
  cursor: pointer;
}

.portal-select option {
  background: var(--navy-900);
  color: #ffffff;
}

.panel-card .portal-select,
.modal-card .portal-select {
  background: #ffffff;
  color: var(--slate-900);
  border: 1px solid var(--slate-300);
}

.panel-card .portal-select option,
.modal-card .portal-select option {
  background: #ffffff;
  color: var(--slate-900);
}

.btn-header {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 13px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
}

.btn-teal {
  background: var(--teal-400);
  color: var(--navy-950);
}

.btn-teal:hover {
  background: var(--teal-300);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.16);
}

.modal-card .btn-outline {
  background: var(--slate-100);
  color: var(--slate-700);
  border: 1px solid var(--slate-300);
}

.user-session-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 10px;
  border-left: 1px solid rgba(255, 255, 255, 0.18);
}

.user-chip {
  font-size: 12px;
  font-weight: 600;
  color: var(--teal-300);
  background: rgba(120, 194, 191, 0.14);
  padding: 5px 10px;
  border-radius: 6px;
}

.btn-logout {
  background: rgba(239, 68, 68, 0.18);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.35);
  padding: 6px 11px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.btn-logout:hover {
  background: rgba(239, 68, 68, 0.32);
  color: #ffffff;
}

/* ============================================================================
   MAIN DASHBOARD CONTENT & BOTTOM FOOTER BAR
   ============================================================================ */
.portal-main {
  flex: 1;
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
  padding: 20px 26px 24px;
}

.report-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px 16px;
  font-size: 12.5px;
  color: #334e5e;
  border-top: 1px solid #d9ebeb;
  background: #F0F9F9;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 9px;
}

.footer-caption {
  font-size: 12px;
  color: #5a7684;
}

.managed-by {
  margin-left: 12px;
}

.sophos-logo-text {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: #005bc4;
}

.acronis-logo-text {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: #072337;
}

.veeam-logo-text {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: #059669;
}

.espok-footer-lockup {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.espok-footer-emblem {
  width: 24px;
  height: 24px;
}

.espok-footer-logo {
  font-size: 19px;
  font-weight: 900;
  letter-spacing: 1px;
  color: #072337;
}

.footer-center {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
  color: #072337;
}

.footer-center .sep {
  color: #5CACA8;
  font-weight: 400;
}

.footer-right {
  font-size: 12.5px;
  font-weight: 600;
  color: #072337;
}

.teal-accent-text {
  color: #3b9793;
  font-weight: 700;
}

.tab-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Posture Hero Banner */
.posture-hero {
  background: linear-gradient(120deg, var(--navy-900) 0%, var(--navy-800) 100%);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  box-shadow: var(--shadow-md);
}

.posture-hero-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.posture-score-ring {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: 4px solid var(--teal-400);
  background: rgba(120, 194, 191, 0.12);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.posture-score-ring span {
  font-size: 21px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.1;
}

.posture-score-ring small {
  font-size: 9px;
  font-weight: 700;
  color: var(--teal-300);
  letter-spacing: 0.08em;
}

.posture-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.posture-title-row h2 {
  font-size: 19px;
  font-weight: 800;
}

.posture-desc {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 4px;
}

.module-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.mod-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--teal-300);
  border: 1px solid rgba(120, 194, 191, 0.35);
}

.sync-meta {
  text-align: right;
  background: rgba(4, 21, 33, 0.45);
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid rgba(120, 194, 191, 0.25);
}

.sync-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--teal-400);
}

.sync-time {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  margin-top: 2px;
}

.sync-sub {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
}

/* KPI Grid 6 & Grid 4 */
.kpi-grid-6 {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}

.kpi-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.kpi-card {
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 16px 16px;
  box-shadow: var(--shadow-sm);
  border-top: 4px solid var(--navy-900);
}

.kpi-navy  { border-top-color: var(--navy-900); }
.kpi-teal  { border-top-color: var(--teal-500); }
.kpi-green { border-top-color: var(--green-500); }
.kpi-amber { border-top-color: var(--amber-500); }
.kpi-red   { border-top-color: var(--red-500); }

.kpi-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--slate-500);
  text-transform: uppercase;
}

.kpi-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--navy-900);
  margin: 6px 0 3px;
}

.kpi-sub {
  font-size: 11.5px;
  color: var(--slate-500);
  font-weight: 500;
}

/* Pillar Grid (2 Columns) */
.pillar-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.panel-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--slate-200);
}

.pillar-card {
  border-top: 4px solid var(--navy-900);
}

#overviewAcronisCard {
  border-top-color: var(--teal-500);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--slate-100);
}

.panel-header h3 {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--navy-900);
}

.panel-sub {
  font-size: 12px;
  color: var(--slate-500);
}

.pillar-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: 5px;
  margin-bottom: 4px;
}

.tag-sophos {
  background: rgba(7, 35, 55, 0.09);
  color: var(--navy-900);
}

.tag-acronis {
  background: rgba(70, 157, 153, 0.14);
  color: var(--teal-600);
}

.pillar-veeam {
  grid-column: 1 / -1;
  border-top: 4px solid #059669;
}

.tag-veeam {
  background: rgba(5, 150, 105, 0.13);
  color: #047857;
}

.veeam-metrics-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}

.veeam-inline-error {
  margin-top: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.25);
  color: #b91c1c;
  font-size: 12.5px;
  font-weight: 600;
}

.veeam-config-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  align-items: end;
}

.veeam-config-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 4px;
  gap: 12px;
  flex-wrap: wrap;
}

.veeam-toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy-900);
  cursor: pointer;
}

.source-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--slate-100);
  color: var(--slate-700);
}

.pillar-metrics-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.mini-stat {
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: 9px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
}

.mini-label {
  font-size: 11px;
  color: var(--slate-500);
  font-weight: 600;
}

.mini-stat strong {
  font-size: 18px;
  font-weight: 800;
  color: var(--navy-900);
  margin-top: 2px;
}

.text-green { color: var(--green-600) !important; }
.text-amber { color: var(--amber-500) !important; }
.text-red   { color: var(--red-500) !important; }

.pillar-split {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 18px;
  align-items: center;
}

.chart-donut-wrap {
  height: 165px;
  position: relative;
}

.chart-box-tall {
  height: 220px;
  position: relative;
}

/* Category Bars */
.category-bars {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.padded-bars {
  padding: 10px 0;
}

.cat-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cat-row-top {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  color: var(--slate-700);
}

.cat-track {
  height: 8px;
  background: var(--slate-100);
  border-radius: 999px;
  overflow: hidden;
}

.cat-fill {
  height: 100%;
  border-radius: 999px;
}

/* Status Pills */
.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
}

.status-optimal {
  background: #d1fae5;
  color: #065f46;
}

.status-warning {
  background: #fef3c7;
  color: #92400e;
}

.status-danger {
  background: #fee2e2;
  color: #991b1b;
}

/* Tables */
.table-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.portal-search {
  padding: 7px 12px;
  border: 1px solid var(--slate-300);
  border-radius: 8px;
  font-size: 12.5px;
  min-width: 220px;
  outline: none;
}

.portal-search:focus {
  border-color: var(--teal-500);
}

.table-responsive {
  overflow-x: auto;
}

.portal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.portal-table th {
  text-align: left;
  padding: 10px 12px;
  background: var(--slate-50);
  color: var(--slate-500);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--slate-200);
}

.portal-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--slate-100);
  color: var(--slate-700);
  vertical-align: middle;
}

.portal-table tbody tr:hover {
  background: var(--slate-50);
}

/* Executive Summary List */
.exec-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.exec-list li {
  position: relative;
  padding: 10px 12px 10px 34px;
  background: var(--slate-50);
  border-radius: 9px;
  font-size: 13px;
  color: var(--slate-700);
  border-left: 3px solid var(--teal-500);
}

.exec-list li::before {
  content: "✓";
  position: absolute;
  left: 12px;
  top: 10px;
  font-weight: 800;
  color: var(--teal-600);
}

.module-not-subscribed {
  padding: 36px 20px;
  text-align: center;
  background: var(--slate-50);
  border-radius: 10px;
  color: var(--slate-500);
  font-size: 13.5px;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 21, 33, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-card {
  background: #ffffff;
  border-radius: 14px;
  width: 100%;
  max-width: 560px;
  padding: 24px;
  box-shadow: var(--shadow-xl);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--slate-200);
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--slate-500);
}

.modal-form .form-group {
  margin-bottom: 14px;
}

.modal-form label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--navy-900);
  margin-bottom: 5px;
}

.modal-form input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--slate-300);
  border-radius: 8px;
  font-size: 13px;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.full-width {
  width: 100%;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.btn-xs {
  padding: 5px 9px;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid var(--slate-300);
  background: #ffffff;
  cursor: pointer;
  color: var(--navy-900);
}

.btn-xs:hover {
  background: var(--slate-100);
}

.inline-pwd-input {
  padding: 5px 9px;
  font-size: 12px;
  font-family: monospace;
  border: 1px solid var(--slate-300);
  border-radius: 6px;
  width: 155px;
  color: var(--navy-900);
  background: #f8fafc;
}

.inline-pwd-input:focus {
  outline: none;
  border-color: var(--teal-500);
  background: #ffffff;
}

.btn-save-pwd {
  background: var(--teal-400);
  color: var(--navy-950);
  border-color: var(--teal-500);
  font-weight: 700;
}

.btn-save-pwd:hover {
  background: var(--teal-300);
}

.portal-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--navy-900);
  color: #ffffff;
  border-left: 4px solid var(--teal-400);
  padding: 12px 18px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-xl);
  z-index: 2000;
}

/* Responsive */
@media (max-width: 1150px) {
  .kpi-grid-6 {
    grid-template-columns: repeat(3, 1fr);
  }
  .kpi-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .veeam-config-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .veeam-metrics-row {
    grid-template-columns: repeat(3, 1fr);
  }
  .pillar-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .kpi-grid-6,
  .kpi-grid-4,
  .veeam-config-grid {
    grid-template-columns: 1fr;
  }
  .veeam-metrics-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .pillar-split {
    grid-template-columns: 1fr;
  }
  .pillar-metrics-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================================================================
   1-PAGE EXECUTIVE PDF PRINT STYLESHEET
   ============================================================================ */
@media print {
  @page {
    size: A4 landscape;
    margin: 7mm;
  }

  body {
    background: #ffffff !important;
    font-size: 10px !important;
  }

  .no-print,
  #loginView {
    display: none !important;
  }

  .print-only {
    display: flex !important;
  }

  .print-banner {
    background: var(--navy-900) !important;
    color: #ffffff !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    padding: 10px 16px;
    border-radius: 8px;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    border-bottom: 3px solid var(--teal-400);
  }

  .print-kicker {
    font-size: 8.5px;
    color: var(--teal-400);
    font-weight: 700;
    letter-spacing: 0.08em;
  }

  .print-banner h1 {
    font-size: 16px;
    font-weight: 800;
  }

  .print-meta {
    font-size: 9.5px;
    color: var(--teal-300);
  }

  .print-score-box {
    text-align: right;
  }

  .print-score-label {
    font-size: 8px;
    color: var(--teal-400);
    font-weight: 700;
  }

  .print-score-val {
    font-size: 18px;
    font-weight: 800;
  }

  .portal-main {
    padding: 0 !important;
    max-width: 100% !important;
  }

  .posture-hero {
    display: none !important;
  }

  .tab-panel {
    display: none !important;
  }

  #tab-overview {
    display: flex !important;
    gap: 8px !important;
  }

  .kpi-grid-6 {
    grid-template-columns: repeat(6, 1fr) !important;
    gap: 6px !important;
  }

  .kpi-card {
    padding: 7px 9px !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .kpi-value {
    font-size: 15px !important;
    margin: 2px 0 !important;
  }

  .pillar-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }

  .panel-card {
    padding: 8px 11px !important;
    page-break-inside: avoid;
  }

  .chart-donut-wrap {
    height: 105px !important;
  }

  .chart-box-tall {
    height: 115px !important;
  }
}
