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

:root {
  --bg:        #ffffff;
  --surface:   #f6f8fa;
  --border:    #e6e8eb;
  --border-dk: #c8ccd2;
  --accent:    #635bff;
  --accent-dk: #4b44cc;
  --text:      #1a1f36;
  --text-2:    #697386;
  --text-3:    #9ba3b2;
  --green:     #1a9e6e;  --green-bg:  #e9f7f2;
  --yellow:    #b54708;  --yellow-bg: #fef3e2;
  --red:       #c0152d;  --red-bg:    #fde8eb;
  --blue:      #1264a3;  --blue-bg:   #e8f3fb;
  --r:         6px;
  --sidebar-w: 64px;
  --font:      -apple-system, 'Inter', BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body { background:var(--bg); color:var(--text); font-family:var(--font); font-size:14px; line-height:1.5; min-height:100vh; -webkit-font-smoothing:antialiased; }
a, button, input, select, textarea { -webkit-tap-highlight-color:transparent; }
button, select { font:inherit; }
button:disabled { opacity:.6; cursor:not-allowed; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline:2px solid rgba(18,100,163,.38);
  outline-offset:2px;
}

/* ── Layout ──────────────────────────────────────────────── */
.layout, .app-layout { display:flex; min-height:100vh; }
.main   { flex:1; min-width:0; padding:28px 32px; overflow-y:auto; }

/* ── Col 1 — Services (icônes) ───────────────────────────── */
.services-col {
  width:64px; flex-shrink:0;
  border-right:1px solid var(--border);
  display:flex; flex-direction:column; align-items:center;
  position:sticky; top:0; height:100vh;
  background:var(--bg);
}
.services-logo {
  display:flex; align-items:center; justify-content:center;
  padding:16px 0 14px;
  border-bottom:0;
  width:100%;
  text-decoration:none;
}
.services-logo img { width:28px; height:28px; border-radius:6px; object-fit:contain; }
.services-list {
  flex:1; display:flex; flex-direction:column; align-items:center;
  padding:10px 0; gap:2px;
}
.service-link {
  position:relative;
  display:flex; align-items:center; justify-content:center;
  width:40px; height:40px; border-radius:8px;
  color:var(--text-3);
  text-decoration:none; cursor:pointer;
  transition:background .1s, color .1s;
  user-select:none;
}
.service-link svg { width:18px; height:18px; flex-shrink:0; }
.service-link:hover:not(.disabled) { background:var(--surface); color:var(--text-2); }
.service-link.active { background:var(--surface); color:var(--accent); }
.service-link.active::before {
  content:""; position:absolute; left:-12px; top:10px; bottom:10px;
  width:3px; border-radius:2px; background:var(--accent);
}
.service-link.disabled { color:var(--border-dk); cursor:default; }
.services-footer {
  padding:12px 0;
  border-top:0;
  width:100%; display:flex; justify-content:center;
}
.btn-logout {
  display:flex; align-items:center; justify-content:center;
  width:40px; height:40px; border-radius:8px;
  background:none; border:none; cursor:pointer;
  color:var(--text-3); font-family:var(--font);
  transition:background .12s, color .12s;
}
.btn-logout:hover { background:var(--red-bg); color:var(--red); }
.btn-logout svg { width:17px; height:17px; }

/* ── Col 2 — Sous-services ───────────────────────────────── */
.subservices-col {
  width:180px; flex-shrink:0;
  border-right:1px solid var(--border);
  display:flex; flex-direction:column;
  position:sticky; top:0; height:100vh;
  background:var(--bg); overflow-y:auto;
  padding:16px 0;
}
.subservices-header {
  font-size:10px; font-weight:700; text-transform:uppercase;
  letter-spacing:.7px; color:var(--text-3);
  padding:0 14px 10px;
}
.subservice-link {
  display:flex; align-items:center; min-height:32px; padding:7px 14px;
  font-size:13px; color:var(--text-2);
  text-decoration:none;
  transition:color .1s, background .1s;
  border-radius:0;
}
.subservice-link:hover  { color:var(--text); background:var(--surface); }
.subservice-link.active { color:var(--accent); font-weight:600; background:#f2f7ff; box-shadow:inset 3px 0 0 var(--blue); }

/* ── Shared ──────────────────────────────────────────────── */
.soon-badge {
  margin-left:auto; font-size:9px; font-weight:600;
  text-transform:uppercase; letter-spacing:.4px;
  background:var(--surface); color:var(--text-3);
  border:1px solid var(--border); border-radius:4px;
  padding:1px 5px; flex-shrink:0;
}

/* ── Section header bar ──────────────────────────────────── */
.section-header-bar {
  display:flex; align-items:center; justify-content:space-between;
  margin-bottom:20px; padding-bottom:18px; border-bottom:1px solid var(--border);
  gap:16px;
}
.section-header-info { display:flex; align-items:center; gap:12px; }
.section-icon {
  width:36px; height:36px; border-radius:8px;
  background:var(--surface); border:1px solid var(--border);
  display:flex; align-items:center; justify-content:center;
  color:var(--text-2); flex-shrink:0;
}
.section-title { font-size:17px; font-weight:600; letter-spacing:-.2px; }
.section-sub   { font-size:12px; color:var(--text-2); margin-top:1px; }

/* ── Stat chips ──────────────────────────────────────────── */
.stat-chips {
  display:grid; grid-template-columns:repeat(auto-fit, minmax(150px, 1fr)); gap:1px; background:var(--border);
  border:1px solid var(--border); border-radius:var(--r);
  overflow:hidden; margin-bottom:20px;
}
.stat-chip {
  background:var(--bg); padding:14px 16px;
  display:flex; flex-direction:column; gap:5px; min-width:0;
}
.chip-label { font-size:10px; color:var(--text-2); text-transform:uppercase; letter-spacing:.5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.chip-num   { font-size:22px; font-weight:700; letter-spacing:-.4px; line-height:1; }

/* ── Component grid ──────────────────────────────────────── */
.component-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:16px;
}
.component-card {
  background:var(--bg);
  border-radius:8px;
  box-shadow:0 1px 4px rgba(0,0,0,.06), 0 0 0 1px rgba(0,0,0,.05);
  overflow:hidden;
  display:flex; flex-direction:column;
}
.component-card.span-2 { grid-column:1 / -1; }

.comp-header {
  display:flex; align-items:center; justify-content:space-between;
  padding:13px 16px 11px;
  border-bottom:1px solid var(--border);
  background:var(--surface);
  flex-shrink:0;
}
.comp-title { font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.6px; color:var(--text-2); }
.comp-link  { font-size:12px; color:var(--accent); text-decoration:none; }
.comp-link:hover { text-decoration:underline; }
.comp-body  { padding:16px; flex:1; }

/* ── Queue counts grid ───────────────────────────────────── */
.queue-counts-grid {
  display:grid; grid-template-columns:repeat(auto-fit, minmax(72px,1fr)); gap:8px; margin-bottom:14px;
}
.q-count-box { display:flex; flex-direction:column; align-items:center; gap:3px; min-width:0; padding:6px 4px; border-radius:6px; background:var(--surface); }
.q-count-num { font-size:20px; font-weight:700; letter-spacing:-.3px; line-height:1; }
.q-count-label { font-size:10px; color:var(--text-3); text-transform:uppercase; letter-spacing:.4px; }
.queue-status-line { display:flex; align-items:center; gap:7px; margin-bottom:12px; }
.queue-quick-actions { display:flex; gap:8px; flex-wrap:wrap; }

/* ── Inbox preview ───────────────────────────────────────── */
.comp-inbox-list { display:flex; flex-direction:column; flex:1; }
.inbox-preview-item {
  display:block; padding:10px 16px; border-bottom:1px solid var(--border);
  text-decoration:none; transition:background .1s; cursor:pointer;
}
.inbox-preview-item:last-child { border-bottom:none; }
.inbox-preview-item:hover { background:var(--surface); }
.inbox-preview-item.unread .inbox-item-from,
.inbox-preview-item.unread .inbox-item-subject { font-weight:600; color:var(--text); }
.inbox-item-row { display:flex; justify-content:space-between; align-items:baseline; margin-bottom:2px; }
.inbox-item-from { font-size:13px; color:var(--text); font-weight:400; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:200px; }
.inbox-item-date { font-size:11px; color:var(--text-3); flex-shrink:0; }
.inbox-item-subject { font-size:12px; color:var(--text-2); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

/* ── Analytics layout ────────────────────────────────────── */
.comp-analytics-body { display:flex; gap:0; flex:1; }
.analytics-chart-wrap { flex:1; padding:16px 20px; min-width:0; position:relative; height:240px; }
.analytics-side {
  width:220px; flex-shrink:0;
  border-left:1px solid var(--border);
  padding:16px;
  overflow-y:auto;
}
.analytics-side-label {
  font-size:10px; font-weight:700; text-transform:uppercase;
  letter-spacing:.5px; color:var(--text-3); margin-bottom:8px;
}

/* ── Login ───────────────────────────────────────────────── */

/* ── Login ───────────────────────────────────────────────── */
.login-wrapper { display:flex; align-items:center; justify-content:center; min-height:100vh; background:var(--surface); }
.login-card { background:var(--bg); border:1px solid var(--border); border-radius:10px; padding:40px; width:380px; }
.login-logo { display:flex; justify-content:center; margin-bottom:24px; }
.login-logo img { width:44px; height:44px; object-fit:contain; border-radius:10px; }
.login-title { font-size:17px; font-weight:600; text-align:center; margin-bottom:24px; }

/* ── Page header ─────────────────────────────────────────── */
.page-header {
  display:flex; align-items:flex-start; justify-content:space-between;
  margin-bottom:24px; padding-bottom:20px; border-bottom:1px solid var(--border);
}
.page-header h1 { font-size:18px; font-weight:600; letter-spacing:-.2px; }
.page-sub { font-size:12px; color:var(--text-2); margin-top:2px; }

/* ── Global status badge ─────────────────────────────────── */
.global-badge { display:inline-flex; align-items:center; gap:6px; padding:6px 14px; border-radius:20px; font-size:12px; font-weight:600; letter-spacing:.3px; }
.global-badge.loading    { background:var(--surface); color:var(--text-2); }
.global-badge.badge-healthy  { background:var(--green-bg); color:var(--green); }
.global-badge.badge-degraded { background:var(--yellow-bg); color:var(--yellow); }
.global-badge.badge-critical { background:var(--red-bg); color:var(--red); }

/* ── Stat grid ───────────────────────────────────────────── */
.stat-grid {
  display:grid; grid-template-columns:repeat(auto-fill, minmax(140px,1fr));
  gap:1px; background:var(--border); border:1px solid var(--border);
  border-radius:var(--r); overflow:hidden; margin-bottom:20px;
}
.stat-card { background:var(--bg); padding:18px 20px; }
.stat-label { font-size:11px; color:var(--text-2); text-transform:uppercase; letter-spacing:.5px; margin-bottom:6px; }
.stat-num { font-size:26px; font-weight:700; letter-spacing:-.5px; line-height:1; }
.c-red    { color:var(--red); }
.c-green  { color:var(--green); }
.c-yellow { color:var(--yellow); }
.c-blue   { color:var(--blue); }

/* ── Dash two-col grid ───────────────────────────────────── */
.dash-grid { display:grid; grid-template-columns:280px 1fr; gap:16px; }
.dash-col-left { display:flex; flex-direction:column; }
.dash-col-right { display:flex; flex-direction:column; gap:16px; }

/* ── Card ────────────────────────────────────────────────── */
.card { border:1px solid var(--border); border-radius:var(--r); background:var(--bg); overflow:hidden; }
.card-header {
  display:flex; align-items:center; justify-content:space-between;
  padding:12px 16px; border-bottom:1px solid var(--border); background:var(--surface);
}
.card-title { font-size:12px; font-weight:600; text-transform:uppercase; letter-spacing:.5px; color:var(--text-2); }

/* ── Health panel ────────────────────────────────────────── */
.health-list { padding:8px 0; }
.health-loading { padding:16px 16px; color:var(--text-2); font-size:13px; }
.health-item { display:flex; align-items:center; gap:10px; padding:9px 16px; border-bottom:1px solid var(--border); }
.health-item:last-child { border-bottom:none; }
.dot { width:8px; height:8px; border-radius:50%; flex-shrink:0; }
.dot-green  { background:var(--green); }
.dot-yellow { background:#f59e0b; }
.dot-red    { background:var(--red); }
.health-label   { flex:1; font-size:13px; font-weight:500; }
.health-latency { font-size:11px; color:var(--text-3); background:var(--surface); padding:1px 6px; border-radius:10px; }
.health-extra   { font-size:11px; color:var(--text-2); }
.health-error   { font-size:11px; color:var(--red); }

/* ── Simple list (services, templates) ──────────────────── */
.simple-list { padding:4px 0; }
.simple-row  { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:9px 16px; border-bottom:1px solid var(--border); }
.simple-row:last-child { border-bottom:none; }
.simple-count { font-size:13px; font-weight:600; color:var(--text); }
.empty-sm { padding:16px; color:var(--text-3); font-size:13px; text-align:center; }

/* ── Audit row ───────────────────────────────────────────── */
.audit-row { display:grid; grid-template-columns:1fr auto auto; gap:12px; }
.audit-action { font-size:12px; font-family:'Menlo','Consolas',monospace; color:var(--accent); }
.audit-ip, .audit-time { white-space:nowrap; }

/* ── Table ───────────────────────────────────────────────── */
.table-wrap, .table-wrapper { overflow-x:auto; width:100%; }
table { width:100%; border-collapse:collapse; }
th {
  text-align:left; padding:9px 16px; font-size:11px; font-weight:600;
  text-transform:uppercase; letter-spacing:.5px; color:var(--text-2);
  background:var(--surface); border-bottom:1px solid var(--border); white-space:nowrap;
}
td { padding:11px 16px; border-bottom:1px solid var(--border); vertical-align:middle; }
td, th { max-width:340px; }
tr:last-child td { border-bottom:none; }
tbody tr:hover td { background:#fafbfc; }
.empty { text-align:center; color:var(--text-3); padding:32px; font-size:13px; }

/* ── Badges ──────────────────────────────────────────────── */
.badge {
  display:inline-flex; align-items:center; gap:5px;
  padding:2px 8px; border-radius:20px; font-size:11px; font-weight:500; white-space:nowrap;
}
.badge-dot { width:6px; height:6px; border-radius:50%; flex-shrink:0; }
.badge-sent       { background:var(--green-bg);  color:var(--green); }
.badge-sent .badge-dot       { background:var(--green); }
.badge-queued     { background:var(--yellow-bg); color:var(--yellow); }
.badge-queued .badge-dot     { background:#f59e0b; }
.badge-processing { background:var(--blue-bg);   color:var(--blue); }
.badge-processing .badge-dot { background:var(--blue); }
.badge-failed     { background:var(--red-bg);    color:var(--red); }
.badge-failed .badge-dot     { background:var(--red); }
.badge-service { background:var(--surface); color:var(--text-2); border:1px solid var(--border); font-size:11px; }

/* ── Queue pills ─────────────────────────────────────────── */
.queue-pills { display:flex; gap:6px; align-items:center; }
.pill { font-size:11px; padding:3px 10px; border-radius:20px; background:var(--surface); color:var(--text-2); border:1px solid var(--border); }
.pill-active { background:var(--green-bg); color:var(--green); border-color:transparent; }
.pill-fail   { background:var(--red-bg);   color:var(--red);   border-color:transparent; }

/* ── Tabs ────────────────────────────────────────────────── */
.tabs { display:flex; border-bottom:1px solid var(--border); margin-bottom:16px; }
.tab-btn {
  padding:10px 18px; font-size:13px; font-weight:500; color:var(--text-2);
  background:none; border:none; border-bottom:2px solid transparent;
  cursor:pointer; margin-bottom:-1px; transition:color .12s, border-color .12s;
  display:flex; align-items:center; gap:6px;
}
.tab-btn:hover { color:var(--text); }
.tab-btn.active { color:var(--accent); border-bottom-color:var(--accent); }
.tab-count { background:var(--surface); color:var(--text-2); border-radius:10px; font-size:11px; font-weight:500; padding:1px 7px; }
.tab-pane { display:none; }
.tab-pane.active { display:block; }

/* ── Filter bar ──────────────────────────────────────────── */
.filter-bar { display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin-bottom:12px; }
.filter-input, .filter-select {
  background:var(--bg); border:1px solid var(--border-dk); border-radius:var(--r);
  color:var(--text); padding:7px 12px; font-size:13px; font-family:var(--font); outline:none;
  transition:border-color .12s;
}
.filter-input:focus, .filter-select:focus { border-color:var(--accent); box-shadow:0 0 0 3px rgba(99,91,255,.1); }
.filter-check { display:flex; align-items:center; gap:6px; font-size:13px; color:var(--text-2); cursor:pointer; }

/* ── Queue controls ──────────────────────────────────────── */
.queue-controls { display:flex; gap:10px; align-items:center; padding:16px; flex-wrap:wrap; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display:inline-flex; align-items:center; gap:6px;
  padding:8px 14px; border-radius:var(--r); font-size:13px; font-weight:500;
  cursor:pointer; border:none; text-decoration:none;
  transition:background .12s, border-color .12s; white-space:nowrap; font-family:var(--font);
}
.btn-primary:not(.btn), .btn-ghost:not(.btn), .btn-sm {
  display:inline-flex; align-items:center; justify-content:center; gap:6px;
  border-radius:var(--r); font-size:13px; font-weight:500;
  cursor:pointer; text-decoration:none; white-space:nowrap; font-family:var(--font);
}
.btn-primary:not(.btn) { padding:8px 14px; border:none; background:var(--accent); color:#fff; }
.btn-primary:not(.btn):hover { background:var(--accent-dk); }
.btn-ghost:not(.btn) { padding:8px 14px; background:none; color:var(--text-2); border:1px solid var(--border); }
.btn-ghost:not(.btn):hover { background:var(--surface); color:var(--text); }
.btn-sm { padding:4px 10px; border:1px solid var(--border); background:var(--bg); color:var(--text-2); }
.btn-sm:hover { background:var(--surface); color:var(--text); }
.btn-primary      { background:var(--accent); color:#fff; }
.btn-primary:hover { background:var(--accent-dk); }
.btn-secondary    { background:var(--bg); color:var(--text); border:1px solid var(--border-dk); }
.btn-secondary:hover { background:var(--surface); }
.btn-ghost        { background:none; color:var(--text-2); border:1px solid var(--border); }
.btn-ghost:hover  { background:var(--surface); color:var(--text); }
.btn-danger-ghost { background:none; color:var(--red); border:1px solid var(--border); }
.btn-danger-ghost:hover { background:var(--red-bg); border-color:var(--red); }
.btn-xs  { padding:4px 10px; font-size:11px; border-radius:4px; }
.btn-full { width:100%; justify-content:center; }

/* ── Forms ───────────────────────────────────────────────── */
.form-group { display:flex; flex-direction:column; gap:6px; margin-bottom:14px; }
label { font-size:13px; font-weight:500; }
input[type="text"], input[type="email"], input[type="password"], select, textarea {
  background:var(--bg); border:1px solid var(--border-dk); border-radius:var(--r);
  color:var(--text); padding:9px 13px; font-size:14px; font-family:var(--font);
  outline:none; transition:border-color .12s, box-shadow .12s; width:100%;
}
input:focus, select:focus, textarea:focus {
  border-color:var(--accent); box-shadow:0 0 0 3px rgba(99,91,255,.1);
}
input::placeholder, textarea::placeholder { color:var(--text-3); }
textarea { resize:vertical; line-height:1.6; }

/* ── Send card ───────────────────────────────────────────── */
.send-card, .form-card { padding:24px; max-width:640px; }
.send-footer { display:flex; align-items:center; gap:16px; }

/* ── Pagination ──────────────────────────────────────────── */
.pagination { display:flex; align-items:center; gap:8px; padding:12px 16px; border-top:1px solid var(--border); }
.page-info { color:var(--text-2); font-size:12px; margin-right:auto; }
.page-btn { padding:5px 12px; border:1px solid var(--border); border-radius:var(--r); color:var(--text-2); font-size:12px; text-decoration:none; background:var(--bg); transition:background .12s; }
.page-btn:hover { background:var(--surface); color:var(--text); }

/* ── Alerts ──────────────────────────────────────────────── */
.alert { border-radius:var(--r); padding:12px 16px; margin-bottom:16px; font-size:13px; }
.alert-error   { background:var(--red-bg);   border:1px solid #f5c2c7; color:var(--red); }
.alert-success { background:var(--green-bg); border:1px solid #a8d5c2; color:var(--green); }

/* ── Gmail two-column ────────────────────────────────────── */
.mail-split { display:flex; height:calc(100vh - 280px); min-height:500px; overflow:hidden; }

.mail-list-panel {
  width:320px; flex-shrink:0; border-right:1px solid var(--border);
  overflow-y:auto; display:flex; flex-direction:column;
}
.mail-list-item {
  padding:12px 16px; border-bottom:1px solid var(--border);
  cursor:pointer; transition:background .1s;
}
.mail-list-item:hover    { background:var(--surface); }
.mail-list-item.selected { background:#f0efff; }
.mail-list-item.unread .mail-item-from,
.mail-list-item.unread .mail-item-subject { font-weight:600; color:var(--text); }
.mail-item-row1 { display:flex; justify-content:space-between; align-items:baseline; margin-bottom:3px; }
.mail-item-from    { font-size:13px; color:var(--text); font-weight:400; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.mail-item-date    { font-size:11px; color:var(--text-3); white-space:nowrap; }
.mail-item-subject { font-size:12px; color:var(--text-2); margin-bottom:3px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.mail-item-meta    { display:flex; justify-content:space-between; align-items:center; }
.mail-att-badge    { font-size:11px; color:var(--text-3); }

.mail-detail-panel {
  flex:1; min-width:0; overflow:hidden; display:flex; flex-direction:column;
}
.mail-detail-empty {
  flex:1; display:flex; flex-direction:column; align-items:center;
  justify-content:center; gap:12px; color:var(--text-3); font-size:13px;
}
.mail-detail-content {
  flex:1; min-height:0; height:100%; display:flex; flex-direction:column; overflow:hidden;
}
.mail-detail-header {
  padding:16px 20px; border-bottom:1px solid var(--border); background:var(--surface);
  display:flex; flex-direction:column; gap:6px;
}
.mail-detail-subject { font-size:15px; font-weight:600; }
.mail-detail-meta { font-size:12px; color:var(--text-2); display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.mail-detail-actions { display:flex; gap:8px; }
.mail-detail-body { flex:1; min-height:0; overflow-y:auto; display:block; background:#fff; }
.mail-detail-body::-webkit-scrollbar { display:none; }
.mail-detail-body { scrollbar-width:none; }
.mail-iframe { display:block; width:100%; min-height:100%; border:none; background:#fff; }
.mail-pre { flex:1; overflow-y:auto; padding:20px; white-space:pre-wrap; word-break:break-word; font-family:'Menlo','Consolas',monospace; font-size:12px; line-height:1.6; }

/* ── Misc ────────────────────────────────────────────────── */
.mono { font-family:'Menlo','Consolas',monospace; font-size:12px; }
.text-mono { font-family:'Menlo','Consolas',monospace; font-size:12px; }
.text-muted { color:var(--text-2); font-size:12px; }
.text-sm { font-size:12px; }
.text-2  { color:var(--text-2); }
.text-3  { color:var(--text-3); }
.link    { color:var(--accent); text-decoration:none; }
.link:hover { text-decoration:underline; }
.tooltip-icon { cursor:help; color:var(--yellow); font-size:13px; }
.error-hint { cursor:help; color:var(--yellow); font-size:13px; }
.table-card, .detail-card { border:1px solid var(--border); border-radius:var(--r); background:var(--bg); overflow:hidden; }
.detail-card { padding:22px; }
.detail-grid { display:grid; gap:1px; background:var(--border); border:1px solid var(--border); border-radius:var(--r); overflow:hidden; }
.detail-row { display:grid; grid-template-columns:160px 1fr; gap:12px; background:var(--bg); padding:10px 12px; min-width:0; }
.detail-label { color:var(--text-2); font-size:12px; font-weight:600; text-transform:uppercase; letter-spacing:.4px; }
.detail-section { margin-top:18px; }
.detail-section-title { color:var(--text-2); font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:.5px; margin-bottom:8px; }
.mail-body { border:1px solid var(--border); border-radius:var(--r); background:var(--surface); padding:16px; white-space:pre-wrap; word-break:break-word; font-family:'Menlo','Consolas',monospace; font-size:12px; line-height:1.6; }
.link-more { color:var(--accent); text-decoration:none; font-size:12px; font-weight:600; }
.link-more:hover { text-decoration:underline; }

/* ── Auth dashboard — breakdown bars ────────────────────── */
.breakdown-list { display:flex; flex-direction:column; gap:10px; }
.breakdown-row  { display:flex; align-items:center; gap:10px; }
.breakdown-label{ font-size:12px; color:var(--text-2); min-width:140px; flex-shrink:0; }
.breakdown-bar-wrap { flex:1; height:6px; background:var(--surface); border-radius:3px; overflow:hidden; }
.breakdown-bar  { height:100%; background:var(--accent); border-radius:3px; min-width:2px; transition:width .3s; }
.breakdown-bar.c-bar-purple { background:#9b59b6; }
.breakdown-bar.c-bar-green  { background:var(--green); }
.breakdown-bar.c-bar-yellow { background:var(--yellow); }
.breakdown-count{ font-size:12px; color:var(--text); font-weight:600; min-width:32px; text-align:right; }
.breakdown-divider { border-top:1px solid var(--border); margin:12px 0; }
.comp-badge { font-size:11px; color:var(--text-2); background:var(--surface); padding:2px 8px; border-radius:10px; border:1px solid var(--border); }

/* ── Database viewer ─────────────────────────────────────── */
.db-layout { height:100vh; overflow:hidden; }

/* Col 2 — database nav */
.db-nav-col { padding:0; overflow:hidden; display:flex; flex-direction:column; }

.db-nav-top { padding:14px 12px 12px; flex-shrink:0; }
.db-schema-select {
  width:100%; padding:7px 10px; font-size:13px; font-family:var(--font);
  background:var(--bg); border:1px solid var(--border-dk); border-radius:var(--r);
  color:var(--text); outline:none; cursor:pointer;
  transition:border-color .12s;
}
.db-schema-select:focus { border-color:var(--accent); box-shadow:0 0 0 3px rgba(99,91,255,.1); }

.db-nav-divider { height:1px; background:var(--border); flex-shrink:0; }

.db-nav-tables { flex:1; overflow-y:auto; padding:6px 0; }

.db-nav-hint { padding:12px; font-size:12px; color:var(--text-3); text-align:center; }
.db-nav-loading { padding:12px; font-size:12px; color:var(--text-3); text-align:center; }

.db-table-item {
  display:flex; align-items:center; justify-content:space-between;
  padding:6px 12px; cursor:pointer;
  font-size:12px; color:var(--text-2); font-family:'Menlo','Consolas',monospace;
  white-space:nowrap; overflow:hidden;
  transition:background .1s, color .1s;
}
.db-table-item:hover  { background:var(--surface); color:var(--text); }
.db-table-item.active { background:#f5f4ff; color:var(--accent); font-weight:600; }
.db-table-item-name   { overflow:hidden; text-overflow:ellipsis; min-width:0; }
.db-kind-badge {
  font-size:9px; font-weight:700; background:var(--surface); color:var(--text-3);
  border:1px solid var(--border); border-radius:3px; padding:0 4px; flex-shrink:0; margin-left:4px;
}

/* Col 3 — main */
.db-main { padding:0; overflow:hidden; display:flex; flex-direction:column; }

/* Empty state */
.db-empty-state {
  flex:1; display:flex; flex-direction:column;
  align-items:center; justify-content:center; gap:14px;
  color:var(--text-3);
}
.db-empty-state svg { width:40px; height:40px; opacity:.35; }
.db-empty-state p   { font-size:13px; }

/* Viewer */
.db-viewer { flex:1; display:flex; flex-direction:column; overflow:hidden; }

.db-viewer-header {
  display:flex; align-items:center; justify-content:space-between;
  padding:12px 20px; border-bottom:1px solid var(--border);
  background:var(--surface); flex-shrink:0;
}
.db-viewer-title-row { display:flex; align-items:center; gap:8px; font-size:14px; }
.db-schema-badge {
  font-size:11px; font-weight:600; text-transform:uppercase; letter-spacing:.4px;
  background:#f5f4ff; color:var(--accent); border:1px solid #dddaff;
  border-radius:4px; padding:2px 7px;
}
.db-dot-sep  { color:var(--border-dk); }
.db-table-name { font-family:'Menlo','Consolas',monospace; font-size:13px; font-weight:600; color:var(--text); }

.db-viewer-meta { display:flex; align-items:center; gap:10px; }
.db-total-badge { font-size:12px; color:var(--text-2); background:var(--bg); border:1px solid var(--border); border-radius:4px; padding:3px 10px; }
.db-loading-txt { font-size:12px; color:var(--text-3); font-style:italic; }

/* Scrollable table area */
.db-table-scroll { flex:1; overflow:auto; }
.db-table-scroll table { width:max-content; min-width:100%; border-collapse:collapse; }
.db-table-scroll th {
  position:sticky; top:0; z-index:1;
  padding:8px 14px 6px; background:var(--surface); border-bottom:1px solid var(--border-dk);
  text-align:left; white-space:nowrap; vertical-align:bottom;
}
.db-col-name { display:block; font-size:11px; font-weight:700; text-transform:none; letter-spacing:0; color:var(--text); font-family:'Menlo','Consolas',monospace; }
.db-col-type { display:block; font-size:10px; font-weight:500; color:var(--text-3); text-transform:none; letter-spacing:0; margin-top:1px; }
.db-table-scroll td {
  padding:8px 14px; border-bottom:1px solid var(--border);
  font-size:12px; font-family:'Menlo','Consolas',monospace;
  white-space:nowrap; max-width:360px; overflow:hidden; text-overflow:ellipsis;
  color:var(--text);
}

.db-select-th,
.db-select-cell {
  width: 38px;
  max-width: 38px;
  text-align: center;
}

.db-row-select {
  width: 16px;
  height: 16px;
  accent-color: #000;
}
.db-table-scroll tr:last-child td { border-bottom:none; }
.db-table-scroll tbody tr:hover td { background:#fafbfc; }

.db-null { color:var(--text-3); font-style:italic; }
.db-json { color:var(--blue); }
.db-table-empty, .db-error { padding:32px; text-align:center; font-size:13px; color:var(--text-3); font-family:var(--font); }
.db-error { color:var(--red); }

/* Footer */
.db-footer {
  display:flex; align-items:center; justify-content:space-between;
  padding:9px 20px; border-top:1px solid var(--border); background:var(--surface); flex-shrink:0;
}
.db-limit-row { display:flex; align-items:center; gap:7px; font-size:12px; color:var(--text-2); }
.db-limit-select {
  background:var(--bg); border:1px solid var(--border-dk); border-radius:4px;
  color:var(--text); padding:3px 8px; font-size:12px; font-family:var(--font);
  outline:none; cursor:pointer;
}
.db-limit-select:focus { border-color:var(--accent); }

.db-pagination { display:flex; align-items:center; gap:8px; }
.db-page-info  { font-size:12px; color:var(--text-2); }
.db-page-num   { font-size:12px; color:var(--text); font-weight:500; min-width:48px; text-align:center; }
.db-page-btn {
  background:var(--bg); border:1px solid var(--border-dk); border-radius:4px;
  color:var(--text-2); font-size:12px; padding:3px 10px; cursor:pointer;
  font-family:var(--font); transition:background .1s, color .1s;
}
.db-page-btn:hover:not(:disabled) { background:var(--surface); color:var(--text); }
.db-page-btn:disabled { opacity:.4; cursor:default; }

@media (max-width: 1120px) {
  .component-grid { grid-template-columns:1fr; }
  .component-card.span-2 { grid-column:auto; }
  .analytics-side { width:180px; }
  .main { padding:24px; }
}

@media (max-width: 820px) {
  .app-layout, .layout { display:block; min-height:100vh; padding-top:56px; }
  .services-col {
    position:fixed; top:0; left:0; right:0; z-index:10;
    width:100%; height:56px; flex-direction:row; border-right:none; border-bottom:1px solid var(--border);
  }
  .services-logo { width:56px; height:56px; padding:0; border-bottom:none; border-right:1px solid var(--border); }
  .services-list { flex:1; flex-direction:row; justify-content:flex-start; padding:0 8px; overflow-x:auto; }
  .services-footer { width:auto; padding:0 8px; border-top:none; border-left:1px solid var(--border); }
  .service-link.active::before { left:10px; right:10px; top:auto; bottom:-8px; width:auto; height:3px; }
  .subservices-col {
    position:sticky; top:56px; z-index:9; width:100%; height:auto;
    flex-direction:row; align-items:center; gap:4px; overflow-x:auto; border-right:none; border-bottom:1px solid var(--border);
    padding:8px;
  }
  .subservices-header { padding:0 8px; white-space:nowrap; }
  .subservice-link { white-space:nowrap; border-radius:6px; min-height:34px; }
  .subservice-link.active { box-shadow:none; }
  .main { padding:18px; }
  .section-header-bar, .page-header { flex-direction:column; align-items:flex-start; gap:12px; }
  .stat-chips { grid-template-columns:repeat(2, minmax(0, 1fr)); }
  .tabs { overflow-x:auto; }
  .tab-btn { white-space:nowrap; }
  .filter-input, .filter-select { flex:1 1 170px; min-width:0; }
  .mail-split { flex-direction:column; height:auto; min-height:0; }
  .mail-list-panel { width:100%; max-height:360px; border-right:none; border-bottom:1px solid var(--border); }
  .mail-detail-panel { min-height:420px; }
  .comp-analytics-body { flex-direction:column; }
  .analytics-side { width:100%; border-left:none; border-top:1px solid var(--border); }
  .db-layout { display:block; height:auto; overflow:visible; padding-top:56px; }
  .db-nav-col { position:sticky; top:56px; width:100%; max-height:240px; border-right:none; border-bottom:1px solid var(--border); }
  .db-main { min-height:70vh; }
  .db-viewer-header, .db-footer { flex-direction:column; align-items:flex-start; gap:8px; }
  .detail-row { grid-template-columns:1fr; gap:4px; }
}

/* ── Professional dashboard skin ─────────────────────────── */
:root {
  --bg: #f7f9fc;
  --surface: #f2f5f9;
  --surface-2: #edf2f7;
  --card: #ffffff;
  --border: #e2e8f0;
  --border-dk: #cbd5e1;
  --accent: #0f766e;
  --accent-dk: #115e59;
  --accent-soft: #e6f5f2;
  --text: #172033;
  --text-2: #5f6f85;
  --text-3: #93a2b7;
  --green: #16835f;  --green-bg: #e8f7f0;
  --yellow: #a15c07; --yellow-bg: #fff4db;
  --red: #b42332;    --red-bg: #fdecef;
  --blue: #2563a9;   --blue-bg: #e9f2ff;
  --purple: #7257a5; --purple-bg: #f1edfb;
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow-sm: 0 8px 24px rgba(15, 23, 42, .08);
  --shadow-md: 0 18px 42px rgba(15, 23, 42, .10);
  --shadow-ring: 0 0 0 1px rgba(15, 23, 42, .04);
  --r: 8px;
  --font: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body {
  background:
    radial-gradient(circle at top left, rgba(15,118,110,.08), transparent 34vw),
    linear-gradient(180deg, #fbfcff 0%, var(--bg) 280px);
  letter-spacing: 0;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid rgba(15,118,110,.28);
  outline-offset: 2px;
}

.main { padding:30px 34px; }

.services-col,
.subservices-col {
  background:rgba(255,255,255,.86);
  backdrop-filter:blur(16px);
}

.services-logo img {
  width:30px;
  height:30px;
  border-radius:8px;
  box-shadow:var(--shadow-xs);
}

.service-link {
  width:42px;
  height:42px;
  border-radius:10px;
  transition:background .14s, color .14s, box-shadow .14s, transform .14s;
}

.service-link:hover:not(.disabled) {
  background:#fff;
  color:var(--text);
  box-shadow:var(--shadow-xs), var(--shadow-ring);
  transform:translateY(-1px);
}

.service-link.active {
  background:#fff;
  color:var(--accent);
  box-shadow:var(--shadow-sm), var(--shadow-ring);
}

.subservices-header {
  padding:0 16px 10px;
  font-weight:800;
}

.subservice-link {
  min-height:34px;
  padding:8px 16px;
  font-weight:500;
  transition:color .14s, background .14s, box-shadow .14s;
}

.subservice-link:hover {
  background:#fff;
  color:var(--text);
}

.subservice-link.active {
  color:var(--accent);
  background:var(--accent-soft);
  font-weight:700;
  box-shadow:inset 3px 0 0 var(--accent);
}

.section-header-bar {
  margin-bottom:22px;
  padding-bottom:20px;
}

.section-icon {
  width:42px;
  height:42px;
  border-radius:10px;
  background:#fff;
  color:var(--accent);
  border:1px solid rgba(226,232,240,.9);
  box-shadow:var(--shadow-sm);
}

.section-title,
.page-header h1 {
  font-size:22px;
  font-weight:800;
  line-height:1.15;
  letter-spacing:0;
}

.section-sub,
.page-sub {
  margin-top:4px;
  font-weight:500;
}

.stat-chips,
.stat-grid {
  border:1px solid rgba(226,232,240,.82);
  border-radius:10px;
  box-shadow:var(--shadow-sm);
}

.stat-chip,
.stat-card {
  background:linear-gradient(180deg, #fff 0%, #fbfcff 100%);
}

.stat-chip {
  padding:18px;
  gap:8px;
}

.chip-label,
.stat-label {
  font-weight:800;
  letter-spacing:.6px;
}

.chip-num,
.stat-num {
  font-size:27px;
  font-weight:800;
  letter-spacing:0;
}

.component-grid {
  gap:18px;
}

.component-card,
.card,
.table-card,
.detail-card,
.login-card {
  background:var(--card);
  border:1px solid rgba(226,232,240,.84);
  border-radius:10px;
  box-shadow:var(--shadow-sm), var(--shadow-ring);
}

.component-card {
  transition:box-shadow .16s, transform .16s;
}

.component-card:hover {
  box-shadow:var(--shadow-md), var(--shadow-ring);
}

.comp-header,
.card-header,
.mail-detail-header,
.db-viewer-header,
.db-footer {
  background:linear-gradient(180deg, #fff 0%, #f8fafc 100%);
}

.comp-header {
  padding:15px 18px 13px;
  gap:12px;
}

.comp-title,
.card-title {
  font-weight:800;
  letter-spacing:.65px;
}

.comp-link,
.link,
.link-more {
  color:var(--accent);
  font-weight:700;
}

.comp-body {
  padding:18px;
}

.global-badge,
.pill,
.badge,
.comp-badge,
.db-total-badge {
  border-radius:999px;
  font-weight:700;
  box-shadow:var(--shadow-xs);
}

.badge {
  padding:3px 9px;
}

.badge-service,
.pill,
.db-total-badge,
.comp-badge {
  background:#fff;
  border:1px solid var(--border);
}

.q-count-box {
  padding:10px 6px;
  border-radius:8px;
  background:linear-gradient(180deg, #fff, var(--surface));
  border:1px solid var(--border);
  box-shadow:var(--shadow-xs);
}

.q-count-num {
  font-weight:800;
  letter-spacing:0;
}

.q-count-label {
  font-weight:800;
}

.analytics-chart-wrap {
  height:250px;
  padding:18px 22px;
}

th {
  padding:10px 18px;
  background:#f8fafc;
  font-size:10px;
  font-weight:800;
}

td {
  padding:12px 18px;
}

tbody tr:hover td {
  background:#fbfcff;
}

.tabs {
  width:max-content;
  max-width:100%;
  gap:6px;
  margin-bottom:16px;
  padding:5px;
  border:1px solid var(--border);
  border-radius:10px;
  background:#fff;
  box-shadow:var(--shadow-sm), var(--shadow-ring);
}

.tab-btn {
  padding:9px 14px;
  border-radius:8px;
  border-bottom:none;
  margin-bottom:0;
  font-weight:700;
  transition:color .14s, background .14s, box-shadow .14s;
}

.tab-btn.active {
  background:var(--accent-soft);
  color:var(--accent);
  border-bottom-color:transparent;
  box-shadow:var(--shadow-xs);
}

.tab-count {
  background:#fff;
  border:1px solid var(--border);
  border-radius:999px;
  font-weight:700;
}

.filter-input,
.filter-select,
input[type="text"],
input[type="email"],
input[type="password"],
select,
textarea {
  background:#fff;
  border:1px solid var(--border);
  border-radius:8px;
  box-shadow:var(--shadow-xs);
}

.filter-input,
.filter-select {
  padding:9px 12px;
}

input[type="text"],
input[type="email"],
input[type="password"],
select,
textarea {
  padding:11px 13px;
}

.filter-input:focus,
.filter-select:focus,
input:focus,
select:focus,
textarea:focus {
  border-color:var(--accent);
  box-shadow:0 0 0 3px rgba(15,118,110,.12), var(--shadow-xs);
}

.btn,
.btn-primary:not(.btn),
.btn-ghost:not(.btn),
.btn-sm,
.page-btn,
.db-page-btn {
  border-radius:8px;
  font-weight:700;
  box-shadow:var(--shadow-xs);
  transition:background .14s, border-color .14s, box-shadow .14s, transform .14s, color .14s;
}

.btn:hover,
.btn-primary:not(.btn):hover,
.btn-ghost:not(.btn):hover,
.btn-sm:hover,
.page-btn:hover,
.db-page-btn:hover:not(:disabled) {
  transform:translateY(-1px);
}

.btn-primary,
.btn-primary:not(.btn) {
  background:var(--accent);
  color:#fff;
}

.btn-primary:hover,
.btn-primary:not(.btn):hover {
  background:var(--accent-dk);
}

.btn-secondary,
.btn-ghost,
.btn-ghost:not(.btn),
.btn-sm,
.page-btn,
.db-page-btn {
  background:#fff;
}

.login-wrapper {
  padding:24px;
  background:
    radial-gradient(circle at 20% 20%, rgba(15,118,110,.12), transparent 32vw),
    var(--bg);
}

.login-card {
  width:min(100%, 400px);
  padding:42px;
  background:rgba(255,255,255,.94);
  backdrop-filter:blur(16px);
  box-shadow:var(--shadow-md), var(--shadow-ring);
}

.login-title {
  font-size:19px;
  font-weight:800;
}

.mail-list-item {
  padding:13px 18px;
}

.mail-list-item:hover {
  background:#fbfcff;
}

.mail-list-item.selected {
  background:var(--accent-soft);
  box-shadow:inset 3px 0 0 var(--accent);
}

.mail-detail-subject {
  font-size:16px;
  font-weight:800;
}

.detail-card {
  padding:24px;
}

.detail-row {
  background:#fff;
}

.db-schema-badge,
.db-table-item.active {
  background:var(--accent-soft);
  color:var(--accent);
  border-color:rgba(15,118,110,.18);
}

.db-schema-item:hover,
.db-table-item:hover {
  background:#fff;
}

.db-table-scroll th {
  background:#f8fafc;
}

.db-table-scroll tbody tr:hover td {
  background:#fbfcff;
}

.breakdown-bar.c-bar-purple {
  background:var(--purple);
}

@media (max-width: 1120px) {
  .main { padding:24px; }
}

@media (max-width: 820px) {
  .main { padding:18px; }
  .services-col,
  .subservices-col {
    background:rgba(255,255,255,.94);
  }
  .subservice-link.active {
    box-shadow:var(--shadow-xs);
  }
  .tabs {
    width:100%;
  }
  .stat-chips {
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }
}

/* ════════════════════════════════════════════════════════════════
   NINE ADMIN · COOL SURFACE PASS
   Blanc/gris dominant, beige conserve uniquement comme accent discret.
   ════════════════════════════════════════════════════════════════ */
:root {
  --bg: #f7f8fa !important;
  --surface: #ffffff !important;
  --surface-2: #f4f6f8 !important;
  --surface-soft: #f6f7f9 !important;
  --surface-page: #f7f8fa !important;
  --surface-sidebar: #ffffff !important;
  --surface-card: #ffffff !important;
  --surface-hover: #eef1f5 !important;
  --line-soft: rgba(17, 24, 39, .08) !important;
  --line: rgba(17, 24, 39, .12) !important;
  --accent-soft: #f3eadc !important;
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 30px;
}

body,
.login-wrapper,
.main {
  background: var(--bg) !important;
}

body {
  background-image: none !important;
}

.services-col,
.subservices-col,
.mail-workspace-sidebar,
.files-nav-col,
.db-nav-col,
.card,
.component-card,
.settings-card,
.node-card,
.dns-card,
.mail-content-card,
.db-layout .db-viewer,
.files-main-panel {
  background: #fff !important;
  border-color: var(--line-soft) !important;
}

.subservices-header,
.section-header-bar,
.page-header,
.db-layout .db-viewer-toolbar,
.db-layout .db-footer,
.files-editor-header,
.table thead,
thead,
.dns-records-table thead,
.mail-table-header,
.gmail-header-row {
  background: var(--surface-soft) !important;
}

.service-link,
.btn-logout,
.subservice-link,
.db-layout .db-table-item,
.files-entry-row,
.dns-zone-item,
.mail-folder,
.mail-mini-address,
.db-tab-btn,
.tab-btn {
  border-radius: 999px !important;
}

.service-link.active,
.subservice-link.active,
.db-layout .db-table-item.active,
.files-entry.is-active > .files-entry-row,
.dns-zone-item.active,
.mail-folder.active,
.tab-btn.active,
.db-tab-btn.active {
  background: var(--surface-hover) !important;
  box-shadow: inset 0 0 0 1px rgba(17, 24, 39, .06) !important;
}

.service-link:hover,
.subservice-link:hover,
.db-layout .db-table-item:hover,
.files-entry-row:hover,
.dns-zone-item:hover,
.mail-folder:hover,
.mail-mini-address:hover,
.tab-btn:hover,
.db-tab-btn:hover {
  background: #f3f5f7 !important;
}

.service-link.active::before {
  left: -10px !important;
  top: 50% !important;
  bottom: auto !important;
  width: 6px !important;
  height: 24px !important;
  border-radius: 999px !important;
  transform: translateY(-50%) !important;
  background: var(--accent) !important;
}

.subservice-link.active::before,
.db-layout .db-table-item.active::before,
.dns-zone-item.active::before,
.files-entry.is-active > .files-entry-row::before {
  display: block !important;
  left: 8px !important;
  top: 50% !important;
  width: 5px !important;
  height: 18px !important;
  border-radius: 999px !important;
  transform: translateY(-50%) !important;
  background: var(--accent) !important;
}

.badge,
.pill,
.comp-badge,
.db-total-badge,
.tab-count,
.soon-badge,
.global-badge,
.section-icon,
.progress-bar,
.mini-bar-fill,
.disk-bar-fill,
.token-fill,
[class*="progress"] [style*="background"],
[style*="background: var(--accent"] {
  background-color: var(--accent-soft) !important;
}

.section-icon,
.badge,
.pill,
.comp-badge,
.db-total-badge,
.tab-count,
.soon-badge,
.global-badge {
  color: var(--accent-strong) !important;
  border-color: rgba(181, 142, 94, .18) !important;
}

input,
select,
textarea,
.filter-input,
.filter-select,
.form-input,
.db-row-search,
.db-search-input,
.dns-search-input,
.files-root-select,
.compose-input,
.compose-body,
.db-viewer-tabs {
  background: #fff !important;
  border-color: var(--line-soft) !important;
  border-radius: 18px !important;
}

/* ════════════════════════════════════════════════════════════════
   NINE ADMIN · FINAL LAYOUT NORMALIZATION OVERRIDE
   Placement coherent, moins de lignes internes, blocs plus respirants.
   ════════════════════════════════════════════════════════════════ */
* {
  box-sizing: border-box;
}

.app-layout {
  align-items: stretch !important;
}

.main {
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 22px !important;
}

.section-header-bar,
.page-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 18px !important;
  min-height: 58px !important;
}

.section-header-info,
.page-title-wrap,
.comp-header,
.node-header,
.card-header,
.settings-card-header,
.mail-toolbar,
.db-layout .db-viewer-toolbar,
.files-editor-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 14px !important;
  min-width: 0 !important;
}

.section-header-info {
  justify-content: flex-start !important;
}

.section-title,
.section-sub,
.section-meta-line,
.comp-title,
.node-name,
.svc-name,
.mail-subject,
.files-entry-name {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.component-grid,
.settings-grid,
.stat-grid,
.stats-row,
.stat-chips,
.mail-system-grid,
.queue-counts-grid,
.redis-grid,
.dns-stats-row {
  display: grid !important;
  gap: 16px !important;
  align-items: stretch !important;
}

.component-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.span-2 {
  grid-column: 1 / -1 !important;
}

.stat-chips,
.stats-row,
.stat-grid,
.dns-stats-row {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)) !important;
}

.component-card,
.card,
.settings-card,
.node-card,
.stat-card,
.stat-chip,
.dns-card,
.queue-card,
.mail-content-card,
.db-layout .db-viewer,
.files-main-panel,
.q-count-box,
.bucket-item,
.activity-item,
.mini-card {
  border: 1px solid var(--line-soft) !important;
  border-radius: var(--radius-lg) !important;
  background: #fff !important;
  box-shadow: 0 12px 34px rgba(15, 23, 42, .045) !important;
  overflow: hidden !important;
}

.component-card,
.card,
.settings-card,
.node-card,
.dns-card,
.queue-card,
.mail-content-card,
.db-layout .db-viewer,
.files-main-panel {
  padding: 0 !important;
}

.comp-header,
.card-header,
.settings-card-header,
.node-header,
.files-editor-header,
.mail-table-header,
.gmail-header-row,
.db-layout .db-viewer-toolbar {
  min-height: 56px !important;
  padding: 15px 18px !important;
  border-bottom: 0 !important;
  background: linear-gradient(180deg, #fff, var(--surface-soft)) !important;
}

.comp-body,
.card-body,
.settings-card-body,
.dns-card-body,
.queue-card-body,
.mail-card-body {
  padding: 18px !important;
}

.svc-list,
.table-wrap,
.db-layout .db-table-scroll,
.dns-records-table-wrap,
.mail-table-wrap,
.files-table-wrap {
  width: 100% !important;
  overflow: auto !important;
}

.svc-list {
  padding: 8px !important;
}

.svc-row {
  grid-template-columns: 12px minmax(160px, 1.4fr) minmax(82px, .7fr) minmax(64px, .5fr) minmax(110px, .9fr) minmax(82px, .7fr) minmax(82px, auto) !important;
  gap: 12px !important;
  min-height: 44px !important;
  padding: 10px 12px !important;
  border-bottom: 0 !important;
  border-radius: 16px !important;
}

.svc-row:not(.svc-header):hover {
  background: var(--surface-soft) !important;
}

.svc-row.svc-header {
  position: sticky;
  top: 0;
  z-index: 2;
  min-height: 36px !important;
  background: #fff !important;
  border-bottom: 0 !important;
  box-shadow: inset 0 -1px 0 var(--line-soft) !important;
}

.svc-resource {
  min-width: 0 !important;
}

.btn-restart,
.status-btns button,
.node-actions button,
.table-action,
.action-btn,
button {
  border-radius: 999px !important;
}

.pgb-metrics,
.pgb-perf,
.attention-grid,
.mail-address-grid {
  display: grid !important;
  gap: 12px !important;
  background: transparent !important;
  border: 0 !important;
  padding: 14px !important;
}

.pgb-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

.pgb-perf {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  padding-top: 0 !important;
}

.pgb-metric,
.pgb-perf-item,
.attention-item,
.mail-address-grid > div {
  border: 1px solid var(--line-soft) !important;
  border-radius: var(--radius-md) !important;
  background: var(--surface-soft) !important;
  padding: 15px !important;
  border-right: 1px solid var(--line-soft) !important;
  min-width: 0 !important;
}

.pgb-totals {
  margin: 0 14px 14px !important;
  padding: 14px !important;
  border: 1px solid var(--line-soft) !important;
  border-radius: var(--radius-md) !important;
  background: #fff !important;
}

table,
.table,
.dns-records-table,
.db-layout table,
#users-table {
  width: 100% !important;
  border-collapse: separate !important;
  border-spacing: 0 8px !important;
}

thead,
thead tr,
.svc-header {
  border-radius: 16px !important;
}

th {
  border: 0 !important;
  padding: 10px 14px !important;
  color: var(--text-3) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: .045em !important;
}

td {
  border-top: 1px solid var(--line-soft) !important;
  border-bottom: 1px solid var(--line-soft) !important;
  padding: 13px 14px !important;
  background: #fff !important;
}

tbody tr td:first-child {
  border-left: 1px solid var(--line-soft) !important;
  border-top-left-radius: 16px !important;
  border-bottom-left-radius: 16px !important;
}

tbody tr td:last-child {
  border-right: 1px solid var(--line-soft) !important;
  border-top-right-radius: 16px !important;
  border-bottom-right-radius: 16px !important;
}

tbody tr {
  border: 0 !important;
}

tbody tr:hover td {
  background: var(--surface-soft) !important;
}

.node-body {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 12px !important;
  padding: 14px !important;
}

.node-section {
  border-right: 0 !important;
  border-bottom: 0 !important;
  border: 1px solid var(--line-soft) !important;
  border-radius: var(--radius-md) !important;
  background: var(--surface-soft) !important;
  min-width: 0 !important;
}

.bucket-grid,
.activity-grid,
.status-btns,
.node-info-rows,
.disk-labels,
.node-meta {
  gap: 8px !important;
  min-width: 0 !important;
}

.bucket-grid,
.activity-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(82px, 1fr)) !important;
}

.bucket-item,
.activity-item,
.q-count-box,
.mini-card {
  box-shadow: none !important;
  padding: 10px !important;
}

.section-divider {
  margin: 4px 0 0 !important;
}

.section-divider::after {
  opacity: .55 !important;
}

.alert,
[style*="background:rgba(239,68,68"],
[style*="background:rgba(34,197,94"] {
  border-radius: var(--radius-md) !important;
}

[style*="var(--card-bg"],
[style*="#1e2433"] {
  background: #fff !important;
  border-color: var(--line-soft) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: 0 12px 34px rgba(15, 23, 42, .045) !important;
  color: var(--text) !important;
}

[style*="#e2e8f0"] {
  color: var(--text) !important;
}

[style*="rgba(0,0,0,0.25)"],
[style*="rgba(0,0,0,0.3)"],
[style*="rgba(0,0,0,0.2)"] {
  background: var(--surface-soft) !important;
  color: var(--text) !important;
  border-color: var(--line-soft) !important;
}

@media (max-width: 1180px) {
  .component-grid,
  .node-body,
  .pgb-metrics,
  .pgb-perf {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 760px) {
  .section-header-bar,
  .page-header,
  .comp-header,
  .node-header {
    align-items: flex-start !important;
    flex-direction: column !important;
  }

  .component-grid,
  .node-body,
  .pgb-metrics,
  .pgb-perf,
  .stat-chips,
  .stats-row,
  .stat-grid,
  .dns-stats-row {
    grid-template-columns: 1fr !important;
  }
}

/* ════════════════════════════════════════════════════════════════
   NINE ADMIN · FINAL LAYOUT NORMALIZATION
   Placement coherent, moins de lignes internes, blocs plus respirants.
   ════════════════════════════════════════════════════════════════ */
* {
  box-sizing: border-box;
}

.app-layout {
  align-items: stretch !important;
}

.main {
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 22px !important;
}

.section-header-bar,
.page-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 18px !important;
  min-height: 58px !important;
}

.section-header-info,
.page-title-wrap,
.comp-header,
.node-header,
.card-header,
.settings-card-header,
.mail-toolbar,
.db-layout .db-viewer-toolbar,
.files-editor-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 14px !important;
  min-width: 0 !important;
}

.section-header-info {
  justify-content: flex-start !important;
}

.section-title,
.section-sub,
.section-meta-line,
.comp-title,
.node-name,
.svc-name,
.mail-subject,
.files-entry-name {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.component-grid,
.settings-grid,
.stat-grid,
.stats-row,
.stat-chips,
.mail-system-grid,
.queue-counts-grid,
.redis-grid,
.dns-stats-row {
  display: grid !important;
  gap: 16px !important;
  align-items: stretch !important;
}

.component-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.span-2 {
  grid-column: 1 / -1 !important;
}

.stat-chips,
.stats-row,
.stat-grid,
.dns-stats-row {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)) !important;
}

.component-card,
.card,
.settings-card,
.node-card,
.stat-card,
.stat-chip,
.dns-card,
.queue-card,
.mail-content-card,
.db-layout .db-viewer,
.files-main-panel,
.q-count-box,
.bucket-item,
.activity-item,
.mini-card {
  border: 1px solid var(--line-soft) !important;
  border-radius: var(--radius-lg) !important;
  background: #fff !important;
  box-shadow: 0 12px 34px rgba(15, 23, 42, .045) !important;
  overflow: hidden !important;
}

.component-card,
.card,
.settings-card,
.node-card,
.dns-card,
.queue-card,
.mail-content-card,
.db-layout .db-viewer,
.files-main-panel {
  padding: 0 !important;
}

.comp-header,
.card-header,
.settings-card-header,
.node-header,
.files-editor-header,
.mail-table-header,
.gmail-header-row,
.db-layout .db-viewer-toolbar {
  min-height: 56px !important;
  padding: 15px 18px !important;
  border-bottom: 0 !important;
  background: linear-gradient(180deg, #fff, var(--surface-soft)) !important;
}

.comp-body,
.card-body,
.settings-card-body,
.dns-card-body,
.queue-card-body,
.mail-card-body {
  padding: 18px !important;
}

.svc-list,
.table-wrap,
.db-layout .db-table-scroll,
.dns-records-table-wrap,
.mail-table-wrap,
.files-table-wrap {
  width: 100% !important;
  overflow: auto !important;
}

.svc-list {
  padding: 8px !important;
}

.svc-row {
  grid-template-columns: 12px minmax(160px, 1.4fr) minmax(82px, .7fr) minmax(64px, .5fr) minmax(110px, .9fr) minmax(82px, .7fr) minmax(82px, auto) !important;
  gap: 12px !important;
  min-height: 44px !important;
  padding: 10px 12px !important;
  border-bottom: 0 !important;
  border-radius: 16px !important;
}

.svc-row:not(.svc-header):hover {
  background: var(--surface-soft) !important;
}

.svc-row.svc-header {
  position: sticky;
  top: 0;
  z-index: 2;
  min-height: 36px !important;
  background: #fff !important;
  border-bottom: 0 !important;
  box-shadow: inset 0 -1px 0 var(--line-soft) !important;
}

.svc-resource {
  min-width: 0 !important;
}

.btn-restart,
.status-btns button,
.node-actions button,
.table-action,
.action-btn,
button {
  border-radius: 999px !important;
}

.pgb-metrics,
.pgb-perf,
.attention-grid,
.mail-address-grid {
  display: grid !important;
  gap: 12px !important;
  background: transparent !important;
  border: 0 !important;
  padding: 14px !important;
}

.pgb-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

.pgb-perf {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  padding-top: 0 !important;
}

.pgb-metric,
.pgb-perf-item,
.attention-item,
.mail-address-grid > div {
  border: 1px solid var(--line-soft) !important;
  border-radius: var(--radius-md) !important;
  background: var(--surface-soft) !important;
  padding: 15px !important;
  border-right: 1px solid var(--line-soft) !important;
  min-width: 0 !important;
}

.pgb-totals {
  margin: 0 14px 14px !important;
  padding: 14px !important;
  border: 1px solid var(--line-soft) !important;
  border-radius: var(--radius-md) !important;
  background: #fff !important;
}

table,
.table,
.dns-records-table,
.db-layout table,
#users-table {
  width: 100% !important;
  border-collapse: separate !important;
  border-spacing: 0 8px !important;
}

thead,
thead tr,
.svc-header {
  border-radius: 16px !important;
}

th {
  border: 0 !important;
  padding: 10px 14px !important;
  color: var(--text-3) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: .045em !important;
}

td {
  border-top: 1px solid var(--line-soft) !important;
  border-bottom: 1px solid var(--line-soft) !important;
  padding: 13px 14px !important;
  background: #fff !important;
}

tbody tr td:first-child {
  border-left: 1px solid var(--line-soft) !important;
  border-top-left-radius: 16px !important;
  border-bottom-left-radius: 16px !important;
}

tbody tr td:last-child {
  border-right: 1px solid var(--line-soft) !important;
  border-top-right-radius: 16px !important;
  border-bottom-right-radius: 16px !important;
}

tbody tr {
  border: 0 !important;
}

tbody tr:hover td {
  background: var(--surface-soft) !important;
}

.node-body {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 12px !important;
  padding: 14px !important;
}

.node-section {
  border-right: 0 !important;
  border-bottom: 0 !important;
  border: 1px solid var(--line-soft) !important;
  border-radius: var(--radius-md) !important;
  background: var(--surface-soft) !important;
  min-width: 0 !important;
}

.bucket-grid,
.activity-grid,
.status-btns,
.node-info-rows,
.disk-labels,
.node-meta {
  gap: 8px !important;
  min-width: 0 !important;
}

.bucket-grid,
.activity-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(82px, 1fr)) !important;
}

.bucket-item,
.activity-item,
.q-count-box,
.mini-card {
  box-shadow: none !important;
  padding: 10px !important;
}

.section-divider {
  margin: 4px 0 0 !important;
}

.section-divider::after {
  opacity: .55 !important;
}

.alert,
[style*="background:rgba(239,68,68"],
[style*="background:rgba(34,197,94"] {
  border-radius: var(--radius-md) !important;
}

[style*="var(--card-bg"],
[style*="#1e2433"] {
  background: #fff !important;
  border-color: var(--line-soft) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: 0 12px 34px rgba(15, 23, 42, .045) !important;
  color: var(--text) !important;
}

[style*="#e2e8f0"] {
  color: var(--text) !important;
}

[style*="rgba(0,0,0,0.25)"],
[style*="rgba(0,0,0,0.3)"],
[style*="rgba(0,0,0,0.2)"] {
  background: var(--surface-soft) !important;
  color: var(--text) !important;
  border-color: var(--line-soft) !important;
}

@media (max-width: 1180px) {
  .component-grid,
  .node-body,
  .pgb-metrics,
  .pgb-perf {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 760px) {
  .section-header-bar,
  .page-header,
  .comp-header,
  .node-header {
    align-items: flex-start !important;
    flex-direction: column !important;
  }

  .component-grid,
  .node-body,
  .pgb-metrics,
  .pgb-perf,
  .stat-chips,
  .stats-row,
  .stat-grid,
  .dns-stats-row {
    grid-template-columns: 1fr !important;
  }
}

/* ── Brandkit alignment ─────────────────────────────────── */
:root {
  --brand-primary: #1dd2f1;
  --brand-primary-light: #e8fafd;
  --brand-primary-mid: #0bb8d9;
  --brand-primary-dark: #0895b0;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-150: #ececef;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --gray-950: #0a0f1a;
  --surface-page: #f5f6f8;
  --surface-card: #ffffff;
  --surface-sidebar: #ffffff;
  --surface-dark: #0d1117;
  --text-primary: #111827;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --shadow-card: 0 1px 3px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.06);
  --shadow-card-hover: 0 4px 8px rgba(0,0,0,.08), 0 12px 32px rgba(0,0,0,.10);
  --shadow-primary: 0 4px 20px rgba(29,210,241,.25);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 22px;

  --bg: var(--surface-page);
  --surface: var(--gray-100);
  --surface-2: var(--gray-150);
  --card: var(--surface-card);
  --border: var(--gray-200);
  --border-dk: var(--gray-300);
  --accent: var(--brand-primary);
  --accent-dk: var(--brand-primary-mid);
  --accent-soft: var(--brand-primary-light);
  --text: var(--text-primary);
  --text-2: var(--text-secondary);
  --text-3: var(--text-muted);
  --blue: var(--brand-primary-dark);
  --blue-bg: var(--brand-primary-light);
  --shadow-xs: 0 1px 2px rgba(0,0,0,.05);
  --shadow-sm: var(--shadow-card);
  --shadow-md: var(--shadow-card-hover);
  --shadow-ring: 0 0 0 1px rgba(17,24,39,.03);
  --r: var(--radius-md);
}

body {
  background:var(--surface-page);
  color:var(--text-primary);
}

.services-col,
.subservices-col {
  background:var(--surface-sidebar);
  backdrop-filter:none;
}

.service-link.active,
.service-link:hover:not(.disabled) {
  background:var(--brand-primary-light);
  color:var(--brand-primary-dark);
}

.service-link.active {
  box-shadow:var(--shadow-primary);
}

.service-link.active::before {
  background:var(--brand-primary);
}

.subservice-link.active {
  background:var(--brand-primary-light);
  color:var(--brand-primary-dark);
  box-shadow:inset 3px 0 0 var(--brand-primary);
}

.section-icon {
  color:var(--brand-primary-dark);
  border-color:rgba(29,210,241,.28);
  box-shadow:var(--shadow-primary);
}

.section-title,
.page-header h1 {
  color:var(--text-primary);
  font-weight:800;
  letter-spacing:-.3px;
}

.section-sub,
.page-sub {
  color:var(--text-secondary);
}

.component-card,
.card,
.table-card,
.detail-card,
.login-card {
  border-radius:var(--radius-lg);
  border-color:var(--gray-200);
  box-shadow:var(--shadow-card);
}

.component-card:hover,
.card:hover,
.table-card:hover,
.detail-card:hover {
  box-shadow:var(--shadow-card-hover);
}

.stat-chips {
  border-radius:var(--radius-lg);
  box-shadow:var(--shadow-card);
}

.stat-chip {
  background:var(--surface-card);
}

.stat-chip:first-child {
  background:linear-gradient(135deg, #0d1117 0%, #1a2535 100%);
}

.stat-chip:first-child .chip-label {
  color:rgba(255,255,255,.45);
}

.stat-chip:first-child .chip-num {
  color:#fff;
}

.chip-label,
.stat-label {
  color:var(--text-muted);
  font-weight:600;
  letter-spacing:.08em;
}

.chip-num,
.stat-num {
  color:var(--text-primary);
  font-size:30px;
  font-weight:800;
  letter-spacing:-.5px;
}

.comp-header,
.card-header,
.mail-detail-header,
.db-viewer-header,
.db-footer {
  background:var(--surface-card);
}

.comp-title,
.card-title {
  color:var(--text-muted);
  font-weight:700;
  letter-spacing:.08em;
}

.btn-primary,
.btn-primary:not(.btn) {
  background:var(--brand-primary);
  color:#0a2229;
  box-shadow:var(--shadow-primary);
}

.btn-primary:hover,
.btn-primary:not(.btn):hover {
  background:var(--brand-primary-mid);
}

.btn-ghost,
.btn-ghost:not(.btn),
.btn-secondary,
.btn-sm,
.page-btn,
.db-page-btn {
  border:1.5px solid var(--gray-200);
  background:transparent;
  color:var(--text-primary);
}

.btn-ghost:hover,
.btn-ghost:not(.btn):hover,
.btn-secondary:hover,
.btn-sm:hover,
.page-btn:hover,
.db-page-btn:hover:not(:disabled) {
  border-color:var(--gray-400);
  background:var(--gray-50);
}

.filter-input,
.filter-select,
input[type="text"],
input[type="email"],
input[type="password"],
select,
textarea {
  border:1.5px solid var(--gray-200);
  border-radius:var(--radius-sm);
  box-shadow:none;
}

.filter-input:focus,
.filter-select:focus,
input:focus,
select:focus,
textarea:focus {
  border-color:var(--brand-primary);
  box-shadow:0 0 0 3px rgba(29,210,241,.12);
}

.tabs {
  border-radius:var(--radius-lg);
  box-shadow:var(--shadow-card);
}

.tab-btn {
  border-radius:var(--radius-sm);
}

.tab-btn.active {
  background:var(--brand-primary-light);
  color:var(--brand-primary-dark);
}

.badge-sent,
.badge-processing,
.badge-queued,
.badge-primary,
.pill-active {
  background:var(--brand-primary-light);
  color:var(--brand-primary-dark);
}

.badge-sent .badge-dot,
.badge-processing .badge-dot,
.badge-queued .badge-dot {
  background:var(--brand-primary);
}

.badge-service,
.pill,
.comp-badge,
.db-total-badge,
.tab-count {
  background:var(--gray-100);
  color:var(--gray-600);
  border:1px solid var(--gray-200);
}

.q-count-box,
.mini-card {
  background:var(--surface-card);
  border-radius:var(--radius-md);
  box-shadow:var(--shadow-card);
}

th,
.db-table-scroll th {
  background:var(--surface-card);
  color:var(--text-muted);
  border-bottom-color:var(--gray-150);
}

td,
.db-table-scroll td {
  color:var(--text-primary);
  border-bottom-color:var(--gray-100);
}

tbody tr:hover td,
.db-table-scroll tbody tr:hover td,
.mail-list-item:hover,
.inbox-preview-item:hover {
  background:var(--gray-50);
}

.mail-list-item.selected,
.db-table-item.active,
.db-schema-badge {
  background:var(--brand-primary-light);
  color:var(--brand-primary-dark);
}

.mail-list-item.selected {
  box-shadow:inset 3px 0 0 var(--brand-primary);
}

.breakdown-bar,
.bar-fill,
.mini-bar-fill {
  background:linear-gradient(90deg, var(--brand-primary), var(--brand-primary-dark));
}

.login-wrapper {
  background:var(--surface-page);
}

.login-title {
  color:var(--text-primary);
  font-weight:800;
}

@media (max-width: 820px) {
  .services-col,
  .subservices-col {
    background:var(--surface-sidebar);
  }
}

/* ── Flush table containers ─────────────────────────────── */
.table-wrap,
.table-wrapper,
.mail-list-panel .pagination {
  margin:0;
  padding:0;
}

.card > .table-wrap,
.component-card > .table-wrap,
.table-card > .table-wrapper {
  border-radius:inherit;
}

.table-wrap table,
.table-wrapper table {
  margin:0;
}

/* ── NINE Brandkit Admin Override ────────────────────────── */
:root {
  --bg: #fff;
  --surface: #fff;
  --surface-2: #fff;
  --surface-page: #fff;
  --surface-sidebar: #fff;
  --surface-card: #fff;
  --card: #fff;
  --border: rgba(0, 0, 0, 0.075);
  --border-dk: rgba(0, 0, 0, 0.25);
  --line: rgba(0, 0, 0, 0.25);
  --line-soft: rgba(0, 0, 0, 0.075);
  --line-width: 0.5px;
  --accent: #000;
  --accent-dk: rgba(0, 0, 0, 0.82);
  --accent-soft: #f2f2f2;
  --brand-primary: #000;
  --brand-primary-mid: rgba(0, 0, 0, 0.82);
  --brand-primary-dark: #000;
  --brand-primary-light: #f2f2f2;
  --text: #000;
  --text-primary: #000;
  --text-2: rgba(0, 0, 0, 0.56);
  --text-3: rgba(0, 0, 0, 0.38);
  --text-muted: rgba(0, 0, 0, 0.56);
  --gray-50: #f2f2f2;
  --gray-100: #f7f7f7;
  --gray-150: rgba(0, 0, 0, 0.075);
  --gray-200: rgba(0, 0, 0, 0.12);
  --gray-400: rgba(0, 0, 0, 0.32);
  --green: #0f6b38;
  --green-bg: #edf8f2;
  --yellow: #7a4b00;
  --yellow-bg: #fff6e5;
  --red: #b00020;
  --red-bg: #fff0f3;
  --blue: #000;
  --blue-bg: #f2f2f2;
  --purple: #000;
  --purple-bg: #f2f2f2;
  --r: 8px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --font: "Poppins", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --shadow-card: none;
  --shadow-primary: none;
  --shadow-xs: none;
  --shadow-sm: none;
  --shadow-md: none;
}

* {
  letter-spacing: 0 !important;
}

html {
  scroll-behavior: smooth;
}

body {
  background: #fff !important;
  color: #000;
  font-family: var(--font);
  overflow: hidden;
}

body,
.layout,
.app-layout,
.db-layout {
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font-family: var(--font);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
}

.layout,
.app-layout {
  display: flex;
  background: #fff;
}

.services-col {
  width: 72px;
  border-right: var(--line-width) solid var(--line);
  background: #fff !important;
  backdrop-filter: none;
}

.services-logo {
  min-height: 58px;
  padding: 0;
  border-bottom: 0;
}

.services-logo img,
.login-logo img {
  width: 34px;
  height: 34px;
  border-radius: 0;
  box-shadow: none;
  object-fit: contain;
}

.services-list {
  gap: 4px;
  padding: 14px 0;
}

.service-link,
.btn-logout {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 0;
  background: transparent !important;
  color: rgba(0, 0, 0, 0.42);
  box-shadow: none !important;
  transform: none !important;
}

.service-link:hover:not(.disabled),
.service-link.active,
.btn-logout:hover {
  background: transparent !important;
  color: #000;
}

.service-link.active::before {
  left: -14px;
  top: 8px;
  bottom: 8px;
  width: var(--line-width);
  border-radius: 0;
  background: rgba(0, 0, 0, 0.42);
}

.service-link svg,
.btn-logout svg {
  width: 18px;
  height: 18px;
}

.services-footer {
  border-top: 0;
}

.subservices-col {
  width: 23%;
  min-width: 220px;
  max-width: 320px;
  padding: 28px clamp(18px, 2.4vw, 36px);
  border-right: var(--line-width) solid var(--line);
  background: #fff !important;
  backdrop-filter: none;
}

.subservices-header,
.comp-title,
.card-title,
.section-sub,
.chip-label,
.stat-label,
.analytics-side-label,
.detail-label,
.detail-section-title,
th,
.db-col-type,
.pgb-metric-lbl,
.pgb-perf-lbl,
.pgb-total-lbl {
  color: #000 !important;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0 !important;
  text-transform: uppercase;
}

.subservices-header {
  padding: 4px 0 18px;
  border-bottom: var(--line-width) solid var(--line);
}

.subservice-link,
.db-table-item {
  position: relative;
  min-height: 38px;
  padding: 8px 0 8px 14px;
  border-radius: 0;
  background: transparent !important;
  color: rgba(0, 0, 0, 0.56);
  font-size: 13px;
  font-weight: 700;
  box-shadow: none !important;
}

.subservice-link::before,
.db-table-item::before {
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 0;
  width: var(--line-width);
  background: transparent;
  content: "";
}

.subservice-link:hover,
.subservice-link.active,
.db-table-item:hover,
.db-table-item.active {
  color: #000;
}

.subservice-link:hover::before,
.subservice-link.active::before,
.db-table-item:hover::before,
.db-table-item.active::before {
  background: rgba(0, 0, 0, 0.42);
}

.main {
  flex: 1;
  min-width: 0;
  height: 100vh;
  padding: 28px clamp(18px, 2.4vw, 36px);
  overflow-y: auto;
  background: #fff;
}

.main::-webkit-scrollbar,
.subservices-col::-webkit-scrollbar,
.services-list::-webkit-scrollbar,
.db-nav-tables::-webkit-scrollbar,
.db-table-scroll::-webkit-scrollbar,
.mail-list-panel::-webkit-scrollbar,
.mail-detail-panel::-webkit-scrollbar {
  display: none;
}

.main,
.subservices-col,
.services-list,
.db-nav-tables,
.db-table-scroll,
.mail-list-panel,
.mail-detail-panel {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.section-header-bar,
.page-header {
  margin-bottom: 28px;
  padding-bottom: 18px;
  border-bottom: var(--line-width) solid var(--line);
}

.section-icon {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(0, 0, 0, 0.54);
}

.section-title,
.page-header h1,
.login-title {
  color: #000;
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
}

.page-sub,
.section-sub,
.text-muted,
.text-2,
.text-3 {
  color: rgba(0, 0, 0, 0.56) !important;
}

.stat-chips,
.stat-grid,
.pgb-metrics,
.pgb-perf,
.detail-grid {
  gap: 0;
  background: transparent;
  border: var(--line-width) solid var(--line);
  border-radius: 0;
}

.stat-chip,
.stat-card,
.pgb-metric,
.pgb-perf-item,
.detail-row {
  background: #fff !important;
  border-right: var(--line-width) solid var(--line-soft);
}

.stat-chip:first-child {
  background: #fff !important;
}

.stat-chip:first-child .chip-label,
.stat-chip:first-child .chip-num {
  color: inherit;
}

.chip-num,
.stat-num,
.stat-val,
.pgb-metric-val,
.pgb-perf-val,
.q-count-num {
  color: #000 !important;
  font-size: 30px;
  font-weight: 900;
  line-height: 1;
}

.component-grid {
  gap: 18px;
}

.component-card,
.card,
.table-card,
.detail-card,
.form-card,
.send-card,
.login-card {
  border: 0;
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
}

.component-card,
.card,
.table-card,
.detail-card,
.form-card,
.send-card {
  border: var(--line-width) solid var(--line-soft);
}

.comp-header,
.card-header,
.mail-detail-header,
.db-viewer-header,
.db-footer {
  padding: 14px 16px;
  border-bottom: var(--line-width) solid var(--line-soft);
  background: #fff !important;
}

.comp-body {
  padding: 18px;
}

table {
  border-collapse: collapse;
}

th,
td,
.db-table-scroll th,
.db-table-scroll td {
  border-bottom: var(--line-width) solid var(--line-soft);
  background: #fff !important;
}

tbody tr:hover td,
.db-table-scroll tbody tr:hover td,
.mail-list-item:hover,
.inbox-preview-item:hover,
.simple-row:hover {
  background: #f2f2f2 !important;
}

.table-wrap,
.table-wrapper {
  border-radius: inherit;
}

.simple-row,
.health-item,
.inbox-preview-item,
.mail-list-item {
  border-bottom: var(--line-width) solid var(--line-soft);
}

.btn,
.btn-primary:not(.btn),
.btn-ghost:not(.btn),
.btn-sm,
.page-btn,
.db-page-btn,
.btn-restart {
  min-height: 34px;
  border: 0 !important;
  border-radius: 8px;
  background: transparent;
  color: #000;
  box-shadow: none !important;
  font-weight: 700;
}

.btn:hover,
.btn-ghost:hover,
.btn-secondary:hover,
.btn-sm:hover,
.page-btn:hover,
.db-page-btn:hover:not(:disabled),
.btn-restart:hover {
  background: #f2f2f2 !important;
  color: #000;
}

.btn-primary,
.btn-primary:not(.btn) {
  background: #000 !important;
  color: #fff !important;
}

.btn-primary:hover,
.btn-primary:not(.btn):hover {
  background: rgba(0, 0, 0, 0.82) !important;
}

.btn-danger-ghost {
  color: var(--red);
}

.filter-input,
.filter-select,
.form-input,
.db-schema-select,
.db-limit-select,
input[type="text"],
input[type="email"],
input[type="password"],
select,
textarea {
  border: 0;
  border-bottom: var(--line-width) solid var(--line);
  border-radius: 0;
  background: transparent;
  color: #000;
  box-shadow: none !important;
  font-weight: 600;
}

.filter-input:focus,
.filter-select:focus,
.form-input:focus,
.db-schema-select:focus,
.db-limit-select:focus,
input:focus,
select:focus,
textarea:focus {
  border-color: rgba(0, 0, 0, 0.32);
  box-shadow: none !important;
}

label,
.form-label {
  color: #000;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.badge,
.pill,
.comp-badge,
.db-total-badge,
.tab-count,
.soon-badge {
  border: 0;
  border-radius: 999px;
  background: #f2f2f2 !important;
  color: rgba(0, 0, 0, 0.72) !important;
  font-weight: 700;
}

.badge-dot,
.dot {
  background: currentColor !important;
}

.c-red,
.badge-failed,
.badge-dead,
.badge-critical,
.dot-red {
  color: var(--red) !important;
}

.c-green,
.badge-sent,
.badge-healthy,
.dot-green {
  color: var(--green) !important;
}

.c-yellow,
.badge-queued,
.badge-warn,
.badge-degraded,
.dot-yellow {
  color: var(--yellow) !important;
}

.c-blue,
.badge-processing {
  color: #000 !important;
}

.tabs {
  gap: 8px;
  margin-bottom: 18px;
  border-bottom: var(--line-width) solid var(--line);
  border-radius: 0;
  box-shadow: none;
}

.tab-btn {
  border: 0;
  border-radius: 0;
  color: rgba(0, 0, 0, 0.56);
  font-weight: 700;
}

.tab-btn.active {
  background: transparent;
  color: #000;
  border-bottom-color: #000;
}

.q-count-box,
.mini-card,
.node-card {
  border: var(--line-width) solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
}

.breakdown-bar-wrap,
.mini-bar,
.disk-bar-wrap {
  background: #f2f2f2;
}

.breakdown-bar,
.bar-fill,
.mini-bar-fill,
.disk-bar-fill {
  background: #000 !important;
}

.login-wrapper {
  background: #fff !important;
}

.login-card {
  width: min(390px, calc(100vw - 36px));
  padding: 40px;
  border: var(--line-width) solid var(--line);
}

.alert {
  border: 0;
  border-radius: 8px;
}

.alert-error {
  background: var(--red-bg);
  color: var(--red);
}

.alert-success,
.alert-ok {
  background: var(--green-bg);
  color: var(--green);
}

.link,
.link-more,
.comp-link {
  color: #000;
  font-weight: 800;
}

.link:hover,
.link-more:hover,
.comp-link:hover {
  text-decoration: underline;
}

.db-layout {
  height: 100vh;
}

.db-nav-col {
  width: 23%;
  min-width: 260px;
  padding: 0 !important;
}

.db-nav-top {
  padding: 18px 18px 14px;
}

.db-nav-col .subservices-header {
  padding: 0;
  border-bottom: 0;
}

.db-nav-stats {
  display: flex;
  gap: 10px;
  margin: 12px 0;
  color: rgba(0, 0, 0, 0.52);
  font-size: 12px;
  font-weight: 700;
}

.db-nav-stats strong {
  color: #000;
  font-weight: 900;
}

.db-search-input,
.dns-search-input {
  width: 100%;
  min-height: 36px;
  border: 0;
  border-bottom: var(--line-width) solid var(--line);
  border-radius: 0;
  background: transparent;
  color: #000;
  font-size: 13px;
  font-weight: 700;
}

.db-search-input::placeholder,
.dns-search-input::placeholder {
  color: rgba(0, 0, 0, 0.34);
}

.db-main {
  height: 100vh;
  padding: 0 !important;
  overflow: hidden;
}

.db-nav-divider {
  display: none;
}

.db-schema-group {
  display: grid;
  gap: 4px;
  padding: 2px 0;
}

.db-schema-row {
  position: relative;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) 18px;
  width: 100%;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  background: transparent;
  color: #000;
  cursor: pointer;
  padding: 9px 13px;
  text-align: left;
}

.db-schema-row::before {
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 0;
  width: var(--line-width);
  background: transparent;
  content: "";
}

.db-schema-row:hover,
.db-schema-row:focus-visible {
  background: transparent;
  outline: none;
}

.db-schema-row:hover::before,
.db-schema-row:focus-visible::before,
.db-schema-group.is-expanded .db-schema-row::before {
  background: rgba(0, 0, 0, 0.42);
}

.db-schema-icon {
  display: flex;
  width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
  color: rgba(0, 0, 0, 0.42);
}

.db-schema-icon svg {
  width: 17px;
  height: 17px;
}

.db-schema-label {
  display: block;
  min-width: 0;
}

.db-schema-title {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #000;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.2;
  text-transform: capitalize;
}

.db-schema-label small {
  display: block;
  margin-top: 2px;
  color: rgba(0, 0, 0, 0.48);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.2;
}

.db-schema-toggle {
  position: relative;
  display: block;
  width: 14px;
  height: 14px;
  justify-self: center;
}

.db-schema-toggle::before,
.db-schema-toggle::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 11px;
  height: 1px;
  background: rgba(0, 0, 0, 0.38);
  content: "";
  transition: opacity 300ms ease, transform 300ms ease;
  transform: translate(-50%, -50%);
}

.db-schema-toggle::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.db-schema-group.is-expanded .db-schema-toggle::before {
  transform: translate(-50%, -50%) rotate(180deg);
}

.db-schema-group.is-expanded .db-schema-toggle::after {
  opacity: 0;
  transform: translate(-50%, -50%) rotate(180deg);
}

.db-schema-tables {
  display: grid;
  gap: 2px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  padding: 0 0 4px 43px;
  transition: max-height 300ms ease, opacity 300ms ease;
}

.db-schema-group.is-expanded .db-schema-tables {
  max-height: 1600px;
  opacity: 1;
}

.db-table-item {
  width: 100%;
  border: 0;
  min-height: 30px;
  padding: 6px 13px 6px 0;
  text-align: left;
}

.db-table-item::before {
  left: -43px;
}

.db-table-meta {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
  color: rgba(0, 0, 0, 0.36);
  font-family: var(--font);
  font-size: 11px;
  font-weight: 800;
}

.db-nav-hint-left {
  padding-left: 28px;
  text-align: left;
}

.db-table-scroll {
  margin: 0;
  padding: 0;
}

.db-table-scroll table {
  margin: 0;
}

.db-viewer-title-block {
  min-width: 0;
}

.db-viewer-sub {
  margin-top: 3px;
  color: rgba(0, 0, 0, 0.42);
  font-family: "Menlo", "Consolas", monospace;
  font-size: 11px;
  font-weight: 700;
}

.db-tool-btn {
  min-height: 30px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #000;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  padding: 0 10px;
}

.db-tool-btn:hover {
  background: #f2f2f2;
}

.db-tab-btn.active {
  background: #000;
  color: #fff;
}

.db-row-search {
  width: 220px;
  min-height: 30px;
  border: 0;
  border-bottom: var(--line-width) solid var(--line);
  background: transparent;
  color: #000;
  font-size: 12px;
  font-weight: 700;
}

.db-sortable-th {
  cursor: pointer;
}

.db-cell-btn {
  display: block;
  width: 100%;
  max-width: 360px;
  overflow: hidden;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  padding: 0;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.db-cell-btn:hover {
  text-decoration: underline;
}

.db-col-name {
  display: flex;
  align-items: center;
  gap: 6px;
}

.db-key-icon,
.db-fk-pill {
  display: inline-flex;
  height: 16px;
  align-items: center;
  border: var(--line-width) solid var(--line-soft);
  border-radius: 4px;
  color: rgba(0, 0, 0, 0.52);
  font-family: var(--font);
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  padding: 0 4px;
  text-transform: uppercase;
}

.db-key-icon {
  color: #000;
}

.db-cell-with-fk {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.db-fk-jump {
  display: inline-flex;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  border: var(--line-width) solid var(--line-soft);
  border-radius: 6px;
  background: #fff;
  color: rgba(0, 0, 0, 0.52);
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}

.db-fk-jump:hover {
  border-color: rgba(0, 0, 0, 0.28);
  color: #000;
}

.db-fk-cell {
  background: rgba(0, 0, 0, 0.012);
}

.db-clear-filter-btn {
  color: rgba(0, 0, 0, 0.64);
}

.db-cell-dialog {
  width: min(760px, calc(100vw - 36px));
}

.db-cell-editor-meta {
  margin: 10px 24px 0;
  color: rgba(0, 0, 0, 0.48);
  font-size: 12px;
  font-weight: 700;
}

.db-cell-editor {
  width: calc(100% - 48px);
  min-height: 220px;
  max-height: 56vh;
  resize: vertical;
  margin: 12px 24px 0;
  border: var(--line-width) solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
  color: #000;
  font-family: "Menlo", "Consolas", monospace;
  font-size: 12px;
  line-height: 1.55;
  padding: 14px;
}

.db-cell-editor:read-only {
  color: rgba(0, 0, 0, 0.58);
}

.db-cell-pre {
  max-height: 60vh;
  overflow: auto;
  margin: 16px 24px;
  border: var(--line-width) solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
  color: #000;
  font-family: "Menlo", "Consolas", monospace;
  font-size: 12px;
  line-height: 1.55;
  padding: 16px;
  white-space: pre-wrap;
  word-break: break-word;
}

.db-definition-view {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 16px;
  scrollbar-width: none;
}

.db-definition-view::-webkit-scrollbar {
  display: none;
}

.db-definition-card {
  border: var(--line-width) solid var(--line-soft);
  background: #fff;
  box-shadow: var(--shadow-soft);
  margin-bottom: 14px;
}

.db-definition-card h3 {
  min-height: 46px;
  display: flex;
  align-items: center;
  margin: 0;
  border-bottom: var(--line-width) solid var(--line-soft);
  padding: 0 16px;
  color: #000;
  font-size: 14px;
  font-weight: 900;
}

.db-definition-row {
  display: grid;
  grid-template-columns: minmax(160px, 240px) minmax(0, 1fr);
  gap: 16px;
  min-height: 42px;
  align-items: center;
  border-bottom: var(--line-width) solid var(--line-soft);
  padding: 10px 16px;
}

.db-definition-row:last-child {
  border-bottom: 0;
}

.db-definition-row strong {
  color: #000;
  font-size: 12px;
  font-weight: 900;
}

.db-definition-row code {
  min-width: 0;
  overflow: hidden;
  color: rgba(0, 0, 0, 0.58);
  font-family: "Menlo", "Consolas", monospace;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.db-columns-dialog {
  width: min(520px, calc(100vw - 36px));
}

.db-filter-dialog,
.db-insert-dialog {
  width: min(680px, calc(100vw - 36px));
}

.db-filter-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px minmax(0, 1fr);
  gap: 10px;
  padding: 16px 24px;
}

.db-active-filters {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 24px;
}

.db-active-filters span {
  border: var(--line-width) solid var(--line-soft);
  border-radius: 6px;
  color: rgba(0, 0, 0, 0.62);
  font-size: 11px;
  font-weight: 800;
  padding: 4px 7px;
}

.db-active-filters small {
  color: rgba(0, 0, 0, 0.42);
  font-size: 12px;
  font-weight: 700;
}

.db-insert-list {
  display: grid;
  gap: 10px;
  max-height: 60vh;
  overflow: auto;
  padding: 16px 24px;
}

.db-insert-field {
  display: grid;
  grid-template-columns: minmax(150px, 220px) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.db-insert-field > span {
  min-width: 0;
  overflow: hidden;
  color: #000;
  font-size: 12px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.db-insert-field small {
  color: rgba(0, 0, 0, 0.42);
  font-weight: 700;
}

.db-columns-list {
  display: grid;
  gap: 2px;
  max-height: 56vh;
  overflow: auto;
  padding: 16px 24px;
}

.db-column-toggle {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  gap: 10px;
  min-height: 34px;
  align-items: center;
  color: #000;
  font-size: 12px;
  font-weight: 800;
}

.db-column-toggle span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.db-column-toggle small {
  color: rgba(0, 0, 0, 0.42);
  font-size: 11px;
  font-weight: 700;
}

.dns-stats-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
  min-width: 0;
}

.dns-stat {
  min-width: 0;
  min-height: 76px;
  border: var(--line-width) solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
  padding: 16px;
}

.dns-stat-label {
  display: block;
  margin-bottom: 8px;
  color: rgba(0, 0, 0, 0.44);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.dns-stat strong {
  color: #000;
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
}

.dns-console {
  display: grid;
  grid-template-columns: minmax(240px, 28%) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  min-width: 0;
  overflow: hidden;
}

.dns-zones-panel,
.dns-records-panel {
  min-width: 0;
  border: var(--line-width) solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
}

.dns-zones-panel {
  position: sticky;
  top: 28px;
  overflow: hidden;
}

.dns-panel-head,
.dns-records-head {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  border-bottom: var(--line-width) solid var(--line-soft);
}

.dns-search-input {
  margin: 0 16px 10px;
  width: calc(100% - 32px);
}

.dns-zone-list {
  display: flex;
  max-height: 58vh;
  flex-direction: column;
  overflow-y: auto;
  padding: 6px 0 10px;
  scrollbar-width: none;
}

.dns-zone-list::-webkit-scrollbar {
  display: none;
}

.dns-zone-item {
  position: relative;
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 16px 9px 20px;
  color: rgba(0, 0, 0, 0.56);
  font-size: 13px;
  font-weight: 800;
}

.dns-zone-item::before {
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 12px;
  width: var(--line-width);
  background: transparent;
  content: "";
}

.dns-zone-item:hover,
.dns-zone-item.active {
  color: #000;
}

.dns-zone-item:hover::before,
.dns-zone-item.active::before {
  background: rgba(0, 0, 0, 0.42);
}

.dns-zone-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dns-zone-kind {
  flex-shrink: 0;
  font-size: 10px;
}

.dns-records-panel {
  overflow: hidden;
}

.dns-records-head > div:first-child {
  min-width: 0;
}

.dns-active-zone {
  margin-top: 5px;
  color: rgba(0, 0, 0, 0.48);
  font-size: 12px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dns-actions {
  display: flex;
  flex-shrink: 0;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.dns-records-table-wrap {
  max-width: 100%;
  overflow-x: auto;
}

.dns-records-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.dns-records-table th,
.dns-records-table td {
  min-width: 0;
}

.dns-name-col {
  width: 24%;
}

.dns-content-col {
  width: 46%;
}

.dns-action-col {
  width: 108px;
}

.dns-record-name,
.dns-record-content {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dns-record-action {
  width: 108px;
}

.dns-record-action form {
  display: flex;
  justify-content: flex-end;
}

@media (max-width: 980px) {
  .dns-records-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .dns-actions {
    justify-content: flex-start;
  }

  .dns-records-table {
    min-width: 760px;
  }
}

.dns-validation {
  margin-top: 6px;
  color: rgba(0, 0, 0, 0.48);
  font-size: 12px;
  font-weight: 700;
}

.dns-validation.ok {
  color: var(--green);
}

.dns-validation.error {
  color: var(--red);
}

.service-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 0;
}

.service-detail-grid .detail-row {
  min-height: 72px;
  padding: 16px;
}

.queue-failed-search {
  width: min(360px, 42vw);
  min-height: 32px;
  font-size: 12px;
}

.storage-alert-card {
  margin-bottom: 18px;
  overflow: hidden;
}

.auth-search-card {
  margin-bottom: 18px;
  overflow: hidden;
}

.auth-search-row {
  padding: 14px 16px;
}

.auth-search-row .filter-input {
  width: 100%;
}

.auth-search-results {
  border-top: var(--line-width) solid var(--line-soft);
}

.auth-user-result {
  display: flex;
  min-height: 56px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  border-bottom: var(--line-width) solid var(--line-soft);
}

.auth-user-result:last-child {
  border-bottom: 0;
}

.auth-user-result strong {
  display: block;
  font-size: 13px;
}

.auth-user-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.attention-card {
  margin-bottom: 18px;
  overflow: hidden;
}

.attention-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.attention-item {
  min-height: 106px;
  border-right: var(--line-width) solid var(--line-soft);
  padding: 16px;
}

.attention-item:last-child {
  border-right: 0;
}

.attention-item.warn {
  box-shadow: inset var(--line-width) 0 0 rgba(192, 21, 45, 0.42);
}

.attention-label {
  display: block;
  color: rgba(0, 0, 0, 0.46);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.attention-item strong {
  display: block;
  margin-top: 8px;
  color: #000;
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
}

.attention-copy {
  display: block;
  margin-top: 8px;
  color: rgba(0, 0, 0, 0.56);
  font-size: 12px;
  font-weight: 700;
}

.mail-split {
  border: var(--line-width) solid var(--line-soft);
}

.mail-list-panel,
.analytics-side {
  border-color: var(--line-soft);
}

.modal-dialog,
dialog {
  border: var(--line-width) solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #000;
}

.section-meta-line {
  margin-top: 6px;
  color: rgba(0, 0, 0, 0.42);
  font-size: 11px;
  font-weight: 700;
}

.nine-toast-stack {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(360px, calc(100vw - 36px));
  pointer-events: none;
}

.nine-toast {
  transform: translateY(8px);
  opacity: 0;
  border: var(--line-width) solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #000;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
  font-size: 13px;
  font-weight: 800;
  padding: 12px 14px;
  transition: opacity 180ms ease, transform 180ms ease;
}

.nine-toast.show {
  transform: translateY(0);
  opacity: 1;
}

.nine-toast-success {
  border-color: rgba(26, 158, 110, 0.32);
}

.nine-toast-error {
  border-color: rgba(192, 21, 45, 0.32);
  color: var(--red);
}

.nine-confirm-dialog {
  width: min(430px, calc(100vw - 36px));
  padding: 0;
}

.nine-confirm-dialog::backdrop {
  background: rgba(0, 0, 0, 0.28);
}

.nine-confirm-card {
  padding: 22px;
}

.nine-confirm-kicker {
  margin-bottom: 10px;
  color: rgba(0, 0, 0, 0.44);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.nine-confirm-title {
  color: #000;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.2;
}

.nine-confirm-message {
  margin-top: 10px;
  color: rgba(0, 0, 0, 0.58);
  font-size: 13px;
  font-weight: 600;
}

.nine-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 22px;
}

.email-command-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.email-command {
  min-height: 34px;
  border: var(--line-width) solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
  color: #000;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
  padding: 0 12px;
}

.email-command:hover {
  background: #f2f2f2;
}

.compose-window {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 900;
  display: none;
  width: min(560px, calc(100vw - 36px));
  height: min(620px, calc(100vh - 36px));
  overflow: hidden;
  border: var(--line-width) solid var(--line);
  border-radius: 8px 8px 0 0;
  background: #fff;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.18);
}

.compose-window.open {
  display: flex;
  flex-direction: column;
}

.compose-window.minimized {
  height: 46px;
}

.compose-window.minimized .compose-form {
  display: none;
}

.compose-header {
  display: flex;
  min-height: 46px;
  align-items: center;
  justify-content: space-between;
  border-bottom: var(--line-width) solid var(--line-soft);
  cursor: move;
  padding: 0 12px 0 16px;
  color: #000;
  font-size: 13px;
  font-weight: 900;
}

.compose-actions {
  display: flex;
  gap: 4px;
}

.compose-icon-btn {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: rgba(0, 0, 0, 0.56);
  cursor: pointer;
  font-weight: 900;
}

.compose-icon-btn:hover {
  background: #f2f2f2;
  color: #000;
}

.compose-form {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
}

.compose-input {
  min-height: 44px;
  border: 0;
  border-bottom: var(--line-width) solid var(--line-soft);
  border-radius: 0;
  padding: 0 16px;
}

.compose-body {
  min-height: 0;
  flex: 1;
  border: 0;
  resize: none;
  padding: 16px;
}

.compose-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: var(--line-width) solid var(--line-soft);
  padding: 12px 16px;
}

.mail-address-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
}

.mail-address-grid > div {
  min-width: 0;
  padding: 16px;
}

.mail-address-grid > div + div {
  border-left: var(--line-width) solid var(--line-soft);
}

.mail-address-row {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: var(--line-width) solid var(--line-soft);
  color: rgba(0, 0, 0, 0.62);
  font-size: 12px;
  font-weight: 700;
}

.mail-address-row:hover {
  color: #000;
}

.mail-address-row .mono {
  min-width: 0;
  overflow: hidden;
  color: #000;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mail-gmail-main {
  padding: 0 !important;
  overflow: hidden;
}

.mail-gmail-topbar {
  display: grid;
  grid-template-columns: 260px minmax(320px, 1fr) auto;
  gap: 18px;
  align-items: center;
  min-height: 76px;
  border-bottom: var(--line-width) solid var(--line);
  padding: 0 18px;
}

.mail-gmail-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mail-gmail-search {
  display: flex;
  align-items: center;
  height: 54px;
  border: 0;
  border-radius: 27px;
  background: #f2f2f2;
  padding: 0 16px;
}

.mail-gmail-search svg {
  width: 20px;
  height: 20px;
  color: rgba(0, 0, 0, 0.52);
  flex-shrink: 0;
}

.mail-gmail-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: #000;
  font-size: 15px;
  font-weight: 700;
  padding: 0 12px;
}

.mail-search-filter {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.mail-workspace {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  height: calc(100vh - 76px);
  background: #fff;
}

.mail-workspace-sidebar {
  overflow-y: auto;
  border-right: var(--line-width) solid var(--line);
  background: #fff;
  padding: 14px 10px;
  scrollbar-width: none;
}

.mail-workspace-sidebar::-webkit-scrollbar {
  display: none;
}

.mail-compose-primary {
  display: flex;
  width: 236px;
  min-height: 58px;
  align-items: center;
  gap: 14px;
  border: 0;
  border-radius: 16px;
  background: #f2f2f2;
  color: #000;
  cursor: pointer;
  font-size: 14px;
  font-weight: 900;
  margin: 0 0 18px;
  padding: 0 22px;
}

.mail-compose-primary svg {
  width: 20px;
  height: 20px;
}

.mail-folder-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mail-folder-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mail-folder-heading {
  display: flex;
  min-height: 28px;
  align-items: center;
  padding: 0 14px 0 20px;
  color: rgba(0, 0, 0, 0.36);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.mail-folder,
.mail-mini-address {
  display: flex;
  min-height: 36px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 0 18px 18px 0;
  color: rgba(0, 0, 0, 0.68);
  font-size: 13px;
  font-weight: 800;
  padding: 0 14px 0 20px;
}

.mail-folder.active {
  background: #f2f2f2;
  color: #000;
}

.mail-folder strong,
.mail-mini-address strong {
  font-size: 12px;
  font-weight: 900;
}

.mail-sidebar-section {
  margin-top: 24px;
}

.mail-sidebar-heading {
  display: flex;
  min-height: 34px;
  align-items: center;
  color: #000;
  font-size: 13px;
  font-weight: 900;
  padding: 0 14px 0 20px;
}

.mail-mini-address span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mail-content-card {
  display: flex;
  min-width: 0;
  overflow: hidden;
  flex-direction: column;
  background: #fff;
}

.mail-system-view {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 18px;
}

.mail-system-view::-webkit-scrollbar { display: none; }
.mail-system-view { scrollbar-width: none; }

.mail-overview-chips {
  margin-bottom: 16px;
}

.mail-overview-card {
  margin-bottom: 16px;
}

.mail-overview-grid {
  align-items: stretch;
}

.mail-overview-grid .component-card {
  min-height: 0;
  background: #fff;
}

.mail-overview-grid .inbox-preview-item {
  width: 100%;
  border-right: 0;
  border-left: 0;
  border-top: 0;
  background: #fff;
  color: inherit;
  font: inherit;
  text-align: left;
}

.mail-system-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.mail-system-card {
  min-height: 92px;
  border: var(--line-width) solid var(--line-soft);
  background: #fff;
  box-shadow: var(--shadow-soft);
  padding: 16px;
}

.mail-system-card span {
  display: block;
  color: rgba(0, 0, 0, 0.46);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.mail-system-card strong {
  display: block;
  margin-top: 12px;
  color: #000;
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
}

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

.mail-system-section {
  border: var(--line-width) solid var(--line-soft);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.mail-system-section h2 {
  min-height: 48px;
  display: flex;
  align-items: center;
  margin: 0;
  border-bottom: var(--line-width) solid var(--line-soft);
  padding: 0 16px;
  color: #000;
  font-size: 14px;
  font-weight: 900;
}

.mail-system-row {
  display: flex;
  width: 100%;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 0;
  border-bottom: var(--line-width) solid var(--line-soft);
  background: #fff;
  color: rgba(0, 0, 0, 0.68);
  padding: 0 16px;
  text-align: left;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
}

.mail-system-row:last-child {
  border-bottom: 0;
}

.mail-system-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mail-system-row strong {
  color: #000;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.mail-system-open {
  cursor: pointer;
}

.mail-system-open:hover {
  color: #000;
}

.mail-system-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  border: var(--line-width) solid var(--line-soft);
  background: #fff;
  box-shadow: var(--shadow-soft);
  margin-bottom: 14px;
  padding: 14px;
}

.mail-toolbar {
  display: flex;
  min-height: 56px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: var(--line-width) solid var(--line-soft);
  padding: 0 18px;
}

.mail-toolbar-left,
.mail-toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mail-toolbar-right {
  color: rgba(0, 0, 0, 0.54);
  font-size: 12px;
  font-weight: 800;
}

.mail-checkbox {
  display: inline-flex;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
}

.mail-checkbox input {
  display: none;
}

.mail-checkbox span {
  width: 16px;
  height: 16px;
  border: var(--line-width) solid rgba(0, 0, 0, 0.28);
  border-radius: 2px;
}

.mail-checkbox input:checked + span {
  background: #000;
  box-shadow: inset 0 0 0 3px #fff;
}

.mail-icon-action {
  min-width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: rgba(0, 0, 0, 0.64);
  cursor: pointer;
  font-size: 18px;
  font-weight: 900;
}

.mail-icon-action:hover {
  background: #f2f2f2;
  color: #000;
}

.mail-selection-count {
  color: #000;
  font-size: 12px;
  font-weight: 900;
}

.mail-category-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  min-height: 64px;
  border-bottom: var(--line-width) solid var(--line-soft);
}

.mail-category-tabs a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(0, 0, 0, 0.56);
  font-size: 13px;
  font-weight: 900;
  padding: 0 22px;
}

.mail-category-tabs a:hover {
  background: #f7f7f7;
  color: #000;
}

.mail-category-tabs a.active {
  color: #000;
}

.mail-category-tabs a.active::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: #000;
  content: "";
}

.mail-category-tabs span {
  border-radius: 999px;
  background: #f2f2f2;
  color: #000;
  font-size: 11px;
  padding: 2px 8px;
}

.mail-row-list {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: none;
}

.mail-row-list::-webkit-scrollbar {
  display: none;
}

.gmail-row {
  position: relative;
  display: grid;
  grid-template-columns: 34px 34px minmax(170px, 240px) minmax(0, 1fr) 52px 92px;
  min-height: 48px;
  align-items: center;
  border-bottom: var(--line-width) solid var(--line-soft);
  color: rgba(0, 0, 0, 0.72);
  font-size: 13px;
  padding: 0 18px 0 14px;
}

.gmail-row:hover,
.gmail-row.selected {
  background: #f2f2f2;
}

.gmail-row.unread {
  color: #000;
  font-weight: 900;
}

.mail-star {
  border: 0;
  background: transparent;
  color: rgba(0, 0, 0, 0.28);
  cursor: pointer;
  font-size: 20px;
}

.mail-star:hover {
  color: #000;
}

.gmail-sender,
.gmail-message,
.gmail-date,
.gmail-preview {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gmail-message {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  display: block;
  font: inherit;
  text-align: left;
}

.gmail-subject {
  color: inherit;
}

.gmail-preview {
  color: rgba(0, 0, 0, 0.48);
  font-weight: 600;
}

.gmail-row.unread .gmail-preview {
  color: rgba(0, 0, 0, 0.62);
}

.gmail-row-icons {
  color: rgba(0, 0, 0, 0.48);
  text-align: center;
}

.gmail-date {
  color: rgba(0, 0, 0, 0.66);
  font-size: 12px;
  font-weight: 900;
  text-align: right;
}

.gmail-hover-actions {
  position: absolute;
  top: 0;
  right: 18px;
  bottom: 0;
  display: none;
  align-items: center;
  gap: 4px;
  background: #f2f2f2;
  padding-left: 16px;
}

.gmail-row:hover .gmail-hover-actions {
  display: flex;
}

.gmail-row:hover .gmail-date,
.gmail-row:hover .gmail-row-icons {
  opacity: 0;
}

.gmail-hover-actions button {
  min-height: 30px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #000;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  padding: 0 8px;
}

.gmail-hover-actions button:hover {
  background: #fff;
}

.mail-detail-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 850;
  display: none;
  width: min(720px, calc(100vw - 72px));
  height: 100vh;
  border-left: var(--line-width) solid var(--line);
  background: #fff;
  box-shadow: -16px 0 42px rgba(0, 0, 0, 0.08);
}

.mail-detail-drawer.open {
  display: flex;
  flex-direction: column;
}

.mail-detail-drawer .mail-detail-empty {
  height: 100%;
}

@media (max-width: 980px) {
  .mail-gmail-topbar,
  .mail-workspace {
    grid-template-columns: 1fr;
  }

  .mail-workspace {
    height: auto;
  }

  .mail-workspace-sidebar {
    border-right: 0;
    border-bottom: var(--line-width) solid var(--line);
  }

  .gmail-row {
    grid-template-columns: 28px minmax(110px, 160px) minmax(0, 1fr) 70px;
  }

  .mail-star,
  .gmail-row-icons {
    display: none;
  }
}

@media (max-width: 820px) {
  body {
    overflow: auto;
  }

  .app-layout,
  .layout {
    display: block;
    padding-top: 58px;
  }

  .services-col {
    height: 58px;
    border-bottom: var(--line-width) solid var(--line);
  }

  .service-link.active::before {
    right: 10px;
    bottom: -7px;
    left: 10px;
    top: auto;
    width: auto;
    height: var(--line-width);
  }

  .subservices-col,
  .db-nav-col {
    width: 100%;
    max-width: none;
    padding: 12px 18px;
  }

  .main,
  .db-main {
    height: auto;
    min-height: 70vh;
    padding: 18px;
  }

  .dns-stats-row,
  .dns-console {
    grid-template-columns: 1fr;
  }

  .dns-zones-panel {
    position: static;
  }
}

/* Database Supabase-style refinements */
.db-layout .db-nav-tables {
  scrollbar-width: none;
}

.db-layout .db-nav-tables::-webkit-scrollbar {
  display: none;
}

.db-layout .db-table-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  align-items: center;
  gap: 4px;
  width: 100%;
  min-height: 32px;
  overflow: visible;
  padding: 0 8px 0 0;
  color: rgba(0, 0, 0, 0.58);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 750;
  transition: color 120ms ease;
}

.db-layout .db-table-item::before {
  top: 6px;
  bottom: 6px;
  left: -43px;
}

.db-table-open {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 30px;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  padding: 4px 0;
  text-align: left;
}

.db-table-item-name {
  min-width: 0;
  overflow: hidden;
  font-family: "Menlo", "Consolas", monospace;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.db-table-menu-btn {
  display: inline-flex;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: rgba(0, 0, 0, 0.34);
  cursor: pointer;
  font-size: 18px;
  font-weight: 300;
  line-height: 1;
  opacity: 0;
  padding: 0;
}

.db-table-item:hover .db-table-menu-btn,
.db-table-item.active .db-table-menu-btn,
.db-table-menu-btn:focus-visible {
  opacity: 1;
}

.db-table-menu-btn:hover,
.db-table-menu-btn:focus-visible {
  background: #f2f2f2;
  color: #000;
  outline: none;
}

.db-table-menu-popover {
  position: fixed;
  z-index: 80;
  display: grid;
  width: 224px;
  overflow: hidden;
  border: var(--line-width) solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.12);
  padding: 6px;
}

.db-table-menu-popover button {
  min-height: 32px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: rgba(0, 0, 0, 0.72);
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
  padding: 0 10px;
  text-align: left;
}

.db-table-menu-popover button:hover {
  background: #f2f2f2;
  color: #000;
}

.db-layout .db-viewer-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  min-height: 58px;
  padding: 10px 14px;
  border-bottom: var(--line-width) solid var(--line-soft);
  background: #fff !important;
}

.db-layout .db-main {
  position: relative;
}

.db-viewer-toolbar {
  display: flex;
  min-height: 46px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: var(--line-width) solid var(--line-soft);
  background: #fff;
  padding: 7px 10px;
}

.db-viewer-tools-left,
.db-viewer-meta {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
}

.db-viewer-meta {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.db-viewer-tabs {
  display: flex;
  gap: 4px;
  padding: 3px;
  border: var(--line-width) solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
}

.db-layout .db-tab-btn.active {
  background: #000;
  color: #fff;
}

.db-row-search {
  width: min(310px, 28vw);
}

.db-layout .db-table-scroll {
  flex: 1;
  overflow: auto;
  background: #fff;
}

.db-layout .db-table-scroll table {
  width: max-content;
  min-width: 100%;
  table-layout: auto;
}

.db-layout .db-table-scroll th {
  height: 42px;
  border-right: var(--line-width) solid var(--line-soft);
  padding: 7px 10px;
  background: #fafafa !important;
}

.db-layout .db-table-scroll td {
  height: 40px;
  border-right: var(--line-width) solid var(--line-soft);
  max-width: 420px;
  padding: 0;
  vertical-align: middle;
}

.db-layout .db-table-scroll th:last-child,
.db-layout .db-table-scroll td:last-child {
  border-right: 0;
}

.db-layout .db-select-th,
.db-layout .db-select-cell {
  width: 42px;
  min-width: 42px;
  max-width: 42px;
  padding: 0;
  text-align: center;
}

.db-layout .db-cell-btn {
  display: flex;
  width: 100%;
  max-width: none;
  min-height: 39px;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(0, 0, 0, 0.84);
  cursor: text;
  font-family: "Menlo", "Consolas", monospace;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  padding: 0 10px;
  text-align: left;
  text-decoration: none;
  white-space: nowrap;
}

.db-layout .db-cell-btn:hover,
.db-layout .db-cell-btn:focus-visible {
  background: #f7f7f7;
  outline: inset 1px rgba(0, 0, 0, 0.18);
  text-decoration: none;
}

.db-cell-text {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.db-cell-text.is-url {
  color: rgba(0, 0, 0, 0.68);
}

.db-cell-text.is-email {
  color: #000;
  font-weight: 650;
}

.db-null {
  color: rgba(0, 0, 0, 0.36);
  font-style: italic;
}

.db-bool {
  color: rgba(0, 0, 0, 0.68);
  font-weight: 800;
}

.db-json-chip {
  flex-shrink: 0;
  border: var(--line-width) solid var(--line-soft);
  border-radius: 4px;
  color: rgba(0, 0, 0, 0.46);
  font-family: var(--font);
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  padding: 2px 4px;
}

.db-layout .db-cell-with-fk {
  grid-template-columns: minmax(0, 1fr) 28px;
  gap: 0;
}

.db-layout .db-fk-jump {
  width: 28px;
  height: 39px;
  border: 0;
  border-left: var(--line-width) solid var(--line-soft);
  border-radius: 0;
  background: #fff;
  color: rgba(0, 0, 0, 0.36);
}

.db-layout .db-fk-jump:hover {
  background: #f2f2f2;
  color: #000;
}

.db-cell-popover {
  position: fixed;
  z-index: 90;
  display: grid;
  gap: 10px;
  border: var(--line-width) solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.14);
  padding: 12px;
}

.db-cell-popover-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.db-cell-popover-head strong,
.db-cell-popover-head span {
  display: block;
}

.db-cell-popover-head strong {
  color: #000;
  font-size: 13px;
  font-weight: 900;
}

.db-cell-popover-head span {
  margin-top: 3px;
  color: rgba(0, 0, 0, 0.46);
  font-family: "Menlo", "Consolas", monospace;
  font-size: 11px;
  font-weight: 700;
}

.db-popover-close {
  display: inline-flex;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: rgba(0, 0, 0, 0.46);
  cursor: pointer;
  font-size: 18px;
}

.db-popover-close:hover {
  background: #f2f2f2;
  color: #000;
}

.db-cell-popover-editor {
  width: 100%;
  min-height: 120px;
  max-height: 360px;
  resize: vertical;
  border: var(--line-width) solid var(--line-soft);
  border-radius: 7px;
  background: #fff;
  color: #000;
  font-family: "Menlo", "Consolas", monospace;
  font-size: 12px;
  line-height: 1.45;
  padding: 10px;
}

.db-cell-popover-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.db-popover-save {
  background: #000;
  color: #fff;
}

.db-popover-save:hover {
  background: #1f1f1f;
}

.db-relation-panel {
  position: absolute;
  right: 14px;
  bottom: 58px;
  z-index: 50;
  display: none;
  width: min(560px, calc(100% - 28px));
  max-height: min(520px, calc(100% - 130px));
  overflow: hidden;
  border: var(--line-width) solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.13);
}

.db-relation-panel.open {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.db-relation-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  border-bottom: var(--line-width) solid var(--line-soft);
  padding: 12px;
}

.db-relation-head strong,
.db-relation-head span {
  display: block;
}

.db-relation-head strong {
  color: #000;
  font-size: 13px;
  font-weight: 900;
}

.db-relation-head span {
  margin-top: 3px;
  color: rgba(0, 0, 0, 0.46);
  font-family: "Menlo", "Consolas", monospace;
  font-size: 11px;
  font-weight: 700;
}

.db-relation-close {
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: rgba(0, 0, 0, 0.46);
  cursor: pointer;
  font-size: 18px;
}

.db-relation-close:hover {
  background: #f2f2f2;
  color: #000;
}

.db-relation-body {
  overflow: auto;
  padding: 10px;
}

.db-relation-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  border: var(--line-width) solid var(--line-soft);
  border-radius: 8px;
  margin-bottom: 8px;
}

.db-relation-row div {
  min-width: 0;
  border-right: var(--line-width) solid var(--line-soft);
  border-bottom: var(--line-width) solid var(--line-soft);
  padding: 8px;
}

.db-relation-row div:nth-child(2n) {
  border-right: 0;
}

.db-relation-row span,
.db-relation-row p {
  display: block;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.db-relation-row span {
  color: rgba(0, 0, 0, 0.42);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.db-relation-row p {
  margin-top: 4px;
  color: #000;
  font-family: "Menlo", "Consolas", monospace;
  font-size: 11px;
  font-weight: 600;
}

.db-relation-open {
  width: 100%;
  min-height: 34px;
  border: 0;
  border-radius: 7px;
  background: #000;
  color: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
}

.db-layout .db-footer {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-top: var(--line-width) solid var(--line-soft);
  background: #fff !important;
  padding: 7px 12px;
}

.db-footer-left {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 14px;
}

.db-row-count {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  color: rgba(0, 0, 0, 0.52);
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.db-row-count strong {
  color: #000;
  font-size: 13px;
  font-weight: 950;
}

.db-row-count code {
  display: block;
  max-width: 240px;
  overflow: hidden;
  color: rgba(0, 0, 0, 0.42);
  font-family: "Menlo", "Consolas", monospace;
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
}

.db-layout .db-limit-row,
.db-layout .db-pagination,
.db-layout .db-page-info,
.db-layout .db-page-num {
  font-size: 12px;
}

/* Files explorer */
.files-layout {
  height: 100vh;
  overflow: hidden;
}

.files-nav-col {
  width: 27%;
  min-width: 320px;
  padding: 0 !important;
  overflow: hidden;
}

.files-nav-top {
  border-bottom: var(--line-width) solid var(--line-soft);
  padding: 18px;
}

.files-nav-top .subservices-header {
  padding: 0;
  border-bottom: 0;
}

.files-root-select {
  width: 100%;
  min-height: 34px;
  margin-top: 14px;
  border: 0;
  border-bottom: var(--line-width) solid var(--line-soft);
  border-radius: 0;
  background: #fff;
  color: #000;
  font-size: 13px;
  font-weight: 800;
}

.files-root-path {
  min-height: 16px;
  margin-top: 8px;
  overflow: hidden;
  color: rgba(0, 0, 0, 0.42);
  font-family: "Menlo", "Consolas", monospace;
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.files-tree {
  height: calc(100vh - 126px);
  overflow: auto;
  padding: 8px 0 18px;
  scrollbar-width: none;
}

.files-tree::-webkit-scrollbar {
  display: none;
}

.files-entry {
  min-width: 0;
}

.files-entry-row {
  position: relative;
  display: grid;
  grid-template-columns: 18px 18px minmax(0, 1fr) auto;
  width: 100%;
  min-height: 34px;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  color: rgba(0, 0, 0, 0.58);
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
  padding: 6px 12px 6px 18px;
  text-align: left;
}

.files-entry-row::before {
  position: absolute;
  top: 7px;
  bottom: 7px;
  left: 0;
  width: var(--line-width);
  background: transparent;
  content: "";
}

.files-entry-row:hover,
.files-entry.is-active > .files-entry-row {
  color: #000;
}

.files-entry-row:hover::before,
.files-entry.is-active > .files-entry-row::before {
  background: rgba(0, 0, 0, 0.42);
}

.files-entry-toggle {
  color: rgba(0, 0, 0, 0.38);
  font-size: 14px;
  font-weight: 400;
  text-align: center;
}

.files-entry-icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
  color: rgba(0, 0, 0, 0.44);
}

.files-entry-icon svg {
  width: 17px;
  height: 17px;
}

.files-entry-name {
  min-width: 0;
  overflow: hidden;
  font-family: "Menlo", "Consolas", monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.files-entry-size {
  color: rgba(0, 0, 0, 0.34);
  font-size: 10px;
  font-weight: 800;
}

.files-entry-children {
  display: none;
  padding-left: 22px;
}

.files-entry.is-open > .files-entry-children {
  display: block;
}

.files-loading,
.files-error,
.files-empty-small {
  color: rgba(0, 0, 0, 0.42);
  font-size: 12px;
  font-weight: 700;
  padding: 12px 18px;
}

.files-error {
  color: var(--red);
}

.files-main {
  height: 100vh;
  padding: 0 !important;
  overflow: hidden;
}

.files-editor-shell {
  display: flex;
  height: 100vh;
  min-width: 0;
  flex-direction: column;
  background: #fff;
}

.files-editor-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 58px;
  align-items: center;
  gap: 16px;
  border-bottom: var(--line-width) solid var(--line-soft);
  padding: 10px 14px;
}

.files-file-title {
  min-width: 0;
}

.files-file-title span,
.files-file-title code {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.files-file-title span {
  color: #000;
  font-size: 15px;
  font-weight: 950;
}

.files-file-title code {
  margin-top: 3px;
  color: rgba(0, 0, 0, 0.42);
  font-family: "Menlo", "Consolas", monospace;
  font-size: 11px;
  font-weight: 700;
}

.files-editor-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.files-file-meta {
  max-width: 300px;
  overflow: hidden;
  color: rgba(0, 0, 0, 0.46);
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.files-save-btn:not(:disabled) {
  background: #000;
  color: #fff;
}

.files-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: rgba(0, 0, 0, 0.42);
  font-size: 13px;
  font-weight: 750;
}

.files-empty svg {
  width: 42px;
  height: 42px;
}

.files-editor {
  flex: 1;
  width: 100%;
  min-height: 0;
  resize: none;
  border: 0;
  background: #fff;
  color: #000;
  font-family: "Menlo", "Consolas", monospace;
  font-size: 12px;
  line-height: 1.55;
  outline: none;
  padding: 16px;
  tab-size: 2;
  white-space: pre;
}

.files-editor:read-only {
  color: rgba(0, 0, 0, 0.58);
}

.files-preview {
  flex: 1;
  min-height: 0;
  align-items: center;
  justify-content: center;
  overflow: auto;
  background: #fff;
  padding: 18px;
}

.files-media-frame {
  display: flex;
  width: 100%;
  height: 100%;
  min-height: 0;
  align-items: center;
  justify-content: center;
  border: var(--line-width) solid var(--line-soft);
  background: #fff;
}

.files-media-frame img,
.files-media-frame video {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.files-media-frame video {
  width: min(100%, 1080px);
  background: #000;
}

.files-audio-frame {
  display: grid;
  width: min(620px, 100%);
  gap: 16px;
  border: var(--line-width) solid var(--line-soft);
  background: #fff;
  padding: 18px;
}

.files-audio-frame strong {
  min-width: 0;
  overflow: hidden;
  color: #000;
  font-size: 14px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.files-audio-frame audio {
  width: 100%;
}

/* Redis dashboard */
.redis-main {
  background: #fff;
}

.redis-stat-chips {
  margin-bottom: 16px;
}

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

.redis-alert-card {
  margin-bottom: 16px;
}

.redis-muted {
  margin: 0;
  color: rgba(0, 0, 0, 0.52);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.55;
}

.redis-warning-list {
  display: grid;
  gap: 10px;
}

.redis-warning-row {
  display: grid;
  grid-template-columns: 7px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  color: rgba(0, 0, 0, 0.68);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.redis-warning-row span {
  width: 7px;
  height: 7px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--yellow);
}

.redis-warning-row p {
  margin: 0;
}

.redis-kv-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.redis-kv-grid.compact {
  margin-top: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.redis-kv-grid div {
  min-width: 0;
  border: var(--line-width) solid var(--line-soft);
  background: #fff;
  padding: 12px;
}

.redis-kv-grid span {
  display: block;
  color: rgba(0, 0, 0, 0.42);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.redis-kv-grid strong {
  display: block;
  min-width: 0;
  margin-top: 6px;
  overflow: hidden;
  color: #000;
  font-size: 14px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.redis-memory-meter {
  display: grid;
  gap: 12px;
}

.redis-memory-track {
  height: 10px;
  overflow: hidden;
  border: var(--line-width) solid var(--line-soft);
  background: rgba(0, 0, 0, 0.035);
}

.redis-memory-track span {
  display: block;
  height: 100%;
  min-width: 2px;
  background: #000;
}

.redis-memory-meta {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.redis-memory-meta strong {
  color: #000;
  font-size: 18px;
  font-weight: 950;
}

.redis-memory-meta span {
  min-width: 0;
  overflow: hidden;
  color: rgba(0, 0, 0, 0.46);
  font-size: 12px;
  font-weight: 700;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.redis-list {
  display: grid;
  gap: 0;
}

.redis-list-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border-top: var(--line-width) solid var(--line-soft);
  padding: 12px 0;
}

.redis-list-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.redis-list-row:last-child {
  padding-bottom: 0;
}

.redis-list-row div {
  min-width: 0;
}

.redis-list-row strong,
.redis-list-row span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.redis-list-row strong {
  color: #000;
  font-size: 13px;
  font-weight: 900;
}

.redis-list-row span {
  color: rgba(0, 0, 0, 0.48);
  font-size: 11px;
  font-weight: 700;
}

.redis-pattern-form {
  display: flex;
  min-width: min(420px, 100%);
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.redis-pattern-form .filter-input {
  min-width: 240px;
}

.redis-key-cell {
  max-width: 340px;
}

.redis-preview-cell,
.redis-error-cell {
  max-width: 420px;
  overflow: hidden;
  color: rgba(0, 0, 0, 0.58);
  font-size: 12px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

  .redis-pattern-form {
    width: 100%;
    justify-content: stretch;
  }

  .redis-pattern-form .filter-input {
    min-width: 0;
    flex: 1;
  }
}

/* ════════════════════════════════════════════════════════════════════════
   NINE ADMIN · REDESIGN « BLANC & BEIGE » — couche additive (réversible)
   Générée avec le design-system ui-ux-pro-max (warm neutral + soft shadows).
   Tout est regroupé ici : pour revenir en arrière, supprimer ce bloc.
   ════════════════════════════════════════════════════════════════════════ */
:root {
  /* — Palette blanc dominant + beige en accent — */
  --bg:              #f8f5ef;   /* off-white chaud très clair  */
  --surface:         #f4efe6;
  --surface-2:       #efe8db;
  --surface-soft:    #faf6ee;   /* fonds d'entête / inputs      */
  --surface-page:    #f8f5ef;
  --surface-sidebar: #ffffff;   /* colonnes blanches            */
  --card:            #ffffff;   /* cartes blanches              */
  --surface-card:    #ffffff;

  --line-soft:       rgba(120, 92, 52, 0.09);
  --line:            rgba(120, 92, 52, 0.16);
  --border:          rgba(120, 92, 52, 0.12);
  --border-dk:       rgba(120, 92, 52, 0.24);

  --text:            #111827;   /* ink neutre (slate-900)      */
  --text-primary:    #111827;
  --text-2:          rgba(17, 24, 39, 0.64);
  --text-secondary:  rgba(17, 24, 39, 0.64);
  --text-3:          rgba(17, 24, 39, 0.42);
  --text-muted:      rgba(17, 24, 39, 0.42);

  --accent:          #111827;   /* slate/ink (direction neutre) */
  --accent-dk:       #000000;
  --accent-strong:   #111827;
  --accent-soft:     #f1f3f5;   /* gris tres clair actif/hover  */
  --accent-soft-2:   #e9edf2;
  --accent-ring:     rgba(17, 24, 39, 0.16);
  --brand-primary:       #111827;
  --brand-primary-light: #f1f3f5;

  /* — Rondeurs (plus généreuses) — */
  --r:         12px;
  --radius-sm: 9px;
  --radius-md: 13px;
  --radius-lg: 18px;
  --radius-xl: 26px;

  /* — Ombres sobres, neutres (slate) — */
  --shadow-soft:        0 1px 2px rgba(15, 23, 42, .03), 0 6px 18px rgba(15, 23, 42, .04);
  --shadow-xs:          0 1px 2px rgba(15, 23, 42, .05);
  --shadow-sm:          0 2px 8px rgba(15, 23, 42, .05);
  --shadow-md:          0 12px 30px rgba(15, 23, 42, .08);
  --shadow-card:        0 1px 2px rgba(15, 23, 42, .03), 0 8px 22px rgba(15, 23, 42, .045);
  --shadow-card-hover:  0 4px 10px rgba(15, 23, 42, .06), 0 16px 36px rgba(15, 23, 42, .09);
  --shadow-ring:        0 0 0 1px rgba(15, 23, 42, .05);
}

/* — Canevas — */
body,
.layout,
.app-layout,
.db-layout,
.login-wrapper { background: var(--bg) !important; color: var(--text); }
.main { background: var(--bg) !important; }

/* — Accessibilité : on restaure des focus rings visibles — */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent) !important;
  outline-offset: 2px !important;
}

/* — Colonnes latérales : blanc chaud + légère profondeur — */
.services-col {
  background: var(--surface-sidebar) !important;
  border-right: 1px solid var(--line-soft) !important;
  box-shadow: 1px 0 0 var(--line-soft);
}
.subservices-col {
  background: var(--surface-sidebar) !important;
  border-right: 1px solid var(--line-soft) !important;
  box-shadow: 1px 0 18px rgba(96, 72, 42, .04);
}

/* — Icônes de service : rondeur + état actif beige — */
.service-link,
.btn-logout {
  border-radius: var(--radius-md) !important;
  transition: background .15s, color .15s, box-shadow .15s, transform .15s;
}
.service-link:hover:not(.disabled),
.btn-logout:hover {
  background: var(--accent-soft) !important;
  color: var(--accent-strong) !important;
}
.service-link.active {
  background: var(--accent-soft) !important;
  color: var(--accent-strong) !important;
  box-shadow: var(--shadow-xs) !important;
}
.service-link.active::before {
  background: var(--accent) !important;
  width: 3px !important;
  border-radius: 2px !important;
}

/* — Sous-services : hover/active beige arrondi — */
.subservice-link,
.db-table-item {
  border-radius: var(--radius-sm) !important;
  transition: background .14s, color .14s;
}
.subservice-link:hover,
.db-table-item:hover {
  background: var(--accent-soft) !important;
  color: var(--text) !important;
}
.subservice-link.active,
.db-table-item.active {
  background: var(--accent-soft) !important;
  color: var(--accent-strong) !important;
  font-weight: 800 !important;
}
.subservice-link:hover::before,
.subservice-link.active::before,
.db-table-item:hover::before,
.db-table-item.active::before { background: var(--accent) !important; }

/* — Icône de section : pastille beige avec ombre — */
.section-icon {
  border-radius: var(--radius-md) !important;
  background: var(--accent-soft) !important;
  color: var(--accent-strong) !important;
  box-shadow: var(--shadow-xs) !important;
}

/* — Stat chips : vraies cartes flottantes au lieu d'une grille plate — */
.stat-chips,
.stat-grid,
.pgb-metrics,
.pgb-perf {
  gap: 14px !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  overflow: visible !important;
}
.stat-chip,
.stat-card,
.pgb-metric,
.pgb-perf-item {
  background: var(--card) !important;
  border: 1px solid var(--line-soft) !important;
  border-right: 1px solid var(--line-soft) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-soft) !important;
  padding: 16px 18px !important;
  transition: box-shadow .2s, transform .2s;
}
.stat-chip:hover,
.stat-card:hover,
.pgb-metric:hover {
  box-shadow: var(--shadow-card) !important;
  transform: translateY(-2px);
}
.chip-num,
.stat-num,
.stat-val,
.q-count-num { color: var(--text) !important; }

/* — Cartes : rondeur généreuse + ombre douce + survol qui soulève — */
.component-card,
.card,
.table-card,
.detail-card,
.form-card,
.send-card,
.login-card,
.q-count-box,
.mini-card,
.node-card {
  border: 1px solid var(--line-soft) !important;
  border-radius: var(--radius-lg) !important;
  background: var(--card) !important;
  box-shadow: var(--shadow-card) !important;
}
.component-card,
.node-card,
.mini-card,
.q-count-box {
  transition: box-shadow .22s ease, transform .22s ease;
}
.component-card:hover,
.node-card:hover,
.mini-card:hover,
.q-count-box:hover {
  box-shadow: var(--shadow-card-hover) !important;
  transform: translateY(-3px);
}

/* — Entêtes de carte : léger fond chaud — */
.comp-header,
.card-header,
.mail-detail-header,
.db-viewer-header,
.db-footer {
  background: var(--surface-soft) !important;
  border-bottom: 1px solid var(--line-soft) !important;
}

/* — Tables : survol beige doux — */
tbody tr:hover td,
.db-table-scroll tbody tr:hover td,
.mail-list-item:hover,
.inbox-preview-item:hover,
.simple-row:hover { background: var(--accent-soft) !important; }

/* — Boutons primaires : espresso chaud + ombre — */
.btn-primary,
.btn-primary:not(.btn) {
  background: var(--accent-strong) !important;
  color: #fff !important;
  border-radius: var(--radius-sm) !important;
  box-shadow: var(--shadow-xs) !important;
  transition: background .15s, box-shadow .15s, transform .12s;
}
.btn-primary:hover,
.btn-primary:not(.btn):hover {
  background: #5a4733 !important;
  box-shadow: var(--shadow-sm) !important;
  transform: translateY(-1px);
}

/* — Boutons secondaires / ghost : rondeur + hover beige — */
.btn,
.btn-ghost:not(.btn),
.btn-sm,
.page-btn,
.db-page-btn,
.btn-restart {
  border-radius: var(--radius-sm) !important;
  transition: background .14s, color .14s, box-shadow .14s;
}
.btn:hover,
.btn-ghost:hover,
.btn-secondary:hover,
.btn-sm:hover,
.page-btn:hover,
.db-page-btn:hover:not(:disabled),
.btn-restart:hover {
  background: var(--accent-soft) !important;
  color: var(--accent-strong) !important;
}

/* — Champs de formulaire : remplis, arrondis, focus ring chaud — */
.filter-input,
.filter-select,
.form-input,
.db-schema-select,
.db-limit-select,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="number"],
select,
textarea {
  border: 1px solid var(--line-soft) !important;
  border-radius: var(--radius-sm) !important;
  background: var(--surface-soft) !important;
  box-shadow: inset 0 1px 2px rgba(96, 72, 42, .04) !important;
  padding: 9px 12px !important;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.filter-input:focus,
.filter-select:focus,
.form-input:focus,
.db-schema-select:focus,
.db-limit-select:focus,
input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent) !important;
  background: var(--card) !important;
  box-shadow: 0 0 0 3px var(--accent-ring) !important;
}

/* — Badges / pills : teinte beige chaude — */
.badge,
.pill,
.comp-badge,
.db-total-badge,
.tab-count,
.soon-badge {
  background: var(--accent-soft) !important;
  color: var(--accent-strong) !important;
  border-radius: 999px !important;
}

/* — Onglets actifs : accent caramel — */
.tab-btn.active {
  color: var(--accent-strong) !important;
  border-bottom-color: var(--accent) !important;
}

/* — Barres de progression : remplissage accent — */
.breakdown-bar,
.bar-fill,
.mini-bar-fill,
.disk-bar-fill {
  background: linear-gradient(90deg, var(--accent), var(--accent-dk)) !important;
}
.breakdown-bar-wrap,
.mini-bar,
.disk-bar-wrap { background: var(--accent-soft) !important; }

/* — Carte de connexion : douce et arrondie — */
.login-wrapper { background: var(--bg) !important; }
.login-card {
  border: 1px solid var(--line-soft) !important;
  border-radius: var(--radius-xl) !important;
  box-shadow: var(--shadow-md) !important;
}

/* — Liens d'accent — */
.link,
.link-more,
.comp-link { color: var(--accent-strong) !important; }

/* — Préférence mouvement réduit — */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .stat-chip:hover,
  .component-card:hover,
  .node-card:hover,
  .mini-card:hover,
  .q-count-box:hover,
  .btn-primary:hover { transform: none !important; }
}
/* ═══════════════ FIN REDESIGN « BLANC & BEIGE » ═══════════════ */

/* ════════════════════════════════════════════════════════════════
   NINE ADMIN · POLISH PASS — rondeur globale + placement harmonise
   Cette couche garde la palette blanc/beige existante et lisse toutes
   les pages, y compris celles qui portent encore des styles locaux.
   ════════════════════════════════════════════════════════════════ */
:root {
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --panel-gap: 18px;
  --panel-pad: 18px;
  --surface-soft: #fbf8f2;
  --surface-hover: #f1e7d8;
  --line-soft: rgba(120, 92, 52, 0.12);
  --line: rgba(120, 92, 52, 0.2);
}

body {
  background:
    radial-gradient(circle at 18% 0%, rgba(181, 142, 94, .12), transparent 34vw),
    var(--bg) !important;
}

.main {
  padding: 30px clamp(20px, 2.5vw, 38px) !important;
}

.services-col,
.subservices-col,
.mail-workspace-sidebar,
.files-nav-col,
.db-nav-col {
  background: rgba(255, 255, 255, .92) !important;
}

.services-col {
  width: 76px;
}

.services-logo {
  min-height: 68px;
}

.service-link,
.btn-logout {
  width: 48px !important;
  height: 48px !important;
  border-radius: 16px !important;
}

.service-link.active::before {
  left: -12px !important;
  top: 13px !important;
  bottom: 13px !important;
  width: 4px !important;
  border-radius: 999px !important;
}

.subservices-col {
  padding: 24px 18px !important;
}

.subservices-header {
  margin: 0 6px 12px;
  padding: 0 0 14px !important;
}

.subservice-link,
.db-layout .db-table-item,
.files-entry-row,
.dns-zone-item,
.mail-folder,
.mail-mini-address {
  border-radius: 14px !important;
}

.subservice-link,
.dns-zone-item {
  padding-left: 16px !important;
  padding-right: 14px !important;
}

.subservice-link::before,
.db-layout .db-table-item::before,
.dns-zone-item::before,
.files-entry-row::before {
  display: none !important;
}

.subservice-link:hover,
.subservice-link.active,
.db-layout .db-table-item:hover,
.db-layout .db-table-item.active,
.files-entry-row:hover,
.files-entry.is-active > .files-entry-row,
.dns-zone-item:hover,
.dns-zone-item.active,
.mail-folder:hover,
.mail-folder.active,
.mail-mini-address:hover {
  background: var(--surface-hover) !important;
  color: var(--accent-strong) !important;
}

.section-header-bar,
.page-header {
  align-items: center;
  border-bottom: 0 !important;
  margin-bottom: 24px !important;
  padding-bottom: 0 !important;
}

.section-icon {
  width: 46px !important;
  height: 46px !important;
  border: 1px solid var(--line-soft) !important;
  border-radius: 16px !important;
}

.section-title,
.page-header h1 {
  font-size: clamp(24px, 2.2vw, 32px) !important;
  letter-spacing: -0.02em !important;
}

.section-sub,
.section-meta-line,
.page-sub {
  font-size: 13px !important;
}

.stat-chips,
.stat-grid,
.stats-row,
.dns-stats-row,
.mail-system-grid,
.redis-kv-grid,
.component-grid {
  gap: var(--panel-gap) !important;
}

.stat-chip,
.stat-card,
.dns-stat,
.mail-system-card,
.redis-kv-grid div,
.pgb-metric,
.pgb-perf-item {
  border-radius: var(--radius-lg) !important;
}

.stat-chip,
.stat-card,
.dns-stat,
.mail-system-card,
.redis-kv-grid div {
  min-height: 104px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.chip-num,
.stat-num,
.stat-val,
.dns-stat strong,
.mail-system-card strong,
.pgb-metric-val {
  font-size: clamp(24px, 2vw, 34px) !important;
}

.component-card,
.card,
.table-card,
.detail-card,
.form-card,
.send-card,
.login-card,
.node-card,
.dns-zones-panel,
.dns-records-panel,
.mail-system-section,
.mail-system-actions,
.mail-split,
.files-media-frame,
.files-audio-frame,
.db-definition-card,
.db-relation-panel,
.db-relation-row,
.redis-alert-card {
  border: 1px solid var(--line-soft) !important;
  border-radius: var(--radius-lg) !important;
  background: rgba(255, 255, 255, .96) !important;
  box-shadow: var(--shadow-card) !important;
  overflow: hidden;
}

.component-card:hover,
.node-card:hover,
.mail-system-card:hover,
.stat-chip:hover,
.stat-card:hover,
.dns-stat:hover,
.redis-kv-grid div:hover {
  box-shadow: var(--shadow-card-hover) !important;
  transform: translateY(-2px);
}

.comp-header,
.card-header,
.mail-detail-header,
.db-viewer-header,
.files-editor-header,
.mail-toolbar,
.dns-panel-head,
.dns-records-head,
.node-header,
.modal-header,
.compose-header,
.db-relation-head,
.mail-system-section h2 {
  min-height: 56px;
  background: var(--surface-soft) !important;
  border-bottom: 1px solid var(--line-soft) !important;
  padding: 14px 18px !important;
}

.comp-body,
.modal-body,
.detail-card,
.send-card,
.form-card {
  padding: var(--panel-pad) !important;
}

.table-wrap,
.table-wrapper,
.db-table-scroll,
.dns-records-table-wrap {
  border-radius: inherit;
}

table {
  border-collapse: separate !important;
  border-spacing: 0;
}

th:first-child,
td:first-child {
  padding-left: 18px !important;
}

th:last-child,
td:last-child {
  padding-right: 18px !important;
}

th,
.db-table-scroll th {
  background: var(--surface-soft) !important;
}

td,
th,
.db-table-scroll td,
.db-table-scroll th {
  border-bottom: 1px solid var(--line-soft) !important;
}

tbody tr:last-child td {
  border-bottom: 0 !important;
}

tbody tr:hover td,
.db-table-scroll tbody tr:hover td,
.simple-row:hover,
.health-item:hover,
.mail-list-item:hover,
.inbox-preview-item:hover,
.gmail-row:hover,
.gmail-row.selected {
  background: var(--surface-hover) !important;
}

.btn,
.btn-primary:not(.btn),
.btn-ghost:not(.btn),
.btn-sm,
.btn-xs,
.page-btn,
.db-page-btn,
.db-tool-btn,
.btn-restart,
.email-command,
.mail-icon-action,
.compose-icon-btn,
.db-fk-jump,
.db-table-menu-btn,
.mail-hover-actions button,
.db-relation-open {
  border-radius: 12px !important;
}

.btn,
.btn-ghost,
.btn-secondary,
.btn-ghost:not(.btn),
.btn-sm,
.btn-xs,
.page-btn,
.db-page-btn,
.db-tool-btn,
.btn-restart,
.email-command {
  min-height: 36px !important;
  border: 1px solid var(--line-soft) !important;
  background: rgba(255, 255, 255, .62) !important;
}

.btn:hover,
.btn-ghost:hover,
.btn-secondary:hover,
.btn-ghost:not(.btn):hover,
.btn-sm:hover,
.btn-xs:hover,
.page-btn:hover,
.db-page-btn:hover:not(:disabled),
.db-tool-btn:hover,
.btn-restart:hover,
.email-command:hover {
  background: var(--surface-hover) !important;
  border-color: var(--line) !important;
}

.btn-primary,
.btn-primary:not(.btn),
.db-tab-btn.active,
.files-save-btn:not(:disabled),
.db-popover-save,
.db-relation-open {
  background: var(--accent-strong) !important;
  color: #fff !important;
  border-color: var(--accent-strong) !important;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="number"],
select,
textarea,
.filter-input,
.filter-select,
.form-input,
.db-row-search,
.db-search-input,
.dns-search-input,
.files-root-select,
.compose-input,
.compose-body {
  border: 1px solid var(--line-soft) !important;
  border-radius: 14px !important;
  background: #fff !important;
  padding: 10px 13px !important;
}

textarea,
.compose-body,
.files-editor,
.db-cell-editor,
.db-cell-popover-editor,
.db-cell-pre {
  border-radius: var(--radius-md) !important;
}

.badge,
.pill,
.comp-badge,
.db-total-badge,
.tab-count,
.soon-badge,
.global-badge {
  border: 1px solid rgba(120, 92, 52, .08) !important;
  border-radius: 999px !important;
  padding: 4px 10px !important;
}

.q-count-box,
.bucket-item,
.mini-card {
  border: 1px solid var(--line-soft) !important;
  border-radius: var(--radius-md) !important;
  background: #fff !important;
}

.queue-counts-grid {
  gap: 12px !important;
}

.breakdown-bar-wrap,
.mini-bar,
.disk-bar,
.disk-bar-wrap,
.redis-memory-track,
.token-bar,
.progress-track,
[style*="height:8px"],
[style*="height: 8px"],
[style*="height:10px"],
[style*="height: 10px"],
[style*="height:14px"],
[style*="height: 14px"] {
  border-radius: 999px !important;
  overflow: hidden !important;
}

.attention-grid,
.mail-address-grid,
.pgb-metrics,
.pgb-perf {
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.attention-item,
.mail-address-grid > div,
.pgb-metric,
.pgb-perf-item {
  border-right: 1px solid var(--line-soft) !important;
}

.attention-item:last-child,
.mail-address-grid > div:last-child,
.pgb-metric:last-child,
.pgb-perf-item:last-child {
  border-right: 0 !important;
}

.dns-console {
  gap: var(--panel-gap) !important;
}

.dns-zones-panel {
  top: 30px;
}

.modal-dialog,
dialog,
.nine-confirm-dialog,
.db-table-menu-popover,
.db-cell-popover,
.compose-window {
  border: 1px solid var(--line-soft) !important;
  border-radius: var(--radius-xl) !important;
  box-shadow: var(--shadow-md) !important;
}

.compose-window {
  border-bottom-right-radius: 0 !important;
}

.mail-gmail-search,
.mail-compose-primary {
  border-radius: 999px !important;
}

.mail-workspace,
.mail-content-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.mail-content-card {
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow-card);
}

.gmail-row {
  padding-right: 18px;
}

.mail-detail-drawer {
  border-top-left-radius: var(--radius-xl);
  border-bottom-left-radius: var(--radius-xl);
  overflow: hidden;
}

.db-layout .db-viewer-toolbar,
.db-layout .db-footer,
.files-editor-header {
  background: var(--surface-soft) !important;
}

.db-viewer-tabs {
  border-radius: 14px !important;
  background: #fff !important;
}

.db-layout .db-table-scroll {
  background: #fff !important;
}

.db-layout .db-cell-btn:hover,
.db-layout .db-cell-btn:focus-visible {
  background: var(--surface-hover) !important;
  border-radius: 8px;
}

.files-entry-row {
  margin: 0 8px;
}

.files-media-frame,
.files-audio-frame {
  border-radius: var(--radius-lg) !important;
}

.node-header,
.node-body,
.node-section,
.bucket-grid,
.node-info-rows {
  min-width: 0;
}

.node-body {
  display: grid;
  gap: 16px;
  padding: 18px !important;
}

.bucket-grid {
  gap: 12px !important;
}

.section-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-2) !important;
}

.section-divider::after {
  flex: 1;
  height: 1px;
  background: var(--line-soft);
  content: "";
}

.login-card {
  background: rgba(255, 255, 255, .92) !important;
}

@media (max-width: 1120px) {
  .component-grid,
  .redis-grid,
  .mail-system-columns {
    grid-template-columns: 1fr !important;
  }

  .dns-console,
  .mail-address-grid {
    grid-template-columns: 1fr !important;
  }

  .mail-address-grid > div + div,
  .attention-item,
  .pgb-metric,
  .pgb-perf-item {
    border-right: 0 !important;
  }

  .attention-grid,
  .pgb-metrics,
  .pgb-perf {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 820px) {
  .main {
    padding: 18px !important;
  }

  .services-col {
    width: 100%;
  }

  .service-link,
  .btn-logout {
    width: 44px !important;
    height: 44px !important;
  }

  .subservices-col,
  .db-nav-col,
  .files-nav-col {
    padding: 10px !important;
  }

  .stat-chips,
  .stat-grid,
  .stats-row,
  .dns-stats-row,
  .mail-system-grid,
  .redis-kv-grid,
  .redis-kv-grid.compact {
    grid-template-columns: 1fr !important;
  }
}

/* ════════════════════════════════════════════════════════════════
   NINE ADMIN · FINAL COOL SURFACE OVERRIDE
   Blanc/gris dominant, beige limite aux petits accents.
   ════════════════════════════════════════════════════════════════ */
:root {
  --bg: #f7f8fa !important;
  --surface: #ffffff !important;
  --surface-2: #f4f6f8 !important;
  --surface-soft: #f6f7f9 !important;
  --surface-page: #f7f8fa !important;
  --surface-sidebar: #ffffff !important;
  --surface-card: #ffffff !important;
  --surface-hover: #eef1f5 !important;
  --line-soft: rgba(17, 24, 39, .08) !important;
  --line: rgba(17, 24, 39, .12) !important;
  --accent-soft: #f3eadc !important;
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 30px;
}

body,
.login-wrapper,
.main {
  background: var(--bg) !important;
  background-image: none !important;
}

.services-col,
.subservices-col,
.mail-workspace-sidebar,
.files-nav-col,
.db-nav-col,
.card,
.component-card,
.settings-card,
.node-card,
.dns-card,
.mail-content-card,
.db-layout .db-viewer,
.files-main-panel,
.login-card {
  background: #fff !important;
  border-color: var(--line-soft) !important;
}

.subservices-header,
.section-header-bar,
.page-header,
.db-layout .db-viewer-toolbar,
.db-layout .db-footer,
.files-editor-header,
thead,
.dns-records-table thead,
.mail-table-header,
.gmail-header-row {
  background: var(--surface-soft) !important;
}

.service-link,
.btn-logout,
.subservice-link,
.db-layout .db-table-item,
.files-entry-row,
.dns-zone-item,
.mail-folder,
.mail-mini-address,
.db-tab-btn,
.tab-btn {
  border-radius: 999px !important;
}

.service-link.active,
.subservice-link.active,
.db-layout .db-table-item.active,
.files-entry.is-active > .files-entry-row,
.dns-zone-item.active,
.mail-folder.active,
.tab-btn.active,
.db-tab-btn.active {
  background: var(--surface-hover) !important;
  box-shadow: inset 0 0 0 1px rgba(17, 24, 39, .06) !important;
}

.service-link:hover,
.subservice-link:hover,
.db-layout .db-table-item:hover,
.files-entry-row:hover,
.dns-zone-item:hover,
.mail-folder:hover,
.mail-mini-address:hover,
.tab-btn:hover,
.db-tab-btn:hover {
  background: #f3f5f7 !important;
}

.service-link.active::before {
  left: -10px !important;
  top: 50% !important;
  right: auto !important;
  bottom: auto !important;
  width: 6px !important;
  height: 24px !important;
  border-radius: 999px !important;
  transform: translateY(-50%) !important;
  background: var(--accent) !important;
}

.subservice-link.active::before,
.db-layout .db-table-item.active::before,
.dns-zone-item.active::before,
.files-entry.is-active > .files-entry-row::before {
  display: block !important;
  left: 8px !important;
  top: 50% !important;
  right: auto !important;
  bottom: auto !important;
  width: 5px !important;
  height: 18px !important;
  border-radius: 999px !important;
  transform: translateY(-50%) !important;
  background: var(--accent) !important;
}

.badge,
.pill,
.comp-badge,
.db-total-badge,
.tab-count,
.soon-badge,
.global-badge,
.section-icon {
  background: var(--accent-soft) !important;
  color: var(--accent-strong) !important;
  border-color: rgba(181, 142, 94, .18) !important;
}

input,
select,
textarea,
.filter-input,
.filter-select,
.form-input,
.db-row-search,
.db-search-input,
.dns-search-input,
.files-root-select,
.compose-input,
.compose-body,
.db-viewer-tabs {
  background: #fff !important;
  border-color: var(--line-soft) !important;
  border-radius: 18px !important;
}

/* ════════════════════════════════════════════════════════════════
   NINE ADMIN · FINAL LAYOUT NORMALIZATION OVERRIDE
   Placement coherent, moins de lignes internes, blocs plus respirants.
   ════════════════════════════════════════════════════════════════ */
* {
  box-sizing: border-box;
}

.app-layout {
  align-items: stretch !important;
}

.main {
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 22px !important;
}

.section-header-bar,
.page-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 18px !important;
  min-height: 58px !important;
}

.section-header-info,
.page-title-wrap,
.comp-header,
.node-header,
.card-header,
.settings-card-header,
.mail-toolbar,
.db-layout .db-viewer-toolbar,
.files-editor-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 14px !important;
  min-width: 0 !important;
}

.section-header-info {
  justify-content: flex-start !important;
}

.section-title,
.section-sub,
.section-meta-line,
.comp-title,
.node-name,
.svc-name,
.mail-subject,
.files-entry-name {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.component-grid,
.settings-grid,
.stat-grid,
.stats-row,
.stat-chips,
.mail-system-grid,
.queue-counts-grid,
.redis-grid,
.dns-stats-row {
  display: grid !important;
  gap: 16px !important;
  align-items: stretch !important;
}

.component-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.span-2 {
  grid-column: 1 / -1 !important;
}

.stat-chips,
.stats-row,
.stat-grid,
.dns-stats-row {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)) !important;
}

.component-card,
.card,
.settings-card,
.node-card,
.stat-card,
.stat-chip,
.dns-card,
.queue-card,
.mail-content-card,
.db-layout .db-viewer,
.files-main-panel,
.q-count-box,
.bucket-item,
.activity-item,
.mini-card {
  border: 1px solid var(--line-soft) !important;
  border-radius: var(--radius-lg) !important;
  background: #fff !important;
  box-shadow: 0 12px 34px rgba(15, 23, 42, .045) !important;
  overflow: hidden !important;
}

.component-card,
.card,
.settings-card,
.node-card,
.dns-card,
.queue-card,
.mail-content-card,
.db-layout .db-viewer,
.files-main-panel {
  padding: 0 !important;
}

.comp-header,
.card-header,
.settings-card-header,
.node-header,
.files-editor-header,
.mail-table-header,
.gmail-header-row,
.db-layout .db-viewer-toolbar {
  min-height: 56px !important;
  padding: 15px 18px !important;
  border-bottom: 0 !important;
  background: linear-gradient(180deg, #fff, var(--surface-soft)) !important;
}

.comp-body,
.card-body,
.settings-card-body,
.dns-card-body,
.queue-card-body,
.mail-card-body {
  padding: 18px !important;
}

.svc-list,
.table-wrap,
.db-layout .db-table-scroll,
.dns-records-table-wrap,
.mail-table-wrap,
.files-table-wrap {
  width: 100% !important;
  overflow: auto !important;
}

.svc-list {
  padding: 8px !important;
}

.svc-row {
  grid-template-columns: 12px minmax(160px, 1.4fr) minmax(82px, .7fr) minmax(64px, .5fr) minmax(110px, .9fr) minmax(82px, .7fr) minmax(82px, auto) !important;
  gap: 12px !important;
  min-height: 44px !important;
  padding: 10px 12px !important;
  border-bottom: 0 !important;
  border-radius: 16px !important;
}

.svc-row:not(.svc-header):hover {
  background: var(--surface-soft) !important;
}

.svc-row.svc-header {
  position: sticky;
  top: 0;
  z-index: 2;
  min-height: 36px !important;
  background: #fff !important;
  border-bottom: 0 !important;
  box-shadow: inset 0 -1px 0 var(--line-soft) !important;
}

.svc-resource {
  min-width: 0 !important;
}

.btn-restart,
.status-btns button,
.node-actions button,
.table-action,
.action-btn,
button {
  border-radius: 999px !important;
}

.pgb-metrics,
.pgb-perf,
.attention-grid,
.mail-address-grid {
  display: grid !important;
  gap: 12px !important;
  background: transparent !important;
  border: 0 !important;
  padding: 14px !important;
}

.pgb-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

.pgb-perf {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  padding-top: 0 !important;
}

.pgb-metric,
.pgb-perf-item,
.attention-item,
.mail-address-grid > div {
  border: 1px solid var(--line-soft) !important;
  border-radius: var(--radius-md) !important;
  background: var(--surface-soft) !important;
  padding: 15px !important;
  border-right: 1px solid var(--line-soft) !important;
  min-width: 0 !important;
}

.pgb-totals {
  margin: 0 14px 14px !important;
  padding: 14px !important;
  border: 1px solid var(--line-soft) !important;
  border-radius: var(--radius-md) !important;
  background: #fff !important;
}

table,
.table,
.dns-records-table,
.db-layout table,
#users-table {
  width: 100% !important;
  border-collapse: separate !important;
  border-spacing: 0 8px !important;
}

thead,
thead tr,
.svc-header {
  border-radius: 16px !important;
}

th {
  border: 0 !important;
  padding: 10px 14px !important;
  color: var(--text-3) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: .045em !important;
}

td {
  border-top: 1px solid var(--line-soft) !important;
  border-bottom: 1px solid var(--line-soft) !important;
  padding: 13px 14px !important;
  background: #fff !important;
}

tbody tr td:first-child {
  border-left: 1px solid var(--line-soft) !important;
  border-top-left-radius: 16px !important;
  border-bottom-left-radius: 16px !important;
}

tbody tr td:last-child {
  border-right: 1px solid var(--line-soft) !important;
  border-top-right-radius: 16px !important;
  border-bottom-right-radius: 16px !important;
}

tbody tr {
  border: 0 !important;
}

tbody tr:hover td {
  background: var(--surface-soft) !important;
}

.node-body {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 12px !important;
  padding: 14px !important;
}

.node-section {
  border-right: 0 !important;
  border-bottom: 0 !important;
  border: 1px solid var(--line-soft) !important;
  border-radius: var(--radius-md) !important;
  background: var(--surface-soft) !important;
  min-width: 0 !important;
}

.bucket-grid,
.activity-grid,
.status-btns,
.node-info-rows,
.disk-labels,
.node-meta {
  gap: 8px !important;
  min-width: 0 !important;
}

.bucket-grid,
.activity-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(82px, 1fr)) !important;
}

.bucket-item,
.activity-item,
.q-count-box,
.mini-card {
  box-shadow: none !important;
  padding: 10px !important;
}

.section-divider {
  margin: 4px 0 0 !important;
}

.section-divider::after {
  opacity: .55 !important;
}

.alert,
[style*="background:rgba(239,68,68"],
[style*="background:rgba(34,197,94"] {
  border-radius: var(--radius-md) !important;
}

[style*="var(--card-bg"],
[style*="#1e2433"] {
  background: #fff !important;
  border-color: var(--line-soft) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: 0 12px 34px rgba(15, 23, 42, .045) !important;
  color: var(--text) !important;
}

[style*="#e2e8f0"] {
  color: var(--text) !important;
}

[style*="rgba(0,0,0,0.25)"],
[style*="rgba(0,0,0,0.3)"],
[style*="rgba(0,0,0,0.2)"] {
  background: var(--surface-soft) !important;
  color: var(--text) !important;
  border-color: var(--line-soft) !important;
}

@media (max-width: 1180px) {
  .component-grid,
  .node-body,
  .pgb-metrics,
  .pgb-perf {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 760px) {
  .section-header-bar,
  .page-header,
  .comp-header,
  .node-header {
    align-items: flex-start !important;
    flex-direction: column !important;
  }

  .component-grid,
  .node-body,
  .pgb-metrics,
  .pgb-perf,
  .stat-chips,
  .stats-row,
  .stat-grid,
  .dns-stats-row {
    grid-template-columns: 1fr !important;
  }
}
