:root {
  --ink: #111827;
  --muted: #667085;
  --line: #e4e7ec;
  --surface: #ffffff;
  --canvas: #f6f7fb;
  --nav: #101828;
  --nav-soft: #1d2939;
  --brand: #635bff;
  --brand-dark: #5148e5;
  --cyan: #22d3c5;
  --success: #079455;
  --warning: #dc6803;
  --danger: #d92d20;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px rgba(16, 24, 40, .05);
}

* { box-sizing: border-box; }
html { min-width: 320px; }
body {
  min-height: 100vh;
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand-dark); }
.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 1045;
  width: 264px;
  display: flex;
  flex-direction: column;
  background: var(--nav);
  color: #fff;
  overflow-y: auto;
  transition: transform .22s ease;
}
.brand-lockup {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 24px 22px 20px;
  color: #fff;
  text-decoration: none;
}
.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--brand), #8b83ff);
  box-shadow: 0 8px 22px rgba(99, 91, 255, .32);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: -.03em;
}
.brand-title { font-size: 15px; font-weight: 750; letter-spacing: -.02em; }
.brand-subtitle { color: #98a2b3; font-size: 11px; }
.nav-section { padding: 8px 12px; }
.nav-label {
  padding: 12px 10px 7px;
  color: #667085;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.sidebar .nav-link {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 42px;
  padding: 9px 11px;
  margin: 2px 0;
  border-radius: 10px;
  color: #b9c0cc;
  font-weight: 570;
  text-decoration: none;
  transition: background .15s ease, color .15s ease;
}
.sidebar .nav-link i { width: 18px; font-size: 17px; }
.sidebar .nav-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar .nav-link.active { background: var(--nav-soft); color: #fff; box-shadow: inset 3px 0 var(--cyan); }
.nav-count {
  min-width: 21px;
  margin-left: auto;
  padding: 2px 6px;
  border-radius: 999px;
  background: #f04438;
  color: #fff;
  font-size: 10px;
  text-align: center;
}
.sidebar-footer { margin-top: auto; padding: 16px; }
.server-chip {
  padding: 12px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  background: rgba(255,255,255,.035);
  color: #98a2b3;
  font-size: 11px;
}
.live-dot { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: #32d583; box-shadow: 0 0 0 4px rgba(50,213,131,.1); }
.workspace { min-height: 100vh; margin-left: 264px; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 1020;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  border-bottom: 1px solid rgba(228,231,236,.9);
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(14px);
}
.topbar-title { color: var(--muted); font-size: 13px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.icon-button {
  position: relative;
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: #344054;
  text-decoration: none;
}
.icon-button:hover { border-color: #c9c3ff; color: var(--brand); }
.notification-dot { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 1px 5px; border: 2px solid #fff; border-radius: 999px; background: #f04438; color: #fff; font-size: 9px; font-weight: 750; }
.admin-chip { display: flex; align-items: center; gap: 9px; padding-left: 5px; }
.admin-avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: #eef0ff; color: var(--brand-dark); font-weight: 750; }
.mobile-menu { display: none; }
.content { width: 100%; max-width: 1600px; margin: 0 auto; padding: 30px 32px 48px; }
.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.eyebrow { margin-bottom: 5px; color: var(--brand); font-size: 11px; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; }
.page-title { margin: 0; font-size: clamp(25px, 3vw, 32px); line-height: 1.15; font-weight: 750; letter-spacing: -.035em; }
.page-description { max-width: 720px; margin: 7px 0 0; color: var(--muted); font-size: 14px; }
.page-actions { display: flex; gap: 9px; flex-wrap: wrap; }
.card {
  border: 1px solid rgba(228,231,236,.95);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.card-header-clean { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 20px 22px; border-bottom: 1px solid #eef0f3; }
.card-title { margin: 0; font-size: 15px; font-weight: 720; letter-spacing: -.015em; }
.card-subtitle { margin-top: 3px; color: var(--muted); font-size: 12px; }
.card-body { padding: 22px; }
.metric-card { position: relative; min-height: 132px; padding: 20px; overflow: hidden; }
.metric-label { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 12px; font-weight: 600; }
.metric-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: #f2f1ff; color: var(--brand); font-size: 17px; }
.metric-value { margin-top: 16px; font-size: 29px; line-height: 1; font-weight: 760; letter-spacing: -.045em; }
.metric-note { margin-top: 8px; color: var(--muted); font-size: 11px; }
.metric-note .positive { color: var(--success); font-weight: 650; }
.alert-strip { display: grid; grid-template-columns: repeat(5, minmax(130px, 1fr)); gap: 10px; }
.alert-item { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.alert-number { min-width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: #f2f4f7; font-weight: 750; }
.alert-item.warning .alert-number { background: #fff4e5; color: var(--warning); }
.alert-item.danger .alert-number { background: #fff0ee; color: var(--danger); }
.alert-item.success .alert-number { background: #ecfdf3; color: var(--success); }
.alert-copy { color: var(--muted); font-size: 11px; line-height: 1.25; }
.form-control, .form-select {
  min-height: 42px;
  border-color: #d0d5dd;
  border-radius: 10px;
  color: #101828;
  font-size: 13px;
  box-shadow: 0 1px 2px rgba(16,24,40,.03);
}
textarea.form-control { min-height: 96px; }
.form-control:focus, .form-select:focus { border-color: #9b94ff; box-shadow: 0 0 0 4px rgba(99,91,255,.1); }
.form-label, label { margin-bottom: 6px; color: #344054; font-size: 12px; font-weight: 650; }
.form-text { color: var(--muted); font-size: 11px; }
.btn { min-height: 40px; padding: 8px 14px; border-radius: 10px; font-size: 13px; font-weight: 650; }
.btn-sm { min-height: 32px; padding: 5px 10px; font-size: 11px; }
.btn-primary { border-color: var(--brand); background: var(--brand); }
.btn-primary:hover, .btn-primary:focus { border-color: var(--brand-dark); background: var(--brand-dark); }
.btn-dark { border-color: var(--nav); background: var(--nav); }
.btn-light { border-color: var(--line); background: #fff; color: #344054; }
.btn-light:hover { border-color: #c7cbd1; background: #f9fafb; }
.badge { padding: 5px 8px; border-radius: 999px; font-size: 10px; font-weight: 700; letter-spacing: .01em; }
.status-active, .status-trial, .status-sent { background: #ecfdf3; color: #027a48; }
.status-past_due, .status-warning, .status-pending { background: #fff6e8; color: #b54708; }
.status-suspended, .status-deactivated, .status-expired, .status-cancelled, .status-failed { background: #fef3f2; color: #b42318; }
.status-info, .status-disabled { background: #f2f4f7; color: #475467; }
.category-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 999px; background: #f2f1ff; color: #5148e5; font-size: 10px; font-weight: 700; }
.category-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.category-badge[data-colour="teal"] { background: #e8fbf8; color: #087e72; }
.category-badge[data-colour="blue"] { background: #eff8ff; color: #175cd3; }
.category-badge[data-colour="orange"] { background: #fff6ed; color: #c4320a; }
.category-badge[data-colour="rose"] { background: #fff1f3; color: #c01048; }
.table-responsive { border-radius: 0 0 var(--radius) var(--radius); }
.table { margin: 0; --bs-table-bg: transparent; }
.table > :not(caption) > * > * { padding: 13px 16px; border-bottom-color: #eef0f3; vertical-align: middle; }
.table thead th { background: #fafbfc; color: var(--muted); font-size: 10px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fbfbfd; }
.table-primary-text { color: #1d2939; font-weight: 650; }
.table-secondary-text { margin-top: 2px; color: var(--muted); font-size: 11px; }
.code { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: .9em; }
.empty-state { padding: 48px 24px; text-align: center; color: var(--muted); }
.empty-icon { width: 48px; height: 48px; display: grid; place-items: center; margin: 0 auto 12px; border-radius: 14px; background: #f2f1ff; color: var(--brand); font-size: 21px; }
.filter-bar { display: flex; gap: 10px; padding: 16px; }
.filter-bar .search-field { position: relative; flex: 1 1 320px; }
.filter-bar .search-field i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #98a2b3; }
.filter-bar .search-field input { padding-left: 39px; }
.filter-check { display: flex; align-items: center; gap: 8px; min-height: 42px; margin: 0; padding: 0 5px; color: #475467; white-space: nowrap; }
.pagination-bar { display: flex; align-items: center; gap: 14px; justify-content: flex-end; padding: 14px 16px; border-top: 1px solid #eef0f3; background: #fff; border-radius: 0 0 var(--radius) var(--radius); }
.pagination-summary { margin-right: auto; color: var(--muted); font-size: 11px; }
.per-page-form { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; }
.per-page-form label { margin: 0; }
.per-page-form .form-select { width: 68px; min-height: 32px; padding-top: 4px; padding-bottom: 4px; }
.pagination-controls { display: flex; align-items: center; gap: 4px; }
.pagination-button { min-width: 32px; height: 32px; display: grid; place-items: center; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: #475467; font-size: 11px; font-weight: 650; text-decoration: none; }
.pagination-button:hover { border-color: #c9c3ff; color: var(--brand); }
.pagination-button.active { border-color: var(--brand); background: var(--brand); color: #fff; }
.pagination-button.disabled { pointer-events: none; opacity: .4; }
.pagination-ellipsis { padding: 0 3px; color: #98a2b3; }
.detail-grid { display: grid; grid-template-columns: minmax(290px, 380px) minmax(0, 1fr); gap: 20px; align-items: start; }
.stack { display: grid; gap: 16px; }
.licence-card { padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.licence-key { display: flex; align-items: center; gap: 8px; color: #344054; font-size: 13px; font-weight: 700; word-break: break-all; }
.subtle-panel { padding: 14px; border-radius: 11px; background: #f8f9fc; color: var(--muted); font-size: 11px; }
.feature-list { display: flex; gap: 6px; flex-wrap: wrap; }
.feature-pill { padding: 5px 8px; border-radius: 8px; background: #f2f4f7; color: #475467; font-size: 10px; }
.diagnostic-summary { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 10px 13px; border: 1px solid var(--line); border-radius: 11px; background: #fff; color: var(--muted); font-size: 11px; font-weight: 650; box-shadow: var(--shadow); }
.diagnostic-summary span { display: flex; align-items: center; gap: 6px; }
.diagnostic-list { display: grid; gap: 20px; }
.diagnostic-card { position: relative; overflow: hidden; }
.diagnostic-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: #32d583; }
.diagnostic-card.diagnostic-warning::before { background: #f79009; }
.diagnostic-card.diagnostic-critical::before { background: #f04438; }
.diagnostic-card-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 20px 22px; border-bottom: 1px solid #eef0f3; }
.diagnostic-client-icon { flex: 0 0 auto; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 13px; background: #eef0ff; color: var(--brand); font-size: 20px; }
.health-pill { display: inline-flex; align-items: center; gap: 7px; padding: 6px 9px; border-radius: 999px; background: #ecfdf3; color: #027a48; font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; }
.health-pill span { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.health-pill.health-warning { background: #fff6e8; color: #b54708; }
.health-pill.health-critical { background: #fef3f2; color: #b42318; }
.diagnostic-section + .diagnostic-section { margin-top: 24px; padding-top: 22px; border-top: 1px solid #eef0f3; }
.diagnostic-section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.diagnostic-section-title span:first-child { color: #344054; font-size: 12px; font-weight: 720; }
.diagnostic-section-title span:last-child { color: var(--muted); font-size: 10px; }
.resource-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.resource-meter, .resource-stat { min-height: 92px; padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: #fbfcfe; }
.resource-meter { grid-column: span 1; }
.resource-meter-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 11px; }
.resource-meter-head strong { color: #344054; font-size: 15px; }
.health-track { height: 7px; margin-top: 18px; border-radius: 999px; background: #e9edf2; overflow: hidden; }
.health-fill { display: block; height: 100%; border-radius: inherit; background: #12b76a; }
.health-fill.warning { background: #f79009; }
.health-fill.critical { background: #f04438; }
.resource-stat { display: flex; align-items: center; gap: 12px; }
.diagnostic-mini-icon { flex: 0 0 auto; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: #f2f1ff; color: var(--brand); font-size: 15px; }
.resource-label { margin-bottom: 3px; color: var(--muted); font-size: 10px; }
.resource-stat strong { color: #344054; font-size: 15px; }
.data-stat-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.data-stat { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 13px; border-radius: 11px; background: #f8f9fc; }
.data-stat strong { display: block; color: #1d2939; font-size: 18px; line-height: 1.1; }
.data-stat div > span { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.diagnostic-footer { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin-top: 22px; padding: 14px 16px; border-radius: 11px; background: #101828; color: #98a2b3; }
.diagnostic-footer > div { min-width: 0; padding: 0 15px; border-right: 1px solid rgba(255,255,255,.1); font-size: 10px; }
.diagnostic-footer > div:first-child { padding-left: 0; }
.diagnostic-footer > div:last-child { padding-right: 0; border-right: 0; }
.diagnostic-footer strong { display: block; margin-top: 4px; color: #fff; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.other-diagnostics { margin-top: 14px; }
.other-diagnostics summary { cursor: pointer; color: var(--brand-dark); font-size: 11px; font-weight: 650; }
.other-metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin-top: 10px; }
.other-metric-grid > div { padding: 10px; border: 1px solid var(--line); border-radius: 9px; }
.other-metric-grid span, .other-metric-grid strong { display: block; }
.other-metric-grid span { color: var(--muted); font-size: 10px; }
.other-metric-grid strong { margin-top: 3px; color: #344054; font-size: 12px; }
.maintenance-notice { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; padding: 13px 15px; border: 1px solid #fedf89; border-radius: 12px; background: #fffaeb; color: #b54708; box-shadow: var(--shadow); }
.maintenance-notice > i { font-size: 19px; }
.maintenance-notice div { flex: 1; }
.maintenance-notice strong, .maintenance-notice span { display: block; }
.maintenance-notice span { margin-top: 2px; color: #93370d; font-size: 11px; }
.maintenance-notice a { color: #b54708; font-size: 11px; font-weight: 700; }
.health-stat { min-height: 104px; display: flex; align-items: center; gap: 13px; padding: 18px; }
.health-stat-icon { flex: 0 0 auto; width: 39px; height: 39px; display: grid; place-items: center; border-radius: 11px; background: #ecfdf3; color: #079455; font-size: 18px; }
.health-stat-icon.warn { background: #fff6e8; color: #dc6803; }
.health-stat-icon.bad { background: #fef3f2; color: #d92d20; }
.health-stat div > span, .health-stat div > strong, .health-stat div > small { display: block; }
.health-stat div > span { color: var(--muted); font-size: 10px; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; }
.health-stat div > strong { margin-top: 3px; color: #1d2939; font-size: 16px; }
.health-stat div > small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.settings-check-list { display: grid; }
.settings-check { display: flex; align-items: center; gap: 12px; padding: 15px 20px; border-bottom: 1px solid #eef0f3; }
.settings-check:last-child { border-bottom: 0; }
.settings-check-icon { flex: 0 0 auto; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: #f2f1ff; color: var(--brand); font-size: 16px; }
.settings-check strong, .settings-check span { display: block; }
.settings-check div > strong { color: #344054; font-size: 12px; }
.settings-check div > span { margin-top: 2px; color: var(--muted); font-size: 10px; }
.maintenance-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.maintenance-grid > div { padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfe; }
.maintenance-grid span, .maintenance-grid strong { display: block; }
.maintenance-grid span { color: var(--muted); font-size: 10px; }
.maintenance-grid strong { margin-top: 5px; color: #344054; font-size: 15px; }
.control-toggle { display: flex; align-items: center; gap: 11px; padding: 13px 0; margin: 0; border-bottom: 1px solid #eef0f3; }
.control-toggle-icon { flex: 0 0 auto; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: #f2f4f7; color: #475467; font-size: 15px; }
.control-toggle strong, .control-toggle small { display: block; }
.control-toggle strong { color: #344054; font-size: 12px; }
.control-toggle small { margin-top: 2px; color: var(--muted); font-size: 10px; line-height: 1.35; }
.control-toggle .form-check-input { width: 36px; height: 20px; margin: 0; }
.maintenance-control { margin-top: 9px; padding: 0 13px 13px; border: 1px solid #fedf89; border-radius: 11px; background: #fffcf5; }
.operation-list { display: grid; gap: 12px; }
.operation-list > div { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding-bottom: 12px; border-bottom: 1px solid #eef0f3; }
.operation-list > div:last-child { padding-bottom: 0; border-bottom: 0; }
.operation-list span { color: var(--muted); font-size: 11px; }
.operation-list strong { color: #344054; font-size: 11px; text-align: right; }
.restore-card { border-color: #fecdca; }
.restore-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: #fef3f2; color: #d92d20; font-size: 16px; }
.account-avatar { flex: 0 0 auto; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: #eef0ff; color: var(--brand); font-size: 15px; font-weight: 750; }
.account-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.account-action { padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: #fbfcfe; }
.provider-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.provider-option { position: relative; margin: 0; cursor: pointer; }
.provider-option input { position: absolute; opacity: 0; pointer-events: none; }
.provider-option > span { display: grid; grid-template-columns: 36px 1fr; grid-template-rows: auto auto; column-gap: 11px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; transition: border-color .15s ease, box-shadow .15s ease, background .15s ease; }
.provider-option i { grid-row: 1 / 3; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: #f2f1ff; color: var(--brand); font-size: 16px; }
.provider-option strong, .provider-option small { display: block; }
.provider-option strong { color: #344054; font-size: 12px; }
.provider-option small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.provider-option input:checked + span { border-color: #8d85ff; background: #faf9ff; box-shadow: 0 0 0 3px rgba(99,91,255,.08); }
.provider-option input:focus-visible + span { outline: 3px solid rgba(99,91,255,.2); outline-offset: 2px; }
.gmail-help { display: flex; gap: 11px; padding: 13px; border: 1px solid #b2ddff; border-radius: 11px; background: #eff8ff; }
.gmail-help > i { color: #175cd3; font-size: 18px; }
.gmail-help strong, .gmail-help span { display: block; }
.gmail-help strong { color: #1849a9; font-size: 11px; }
.gmail-help span { margin-top: 3px; color: #175cd3; font-size: 10px; line-height: 1.45; }
.security-choice { display: flex; gap: 10px; align-items: flex-start; margin: 0; padding: 12px 0; border-top: 1px solid #eef0f3; }
.security-choice strong, .security-choice small { display: block; }
.security-choice strong { color: #344054; font-size: 11px; }
.security-choice small { margin-top: 2px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.advanced-settings { overflow: hidden; }
.advanced-settings > summary { cursor: pointer; list-style: none; }
.advanced-settings > summary::-webkit-details-marker { display: none; }
.advanced-settings[open] > summary i { transform: rotate(180deg); }
.advanced-settings > summary i { color: var(--muted); transition: transform .15s ease; }
.advanced-warning { display: flex; gap: 9px; margin-bottom: 16px; padding: 11px 12px; border: 1px solid #fedf89; border-radius: 10px; background: #fffaeb; color: #b54708; font-size: 10px; line-height: 1.4; }
.configuration-actions { display: grid; gap: 8px; }
.save-settings-card { border-color: #d8d5ff; box-shadow: 0 8px 30px rgba(99,91,255,.08); }
.pwa-install-button { color: var(--brand); }
.offline-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 30% 20%, #f0efff, transparent 42%), var(--canvas); }
.offline-card { width: min(100%, 440px); padding: 42px; border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: var(--shadow); text-align: center; }
.offline-card .brand-mark { margin: 0 auto; color: #fff; }
.offline-card h1 { margin: 4px 0 10px; font-size: 30px; font-weight: 760; letter-spacing: -.04em; }
.offline-card p { margin: 0 0 22px; color: var(--muted); line-height: 1.55; }
.notification-item { display: flex; gap: 13px; padding: 16px 0; border-bottom: 1px solid #eef0f3; }
.notification-item:last-child { border-bottom: 0; }
.notification-item.unread { position: relative; }
.notification-item.unread::before { content: ""; position: absolute; left: -12px; top: 23px; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }
.notification-icon { flex: 0 0 auto; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: #f2f1ff; color: var(--brand); }
.notification-icon.error, .notification-icon.backup { background: #fef3f2; color: var(--danger); }
.notification-icon.support { background: #eff8ff; color: #175cd3; }
.notification-icon.billing { background: #fff6ed; color: var(--warning); }
.modal-backdrop-custom { position: fixed; inset: 0; z-index: 1040; display: none; background: rgba(16,24,40,.48); }
.flash-wrap { margin-bottom: 18px; }
.alert { border: 1px solid transparent; border-radius: 11px; font-size: 13px; }
.auth-page { min-height: 100vh; display: grid; grid-template-columns: minmax(320px, 45%) 1fr; background: #fff; }
.auth-visual { position: relative; display: flex; flex-direction: column; justify-content: space-between; padding: clamp(36px, 6vw, 72px); overflow: hidden; background: var(--nav); color: #fff; }
.auth-visual::before { content: ""; position: absolute; width: 520px; height: 520px; right: -230px; bottom: -210px; border: 90px solid rgba(99,91,255,.25); border-radius: 50%; }
.auth-visual::after { content: ""; position: absolute; width: 260px; height: 260px; right: 18%; top: 15%; border: 1px solid rgba(255,255,255,.1); border-radius: 50%; box-shadow: 0 0 0 60px rgba(255,255,255,.025), 0 0 0 120px rgba(255,255,255,.018); }
.auth-content { position: relative; z-index: 1; max-width: 520px; }
.auth-headline { margin-top: 70px; font-size: clamp(34px, 5vw, 58px); line-height: 1.04; font-weight: 760; letter-spacing: -.05em; }
.auth-copy { max-width: 440px; margin-top: 18px; color: #b8c0cc; font-size: 16px; line-height: 1.6; }
.auth-form-wrap { display: grid; place-items: center; padding: 40px; }
.auth-form { width: 100%; max-width: 390px; }
.auth-form h1 { font-size: 29px; font-weight: 760; letter-spacing: -.035em; }
.auth-logo-mobile { display: none; }

@media (max-width: 1199px) {
  .alert-strip { grid-template-columns: repeat(3, minmax(130px, 1fr)); }
  .resource-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 991px) {
  .sidebar { transform: translateX(-100%); box-shadow: 18px 0 50px rgba(16,24,40,.24); }
  body.nav-open .sidebar { transform: translateX(0); }
  body.nav-open .modal-backdrop-custom { display: block; }
  .workspace { margin-left: 0; }
  .mobile-menu { display: grid; }
  .topbar { padding: 0 20px; }
  .content { padding: 24px 20px 40px; }
  .detail-grid { grid-template-columns: 1fr; }
  .maintenance-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .page-header { align-items: stretch; flex-direction: column; }
  .page-actions .btn { flex: 1; }
  .alert-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-bar { flex-direction: column; }
  .filter-bar .search-field { flex-basis: auto; }
  .pagination-bar { align-items: flex-start; flex-wrap: wrap; }
  .pagination-summary { width: 100%; }
  .pagination-controls { margin-left: auto; }
  .auth-page { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
  .auth-form-wrap { padding: 28px 20px; }
  .auth-logo-mobile { display: flex; align-items: center; gap: 10px; margin-bottom: 60px; }
  .topbar-title, .admin-chip .admin-name { display: none; }
  .content { padding: 22px 15px 36px; }
  .card-header-clean, .card-body { padding: 17px; }
  .diagnostic-card-header { align-items: flex-start; padding: 17px; }
  .diagnostic-summary { align-self: flex-start; }
  .data-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .diagnostic-footer { grid-template-columns: 1fr; gap: 11px; }
  .diagnostic-footer > div { padding: 0 0 11px; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.1); }
  .diagnostic-footer > div:last-child { padding-bottom: 0; border-bottom: 0; }
  .other-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .account-actions { grid-template-columns: 1fr; }
  .provider-choice { grid-template-columns: 1fr; }
  .configuration-actions .btn { width: 100%; }
}
@media (max-width: 479px) {
  .alert-strip { grid-template-columns: 1fr; }
  .topbar { height: 60px; padding: 0 14px; }
  .metric-card { min-height: 118px; padding: 17px; }
  .diagnostic-card-header { flex-direction: column; }
  .diagnostic-card-header .text-end { text-align: left !important; }
  .resource-grid { grid-template-columns: 1fr; }
  .data-stat-grid, .other-metric-grid { grid-template-columns: 1fr; }
  .maintenance-grid { grid-template-columns: 1fr 1fr; }
  .pagination-controls { width: 100%; justify-content: center; order: 3; overflow-x: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* Phone workspace: thumb navigation, readable controls and record cards. */
[hidden] { display: none !important; }
.mobile-tabs, .mobile-brand, .drawer-close { display: none; }
.cleanup-summary { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 24px; margin-bottom: 20px; border-radius: 18px; background: #101828; color: #fff; }
.cleanup-summary p { color: #c5ccda; margin: 10px 0 0; font-size: 14px; }
.retention-row { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.retention-row label { font-size: 16px; margin-bottom: 4px; }
.retention-row p { margin: 0 0 5px; color: var(--muted); font-size: 14px; }
.retention-row small { color: var(--muted); font-size: 13px; }
.retention-row select { flex: 0 0 165px; width: 165px; }
.settings-shortcuts { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.settings-shortcuts > * { display: flex; align-items: center; gap: 16px; padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: 16px; text-decoration: none; }
.settings-shortcuts > * > i:first-child { font-size: 24px; color: var(--brand); }
.settings-shortcuts strong, .settings-shortcuts span { display: block; }
.settings-shortcuts strong { color: var(--ink); font-size: 16px; }
.settings-shortcuts span { color: var(--muted); margin-top: 4px; font-size: 14px; }
.settings-shortcuts > * > div { flex: 1; }
@media (max-width: 767px) {
  html { min-width: 0; scroll-padding-top: 90px; }
  body { font-size: 16px; -webkit-tap-highlight-color: transparent; }
  body.nav-open { overflow: hidden; }
  .workspace, .content, .row > *, .card, .card-body { min-width: 0; }
  .topbar { height: auto; min-height: 66px; padding: calc(8px + env(safe-area-inset-top)) 16px 8px; background: #101828; border: 0; color: #fff; }
  .topbar .icon-button { border-color: #344054; background: #1d2939; color: #fff; width: 44px; height: 44px; }
  .topbar .admin-chip { display: none; }
  .topbar .mobile-menu { display: none; }
  .mobile-brand { display: flex; align-items: center; gap: 9px; color: #fff; text-decoration: none; font-weight: 800; font-size: 20px; }
  .mobile-brand span { font-size: 14px; font-weight: 500; color: #c5ccda; }
  .content { padding: 22px 16px calc(98px + env(safe-area-inset-bottom)); }
  .page-header { margin-bottom: 20px; gap: 16px; }
  .page-title { font-size: 28px; line-height: 1.15; }
  .page-description { font-size: 15px; line-height: 1.5; margin-top: 8px; }
  .eyebrow { font-size: 12px; }
  .page-actions { gap: 10px; }
  .page-actions .btn { flex: 1 1 130px; }
  .card-title { font-size: 18px; }
  .card-subtitle, .form-text, .table-secondary-text, .metric-note, .card .small { font-size: 13px; line-height: 1.45; }
  .form-control, .form-select { font-size: 16px; min-height: 48px; }
  label, .form-label { font-size: 14px; }
  .btn, .btn-sm { min-height: 46px; font-size: 14px; padding: 11px 16px; }
  .badge, .category-badge, .health-pill { font-size: 12px; }
  .filter-bar { padding: 16px; gap: 12px; }
  .filter-bar .form-select { width: 100%; max-width: none !important; }
  .metric-card { min-height: 130px; padding: 18px; }
  .metric-label { font-size: 14px; }
  .metric-value { font-size: 30px; }
  .metric-icon { display: none; }
  .alert-strip { grid-template-columns: 1fr 1fr; }
  .alert-copy { font-size: 13px; }
  .mobile-tabs { position: fixed; z-index: 1030; bottom: 0; left: 0; right: 0; display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); padding: 8px max(8px, env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left)); border-top: 1px solid #e4e7ec; background: rgba(255,255,255,.97); box-shadow: 0 -8px 30px rgba(16,24,40,.06); }
  .mobile-tabs a, .mobile-tabs button { position: relative; min-height: 52px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 3px; padding: 4px; background: none; border: 0; border-radius: 12px; color: #667085; text-decoration: none; font-size: 12px; font-weight: 600; }
  .mobile-tabs i { font-size: 21px; }
  .mobile-tabs .active { color: #5148e5; background: #eeecff; }
  .tab-dot { display: inline-block; width: 6px; height: 6px; margin-left: 3px; border-radius: 50%; background: #ef4444; vertical-align: top; }
  .sidebar { width: min(88vw,340px); padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
  .sidebar .brand-lockup { padding-top: 28px; padding-right: 65px; }
  .drawer-close { display: grid; position: absolute; right: 12px; top: calc(22px + env(safe-area-inset-top)); background: #1d2939; color: #fff; border-color: #344054; width: 44px; height: 44px; }
  .sidebar .nav-link { min-height: 48px; font-size: 15px; }
  .sidebar .nav-label { font-size: 12px; color: #98a2b3; }
  .sidebar-footer .nav-link { color: #fff; }
  .table-responsive:has(.mobile-card-table) { overflow: visible; }
  .mobile-card-table, .mobile-card-table tbody { display: block; width: 100%; }
  .mobile-card-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .mobile-card-table tbody tr { display: block; margin: 12px; padding: 4px 14px; border: 1px solid #e4e7ec; border-radius: 14px; background: #fff; }
  .mobile-card-table tbody td { display: block; width: auto; padding: 11px 0; text-align: left !important; border: 0; overflow-wrap: anywhere; }
  .mobile-card-table tbody td + td { border-top: 1px solid #f0f2f5; }
  .mobile-card-table td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 4px; color: #667085; font-size: 12px; font-weight: 600; }
  .mobile-card-table td:first-child .table-primary-text { font-size: 17px; }
  .mobile-card-table td:last-child .btn { width: 100%; }
  .mobile-card-table td .code { white-space: normal; overflow-wrap: anywhere; }
  .pagination-bar { padding: 16px; gap: 12px; }
  .pagination-summary, .per-page-form { font-size: 14px; }
  .pagination-controls { justify-content: flex-start; width: 100%; overflow-x: auto; }
  .pagination-button { min-width: 44px; height: 44px; font-size: 14px; flex-shrink: 0; }
  .per-page-form .form-select { min-height: 44px; }
  .health-stat { flex-direction: column; align-items: flex-start; gap: 10px; }
  .health-stat div > span, .health-stat div > small { font-size: 12px; }
  .health-stat div > strong { font-size: 18px; }
  .settings-check { flex-wrap: wrap; padding: 16px; }
  .settings-check div > strong, .control-toggle strong, .operation-list strong { font-size: 14px; }
  .settings-check div > span, .control-toggle small, .operation-list span, .subtle-panel { font-size: 13px; }
  .resource-grid, .data-stat-grid { grid-template-columns: 1fr 1fr; }
  .resource-stat { padding: 12px; gap: 8px; flex-wrap: wrap; }
  .resource-label, .resource-meter-head, .data-stat div > span, .diagnostic-section-title span:last-child { font-size: 13px; }
  .diagnostic-section-title span:first-child { font-size: 15px; }
  .diagnostic-footer strong { font-size: 14px; white-space: normal; overflow-wrap: anywhere; }
  .diagnostic-footer > div { font-size: 12px; }
  .retention-row { flex-direction: column; align-items: stretch; gap: 12px; }
  .retention-row select { flex: auto; width: 100%; }
  .cleanup-summary { align-items: flex-start; flex-direction: column; gap: 16px; }
  .auth-page { min-height: 100svh; background: #101828; padding: 18px; }
  .auth-form-wrap { background: #fff; border-radius: 24px; padding: 28px 22px; margin: auto 0; }
  .auth-form { max-width: none; }
  .auth-logo-mobile { margin-bottom: 36px; }
  .auth-form h1 { font-size: 32px; }
  .auth-form .btn { min-height: 50px; font-size: 16px; }
}
