:root {
  --bg: #f5f7f2;
  --surface: #ffffff;
  --surface-soft: #eef4e8;
  --sidebar-bg: #112a1e;
  --sidebar-ink: #e4efe8;
  --sidebar-muted: #8fb09d;
  --sidebar-active: #1f4b36;
  --lime: #c4f042;
  --brand: #123b28;
  --brand-hover: #0d2b1d;
  --ink: #16221b;
  --muted: #586a5f;
  --line: #dce4d7;
  --ok-bg: #e7f6ea; --ok-fg: #146c38; --ok-bd: #b7e2c2;
  --warn-bg: #fff7e0; --warn-fg: #855805; --warn-bd: #f0d78c;
  --info-bg: #e9f4ff; --info-fg: #12538a; --info-bd: #b6d8f7;
  --danger-bg: #fdecec; --danger-fg: #a61c1c; --danger-bd: #f3b8b8;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(17, 42, 30, 0.05);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; max-width: 100%; overflow-x: clip; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
:focus-visible {
  outline: 2.5px solid var(--brand);
  outline-offset: 2px;
}
.sidebar :focus-visible {
  outline: 2.5px solid var(--lime);
  outline-offset: 2px;
}
#pageTitle:focus { outline: none; }
#pageTitle:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 6px; }

/* App Shell */
.shell {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  background: var(--sidebar-bg);
  color: var(--sidebar-ink);
  display: flex;
  flex-direction: column;
  padding: 18px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 50;
}
.sb-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 6px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 14px;
}
.sb-logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--lime);
  color: var(--brand);
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 16px;
  flex: none;
}
.sb-brand-copy { min-width: 0; flex: 1; }
.sb-brand-copy strong { display: block; font-size: 15px; color: #fff; }
.sb-brand-copy span { display: block; font-size: 11px; color: var(--sidebar-muted); }
.menu-close-btn {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  flex: none;
}
.menu-close-btn:hover { background: rgba(255,255,255,0.16); }
.sb-mobile-session {
  display: none;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.sb-mobile-admin { font-size: 12.5px; color: #e4efe8; margin-bottom: 8px; word-break: break-word; }
.sb-mobile-logout { width: 100%; min-height: 44px; }

.env-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.env-pill.staging { background: #f5c842; color: #3a2600; }
.env-pill.production { background: var(--lime); color: var(--brand); }

.nav-group { margin-bottom: 14px; }
.nav-group-label {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--sidebar-muted);
  padding: 0 10px 6px;
}
.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 11px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--sidebar-ink);
  font-size: 13.5px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  margin-bottom: 2px;
  transition: background 0.14s, color 0.14s;
}
.nav-item:hover { background: rgba(255,255,255,0.08); }
.nav-item.active { background: var(--sidebar-active); color: #fff; box-shadow: inset 3px 0 0 var(--lime); }
.nav-badge {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  background: rgba(255,255,255,0.14);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.nav-item.active .nav-badge { background: var(--lime); color: var(--brand); }
.nav-badge.warn { background: #f59e0b; color: #2b1800; }
.nav-badge.danger { background: #dc2626; color: #fff; }

.sb-foot {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 11.5px;
  color: var(--sidebar-muted);
}

/* Main Workspace */
.main-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  padding: 12px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.topbar-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.menu-toggle {
  display: none;
  min-width: 44px;
  min-height: 44px;
  padding: 0 11px;
  gap: 6px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--brand);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  flex: none;
}
.menu-toggle-txt { font-size: 13px; }
.page-title { margin: 0; font-size: 18px; color: var(--brand); font-weight: 800; min-width: 0; }
.topbar-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.conn-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: var(--ok-bg);
  color: var(--ok-fg);
  border: 1px solid var(--ok-bd);
}
.conn-pill.err { background: var(--danger-bg); color: var(--danger-fg); border-color: var(--danger-bd); }
.admin-chip {
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--muted);
}
.admin-chip strong { color: var(--brand); }

.content {
  padding: 20px 22px 40px;
  max-width: 1440px;
  width: 100%;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 35px;
  padding: 6px 12px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.14s, border-color 0.14s, opacity 0.14s;
}
.btn:hover:not(:disabled) { background: var(--surface-soft); border-color: #c1d0bb; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--brand-hover); }
.btn-ok { background: #157347; border-color: #157347; color: #fff; }
.btn-ok:hover:not(:disabled) { background: #105836; }
.btn-warn { background: #fff4d6; border-color: #e8c76f; color: #7a4f00; }
.btn-warn:hover:not(:disabled) { background: #ffebc0; }
.btn-danger { background: #fff5f5; border-color: var(--danger-bd); color: var(--danger-fg); }
.btn-danger:hover:not(:disabled) { background: #fde2e2; }
.btn-sm { min-height: 30px; padding: 4px 9px; font-size: 12px; border-radius: 8px; }

/* Cards & Grids */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.kpi-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 15px 16px;
  box-shadow: var(--shadow);
  min-width: 0;
}
.kpi-card .kpi-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}
.kpi-card .kpi-val {
  display: block;
  font-size: clamp(18px, 2.1vw, 24px);
  font-weight: 800;
  color: var(--brand);
  margin: 5px 0 3px;
  letter-spacing: -0.02em;
  white-space: nowrap;
  line-height: 1.2;
}
.kpi-card .kpi-sub { display: block; font-size: 11.5px; color: var(--muted); line-height: 1.45; }
.kpi-card.warn { border-color: var(--warn-bd); background: #fffdf5; }
.kpi-card.warn .kpi-val { color: var(--warn-fg); }

.money-nowrap { white-space: nowrap; }
.clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Staging QA Simulated Revenue Badges & Banners (UI-05) */
.qa-sim-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #f59e0b;
  white-space: nowrap;
}
.qa-sim-banner {
  padding: 10px 14px;
  border-radius: 11px;
  background: #fff8db;
  border: 1px dashed #d97706;
  color: #78350f;
  font-size: 12.5px;
  line-height: 1.55;
  margin-bottom: 12px;
}

/* Overview Priority Queue (UI-04) */
.ov-priority-panel { padding: 14px 18px; }
.ov-priority-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
.ov-priority-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fafcf8;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: background 0.14s, border-color 0.14s, transform 0.12s;
}
.ov-priority-item:hover { background: var(--surface-soft); border-color: #b4cbb0; transform: translateY(-1px); }
.ov-priority-item.has-items { background: #fffdf4; border-color: var(--warn-bd); }
.ov-priority-item .ov-pr-top {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.ov-priority-item .ov-pr-step { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.ov-priority-item .ov-pr-cnt { font-size: 18px; font-weight: 800; color: var(--brand); }
.ov-priority-item.has-items .ov-pr-cnt { color: var(--warn-fg); }
.ov-priority-item .ov-pr-title { font-size: 12.5px; font-weight: 700; color: var(--ink); line-height: 1.3; }
.ov-priority-item .ov-pr-hint { font-size: 11px; color: var(--muted); line-height: 1.35; }

/* Date Range Filter Fields (ADM-05) */
.date-filter-field {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  background: #fff;
  border: 1px solid #cbd7c6;
  border-radius: 9px;
  padding: 0 8px;
  min-height: 35px;
}
.date-filter-field span { white-space: nowrap; }
.date-filter-field input[type="date"] {
  border: 0;
  padding: 4px 0;
  min-height: 31px;
  min-width: 122px;
  background: transparent;
  font-size: 12.5px;
  color: var(--ink);
  outline: none;
}

/* Detail Drawer Action Bar & Audit JSON Pre */
.drawer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px;
  margin: 12px 0 14px;
  border-radius: 12px;
  background: #f5f9f3;
  border: 1px solid var(--line);
}
.json-pre {
  margin: 6px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f7faf6;
  border: 1px solid var(--line);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11.5px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-x: auto;
  max-height: 260px;
}

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

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.panel-head h2 { margin: 0; font-size: 16.5px; color: var(--brand); }
.toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.toolbar input, .toolbar select {
  min-height: 35px;
  padding: 6px 10px;
  border: 1px solid #cbd7c6;
  border-radius: 9px;
  background: #fff;
  font-size: 13px;
}
.toolbar input { min-width: 210px; }

.info-strip {
  display: block;
  padding: 10px 14px;
  border-radius: 11px;
  background: #f3f8ee;
  border: 1px solid #d4e3cb;
  font-size: 12.5px;
  line-height: 1.65;
  color: #263d2f;
  margin-bottom: 14px;
}
.info-strip.warn { background: var(--warn-bg); border-color: var(--warn-bd); color: var(--warn-fg); }

.subtabs {
  display: inline-flex;
  gap: 4px;
  background: var(--surface-soft);
  padding: 4px;
  border-radius: 11px;
  border: 1px solid var(--line);
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.subtab-btn {
  border: 0;
  background: transparent;
  padding: 7px 13px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
}
.subtab-btn.active { background: #fff; color: var(--brand); box-shadow: 0 1px 3px rgba(0,0,0,0.08); }

/* Tables */
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td {
  text-align: left;
  padding: 10px 10px;
  border-bottom: 1px solid #edf2ea;
  vertical-align: top;
}
th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: #fafcf8;
  white-space: nowrap;
}
tr:hover td { background: #fbfdf9; }
.sub { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 12px; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2.5px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
  border: 1px solid transparent;
}
.pill-ok { background: var(--ok-bg); color: var(--ok-fg); border-color: var(--ok-bd); }
.pill-info { background: var(--info-bg); color: var(--info-fg); border-color: var(--info-bd); }
.pill-warn { background: var(--warn-bg); color: var(--warn-fg); border-color: var(--warn-bd); }
.pill-danger { background: var(--danger-bg); color: var(--danger-fg); border-color: var(--danger-bd); }
.pill-muted { background: #f1f3f0; color: #5b665e; border-color: #dce2da; }
.pill-admin { background: #112a1e; color: #c4f042; border-color: #1f4b36; }
.pill-biz { background: #ede9fe; color: #4c1d95; border-color: #c4b5fd; }
.pill-stack { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.actions-cell { display: flex; flex-wrap: wrap; gap: 6px; }

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #edf2ea;
  font-size: 12.5px;
  color: var(--muted);
}
.pager-btns { display: flex; gap: 6px; align-items: center; }

.empty-box, .error-box {
  text-align: center;
  padding: 32px 16px;
  border-radius: 12px;
  font-size: 13.5px;
}
.empty-box { color: var(--muted); border: 1px dashed var(--line); background: #fbfcf9; }
.error-box { color: var(--danger-fg); border: 1px solid var(--danger-bd); background: var(--danger-bg); }

.skeleton {
  height: 14px;
  border-radius: 6px;
  background: linear-gradient(90deg, #edf2ea 25%, #f6f9f4 50%, #edf2ea 75%);
  background-size: 200% 100%;
  animation: shimmer 1.3s infinite;
  margin-bottom: 10px;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Gate views */
.gate-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
}
.gate-card {
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 10px 30px rgba(17, 42, 30, 0.08);
}
.gate-card h1 { margin: 0 0 6px; font-size: 20px; color: var(--brand); }
.gate-card p { margin: 0 0 18px; font-size: 13.5px; color: var(--muted); }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 13px; }
.field label { font-size: 12.5px; font-weight: 700; color: var(--ink); }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid #cbd7c6;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
}
.field textarea { min-height: 82px; resize: vertical; }
.turnstile-wrap {
  width: 100%;
  height: 56px;
  min-height: 56px;
  margin: 2px 0 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}
.turnstile-wrap > div { transform: scale(0.86); transform-origin: center center; }
.alert {
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
}
.alert.err { background: var(--danger-bg); color: var(--danger-fg); border-color: var(--danger-bd); }
.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0;
  color: var(--muted);
  font-size: 12px;
}
.auth-divider::before, .auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.btn-google {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #fff;
  color: var(--ink);
  border: 1px solid #cbd7c6;
  font-weight: 700;
}
.btn-google:hover { background: var(--surface-soft); }

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(15, 28, 20, 0.52);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-backdrop.open { display: flex; }
.modal {
  width: 100%;
  max-width: 500px;
  max-height: 92vh;
  overflow-y: auto;
  background: var(--surface);
  border-radius: 16px;
  border: 1px solid var(--line);
  padding: 20px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
}
.modal h3 { margin: 0 0 6px; font-size: 17px; color: var(--brand); }
.modal-desc { margin: 0 0 12px; font-size: 13px; color: var(--muted); }
.modal-summary {
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  font-size: 12.5px;
  margin-bottom: 12px;
}
.check-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 12px;
  padding: 10px 11px;
  border-radius: 10px;
  background: var(--warn-bg);
  border: 1px solid var(--warn-bd);
}
.check-row input { width: 17px; height: 17px; margin-top: 2px; flex: none; accent-color: var(--brand); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }

/* Slide-over Detail Drawer */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 95;
  background: rgba(15, 28, 20, 0.42);
  display: none;
  justify-content: flex-end;
}
.drawer-backdrop.open { display: flex; }
.drawer {
  width: 100%;
  max-width: 540px;
  height: 100%;
  background: var(--surface);
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  box-shadow: -12px 0 32px rgba(0,0,0,0.16);
}
.drawer-head {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.drawer-head h3 { margin: 0; font-size: 16px; color: var(--brand); }
.drawer-body { padding: 18px; overflow-y: auto; flex: 1; font-size: 13px; }
.kv-grid { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 8px 12px; margin-bottom: 14px; }
.kv-grid dt { color: var(--muted); font-weight: 600; }
.kv-grid dd { margin: 0; word-break: break-word; }
.preview-photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-bottom: 12px; }
.preview-photos img { width: 100%; height: 84px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }

/* Reports & Support Evidence / Contact Enhancements */
.rep-summary-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.rep-kpi-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  font-size: 12.5px; font-weight: 600; cursor: pointer;
  transition: background .14s, border-color .14s;
}
.rep-kpi-chip:hover { background: var(--surface-soft); border-color: #b7cdb0; }
.rep-kpi-chip.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.rep-kpi-chip strong { font-size: 13px; font-weight: 800; }
.contact-box {
  display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding: 4px 8px; margin-top: 4px; border-radius: 8px;
  background: #f0f8f4; border: 1px solid #c7e0d5; color: #103c3b;
  font-size: 12px; font-weight: 700; max-width: 100%; word-break: break-all;
}
.contact-box.is-missing { background: #f8f9f8; border-color: #dde3de; color: var(--muted); font-weight: 500; }
.copy-mini {
  border: 1px solid #b8d6ca; background: #fff; color: #103c3b;
  border-radius: 6px; padding: 2px 7px; font-size: 11px; font-weight: 700;
  cursor: pointer; line-height: 1.3; flex: none;
}
.copy-mini:hover { background: #e3f4ec; }
.ev-inline { display: flex; align-items: center; gap: 7px; margin-top: 6px; flex-wrap: wrap; }
.ev-thumb-mini {
  width: 44px; height: 36px; border-radius: 7px; object-fit: cover;
  border: 1px solid #c9dad2; cursor: pointer; flex: none; display: block;
}
.ev-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: 999px;
  background: #e9f4ff; border: 1px solid #b6d8f7; color: #12538a;
  font-size: 11.5px; font-weight: 700; cursor: pointer;
}
.ev-badge:hover { background: #d8ebff; }
.drawer-contact-card {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 11px 13px; margin-bottom: 12px; border-radius: 11px;
  background: #eff8f4; border: 1px solid #bfe0d2;
}
.drawer-contact-card small { display: block; font-size: 11px; color: #3a605a; font-weight: 600; }
.drawer-contact-card strong { display: block; font-size: 14px; color: #103c3b; word-break: break-all; }
.ev-section { margin: 14px 0; padding: 12px; border-radius: 12px; background: #f8fbf9; border: 1px solid var(--line); }
.ev-section h4 { margin: 0 0 8px; font-size: 13px; color: var(--brand); }
.ev-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ev-gallery-item {
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
  background: #fff; cursor: pointer; padding: 0; text-align: left; display: block;
}
.ev-gallery-item img { width: 100%; height: 110px; object-fit: cover; display: block; }
.ev-gallery-item span { display: block; padding: 4px 6px; font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-gallery-item:hover { border-color: var(--brand); box-shadow: 0 2px 10px rgba(18,59,40,.12); }
.img-lightbox {
  position: fixed; inset: 0; z-index: 140;
  background: rgba(10, 20, 16, 0.82);
  display: flex; align-items: center; justify-content: center; padding: 18px;
}
.img-lightbox-inner {
  width: min(920px, 100%); max-height: 92vh;
  background: #fff; border-radius: 14px; overflow: hidden;
  display: flex; flex-direction: column; box-shadow: 0 22px 60px rgba(0,0,0,.45);
}
.img-lightbox-head {
  padding: 11px 15px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.img-lightbox-stage {
  padding: 14px; background: #0f1915; display: flex; align-items: center; justify-content: center;
  overflow: auto; max-height: calc(92vh - 58px);
}
.img-lightbox-stage img { max-width: 100%; max-height: 78vh; object-fit: contain; border-radius: 6px; }

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 120;
  max-width: 390px;
  padding: 11px 15px;
  border-radius: 12px;
  background: #16221b;
  color: #fff;
  font-size: 13px;
  box-shadow: 0 10px 26px rgba(0,0,0,0.22);
  display: none;
}
.toast.show { display: block; }
.toast.is-err { background: #9b1c1c; }

.sb-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 45;
  background: rgba(0,0,0,0.42);
}

/* Notification Center Composer & Live 3-Mode Preview */
.modal.notif-modal { width: min(1000px, 96vw) !important; max-width: 1000px !important; max-height: 92vh; overflow-y: auto; }
.notif-composer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.95fr);
  gap: 16px;
  align-items: start;
}
.notif-row-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.notif-lang-tabs { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; align-items: center; }
.notif-lang-btn {
  padding: 5px 10px; border-radius: 999px; border: 1px solid #cbd7c6;
  background: #fff; color: #365044; font-size: 12px; font-weight: 700; cursor: pointer;
}
.notif-lang-btn.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.notif-lang-btn.has-val::after { content: " ✓"; font-size: 10px; opacity: 0.85; }
.notif-est-box {
  padding: 9px 12px; border-radius: 10px; background: #eef7f3; border: 1px solid #bfe0d2;
  font-size: 12.5px; color: #103c3b; margin-bottom: 10px;
}
.notif-sponsor-lock {
  padding: 10px 12px; border-radius: 10px; background: #fff7e6; border: 1px solid #f0c975;
  font-size: 12px; color: #7a4f00; margin-bottom: 10px; line-height: 1.5;
}
.notif-user-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.notif-user-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px;
  border-radius: 999px; background: #eaf4ef; border: 1px solid #bdd9cc;
  font-size: 12px; color: #103c3b; font-weight: 600;
}
.notif-user-chip button { border: 0; background: transparent; color: #8c2a2a; cursor: pointer; font-weight: 800; padding: 0 2px; }
.notif-user-results {
  border: 1px solid #d4e0d3; border-radius: 10px; max-height: 150px; overflow-y: auto;
  background: #fff; margin-top: 4px;
}
.notif-user-opt {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  width: 100%; border: 0; border-bottom: 1px solid #eef2ec; background: #fff;
  padding: 7px 10px; font-size: 12px; text-align: left; cursor: pointer;
}
.notif-user-opt:hover { background: #f3f9f5; }
.notif-preview-panel {
  border: 1px solid var(--line); border-radius: 14px; background: #f8fbf8;
  padding: 12px; position: sticky; top: 0;
}
.notif-preview-modes { display: flex; gap: 5px; margin-bottom: 10px; flex-wrap: wrap; }
.notif-pv-stage {
  border: 1px dashed #c4d7ce; border-radius: 12px; background: #fff;
  padding: 12px; min-height: 165px;
}
.notif-pv-stage.is-mobile { max-width: 340px; margin: 0 auto; background: #f5f7f5; }
.pv-banner {
  display: grid; gap: 7px; padding: 11px 13px; border-radius: 13px;
  background: linear-gradient(135deg, #f4fbf7 0%, #eef7f3 100%);
  border: 1px solid #c5dfd6; color: #143230;
}
.pv-banner.is-urgent { background: #fff4ef; border-color: #ebb8a8; }
.pv-banner.is-report { background: #f2f7ff; border-color: #bfd4f2; }
.pv-banner h4 { margin: 0; font-size: 14px; color: #0e3332; line-height: 1.3; }
.pv-banner p { margin: 0; font-size: 12px; color: #395652; line-height: 1.45; white-space: pre-wrap; }
.pv-banner-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.pv-cta { display: inline-flex; padding: 5px 11px; border-radius: 999px; background: #103c3b; color: #fff; font-size: 11.5px; font-weight: 700; }
.pv-hide { font-size: 11px; color: #46635e; }
.public-reply-field {
  background: #f0f8ff; border: 1px solid #bdd9f2; border-radius: 11px; padding: 10px 12px; margin-bottom: 12px;
}
.public-reply-field label { color: #0e4a7d !important; font-weight: 700 !important; }
.public-reply-box {
  padding: 9px 11px; border-radius: 9px; background: #eef7ff; border: 1px solid #c0dcf5;
  color: #103c5c; font-size: 12.5px; white-space: pre-wrap; margin-top: 4px;
}
.internal-note-box {
  padding: 9px 11px; border-radius: 9px; background: #fff9ec; border: 1px solid #ebd7a7;
  color: #634608; font-size: 12.5px; white-space: pre-wrap; margin-top: 4px;
}
/* Infrastructure & Cost Optimization Overview Panel (P2-03 / G1-03) */
.infra-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.infra-card {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px 14px;
  min-width: 0;
}
.infra-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.infra-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--brand);
}
.infra-main-val {
  font-size: 20px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 9px;
  line-height: 1.2;
}
.infra-main-val small {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.infra-kv {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12.5px;
}
.infra-kv > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  padding-top: 5px;
  border-top: 1px dashed rgba(33, 62, 41, 0.1);
}
.infra-kv dt {
  color: var(--muted);
  font-weight: 600;
  flex: 0 0 auto;
}
.infra-kv dd {
  margin: 0;
  text-align: right;
  color: var(--ink);
  word-break: break-word;
}
/* Redesigned Overview Layout (PDF Spec · PC 2-col & Mobile 1-col) */
.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 0;
  background: transparent;
  color: var(--brand);
  font-size: 13px;
  font-weight: 700;
  padding: 6px 8px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.14s, color 0.14s;
}
.btn-link:hover { background: var(--surface-soft); color: var(--brand-hover); }

.ov-staging-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 9px 14px;
  margin-bottom: 14px;
  border-radius: 12px;
  background: #fffbeb;
  border: 1px solid #f0d78c;
  font-size: 12.5px;
  color: #6b4806;
}
.ov-staging-note { font-weight: 600; }

.ov-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.95fr);
  gap: 16px;
  margin-bottom: 16px;
  align-items: start;
}
.ov-side-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.ov-grid .panel,
.ov-side-stack .panel { margin-bottom: 0; }
.ov-panel-head { margin-bottom: 12px; }

.ov-work-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ov-work-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fbfcf9;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: background 0.14s, border-color 0.14s, transform 0.12s;
}
.ov-work-row:hover { background: var(--surface-soft); border-color: #b4cbb0; }
.ov-work-row.has-items { background: #fffdf5; border-color: var(--warn-bd); }
.ov-work-row.has-items:hover { background: #fff7df; }
.ov-work-row.is-critical { background: #fff6f6; border-color: var(--danger-bd); }
.ov-work-row.is-critical:hover { background: #fdecec; }
.ov-work-row.is-critical .ov-work-count { background: var(--danger-bg); color: var(--danger-fg); border: 1px solid var(--danger-bd); }
.ov-work-row.is-zero { background: #fafbf9; border-style: dashed; color: var(--muted); }
.ov-work-main { min-width: 0; flex: 1; }
.ov-work-title-row {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}
.ov-work-title { font-size: 14.5px; font-weight: 800; color: var(--ink); }
.ov-work-row.is-zero .ov-work-title { color: var(--muted); font-weight: 700; }
.ov-work-sub { display: block; font-size: 12.5px; color: var(--muted); margin-top: 3px; line-height: 1.45; }
.ov-work-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
}
.ov-work-count {
  min-width: 30px;
  height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #edf2ea;
  color: var(--muted);
}
.ov-work-row.has-items .ov-work-count {
  background: var(--warn-bg);
  color: var(--warn-fg);
  border: 1px solid var(--warn-bd);
}
.ov-work-chev { font-size: 16px; color: var(--muted); font-weight: 700; }
.ov-work-zero-foot {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #edf2ea;
  font-size: 12.5px;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.ov-sys-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ov-sys-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.ov-sys-time { font-size: 12px; color: var(--muted); }
.ov-sys-cta {
  align-self: flex-start;
  padding-left: 0;
  padding-right: 6px;
}

.ov-quick-box {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.ov-quick-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 9px;
  border-top: 1px solid #edf2ea;
}
.ov-quick-item:first-child { padding-top: 0; border-top: 0; }
.ov-quick-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13.5px;
}
.ov-quick-top strong { color: var(--brand); }
.ov-quick-sub { font-size: 12px; color: var(--muted); line-height: 1.45; }

.ov-audit-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.ov-audit-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 8px;
  border: 0;
  border-top: 1px solid #edf2ea;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.14s;
}
.ov-audit-row:first-child { border-top: 0; }
.ov-audit-row:hover { background: #f6faf4; }
.ov-audit-left { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.ov-audit-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ov-audit-actor { font-size: 12px; color: var(--muted); font-weight: 600; }
.ov-audit-reason { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-audit-time { font-size: 12px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; flex: none; }

/* Dedicated Infrastructure, AI & Storage Section (PDF Pages 4, 5, 6, 7) */
.infra-top-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.infra-top-copy h2 {
  margin: 0;
  font-size: 21px;
  color: var(--brand);
  font-weight: 800;
  line-height: 1.25;
}
.infra-range-sub {
  margin: 4px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}
.infra-period-seg {
  display: inline-grid;
  grid-template-columns: repeat(3, auto);
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
}
.infra-period-btn {
  min-height: 36px;
  padding: 6px 14px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.14s, color 0.14s;
}
.infra-period-btn:hover:not(.active) { background: rgba(18, 59, 40, 0.08); color: var(--brand); }
.infra-period-btn.active { background: var(--brand); color: #fff; box-shadow: 0 1px 4px rgba(17, 42, 30, 0.22); }

.infra-partial-banner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 11px 14px;
  border-radius: 12px;
  background: var(--warn-bg);
  border: 1px solid var(--warn-bd);
  color: var(--warn-fg);
  font-size: 12.5px;
  line-height: 1.5;
  margin-bottom: 14px;
}
.infra-loading-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--info-bg);
  border: 1px solid var(--info-bd);
  color: var(--info-fg);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 14px;
}

.infra-kpi-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.infra-kpi-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 15px 16px;
  box-shadow: var(--shadow);
  min-width: 0;
}
.infra-kpi-card.is-warn { border-color: var(--warn-bd); background: #fffdf5; }
.infra-kpi-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
}
.infra-kpi-val {
  display: block;
  font-size: clamp(20px, 2.2vw, 26px);
  font-weight: 800;
  color: var(--brand);
  margin: 6px 0 4px;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.infra-kpi-card.is-warn .infra-kpi-val { color: var(--warn-fg); }
.infra-kpi-sub { display: block; font-size: 12px; color: var(--muted); line-height: 1.45; }

.infra-group-bar {
  margin-bottom: 12px;
}
.infra-group-tabs {
  display: inline-flex;
  gap: 6px;
  flex-wrap: wrap;
}
.infra-group-tab {
  min-height: 38px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.14s, color 0.14s, border-color 0.14s;
}
.infra-group-tab:hover:not(.active) { background: var(--surface-soft); color: var(--brand); border-color: #b7cdb0; }
.infra-group-tab.active { background: var(--surface-soft); border-color: var(--brand); color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.infra-group-select-wrap { display: none; width: 100%; }
.infra-group-select {
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 11px;
  border: 1.5px solid var(--brand);
  background: #fff;
  color: var(--brand);
  font-size: 14px;
  font-weight: 700;
}

.infra-detail-panel { margin-bottom: 16px; }
.infra-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.infra-detail-head h3 { margin: 0; font-size: 16px; color: var(--brand); }
.infra-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
}
.infra-stat-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px dashed rgba(33, 62, 41, 0.12);
  font-size: 13px;
}
.infra-stat-line dt { color: var(--muted); font-weight: 600; }
.infra-stat-line dd { margin: 0; text-align: right; font-weight: 700; color: var(--ink); word-break: break-word; }
.infra-source-note {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f4f8f1;
  border: 1px solid #d7e5cf;
  font-size: 12px;
  color: #2b4535;
  line-height: 1.55;
}
.infra-expand-details {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fafcf8;
  padding: 8px 12px;
}
.infra-expand-details summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  color: var(--brand);
  padding: 4px 0;
}
.infra-expand-body { margin-top: 10px; }

.infra-bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(290px, 0.95fr);
  gap: 16px;
  align-items: start;
}
.infra-bottom-grid .panel { margin-bottom: 0; }
.infra-subhead { margin: 0; font-size: 15.5px; color: var(--brand); }
.infra-chart-switch {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  border-radius: 9px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
}
.infra-mini-btn {
  min-height: 30px;
  padding: 4px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.infra-mini-btn.active { background: var(--brand); color: #fff; }
.infra-svg-wrap { width: 100%; overflow: hidden; }
.infra-svg { width: 100%; height: auto; display: block; }
.infra-axis-row {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
}
.infra-storage-list {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Capacity & Quotas Section (Supabase + Vercel · >=80% priority alerts · Mobile 1-col) */
.quotas-top-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.quota-ok-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 15px;
  border-radius: 13px;
  background: var(--ok-bg);
  border: 1px solid var(--ok-bd);
  color: var(--ok-fg);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 16px;
}
.quota-alert-panel {
  border-color: var(--warn-bd);
  background: #fffdf5;
  margin-bottom: 16px;
}
.quota-alert-panel.is-critical {
  border-color: var(--danger-bd);
  background: #fff7f7;
}
.quota-alert-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.quota-alert-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 13px 14px;
  border-radius: 12px;
  background: #fff;
  border: 1.5px solid var(--warn-bd);
}
.quota-alert-card.is-critical { border-color: var(--danger-bd); }
.quota-alert-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.quota-alert-title { font-size: 14.5px; font-weight: 800; color: var(--ink); }
.quota-alert-pct { font-size: 18px; font-weight: 900; color: var(--warn-fg); font-variant-numeric: tabular-nums; }
.quota-alert-card.is-critical .quota-alert-pct { color: var(--danger-fg); }
.quota-alert-action {
  padding: 8px 10px;
  border-radius: 9px;
  background: #f6f9f4;
  border: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--ink);
  line-height: 1.45;
}
.quota-alert-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.quota-provider-panel { margin-bottom: 16px; }
.quota-provider-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.quota-provider-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.quota-provider-title h3 { margin: 0; font-size: 17px; color: var(--brand); }
.quota-stale-strip {
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--warn-bg);
  border: 1px solid var(--warn-bd);
  color: var(--warn-fg);
  font-size: 12.5px;
  line-height: 1.5;
  margin-bottom: 12px;
}

.quota-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.quota-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 15px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: #fbfcf9;
  min-width: 0;
}
.quota-card.is-primary {
  grid-column: 1 / -1;
  background: #ffffff;
  border-color: #c2d4be;
  box-shadow: var(--shadow);
}
.quota-card.is-warning { border-color: var(--warn-bd); background: #fffdf5; }
.quota-card.is-critical { border-color: var(--danger-bd); background: #fff7f7; }
.quota-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.quota-card-title { font-size: 14px; font-weight: 800; color: var(--brand); }
.quota-card-big {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.quota-card-val {
  font-size: clamp(19px, 2vw, 24px);
  font-weight: 800;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.quota-card-val small { font-size: 13px; font-weight: 600; color: var(--muted); }
.quota-card-pct {
  font-size: 15px;
  font-weight: 800;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
}
.quota-card.is-warning .quota-card-pct { color: var(--warn-fg); }
.quota-card.is-critical .quota-card-pct { color: var(--danger-fg); }

.quota-bar-track {
  width: 100%;
  height: 9px;
  border-radius: 999px;
  background: #e5ece2;
  overflow: hidden;
}
.quota-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--brand);
  transition: width 0.25s ease;
}
.quota-bar-fill.is-warning { background: #d97706; }
.quota-bar-fill.is-critical { background: #dc2626; }

.quota-tri-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #f3f7f0;
  border: 1px solid #e1eadc;
}
.quota-tri-cell span { display: block; font-size: 11px; color: var(--muted); font-weight: 600; }
.quota-tri-cell strong { display: block; font-size: 13px; color: var(--ink); font-variant-numeric: tabular-nums; margin-top: 2px; }

.quota-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 10px;
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.45;
}
.quota-unavail-box {
  padding: 10px 12px;
  border-radius: 10px;
  background: #f5f7f4;
  border: 1px dashed #c8d4c4;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.45;
}
.quota-card-foot {
  margin-top: auto;
  padding-top: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.quota-sub-list {
  margin: 0;
  padding: 8px 10px;
  border-radius: 10px;
  background: #f4f7f2;
  border: 1px solid #e2eadf;
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12px;
}
.quota-sub-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.quota-sub-row span { color: var(--muted); }
.quota-sub-row strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.quota-plan-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.quota-forecast-box {
  padding: 10px 12px;
  border-radius: 10px;
  background: #f5f9f6;
  border: 1px solid #d9e6dc;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12.5px;
}
.quota-forecast-box.is-warn {
  background: #fffaf0;
  border-color: var(--warn-bd);
}
.quota-forecast-box.is-crit {
  background: #fff5f5;
  border-color: var(--danger-bd);
}
.quota-forecast-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.quota-forecast-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--brand);
}
.quota-forecast-rows {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.quota-forecast-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.quota-forecast-row span { color: var(--muted); }
.quota-forecast-row strong { color: var(--ink); font-variant-numeric: tabular-nums; text-align: right; }
.quota-forecast-row strong.is-danger { color: var(--danger-fg); }
.quota-forecast-row strong.is-warn { color: var(--warn-fg); }
.quota-forecast-note {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.4;
}
.quota-alert-forecast {
  padding: 7px 10px;
  border-radius: 9px;
  background: #f8faf7;
  border: 1px dashed #cddac8;
  font-size: 12px;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 6px 10px;
  flex-wrap: wrap;
}
.quota-top3-details {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}
.quota-top3-details summary {
  cursor: pointer;
  padding: 9px 12px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--brand);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  user-select: none;
}
.quota-top3-details summary::-webkit-details-marker { display: none; }
.quota-top3-details summary::after {
  content: "▾";
  font-size: 12px;
  color: var(--muted);
}
.quota-top3-details[open] summary {
  border-bottom: 1px solid #edf2ea;
  background: #f8fbf7;
}
.quota-top3-details[open] summary::after { content: "▴"; }
.quota-top3-list {
  padding: 9px 12px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.quota-top3-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.quota-top3-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12.5px;
}
.quota-top3-name { font-weight: 700; color: var(--ink); }
.quota-top3-val { font-weight: 800; color: var(--brand); font-variant-numeric: tabular-nums; }
.quota-top3-detail { font-size: 11.5px; color: var(--muted); }
.quota-top3-bar {
  width: 100%;
  height: 5px;
  border-radius: 999px;
  background: #eaf0e7;
  overflow: hidden;
}
.quota-top3-bar > span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: #2f6c4f;
}

/* User & Rental Demand Analytics (Admin -> Người dùng -> Thống kê) */
.users-subtabs { margin-bottom: 14px; }
.users-subtabs .subtab-btn {
  min-height: 44px;
  min-width: 44px;
  padding: 8px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ua-top-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.ua-period-seg {
  grid-template-columns: repeat(2, minmax(74px, auto));
}
.ua-period-seg .infra-period-btn,
.ua-top-controls .btn,
#usersStatsPane .btn,
#usersStatsPane .infra-mini-btn {
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
}
#usersStatsPane .infra-expand-details summary {
  min-height: 44px;
  display: flex;
  align-items: center;
}
.ua-filter-panel {
  padding: 12px 14px;
  margin-bottom: 14px;
}
.ua-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.ua-filter-bar select {
  min-height: 44px;
  min-width: 44px;
  padding: 8px 12px;
  border: 1px solid #cbd7c6;
  border-radius: 9px;
  background: #fff;
  font-size: 13px;
  color: var(--ink);
}
.ua-kpi-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.ua-kpi-5 {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.ua-kpi-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.ua-kpi-card {
  background: #fbfcf9;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 13px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.ua-kpi-card span { font-size: 12px; font-weight: 700; color: var(--muted); }
.ua-kpi-card strong { font-size: clamp(19px, 2vw, 24px); font-weight: 800; color: var(--brand); font-variant-numeric: tabular-nums; line-height: 1.2; }
.ua-kpi-card small { font-size: 11.5px; color: var(--muted); line-height: 1.38; }

.ua-legend {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 10px;
}
.ua-legend-item { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.ua-dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex: none; }
.ua-dot.signed { background: #123b28; }
.ua-dot.guest { background: #96c93d; }
.ua-dot.search { background: #123b28; }
.ua-dot.detail { background: #1d6fb8; }
.ua-dot.save { background: #d97706; }

/* Stacked Column Chart (Browser Language) */
.ua-stack-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  align-items: end;
  padding: 12px 8px 6px;
  border-radius: 12px;
  background: #f8fbf6;
  border: 1px solid #e3ebe0;
}
.ua-stack-col {
  border: 1px solid transparent;
  background: transparent;
  padding: 6px 4px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  min-width: 0;
  transition: background 0.14s, border-color 0.14s;
}
.ua-stack-col:hover { background: #edf5ea; border-color: #c8dac2; }
.ua-stack-col.active { background: #e8f3e3; border-color: var(--brand); }
.ua-stack-total { font-size: 12px; font-weight: 800; color: var(--brand); font-variant-numeric: tabular-nums; }
.ua-stack-track {
  width: min(38px, 100%);
  height: 118px;
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-start;
  background: #e9efe6;
  border-radius: 8px;
  overflow: hidden;
}
.ua-stack-seg-signed { background: #123b28; width: 100%; transition: height 0.2s; }
.ua-stack-seg-guest { background: #96c93d; width: 100%; transition: height 0.2s; }
.ua-stack-lbl { font-size: 11.5px; font-weight: 700; color: var(--ink); text-align: center; line-height: 1.25; word-break: break-word; }
.ua-stack-sub { font-size: 10.5px; color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; }
.ua-inspect-bar {
  margin-top: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  background: #eef6ec;
  border: 1px solid #cce0c6;
  font-size: 12.5px;
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

/* Horizontal Ranking Bars (Most Searched & Most Interested & Price) */
.ua-dual-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}
.ua-subpanel {
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fbfcf9;
  padding: 13px 14px;
  min-width: 0;
}
.ua-subpanel h4 { margin: 0 0 4px; font-size: 14px; color: var(--brand); }
.ua-hbar-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 10px;
}
.ua-hbar-btn {
  width: 100%;
  min-height: 44px;
  min-width: 44px;
  border: 1px solid transparent;
  background: transparent;
  padding: 8px 9px;
  border-radius: 9px;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  transition: background 0.14s, border-color 0.14s;
}
.ua-hbar-btn:hover { background: #eff5ed; border-color: #cbd9c6; }
.ua-hbar-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 12.5px;
}
.ua-hbar-name { font-weight: 700; color: var(--ink); word-break: break-word; }
.ua-hbar-val { font-weight: 800; color: var(--brand); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ua-hbar-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: #e5ece2;
  overflow: hidden;
  display: flex;
}
.ua-hbar-fill { height: 100%; background: #123b28; border-radius: 999px; }
.ua-hbar-fill.is-detail { background: #1d6fb8; border-radius: 0; }
.ua-hbar-fill.is-save { background: #d97706; border-radius: 0; }
.ua-hbar-fill.is-price { background: #2f6c4f; }

.ua-dim-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.ua-dim-btn {
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #cbd7c6;
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}
.ua-dim-btn.active { background: var(--brand); border-color: var(--brand); color: #fff; }

/* Collapsible Extra Filters for Listings (PDF Pages 2, 5, 7) */
.extra-filters-panel {
  padding: 12px;
  margin-bottom: 12px;
  border-radius: 12px;
  background: #f7faf5;
  border: 1px solid var(--line);
}
.extra-filters-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.extra-filters-grid select {
  min-height: 35px;
  padding: 6px 10px;
  border: 1px solid #cbd7c6;
  border-radius: 9px;
  background: #fff;
  font-size: 13px;
}

/* Mobile Card Details Expander (PC always shows inline; Mobile collapses secondary detail cleanly) */
.mobile-more-toggle { display: none; }
.mobile-more-body { display: block; }

@media (max-width: 980px) {
  .ov-grid { grid-template-columns: 1fr; }
  .infra-bottom-grid { grid-template-columns: 1fr; }
  .infra-kpi-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .notif-composer-grid { grid-template-columns: 1fr; }
  .notif-row-2 { grid-template-columns: 1fr; }
  .notif-preview-panel { position: static; }
}

@media (max-width: 1180px) {
  .ov-priority-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1024px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2 { grid-template-columns: 1fr; }
  .ov-priority-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    left: -272px;
    top: 0;
    width: 264px;
    transition: left 0.2s ease;
  }
  .sidebar.open { left: 0; }
  .sb-backdrop.open { display: block; }
  .menu-toggle { display: inline-flex; }
  .menu-close-btn { display: inline-grid; place-items: center; }
  .sb-mobile-session { display: block; }
  .topbar {
    padding: 8px 12px;
    flex-wrap: nowrap;
    min-height: 58px;
  }
  .topbar-left { flex: 1; min-width: 0; gap: 8px; }
  .page-title {
    font-size: 16px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .topbar-right { flex: none; gap: 6px; }
  .topbar-right .conn-pill,
  .topbar-right .admin-chip,
  .topbar-right .topbar-logout { display: none; }
  .topbar-right #refreshBtn { min-height: 44px; padding: 6px 12px; font-size: 13px; }
  .nav-item { min-height: 44px; padding: 10px 12px; }
  .content { padding: 14px 12px 34px; }
  .toolbar input { min-width: 100%; }
  .kv-grid { grid-template-columns: 1fr; }
}

/* Mobile Card Layout & Zero Horizontal Scroll at 320 / 360 / 390px (ADM-04 + UI-01 + PDF Mobile Spec) */
@media (max-width: 767px) {
  .content { padding: 12px 12px 32px; }
  .panel { padding: 14px 12px; border-radius: 14px; }
  .panel-head { margin-bottom: 12px; }
  .panel-head h2 { font-size: 15.5px; }

  .btn, .btn-link { min-height: 44px; min-width: 44px; }
  .btn-sm { min-height: 44px; min-width: 44px; padding: 8px 12px; font-size: 12.5px; }
  .sb-mobile-logout { width: 100%; min-height: 44px; padding: 10px 14px; font-size: 13.5px; }
  .rep-kpi-chip { min-height: 44px; padding: 8px 13px; }
  .ov-work-row { min-height: 54px; padding: 12px; }
  .ov-audit-row { min-height: 48px; padding: 10px 6px; }

  .infra-top-bar { flex-direction: column; gap: 10px; }
  .infra-top-copy h2 { font-size: 18px; }
  .infra-period-seg { width: 100%; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .infra-period-btn { min-height: 44px; padding: 8px 6px; font-size: 13px; }
  .infra-kpi-row { grid-template-columns: 1fr; gap: 10px; }
  .infra-group-tabs { display: none; }
  .infra-group-select-wrap { display: block; }
  .infra-detail-grid { grid-template-columns: 1fr; gap: 0; }
  .infra-chart-switch { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .infra-mini-btn { min-height: 44px; min-width: 44px; padding: 8px 12px; font-size: 13px; }
  .infra-expand-details summary { min-height: 44px; display: flex; align-items: center; }
  .quotas-top-actions { width: 100%; }
  .quotas-top-actions .btn { width: 100%; min-height: 44px; }
  .quota-cards-grid { grid-template-columns: 1fr; gap: 10px; }
  .quota-card.is-primary { grid-column: auto; }
  .quota-tri-row { grid-template-columns: 1fr; gap: 6px; }
  .quota-provider-head .btn,
  .quota-card-foot .btn,
  .quota-alert-foot .btn { width: 100%; min-height: 44px; justify-content: center; }
  .quota-top3-details summary { min-height: 44px; padding: 10px 12px; }
  .ua-top-controls { width: 100%; flex-direction: column; align-items: stretch; }
  .ua-period-seg { width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ua-top-controls .btn { width: 100%; min-height: 44px; }
  .ua-filter-bar select,
  .ua-filter-bar .btn { width: 100%; min-height: 44px; }
  .ua-kpi-4,
  .ua-kpi-5,
  .ua-kpi-3,
  .ua-dual-grid { grid-template-columns: 1fr; gap: 10px; }
  .ua-stack-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .ua-stack-col { min-height: 44px; }
  .ua-stack-track { height: 78px; }
  .ua-dim-btn { min-height: 44px; padding: 8px 14px; }
  .ua-hbar-btn { min-height: 44px; padding: 8px; }

  .kpi-grid { grid-template-columns: 1fr; gap: 9px; margin-bottom: 12px; }
  .kpi-card { padding: 12px 11px; }
  .kpi-card .kpi-label { font-size: 11px; }
  .kpi-card .kpi-val { font-size: clamp(16px, 4.8vw, 22px); white-space: nowrap; }
  .kpi-card .kpi-sub { font-size: 11.5px; }

  .ov-priority-list { grid-template-columns: 1fr; gap: 8px; }
  .ov-priority-item { padding: 10px 12px; }
  .infra-grid { grid-template-columns: 1fr; gap: 10px; }
  .infra-card { padding: 12px; }

  .toolbar { width: 100%; gap: 8px; }
  .toolbar select,
  .toolbar input[type="search"],
  .toolbar .date-filter-field,
  .extra-filters-grid select,
  .extra-filters-grid .date-filter-field {
    width: 100%;
    min-width: 0;
    min-height: 44px;
  }
  .toolbar .date-filter-field,
  .extra-filters-grid .date-filter-field { justify-content: space-between; }
  .toolbar .date-filter-field input[type="date"],
  .extra-filters-grid .date-filter-field input[type="date"] { flex: 1; min-width: 0; text-align: right; min-height: 40px; }
  .toolbar .sub-tabs { width: 100%; flex-wrap: wrap; }
  .subtabs { width: 100%; }
  .subtab-btn { flex: 1; text-align: center; min-height: 44px; padding: 8px; font-size: 12.5px; }
  .listings-primary-toolbar #listMoreFiltersBtn,
  .listings-primary-toolbar #listReload { flex: 1; }

  /* Stacked Mobile Record Cards — compact, scannable, ZERO horizontal scroll! */
  .table-wrap { overflow-x: visible; }
  table.mobile-cards,
  table.mobile-cards tbody {
    display: block;
    width: 100%;
  }
  table.mobile-cards thead {
    display: none;
  }
  table.mobile-cards tr {
    display: flex;
    flex-direction: column;
    gap: 7px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 13px;
    padding: 12px;
    margin-bottom: 10px;
    box-shadow: var(--shadow);
  }
  table.mobile-cards tr:hover td { background: transparent; }
  table.mobile-cards td {
    display: block;
    width: 100%;
    max-width: 100% !important;
    padding: 0;
    border-bottom: 0;
    white-space: normal !important;
    word-break: break-word;
  }
  table.mobile-cards td[data-label]:not([data-label=""])::before {
    content: attr(data-label);
    display: block;
    font-size: 10.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
    margin-bottom: 2px;
  }
  table.mobile-cards td.mobile-detail-cell { padding-top: 2px; }
  table.mobile-cards td.mobile-detail-cell::before { display: none !important; }
  .mobile-more-toggle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--brand);
    padding: 8px 12px;
    min-height: 44px;
    min-width: 44px;
    border-radius: 8px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
  }
  .mobile-more-body { display: none; margin-top: 6px; padding: 8px 10px; border-radius: 9px; background: #f8fbf7; border: 1px solid #e2eadf; }
  .mobile-more-body.is-open { display: block; }
  table.mobile-cards td.actions-cell {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 9px;
    margin-top: 2px;
    border-top: 1px solid #edf2ea;
  }
  table.mobile-cards td.actions-cell .btn {
    min-height: 44px;
    padding: 8px 12px;
    font-size: 13px;
  }
  table.mobile-cards .mobile-hide-action {
    display: none !important;
  }

  .drawer { max-width: 100%; }
  .drawer-head { padding: 13px 14px; }
  .drawer-body { padding: 14px; }
  .ev-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .preview-photos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pager { justify-content: center; text-align: center; }
  .toast { left: 12px; right: 12px; bottom: 12px; max-width: none; }
}
