/* God's Ground — StreamGuard Theme (Official Blue, Crimson Red & Crisp White) */
:root {
  /* God's Ground Brand Palette */
  --gg-blue: #0d598b;
  --gg-blue-mid: #145e8f;
  --gg-blue-bright: #1e78b4;
  --gg-blue-light: #7cc4f5;
  --gg-red: #a31b16;
  --gg-red-bright: #c92a24;
  --gg-red-soft: #f87171;
  --gg-white: #ffffff;

  /* Dark Admin Surfaces anchored in Deep God's Ground Navy-Blue */
  --bg: #071522;
  --bg-elevated: #0a1d2e;
  --bg-card: #0e253a;
  --bg-card-hover: #13304a;
  --border: #1d3c58;
  --text: #f8fafc;
  --text-muted: #9eb7ce;
  --primary: var(--gg-blue-mid);
  --primary-hover: var(--gg-blue-bright);
  --blue: var(--gg-blue-bright);
  --emerald: #10b981;
  --amber: #f59e0b;
  --rose: var(--gg-red-bright);
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 14px 36px rgba(2, 10, 18, 0.48);

  /* Light Client Portal Theme (Crisp White + God's Ground Blue & Red accents) */
  --c-bg: #f4f7fa;
  --c-card: #ffffff;
  --c-border: #d7e2ec;
  --c-text: #0b2236;
  --c-muted: #526b82;
  --c-brand: var(--gg-blue);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.hidden {
  display: none !important;
}

.muted {
  color: var(--text-muted);
}

.small {
  font-size: 0.84rem;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.84rem;
}

.gg-red-text {
  color: #e2534d;
  font-weight: 600;
}

/* Centered screens */
.centered-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at 18% 15%, rgba(20, 94, 143, 0.42), transparent 48%),
    radial-gradient(circle at 85% 88%, rgba(163, 27, 22, 0.22), transparent 46%),
    linear-gradient(160deg, #06131f 0%, #092034 60%, #071522 100%);
}

.loading-logo {
  width: 64px;
  height: auto;
  margin-bottom: 14px;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.4));
}

.spinner {
  width: 34px;
  height: 34px;
  border: 3px solid rgba(255, 255, 255, 0.14);
  border-top-color: var(--gg-blue-light);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
  margin-bottom: 12px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Login Card */
.login-card {
  width: 100%;
  max-width: 450px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 4px solid var(--gg-red);
  border-radius: 18px;
  padding: 30px 32px 28px;
  box-shadow: var(--shadow);
}

.login-brand-hero {
  background: linear-gradient(135deg, #0a3454 0%, #0d598b 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  padding: 18px 20px 14px;
  margin-bottom: 22px;
  text-align: center;
}

.login-logo-wide {
  width: 100%;
  max-width: 320px;
  height: auto;
  display: block;
  margin: 0 auto 12px;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.28));
}

.login-sub-bar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(7, 21, 34, 0.42);
  padding: 5px 12px;
  border-radius: 99px;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.sub-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gg-red-bright);
  box-shadow: 0 0 8px var(--gg-red-bright);
}

.login-footer {
  margin-top: 18px;
  text-align: center;
}

.demo-pill {
  background: rgba(20, 94, 143, 0.24);
  border: 1px solid rgba(124, 196, 245, 0.35);
  color: #e0f2fe;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 0.84rem;
  margin-bottom: 18px;
}

.demo-pill span {
  font-weight: 700;
  color: #fff;
}

.demo-quick {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.demo-quick p {
  margin: 0 0 10px;
}

.stack-md {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

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

.row-between {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* Forms & Controls */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 0.84rem;
  font-weight: 600;
  color: #d6e6f5;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="url"],
input[type="search"],
select {
  background: #081826;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 0.93rem;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus, select:focus {
  border-color: var(--gg-blue-light);
  box-shadow: 0 0 0 3px rgba(20, 94, 143, 0.35);
}

.inline-error {
  background: rgba(163, 27, 22, 0.2);
  border: 1px solid rgba(201, 42, 36, 0.55);
  color: #fecaca;
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: 0.86rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 9px 15px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-sm {
  padding: 6px 11px;
  font-size: 0.82rem;
}

.btn-block {
  width: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gg-blue) 0%, var(--gg-blue-bright) 100%);
  border-color: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  filter: brightness(1.1);
}

.btn-danger {
  background: linear-gradient(135deg, var(--gg-red) 0%, var(--gg-red-bright) 100%);
  color: #fff;
}

.btn-danger:hover:not(:disabled) {
  filter: brightness(1.1);
}

.btn-amber {
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(245, 158, 11, 0.45);
  color: #fcd34d;
}

.btn-amber:hover:not(:disabled) {
  background: rgba(245, 158, 11, 0.26);
}

.btn-emerald {
  background: rgba(16, 185, 129, 0.16);
  border-color: rgba(16, 185, 129, 0.45);
  color: #6ee7b7;
}

.btn-emerald:hover:not(:disabled) {
  background: rgba(16, 185, 129, 0.26);
}

.btn-outline {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn-outline:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--gg-blue-light);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}

.btn-ghost:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

/* Admin Layout */
.admin-layout {
  display: grid;
  grid-template-columns: 268px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: linear-gradient(180deg, #092035 0%, #071625 100%);
  border-right: 1px solid var(--border);
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px 14px;
  margin-bottom: 18px;
  background: rgba(13, 89, 139, 0.22);
  border: 1px solid rgba(124, 196, 245, 0.2);
  border-bottom: 3px solid var(--gg-red);
  border-radius: 12px;
}

.sidebar-logo-badge {
  width: 44px;
  height: auto;
  flex-shrink: 0;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.35));
}

.brand-name {
  font-weight: 800;
  font-size: 1.06rem;
  letter-spacing: -0.01em;
  color: #ffffff;
  line-height: 1.15;
}

.brand-product {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gg-blue-light);
  margin-top: 1px;
}

.mode-tag {
  display: inline-block;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #ffffff;
  background: var(--gg-red);
  padding: 2px 7px;
  border-radius: 99px;
  margin-top: 4px;
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: transparent;
  border: 1px solid transparent;
  border-left: 3px solid transparent;
  color: var(--text-muted);
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all 0.14s;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.nav-item.active {
  background: rgba(13, 89, 139, 0.34);
  border-color: rgba(124, 196, 245, 0.25);
  border-left-color: var(--gg-red-bright);
  color: #fff;
}

.nav-ico {
  font-size: 1.05rem;
}

.demo-sidebar-box {
  background: rgba(13, 89, 139, 0.18);
  border: 1px dashed rgba(124, 196, 245, 0.42);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.demo-box-title {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gg-blue-light);
  font-weight: 700;
}

.user-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.user-name {
  font-weight: 600;
  font-size: 0.92rem;
}

.main-content {
  padding: 28px 34px 48px;
  max-width: 1320px;
  width: 100%;
  margin: 0 auto;
}

.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 22px;
}

.page-header h2 {
  margin: 0;
  font-size: 1.55rem;
  letter-spacing: -0.02em;
}

.page-header p {
  margin: 4px 0 0;
}

/* Status Banner */
.status-banner {
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid;
}

.status-healthy {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.35);
}

.status-attention {
  background: rgba(20, 94, 143, 0.22);
  border-color: rgba(124, 196, 245, 0.42);
}

.status-critical, .status-live {
  background: rgba(163, 27, 22, 0.24);
  border-color: rgba(201, 42, 36, 0.65);
}

.pulse-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 8px;
}

.dot-green { background: var(--emerald); box-shadow: 0 0 10px var(--emerald); }
.dot-amber { background: var(--amber); box-shadow: 0 0 10px var(--amber); }
.dot-red { background: var(--gg-red-bright); box-shadow: 0 0 10px var(--gg-red-bright); animation: pulse 1.4s infinite; }

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(1.25); }
}

/* Cards & Grids */
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 20px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.card-title {
  margin: 0 0 12px;
  font-size: 1.02rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.metric-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 700;
}

.metric-value {
  font-size: 1.7rem;
  font-weight: 800;
  margin: 6px 0 4px;
  letter-spacing: -0.02em;
}

.progress-track {
  height: 9px;
  background: rgba(255, 255, 255, 0.09);
  border-radius: 99px;
  overflow: hidden;
  margin: 10px 0 8px;
}

.progress-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.35s ease;
}

.fill-green { background: linear-gradient(90deg, #10b981, #34d399); }
.fill-blue { background: linear-gradient(90deg, var(--gg-blue), var(--gg-blue-light)); }
.fill-amber { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.fill-red { background: linear-gradient(90deg, var(--gg-red), var(--gg-red-bright)); }

/* Action Preset Cards */
.preset-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  transition: border-color 0.15s, transform 0.15s;
}

.preset-card:hover {
  border-color: var(--gg-blue-light);
  transform: translateY(-1px);
}

.preset-stat {
  font-size: 1.5rem;
  font-weight: 800;
}

.stat-brand-blue {
  color: var(--gg-blue-light);
}

.stat-clean {
  color: var(--emerald);
}

.client-layout .stat-brand-blue {
  color: var(--gg-blue);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 99px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.badge-service { background: rgba(16, 185, 129, 0.16); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-test { background: rgba(245, 158, 11, 0.16); color: #fcd34d; border: 1px solid rgba(245, 158, 11, 0.35); }
.badge-expired { background: rgba(163, 27, 22, 0.26); color: #fca5a5; border: 1px solid rgba(201, 42, 36, 0.45); }
.badge-flv { background: rgba(13, 89, 139, 0.35); color: #bae6fd; border: 1px solid rgba(124, 196, 245, 0.4); }
.badge-live { background: var(--gg-red); color: #fff; }
.badge-sec { background: rgba(163, 27, 22, 0.35); color: #fecaca; border: 1px solid rgba(201, 42, 36, 0.5); }
.badge-std { background: rgba(148, 163, 184, 0.18); color: #d6e6f5; }

/* Alerts list */
.alert-item {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  margin-bottom: 10px;
}

.alert-item.warning { border-left: 4px solid var(--amber); }
.alert-item.critical, .alert-item.live { border-left: 4px solid var(--gg-red-bright); }
.alert-item.info { border-left: 4px solid var(--gg-blue-bright); }

/* Code snippet box */
.cmd-box {
  background: #06131f;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
}

/* Filter tabs */
.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 99px;
  padding: 6px 13px;
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
}

.pill-btn.active {
  background: var(--gg-blue-mid);
  border-color: var(--gg-blue-light);
  color: #fff;
}

/* Table */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-top: 14px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th, td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  background: rgba(13, 89, 139, 0.14);
}

tr:last-child td {
  border-bottom: none;
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.empty-state {
  text-align: center;
  padding: 36px 20px;
  color: var(--text-muted);
}

/* Switch toggle */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.toggle-row:last-child {
  border-bottom: none;
}

.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #28445e;
  border-radius: 99px;
  transition: 0.2s;
}

.slider:before {
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: 0.2s;
}

.switch input:checked + .slider {
  background: var(--gg-blue-bright);
}

.switch input:checked + .slider:before {
  transform: translateX(20px);
}

/* ================= CLIENT PORTAL (God's Ground Blue, Red & Crisp White) ================= */
.client-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--c-bg);
  color: var(--c-text);
}

.client-header {
  background: linear-gradient(135deg, #093d61 0%, var(--gg-blue) 55%, var(--gg-blue-mid) 100%);
  border-bottom: 4px solid var(--gg-red);
  color: #fff;
  padding: 20px 24px;
  box-shadow: 0 6px 22px rgba(7, 21, 34, 0.18);
}

.client-header-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.client-brand {
  display: flex;
  align-items: center;
  gap: 15px;
}

.client-gg-badge {
  width: 52px;
  height: auto;
  flex-shrink: 0;
  background: #ffffff;
  padding: 4px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
}

.client-umbrella-tag {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #bae6fd;
  margin-bottom: 2px;
}

.client-brand h1 {
  margin: 0;
  font-size: 1.35rem;
}

.client-sub {
  margin: 3px 0 0;
  opacity: 0.9;
  font-size: 0.88rem;
}

.client-header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.btn-light {
  background: #fff;
  color: var(--gg-blue);
}

.btn-light:hover {
  background: #eff6ff;
}

.btn-light-outline {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.38);
  color: #fff;
}

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

.client-main {
  flex: 1;
  max-width: 1080px;
  width: 100%;
  margin: 0 auto;
  padding: 26px 24px 40px;
}

.client-layout .card,
.client-layout .preset-card {
  background: var(--c-card);
  border-color: var(--c-border);
  color: var(--c-text);
  box-shadow: 0 2px 10px rgba(13, 89, 139, 0.06);
}

.client-layout .preset-card:hover {
  border-color: var(--gg-blue);
}

.client-layout .muted {
  color: var(--c-muted);
}

.client-layout .table-wrap {
  border-color: var(--c-border);
  background: #fff;
}

.client-layout th {
  background: #eef4f9;
  color: #274865;
  border-color: var(--c-border);
}

.client-layout td {
  border-color: var(--c-border);
}

.client-layout tbody tr:hover {
  background: #f6f9fc;
}

.client-layout .pill-btn {
  background: #fff;
  border-color: var(--c-border);
  color: #3b5873;
}

.client-layout .pill-btn.active {
  background: var(--gg-blue);
  border-color: var(--gg-blue);
  color: #fff;
}

.client-layout input[type="search"] {
  background: #fff;
  border-color: var(--c-border);
  color: var(--c-text);
}

.client-layout .btn-outline {
  border-color: var(--c-border);
  color: var(--c-text);
}

.client-layout .btn-outline:hover {
  background: #eef4f9;
  border-color: var(--gg-blue);
}

.client-layout .btn-amber {
  background: #fffbeb;
  border-color: #f59e0b;
  color: #b45309;
}

.client-layout .btn-emerald {
  background: #ecfdf5;
  border-color: #10b981;
  color: #047857;
}

.client-layout .badge-service { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.client-layout .badge-test { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.client-layout .badge-expired { background: #fef2f2; color: var(--gg-red); border-color: #fecaca; }
.client-layout .badge-flv { background: #eff6ff; color: var(--gg-blue); border-color: #bfdbfe; }

.client-banner {
  background: #fff;
  border: 1px solid var(--c-border);
  border-left: 5px solid var(--gg-blue);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.client-footer {
  background: #ffffff;
  border-top: 1px solid var(--c-border);
  padding: 16px 24px;
}

.client-footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.client-footer-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--c-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.client-footer-logo {
  height: 36px;
  width: auto;
  display: block;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 16, 26, 0.76);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
}

.modal-card {
  width: 100%;
  max-width: 560px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 3px solid var(--gg-red);
  border-radius: 16px;
  color: var(--text);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  margin: 0;
  font-size: 1.08rem;
}

.icon-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.modal-body {
  padding: 18px 20px;
  max-height: 65vh;
  overflow-y: auto;
}

.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.preview-file-list {
  max-height: 240px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-top: 12px;
}

.preview-file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.86rem;
}

.preview-file-row:last-child {
  border-bottom: none;
}

/* Toasts */
.toast-container {
  position: fixed;
  bottom: 22px;
  right: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 1200;
}

.toast {
  background: #0d253a;
  color: #f8fafc;
  border: 1px solid var(--border);
  border-left: 4px solid var(--gg-blue-light);
  padding: 12px 16px;
  border-radius: 10px;
  box-shadow: var(--shadow);
  font-size: 0.9rem;
  max-width: 380px;
}

.toast.error {
  border-left-color: var(--gg-red-bright);
}

.toast.warning {
  border-left-color: var(--amber);
}

/* Responsive */
@media (max-width: 1020px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .main-content {
    padding: 20px 16px 36px;
  }
}

@media (max-width: 560px) {
  .grid-4 { grid-template-columns: 1fr; }
}
