:root {
  --pc-bg: #f5f4f0;
  --pc-surface: #ffffff;
  --pc-sidebar: #15161a;
  --pc-sidebar-text: #b8b9bf;
  --pc-sidebar-text-active: #ffffff;
  --pc-accent: #f2a919;
  --pc-accent-dark: #d8930a;
  --pc-text: #1c1d21;
  --pc-text-muted: #6b6d76;
  --pc-border: #e6e5e0;
  --pc-success-bg: #e3f3e8;
  --pc-success-text: #1f7a3f;
  --pc-warning-bg: #fdf1da;
  --pc-warning-text: #9a6b09;
  --pc-danger-bg: #fbe6e6;
  --pc-danger-text: #b3261e;
  --pc-radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--pc-bg);
  color: var(--pc-text);
  font-size: 14px;
}

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

/* ---------- Authenticated app shell ---------- */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--pc-sidebar);
  color: var(--pc-sidebar-text);
  display: flex;
  flex-direction: column;
  padding: 20px 16px;
}

.sidebar-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.sidebar-brand .logo-mark {
  width: 32px; height: 32px; border-radius: 8px;
  background: linear-gradient(135deg, var(--pc-accent), var(--pc-accent-dark));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: #15161a; font-size: 14px;
}
.sidebar-brand .brand-name { font-weight: 700; color: #fff; letter-spacing: 0.02em; font-size: 13px; }
.sidebar-role { color: var(--pc-accent); font-size: 11px; font-weight: 600; letter-spacing: 0.06em; margin: 4px 0 20px 2px; text-transform: uppercase; }

.sidebar-nav { list-style: none; margin: 0; padding: 0; flex: 1; }
.sidebar-nav li { margin-bottom: 2px; }
.sidebar-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 8px; font-size: 13.5px; font-weight: 500;
  color: var(--pc-sidebar-text);
}
.sidebar-nav a:hover { background: rgba(255,255,255,0.06); color: #fff; }
.sidebar-nav a.active { background: var(--pc-accent); color: #15161a; font-weight: 600; }
.sidebar-nav a.disabled { opacity: 0.4; cursor: not-allowed; }
.sidebar-nav a.disabled:hover { background: none; color: var(--pc-sidebar-text); }
.sidebar-nav .nav-icon { width: 16px; text-align: center; opacity: 0.9; }

/* Settings submenu: a <details> group, so it opens and closes without JavaScript */
.nav-group details { margin: 0; }
.nav-group summary {
  display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none;
  padding: 9px 10px; border-radius: 8px; font-size: 13.5px; font-weight: 500; color: var(--pc-sidebar-text);
}
.nav-group summary::-webkit-details-marker { display: none; }
.nav-group summary:hover { background: rgba(255,255,255,0.06); color: #fff; }
.nav-group summary.has-active { color: #fff; font-weight: 600; }
.nav-group summary:focus-visible, .nav-sub a:focus-visible { outline: 2px solid var(--pc-accent); outline-offset: 1px; }
.nav-caret { margin-left: auto; font-size: 16px; line-height: 1; transition: transform .15s ease; }
.nav-group details[open] > summary .nav-caret { transform: rotate(90deg); }
.nav-sub { list-style: none; margin: 2px 0 6px 18px; padding: 0 0 0 10px; border-left: 1px solid rgba(255,255,255,0.1); }
.nav-sub li { margin-bottom: 1px; }
.nav-sub a { padding: 6px 10px; font-size: 13px; font-weight: 400; }
.nav-sub .nav-sub-label {
  padding: 10px 10px 3px; color: #777a82; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .09em;
}
@media (prefers-reduced-motion: reduce) { .nav-caret { transition: none; } }

.sidebar-footer { margin-top: auto; padding-top: 12px; border-top: 1px solid rgba(255,255,255,0.08); }
.sidebar-footer a { display: block; padding: 8px 10px; font-size: 13px; color: var(--pc-sidebar-text); border-radius: 8px; }
.sidebar-footer a:hover { background: rgba(255,255,255,0.06); color: #fff; }

.main-area { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px; border-bottom: 1px solid var(--pc-border); background: var(--pc-surface);
}
.topbar .user-chip { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--pc-text-muted); }
.content { padding: 28px; flex: 1; }

.page-title { font-size: 22px; font-weight: 700; margin: 0 0 4px; }
.page-subtitle { color: var(--pc-text-muted); margin: 0 0 22px; font-size: 13.5px; }

/* ---------- Cards / KPIs ---------- */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 22px; }
.card {
  background: var(--pc-surface); border: 1px solid var(--pc-border); border-radius: var(--pc-radius);
  padding: 18px 20px;
}
.kpi-card .kpi-label { font-size: 11px; font-weight: 700; letter-spacing: 0.05em; color: var(--pc-text-muted); text-transform: uppercase; margin-bottom: 8px; }
.kpi-card .kpi-value { font-size: 28px; font-weight: 700; }
.kpi-card .kpi-trend { font-size: 12px; color: var(--pc-success-text); margin-top: 6px; }

.panel { background: var(--pc-surface); border: 1px solid var(--pc-border); border-radius: var(--pc-radius); padding: 20px; margin-bottom: 20px; }
.panel h2, .panel h3 { margin-top: 0; }

.attention-item { padding: 12px 14px; border-radius: 8px; margin-bottom: 10px; font-size: 13.5px; }
.attention-item.critical { background: var(--pc-danger-bg); color: var(--pc-danger-text); }
.attention-item.warning { background: var(--pc-warning-bg); color: var(--pc-warning-text); }
.attention-empty { color: var(--pc-text-muted); font-size: 13.5px; }

.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600; }
.badge-success { background: var(--pc-success-bg); color: var(--pc-success-text); }
.badge-warning { background: var(--pc-warning-bg); color: var(--pc-warning-text); }
.badge-danger { background: var(--pc-danger-bg); color: var(--pc-danger-text); }
.badge-info { background: #e3ecf7; color: #29538a; }
.badge-secondary { background: #ececea; color: var(--pc-text-muted); }

.pc-modal-overlay:not([hidden]) {
  position: fixed; inset: 0; background: rgba(15, 16, 20, .45);
  display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 16px;
}
.pc-modal {
  background: var(--pc-surface); border-radius: var(--pc-radius); border: 1px solid var(--pc-border);
  max-width: 480px; width: 100%; padding: 24px; box-shadow: 0 20px 45px rgba(15, 23, 32, .18);
}
.pc-modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

/* ---------- Auth pages ---------- */
.auth-shell { display: flex; min-height: 100vh; }
.auth-panel-dark {
  width: 46%; background: var(--pc-sidebar); color: #d9dae0; padding: 56px;
  display: flex; flex-direction: column;
}
.auth-panel-light { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px; }
.auth-card { width: 100%; max-width: 380px; }
.auth-card h1 { font-size: 24px; margin-bottom: 6px; }
.auth-card .lede { color: var(--pc-text-muted); margin-bottom: 26px; font-size: 13.5px; }

.pill { display: inline-block; background: var(--pc-accent); color: #15161a; font-weight: 700; font-size: 11px; letter-spacing: 0.05em; padding: 5px 12px; border-radius: 999px; text-transform: uppercase; margin-bottom: 18px; }

.auth-brand { font-weight: 700; letter-spacing: 0.06em; margin-bottom: 20px; }
.auth-headline { font-size: 30px; font-weight: 700; line-height: 1.25; margin: 18px 0 14px; }
.auth-hint { color: #9a9ba3; font-size: 13px; margin-bottom: 30px; }
.auth-feature { display: flex; gap: 10px; margin-bottom: 16px; font-size: 13px; color: #c7c8cf; }
.auth-feature .dot { width: 20px; height: 20px; flex-shrink: 0; border-radius: 6px; background: var(--pc-accent); color: #15161a; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 6px; color: var(--pc-text-muted); }
.field input[type="text"], .field input[type="email"], .field input[type="password"],
.field input[type="number"], .field input[type="date"], .field input[type="time"], .field input[type="tel"], .field input[type="url"] {
  width: 100%; padding: 10px 12px; border: 1px solid var(--pc-border); border-radius: 9px; font-size: 14px;
  background: var(--pc-surface); color: var(--pc-text); transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--pc-accent); box-shadow: 0 0 0 3px rgba(242,169,25,.14);
}

/* ---------- Custom file picker (replaces the bare OS <input type=file>) ---------- */
.file-picker {
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px; border: 1px dashed var(--pc-border); border-radius: 8px;
  background: var(--pc-bg); cursor: pointer; font-size: 12.5px; font-weight: 600;
  color: var(--pc-text-muted); transition: border-color .15s ease, background .15s ease, color .15s ease;
  max-width: 100%;
}
.file-picker:hover { border-color: var(--pc-accent-dark); color: var(--pc-text); }
.file-picker:focus-within { outline: none; border-color: var(--pc-accent); box-shadow: 0 0 0 3px rgba(242,169,25,.14); }
.file-picker.has-file { border-style: solid; border-color: var(--pc-accent); background: #fdf6e6; color: var(--pc-text); }
.file-picker input[type="file"] {
  position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer;
}
.file-picker-icon { flex-shrink: 0; width: 16px; height: 16px; color: var(--pc-accent-dark); }
.file-picker.has-file .file-picker-icon { color: var(--pc-accent-dark); }
.file-picker-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.file-picker-sm { padding: 7px 12px; font-size: 12px; gap: 6px; }
.file-picker-sm .file-picker-icon { width: 14px; height: 14px; }
.file-picker-sm .file-picker-name { max-width: 110px; }

.file-picker-block { display: flex; width: 100%; }
.file-picker-block .file-picker-name { max-width: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 18px; border-radius: 8px; font-size: 13.5px; font-weight: 600;
  border: 1px solid transparent; cursor: pointer;
}
.btn-primary { background: var(--pc-accent); color: #15161a; width: 100%; }
.btn-primary:hover { background: var(--pc-accent-dark); }
.btn-dark { background: #15161a; color: #fff; }
.btn-outline { background: transparent; border-color: var(--pc-border); color: var(--pc-text); }

.form-note { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; margin-bottom: 18px; }
.form-note a { color: var(--pc-accent-dark); font-weight: 600; }

.info-box { background: #f1f1ee; border-radius: 8px; padding: 12px 14px; font-size: 12.5px; color: var(--pc-text-muted); margin-top: 16px; }

.flash { padding: 10px 14px; border-radius: 8px; font-size: 13px; margin-bottom: 16px; }
.flash-danger { background: var(--pc-danger-bg); color: var(--pc-danger-text); }
.flash-success { background: var(--pc-success-bg); color: var(--pc-success-text); }
.flash-warning { background: var(--pc-warning-bg); color: var(--pc-warning-text); }
.flash-info { background: #e8eef7; color: #2a4d8f; }
.pc-ajax-toast { transition: opacity .2s ease; }

.errors { color: var(--pc-danger-text); font-size: 12px; margin-top: 4px; }

.reset-link-box { word-break: break-all; background: #f1f1ee; border-radius: 8px; padding: 12px 14px; font-size: 12px; margin-top: 14px; }

/* ---------- Page header / actions ---------- */
.page-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 22px; gap: 16px; flex-wrap: wrap; }
.breadcrumb { font-size: 11.5px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--pc-accent-dark); margin-bottom: 6px; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.btn-sm { padding: 6px 12px; font-size: 12.5px; }
.btn-danger { background: var(--pc-danger-text); color: #fff; }
.btn-success { background: var(--pc-success-text); color: #fff; }
button.btn { font-family: inherit; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ---------- Stat strip (inline KPI row inside a panel) ---------- */
.stat-strip { display: flex; gap: 28px; flex-wrap: wrap; margin-bottom: 18px; }
.stat-strip .stat { min-width: 90px; }
.stat .stat-label { font-size: 11px; font-weight: 700; letter-spacing: 0.04em; color: var(--pc-text-muted); text-transform: uppercase; margin-bottom: 4px; }
.stat .stat-value { font-size: 20px; font-weight: 700; }

/* ---------- Filter bar ---------- */
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; align-items: center; }
.filter-chip {
  padding: 7px 14px; border-radius: 999px; border: 1px solid var(--pc-border); background: var(--pc-surface);
  font-size: 12.5px; font-weight: 600; color: var(--pc-text-muted);
}
.filter-chip.active { border-color: var(--pc-success-text); color: var(--pc-success-text); background: var(--pc-success-bg); }
.filter-bar select, .filter-bar input[type="text"], .filter-bar input[type="search"], .filter-bar input[type="date"] {
  padding: 7px 12px; border-radius: 8px; border: 1px solid var(--pc-border); font-size: 12.5px;
}

/* ---------- Data table ---------- */
.table-wrap { overflow-x: auto; }
table.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data-table th {
  text-align: left; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--pc-text-muted); padding: 10px 14px; border-bottom: 1px solid var(--pc-border); white-space: nowrap;
}
table.data-table td { padding: 12px 14px; border-bottom: 1px solid var(--pc-border); vertical-align: middle; }
table.data-table tbody tr:hover { background: #fafaf7; }
table.data-table tbody tr:last-child td { border-bottom: none; }
.table-empty { padding: 40px 14px; text-align: center; color: var(--pc-text-muted); font-size: 13.5px; }
.cell-muted { color: var(--pc-text-muted); }
.cell-strong { font-weight: 600; }
.row-link { display: block; }

.pagination { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; font-size: 12.5px; color: var(--pc-text-muted); flex-wrap: wrap; gap: 10px; }
.pagination-controls { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.page-num { padding: 5px 10px; border-radius: 6px; border: 1px solid var(--pc-border); color: var(--pc-text-muted); font-weight: 600; }
.page-num.active { background: var(--pc-accent); color: #15161a; border-color: var(--pc-accent); }
.page-ellipsis { padding: 5px 4px; color: var(--pc-text-muted); }
.sortable-th { display: inline-flex; align-items: center; gap: 4px; color: inherit; cursor: pointer; }
.sortable-th:hover { color: var(--pc-text, #15161a); }
.sortable-th.active { color: var(--pc-text, #15161a); }
.sort-arrow { font-size: 9px; color: var(--pc-border); }
.sort-arrow.active { color: var(--pc-text, #15161a); }
.search-box { display: flex; gap: 8px; align-items: center; margin-left: auto; }
.search-box input[type="search"] { padding: 7px 12px; border-radius: 8px; border: 1px solid var(--pc-border); font-size: 12.5px; min-width: 220px; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 6px; margin-bottom: 20px; flex-wrap: wrap; }
.tabs a, .tabs button {
  padding: 8px 16px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--pc-text-muted);
  background: var(--pc-surface); border: 1px solid var(--pc-border); cursor: pointer;
}
.tabs a.active, .tabs button.active { background: var(--pc-accent); color: #15161a; border-color: var(--pc-accent); }
.tabs a.disabled { opacity: 0.45; pointer-events: none; }

/* ---------- Driver self-service portal ---------- */
.driver-brand { display: flex; align-items: center; gap: 10px; transition: opacity .15s; }
.driver-brand:hover { opacity: .75; }
.driver-brand .logo-mark {
  width: 32px; height: 32px; border-radius: 8px;
  background: linear-gradient(135deg, var(--pc-accent), var(--pc-accent-dark));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: #15161a; font-size: 14px;
}
.driver-brand .brand-name { font-weight: 700; letter-spacing: 0.02em; font-size: 13.5px; color: var(--pc-text); }
.driver-brand-logo { width: 32px; height: 32px; border-radius: 8px; object-fit: contain; background: var(--pc-surface); border: 1px solid var(--pc-border); }
.driver-status-panel { position: sticky; top: 20px; }
@media (max-width: 900px) { .driver-status-panel { position: static; } }

.driver-auth .content { max-width: 1000px; margin: 0 auto; padding: 56px 20px; }
.driver-auth .card { box-shadow: 0 20px 45px rgba(15, 23, 32, .07); }
.auth-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.auth-main { max-width: 480px; }
.auth-aside {
  background: var(--pc-sidebar); color: #fff; border-radius: 18px;
  padding: 40px 34px; position: relative; overflow: hidden;
}
.auth-aside::after {
  content: ""; position: absolute; inset: auto -40px -60px auto; width: 180px; height: 180px;
  border-radius: 50%; background: radial-gradient(circle, rgba(242,169,25,.16), transparent 70%);
}
.auth-aside-graphic { width: 100%; height: auto; margin-bottom: 22px; }
.auth-aside-title { font-size: 21px; font-weight: 700; margin: 0 0 10px; line-height: 1.3; }
.auth-aside-text { color: var(--pc-sidebar-text); font-size: 13.5px; line-height: 1.6; margin: 0 0 22px; }
.auth-benefits { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 13px; position: relative; }
.auth-benefits li { display: flex; align-items: center; gap: 10px; font-size: 13px; color: #fff; }
.auth-benefits li svg { flex: none; color: var(--pc-accent); }
@media (max-width: 900px) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .auth-main { max-width: 480px; margin: 0 auto; }
}
@media (max-width: 540px) { .driver-auth .content { padding: 32px 16px; } }

.chip-list { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 999px;
  font-size: 12.5px; background: var(--pc-surface); border: 1px solid var(--pc-border); color: var(--pc-text);
}
.chip button { border: none; background: none; color: var(--pc-text-muted); cursor: pointer; font-size: 13px; line-height: 1; padding: 0; }
.chip button:hover { color: var(--pc-danger-text, #c0392b); }

.chip-list ul { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.chip-list ul li {
  position: relative; border-radius: 999px; font-size: 12.5px;
  background: var(--pc-surface); border: 1px solid var(--pc-border); color: var(--pc-text);
  transition: border-color .15s ease, background .15s ease;
}
.chip-list ul li input[type="checkbox"] { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.chip-list ul li label {
  display: flex; align-items: center; margin: 0; padding: 7px 12px 7px 30px; font-size: 12.5px;
  font-weight: 500; color: var(--pc-text); cursor: pointer; white-space: nowrap;
}
.chip-list ul li::before {
  content: ""; position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px; border-radius: 5px; border: 1.5px solid var(--pc-border);
  background: var(--pc-surface); transition: background .15s ease, border-color .15s ease;
}
.chip-list ul li:has(input:checked) { border-color: var(--pc-accent); background: #fff8ea; }
.chip-list ul li:has(input:checked) label { font-weight: 700; color: var(--pc-text); }
.chip-list ul li:has(input:checked)::before { background: var(--pc-accent); border-color: var(--pc-accent); }
.chip-list ul li:has(input:checked)::after {
  content: ""; position: absolute; left: 15px; top: 50%; width: 4px; height: 8px;
  border: solid #15161a; border-width: 0 2px 2px 0; transform: translateY(-65%) rotate(45deg);
}
.chip-list ul li:has(input:focus-visible) { box-shadow: 0 0 0 3px rgba(242,169,25,.25); }

/* ---------- Two column detail layout ---------- */
.detail-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; align-items: start; }
.detail-grid.even { grid-template-columns: 1fr 1fr; }
@media (max-width: 900px) { .detail-grid, .detail-grid.even { grid-template-columns: 1fr; } }

.kv-list { display: flex; flex-direction: column; gap: 14px; }
.kv-row { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; }

/* ---------- Module link cards (overview-style pages) ---------- */
.module-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.module-card {
  display: flex; align-items: flex-start; gap: 14px; padding: 16px; text-decoration: none; color: inherit;
  background: var(--pc-surface); border: 1px solid var(--pc-border); border-radius: 14px;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.module-card:hover { border-color: var(--pc-accent); box-shadow: 0 6px 18px rgba(20,20,25,.08); transform: translateY(-1px); }
.module-icon {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
  font-size: 18px; background: #fff4dc; color: var(--pc-accent-dark);
}
.module-body { flex: 1; min-width: 0; }
.module-title { font-size: 14.5px; font-weight: 700; margin: 0 0 3px; color: var(--pc-text); }
.module-desc { font-size: 12.5px; color: var(--pc-text-muted); line-height: 1.5; margin: 0 0 8px; }
.module-meta { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; color: var(--pc-text-muted); }
.module-meta.is-live { color: var(--pc-success-text); }
.module-meta.is-idle { color: var(--pc-text-muted); }
.module-meta .dot-sm { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.module-arrow { flex: 0 0 auto; color: var(--pc-text-muted); font-size: 16px; align-self: center; }
.module-card:hover .module-arrow { color: var(--pc-accent-dark); }

.kpi-card.kpi-highlight { border-color: var(--pc-accent); background: linear-gradient(180deg, #fffaf0, var(--pc-surface)); }
.kpi-card .kpi-icon { font-size: 15px; margin-bottom: 6px; opacity: .85; }
.kpi-card .kpi-sub { font-size: 11.5px; color: var(--pc-text-muted); margin-top: 4px; }

/* ---------- Report filter + export toolbar ---------- */
.report-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 14px; margin-bottom: 18px; }
.report-filter-form { margin: 0; align-items: flex-end; }
.report-filter-field { display: flex; flex-direction: column; gap: 5px; min-width: 150px; }
.filter-label { font-size: 11px; font-weight: 700; letter-spacing: 0.04em; color: var(--pc-text-muted); text-transform: uppercase; }
.report-select {
  padding: 10px 12px; border-radius: 9px; border: 1px solid var(--pc-border); font-size: 13.5px;
  background: var(--pc-surface); color: var(--pc-text);
}
.report-export-actions { display: flex; gap: 8px; }
@media (max-width: 760px) { .report-toolbar { flex-direction: column; align-items: stretch; } .report-export-actions { justify-content: flex-end; } }
.kv-row .kv-label { color: var(--pc-text-muted); }
.kv-row .kv-value { font-weight: 600; text-align: right; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid.single { grid-template-columns: 1fr; }
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }
.field select, .field textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--pc-border); border-radius: 9px; font-size: 14px;
  font-family: inherit; background: var(--pc-surface); color: var(--pc-text);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%236b6d76'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 34px; }
.field textarea { resize: vertical; min-height: 80px; }
.field .hint { display: block; font-size: 11.5px; color: var(--pc-text-muted); margin-top: 6px; line-height: 1.5; }

/* ---------- Prefixed / suffixed input ---------- */
.input-affix {
  display: flex; align-items: stretch; width: 100%; border: 1px solid var(--pc-border); border-radius: 9px;
  background: var(--pc-surface); transition: border-color .15s ease, box-shadow .15s ease; overflow: hidden;
}
.input-affix:focus-within { border-color: var(--pc-accent); box-shadow: 0 0 0 3px rgba(242,169,25,.14); }
.input-affix .affix {
  display: flex; align-items: center; padding: 0 12px; font-size: 13.5px; font-weight: 600;
  color: var(--pc-text-muted); background: var(--pc-bg); flex: 0 0 auto;
}
.input-affix .affix.icon { padding: 0 10px; }
.input-affix .affix svg { display: block; flex-shrink: 0; }
.field .input-affix input[type="number"], .field .input-affix input[type="text"], .field .input-affix input[type="time"] {
  border: 0; border-radius: 0; background: transparent; width: 100%; min-width: 0; padding: 10px 12px;
  font-size: 14px; color: var(--pc-text); color-scheme: light;
}
.field .input-affix input[type="number"]:focus, .field .input-affix input[type="text"]:focus, .field .input-affix input[type="time"]:focus {
  box-shadow: none; border-color: transparent;
}

/* ---------- Date / time picker ---------- */
.pc-datefield, .pc-timefield { position: relative; }
.pc-picker-trigger { cursor: pointer; user-select: none; }
.pc-picker-trigger:focus { outline: none; border-color: var(--pc-accent); box-shadow: 0 0 0 3px rgba(242,169,25,.14); }
.pc-picker-display {
  flex: 1; min-width: 0; padding: 10px 4px; font-size: 14px; color: var(--pc-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pc-picker-display.is-placeholder { color: var(--pc-text-muted); }
.pc-picker-clear, .pc-picker-chevron {
  display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
  color: var(--pc-text-muted); background: none; border: 0; padding: 0 12px; cursor: pointer; font-size: 16px;
}
.pc-picker-clear:hover { color: var(--pc-danger-text); }
.pc-picker-chevron { pointer-events: none; padding: 0 12px 0 4px; }

.pc-picker-popover {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 40;
  background: var(--pc-surface); border: 1px solid var(--pc-border); border-radius: 14px;
  box-shadow: 0 16px 38px rgba(20,20,25,.14); padding: 14px; animation: pc-pop-in .12s ease;
}
@keyframes pc-pop-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

.pc-date-popover { width: 288px; }
.pc-date-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.pc-date-title {
  font-size: 13.5px; font-weight: 700; border: 0; background: none; padding: 2px 4px; border-radius: 6px;
  font-family: inherit; color: var(--pc-text);
}
.pc-date-title-year {
  border: 0; background: none; padding: 2px 4px; margin: 0 -4px; border-radius: 6px; font: inherit;
  font-weight: 700; color: inherit; cursor: pointer; transition: background .12s ease, color .12s ease;
}
.pc-date-title-year:hover { background: var(--pc-bg); color: var(--pc-accent-dark); }
.pc-date-title-btn { cursor: pointer; transition: background .12s ease, color .12s ease; }
.pc-date-title-btn:hover { background: var(--pc-bg); color: var(--pc-accent-dark); }
.pc-nav {
  border: 0; background: none; color: var(--pc-text-muted); font-size: 15px; line-height: 1; cursor: pointer;
  padding: 5px 7px; border-radius: 7px; transition: background .12s ease, color .12s ease;
}
.pc-nav:hover { background: var(--pc-bg); color: var(--pc-text); }
.pc-date-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); margin-bottom: 4px; }
.pc-date-weekdays span { text-align: center; font-size: 10.5px; font-weight: 700; color: var(--pc-text-muted); text-transform: uppercase; }
.pc-date-grid { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 2px; }
.pc-day {
  width: 100%; aspect-ratio: 1; border: 0; background: none; border-radius: 50%; font-size: 12.5px;
  color: var(--pc-text); cursor: pointer; transition: background .12s ease, color .12s ease;
}
.pc-day:hover { background: var(--pc-bg); }
.pc-day-empty { visibility: hidden; cursor: default; }
.pc-day-past { color: var(--pc-text-muted); }
.pc-day-today { box-shadow: inset 0 0 0 1.5px var(--pc-text-muted); }
.pc-day-selected, .pc-day-selected:hover { background: #15161a; color: #fff; font-weight: 700; }

.pc-year-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 4px 0 2px; }
.pc-year-item {
  border: 0; background: none; padding: 11px 0; border-radius: 8px; font-size: 13px; font-weight: 600;
  color: var(--pc-text); cursor: pointer; transition: background .12s ease, color .12s ease;
}
.pc-year-item:hover { background: var(--pc-bg); }
.pc-year-item-current { box-shadow: inset 0 0 0 1.5px var(--pc-text-muted); }
.pc-year-item-selected, .pc-year-item-selected:hover { background: #15161a; color: #fff; }

.pc-time-popover { width: 220px; }
.pc-time-columns { display: flex; align-items: stretch; gap: 2px; }
.pc-time-col {
  flex: 1; height: 168px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px;
  scrollbar-width: thin;
}
.pc-time-col::-webkit-scrollbar { width: 4px; }
.pc-time-col::-webkit-scrollbar-thumb { background: var(--pc-border); border-radius: 999px; }
.pc-time-col.pc-time-col-period { flex: 0 0 46px; height: auto; justify-content: center; overflow: visible; }
.pc-time-sep { align-self: center; font-weight: 700; color: var(--pc-text-muted); padding: 0 2px; }
.pc-time-item {
  flex: 0 0 auto; border: 0; background: none; padding: 7px 0; border-radius: 8px; font-size: 13.5px;
  color: var(--pc-text-muted); cursor: pointer; transition: background .12s ease, color .12s ease;
}
.pc-time-item:hover { background: var(--pc-bg); color: var(--pc-text); }
.pc-time-item.is-selected { background: #fff8ea; color: var(--pc-text); font-weight: 700; }

.pc-picker-footer {
  display: flex; align-items: center; justify-content: space-between; margin-top: 12px;
  padding-top: 10px; border-top: 1px solid var(--pc-border);
}
.pc-link { border: 0; background: none; padding: 2px; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.pc-link-danger { color: var(--pc-danger-text); }
.pc-link-accent { color: var(--pc-accent-dark); }
.field .input-affix input[type="time"]::-webkit-calendar-picker-indicator {
  opacity: .4; filter: grayscale(1); cursor: pointer; border-radius: 4px; transition: opacity .15s ease;
}
.field .input-affix input[type="time"]::-webkit-calendar-picker-indicator:hover { opacity: .75; }
.checkbox-row { display: flex; align-items: center; gap: 8px; font-size: 13.5px; margin-bottom: 10px; }
.form-actions { display: flex; gap: 10px; margin-top: 8px; }
.form-actions .btn { width: auto; }

/* ---------- Service zone editor ---------- */
.zone-editor, .form-editor { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
@media (max-width: 1000px) { .zone-editor, .form-editor { grid-template-columns: 1fr; } }

.zone-card, .form-card { background: var(--pc-surface); border: 1px solid var(--pc-border); border-radius: 16px; padding: 22px; margin-bottom: 18px; box-shadow: 0 1px 2px rgba(20,20,25,.03); }
.zone-card h2, .form-card h2 { margin: 0 0 4px; font-size: 15px; font-weight: 700; }
.zone-card-head, .form-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.zone-card-head h2, .form-card-head h2 { margin: 0; }
.form-card-head p { margin: 4px 0 0; font-size: 12px; color: var(--pc-text-muted); }
.form-card-head-text { display: flex; align-items: flex-start; gap: 12px; }
.form-card-icon {
  width: 34px; height: 34px; flex: 0 0 34px; border-radius: 10px; display: grid; place-items: center;
  font-size: 15px; font-weight: 700; margin-top: 1px;
}

.zone-mode-switch { display: inline-flex; padding: 4px; gap: 2px; background: var(--pc-bg); border: 1px solid var(--pc-border); border-radius: 11px; }
.zone-mode-switch button {
  border: 0; background: transparent; color: var(--pc-text-muted); font-size: 12.5px; font-weight: 600;
  padding: 8px 14px; border-radius: 8px; cursor: pointer; transition: background .15s ease, color .15s ease;
}
.zone-mode-switch button:hover { color: var(--pc-text); }
.zone-mode-switch button.active { background: var(--pc-surface); color: var(--pc-text); box-shadow: 0 1px 3px rgba(20,20,25,.12); }

.zone-mode-panel { padding: 14px 16px; margin-bottom: 16px; border-radius: 12px; background: var(--pc-bg); border: 1px solid var(--pc-border); }
.zone-hint { margin: 0; font-size: 12px; color: var(--pc-text-muted); line-height: 1.5; }
.zone-panel-actions { display: flex; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.zone-panel-actions label { font-size: 12.5px; font-weight: 600; color: var(--pc-text-muted); margin: 0; }

.zone-radius-input { display: inline-flex; align-items: center; gap: 8px; padding: 4px 4px 4px 12px; border: 1px solid var(--pc-border); border-radius: 8px; background: var(--pc-surface); }
.zone-radius-input input { border: 0; width: 80px; font-size: 13.5px; padding: 6px 0; background: transparent; }
.zone-radius-input input:focus { outline: none; }
.zone-radius-input span { font-size: 11.5px; color: var(--pc-text-muted); padding-right: 6px; }

.zone-search-input { width: 100%; padding: 11px 14px; border: 1px solid var(--pc-border); border-radius: 10px; font-size: 13.5px; margin-bottom: 12px; background: var(--pc-surface); }
.zone-search-input:focus { outline: 2px solid var(--pc-accent); outline-offset: 0; border-color: var(--pc-accent); }

.zone-map-shell { border-radius: 14px; overflow: hidden; border: 1px solid var(--pc-border); margin-bottom: 10px; }
.zone-map-shell #zone-map-canvas { width: 100%; height: 640px; }
@media (max-width: 700px) { .zone-map-shell #zone-map-canvas { height: 420px; } }
.zone-map-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }

.zone-json-advanced { border-top: 1px solid var(--pc-border); padding-top: 14px; }
.zone-json-advanced summary { cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--pc-text-muted); }
.zone-json-advanced summary:hover { color: var(--pc-text); }
.zone-json-advanced textarea { margin-top: 10px; }

.zone-color-row { display: flex; align-items: center; gap: 14px; }
.zone-color-row input[type="color"] { width: 52px; height: 52px; padding: 3px; border: 1px solid var(--pc-border); border-radius: 12px; cursor: pointer; background: var(--pc-surface); flex-shrink: 0; }
.zone-color-row label { margin-bottom: 4px; }

.zone-editor-actions, .form-editor-actions { position: sticky; top: 16px; display: flex; gap: 10px; }
.zone-editor-actions .btn, .form-editor-actions .btn { flex: 1; }

/* ---------- Fare rule form ---------- */
.status-live-badge { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 11.5px; font-weight: 600; }
.status-live-badge i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

#schedule-section { transition: opacity .15s ease; }
#field-specific-date, #field-days-of-week, #field-time-range { transition: opacity .15s ease; }

.overlap-alert { border-radius: 16px; padding: 20px 22px; margin-bottom: 20px; border: 1px solid #f0d9a8; background: linear-gradient(180deg, #fef8ec, #fdf1da); box-shadow: 0 1px 2px rgba(20,20,25,.03); }
.overlap-alert-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.overlap-alert-icon { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 10px; display: grid; place-items: center; background: #fbe4b0; color: #8a5a05; font-size: 16px; font-weight: 800; }
.overlap-alert h3 { margin: 0; font-size: 14.5px; color: var(--pc-warning-text); }
.overlap-alert-sub { margin: 2px 0 0; font-size: 12px; color: #8a6a2a; }
.overlap-alert-list { display: flex; flex-direction: column; gap: 10px; }
.overlap-alert-item { padding: 12px 14px; border-radius: 10px; background: rgba(255,255,255,.6); border: 1px solid rgba(154,107,9,.15); }
.overlap-alert-item strong { font-size: 13px; }
.overlap-alert-item .oa-schedule { color: #8a6a2a; font-size: 11.5px; margin-left: 6px; }
.overlap-alert-item .oa-outcome { margin: 5px 0 0; font-size: 12.5px; color: #6b4f14; }
.overlap-alert-actions { margin-top: 14px; font-size: 12px; color: #8a6a2a; }

.schedule-preview { border-radius: 12px; padding: 13px 14px; font-size: 12px; line-height: 1.6; background: #202722; color: #b8dac8; }
.schedule-preview strong { display: block; margin-bottom: 4px; color: #fff; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }

/* ---------- Timeline / notes ---------- */
.timeline { display: flex; flex-direction: column; gap: 0; }
.timeline-item { position: relative; padding: 0 0 20px 24px; border-left: 2px solid var(--pc-border); }
.timeline-item:last-child { border-color: transparent; padding-bottom: 0; }
.timeline-item::before { content: ""; position: absolute; left: -6px; top: 2px; width: 10px; height: 10px; border-radius: 50%; background: var(--pc-accent); }
.timeline-item .timeline-meta { font-size: 11.5px; color: var(--pc-text-muted); margin-bottom: 3px; }
.timeline-item .timeline-body { font-size: 13.5px; }

.empty-state { text-align: center; padding: 48px 20px; color: var(--pc-text-muted); }
.empty-state .empty-title { font-weight: 600; color: var(--pc-text); margin-bottom: 6px; }

.avatar-chip { display: inline-flex; align-items: center; gap: 8px; }
.avatar-circle {
  width: 28px; height: 28px; border-radius: 50%; background: var(--pc-sidebar); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; flex-shrink: 0;
}

.progress-track { height: 6px; border-radius: 999px; background: var(--pc-border); overflow: hidden; }
.progress-fill { height: 100%; background: var(--pc-accent); }

.impersonation-banner {
  background: var(--pc-warning-text); color: #fff; padding: 10px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 13px;
}

.section-title { font-size: 15px; font-weight: 700; margin: 0 0 14px; }
.tenant-chip { margin: 8px 14px 14px; padding: 8px 10px; border: 1px solid #34363c; border-radius: 8px; color: #d7d8dc; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tenant-chip span { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--pc-accent); }
.nav-divider { padding: 18px 18px 7px; color: #777a82; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; }
.tenant-stats { margin-bottom: 20px; }
.form-panel { max-width: 820px; }
.sidebar-tenant-logo { width: 34px; height: 34px; object-fit: contain; border-radius: 7px; background: #fff; padding: 3px; }
.tenant-heading { display: flex; align-items: center; gap: 14px; }
.tenant-logo-preview { width: 64px; height: 64px; object-fit: contain; border: 1px solid var(--pc-border); border-radius: 12px; background: #fff; padding: 6px; }
.tenant-table-name { display: flex; align-items: center; gap: 10px; }
.tenant-table-name img, .tenant-logo-fallback { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 8px; object-fit: contain; border: 1px solid var(--pc-border); background: #fff; padding: 3px; }
.tenant-logo-fallback { display: inline-flex; align-items: center; justify-content: center; background: var(--pc-sidebar); color: var(--pc-accent); font-weight: 800; padding: 0; }

/* ---------- SaaS control plane ---------- */
.user-chip .user-avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #1d1e22; color: var(--pc-accent); font-weight: 800; }
.user-chip > span:last-child { display: flex; flex-direction: column; line-height: 1.25; }
.user-chip strong { color: var(--pc-text); font-size: 12.5px; }
.user-chip small { color: var(--pc-text-muted); font-size: 11px; }

/* ---------- User menu (avatar dropdown, e.g. driver top bar) ---------- */
.user-avatar {
  width: 34px; height: 34px; flex: 0 0 auto; border-radius: 50%; display: grid; place-items: center;
  background: #1d1e22; color: var(--pc-accent); font-weight: 800; font-size: 12.5px; letter-spacing: .02em;
}
.user-avatar-img { object-fit: cover; }
.user-avatar-lg { width: 52px; height: 52px; font-size: 17px; }

.user-menu { position: relative; }
.user-menu-trigger {
  display: flex; align-items: center; gap: 10px; padding: 4px 10px 4px 4px; border: 1px solid transparent;
  border-radius: 999px; background: none; cursor: pointer; font: inherit; text-align: left;
  transition: background .12s ease, border-color .12s ease;
}
.user-menu-trigger:hover { background: var(--pc-bg); }
.user-menu-trigger[aria-expanded="true"] { background: var(--pc-bg); border-color: var(--pc-border); }
.user-menu-label { display: flex; flex-direction: column; line-height: 1.25; }
.user-menu-label strong { color: var(--pc-text); font-size: 12.5px; font-weight: 700; }
.user-menu-label small { color: var(--pc-text-muted); font-size: 11px; }
.user-menu-caret { width: 13px; height: 13px; color: var(--pc-text-muted); transition: transform .15s ease; flex: 0 0 auto; }
.user-menu-trigger[aria-expanded="true"] .user-menu-caret { transform: rotate(180deg); }

.user-menu-panel {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 40; width: 264px;
  background: var(--pc-surface); border: 1px solid var(--pc-border); border-radius: 14px;
  box-shadow: 0 16px 38px rgba(20,20,25,.14); padding: 16px; animation: pc-pop-in .12s ease;
}
.user-menu-panel-header { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.user-menu-name { font-weight: 700; font-size: 14px; color: var(--pc-text); }
.user-menu-email { font-size: 12px; color: var(--pc-text-muted); word-break: break-all; }
.user-menu-divider { height: 1px; background: var(--pc-border); margin: 12px 0; }
.user-menu-file-trigger {
  display: block; text-align: center; padding: 8px 12px; border: 1px solid var(--pc-border); border-radius: 8px;
  font-size: 12.5px; font-weight: 600; color: var(--pc-text); cursor: pointer;
  transition: border-color .12s ease, background .12s ease;
}
.user-menu-file-trigger:hover { border-color: var(--pc-accent-dark); background: var(--pc-bg); }
.user-menu-action-btn {
  display: block; width: 100%; text-align: center; padding: 8px 12px; margin-top: 8px; border: 0; border-radius: 8px;
  font-size: 12.5px; font-weight: 600; cursor: pointer; background: none; color: var(--pc-text-muted); text-decoration: none;
  font-family: inherit;
}
.user-menu-action-btn:hover { background: var(--pc-bg); color: var(--pc-text); }
.user-menu-signout { color: var(--pc-danger-text); font-weight: 700; }
.user-menu-signout:hover { background: var(--pc-danger-bg); color: var(--pc-danger-text); }

.profile-avatar-row { display: flex; align-items: center; gap: 16px; margin-bottom: 4px; }
.profile-avatar-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.section-divider { height: 1px; background: var(--pc-border); margin: 20px 0; }
.btn-link-danger {
  border: 0; background: none; padding: 0; font: inherit; font-size: 12.5px; font-weight: 600;
  color: var(--pc-danger-text); cursor: pointer; text-decoration: underline;
}
.btn-link-danger:hover { opacity: .75; }

.platform-ui { --platform-ink: #101114; --platform-soft: #f6f6f3; --platform-line: #e8e8e3; --platform-green: #1e8c58; }
.platform-ui .content { max-width: 1480px; width: 100%; margin: 0 auto; padding: 30px 34px 46px; }
.platform-ui .topbar { height: 68px; padding: 0 34px; position: sticky; top: 0; z-index: 20; box-shadow: 0 1px 0 rgba(18,18,20,.04); }
.platform-topbar-label { display: inline-flex; align-items: center; gap: 9px; color: #303138; font-weight: 700; font-size: 13px; letter-spacing: .01em; }
.platform-topbar-label i { width: 8px; height: 8px; border-radius: 50%; background: var(--pc-accent); box-shadow: 0 0 0 5px rgba(242,169,25,.13); }
.platform-back { color: #4e5058; font-weight: 650; font-size: 13px; transition: color .18s ease, transform .18s ease; display: inline-block; }
.platform-back:hover { color: var(--platform-ink); transform: translateX(-2px); }

.platform-hero { min-height: 260px; border-radius: 24px; padding: 38px 42px; position: relative; overflow: hidden; display: flex; justify-content: space-between; align-items: center; gap: 30px; color: #fff; background: radial-gradient(circle at 72% 0%, rgba(242,169,25,.17), transparent 30%), linear-gradient(135deg, #0d0e10 0%, #18191d 70%, #111215 100%); box-shadow: 0 20px 55px rgba(15,16,19,.15); }
.platform-hero-copy { position: relative; z-index: 2; max-width: 650px; }
.platform-eyebrow { display: inline-flex; align-items: center; gap: 8px; color: #f5bb45; font-size: 10px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; margin-bottom: 13px; }
.platform-eyebrow::before { content: ""; width: 22px; height: 1px; background: currentColor; }
.platform-eyebrow.dark { color: #a26d05; }
.platform-hero h1 { font-size: clamp(30px, 3vw, 44px); line-height: 1.06; letter-spacing: -.035em; margin: 0 0 15px; max-width: 620px; }
.platform-hero p { max-width: 560px; color: #a9abb2; font-size: 14px; line-height: 1.65; margin: 0; }
.platform-primary-action { position: relative; z-index: 3; min-width: 210px; display: flex; align-items: center; gap: 13px; padding: 13px 16px; border-radius: 14px; background: var(--pc-accent); color: #111216; box-shadow: 0 13px 28px rgba(242,169,25,.2); transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.platform-primary-action:hover { transform: translateY(-2px); background: #ffb928; box-shadow: 0 17px 34px rgba(242,169,25,.28); }
.platform-primary-action .action-plus { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: rgba(18,18,20,.1); font-size: 24px; font-weight: 400; }
.platform-primary-action > span:last-child { display: flex; flex-direction: column; }
.platform-primary-action strong { font-size: 13.5px; }
.platform-primary-action small { margin-top: 2px; font-size: 10.5px; color: rgba(17,18,22,.62); }
.platform-primary-action.compact { display: inline-flex; min-width: 0; width: auto; padding: 10px 16px; margin-top: 8px; }
.hero-orbit { position: absolute; border: 1px solid rgba(255,255,255,.065); border-radius: 50%; pointer-events: none; }
.orbit-one { width: 310px; height: 310px; right: 120px; top: -190px; }
.orbit-two { width: 190px; height: 190px; right: -55px; bottom: -100px; border-color: rgba(242,169,25,.15); }

.platform-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: -24px 22px 34px; position: relative; z-index: 5; }
.platform-metric { min-height: 124px; display: flex; align-items: flex-start; gap: 13px; padding: 19px; border: 1px solid var(--platform-line); border-radius: 16px; background: rgba(255,255,255,.97); box-shadow: 0 12px 30px rgba(25,26,30,.065); transition: transform .2s ease, box-shadow .2s ease; }
.platform-metric:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(25,26,30,.1); }
.metric-icon { width: 32px; height: 32px; flex: 0 0 32px; display: grid; place-items: center; border-radius: 9px; font-size: 12px; }
.metric-amber { color: #986400; background: #fff3d4; }.metric-green { color: #197249; background: #e4f6ec; }.metric-blue { color: #3269a8; background: #e9f2fc; }.metric-violet { color: #6d58a8; background: #f0ebfb; }
.platform-metric > div { min-width: 0; display: flex; flex-direction: column; }
.platform-metric small { color: #7b7d85; font-size: 10px; font-weight: 750; letter-spacing: .055em; text-transform: uppercase; }
.platform-metric strong { color: var(--platform-ink); font-size: 27px; line-height: 1; margin: 9px 0 7px; letter-spacing: -.03em; }
.platform-metric strong b { font-size: 13px; color: #8d8f96; font-weight: 600; letter-spacing: 0; }
.platform-metric em { color: #9899a0; font-size: 10.5px; font-style: normal; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.workspace-section { padding-top: 2px; }
.workspace-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; margin-bottom: 18px; }
.section-kicker { display: block; color: #ad7509; font-size: 9.5px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; margin-bottom: 5px; }
.workspace-section-head h2, .settings-heading h2, .workspace-info-card h2 { font-size: 21px; letter-spacing: -.02em; margin: 0; }
.workspace-section-head p, .settings-heading p { color: #85878e; margin: 6px 0 0; font-size: 12.5px; }
.workspace-tools { display: flex; align-items: center; gap: 10px; }
.workspace-search { width: 250px; height: 38px; padding: 0 10px; display: flex; align-items: center; gap: 8px; border: 1px solid #deded9; border-radius: 10px; background: #fff; color: #8c8d94; transition: border-color .18s, box-shadow .18s; }
.workspace-search:focus-within { border-color: #e3a42a; box-shadow: 0 0 0 3px rgba(242,169,25,.12); }
.workspace-search input { min-width: 0; flex: 1; border: 0; outline: 0; font: inherit; font-size: 12px; background: transparent; }
.workspace-search kbd { padding: 2px 6px; border: 1px solid #e1e1dc; border-radius: 5px; background: #f8f8f5; font: 10px inherit; }
.workspace-filters { display: flex; padding: 3px; border: 1px solid #deded9; background: #fff; border-radius: 10px; }
.workspace-filters button { border: 0; border-radius: 7px; padding: 7px 10px; color: #777981; background: transparent; font: 600 11px inherit; cursor: pointer; transition: background .18s, color .18s; }
.workspace-filters button:hover { color: #1d1e22; }.workspace-filters button.active { background: #17181c; color: #fff; }

.workspace-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.workspace-card { padding: 20px; border: 1px solid var(--platform-line); border-radius: 18px; background: #fff; box-shadow: 0 4px 14px rgba(19,20,24,.025); transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease; animation: card-in .36s ease both; }
.workspace-card:hover { transform: translateY(-3px); border-color: #dad9d3; box-shadow: 0 16px 38px rgba(19,20,24,.08); }
.workspace-card[hidden] { display: none; }
@keyframes card-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.workspace-card-top { display: flex; align-items: center; gap: 11px; }
.workspace-logo { width: 44px; height: 44px; flex: 0 0 44px; padding: 4px; object-fit: contain; border: 1px solid #e6e6e0; border-radius: 12px; background: #fff; }
.workspace-logo-fallback { display: grid; place-items: center; padding: 0; background: #191a1e; color: var(--pc-accent); border-color: #191a1e; font-size: 17px; font-weight: 800; }
.workspace-identity { min-width: 0; flex: 1; }.workspace-identity h3 { margin: 0 0 3px; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }.workspace-identity span { color: #92949b; font-size: 10.5px; }
.workspace-health, .detail-health { display: inline-flex; align-items: center; gap: 6px; width: max-content; padding: 5px 8px; border-radius: 999px; font-size: 9.5px; font-weight: 750; text-transform: capitalize; }
.workspace-health i, .detail-health i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px rgba(31,141,88,.11); }
.health-active { background: #eaf7f0; color: #217b50; }.health-warning { background: #fff1dc; color: #a06500; }
.workspace-owner { display: flex; align-items: center; gap: 9px; margin: 18px 0 14px; padding: 11px 12px; border-radius: 11px; background: #f7f7f4; }
.owner-avatar { width: 28px; height: 28px; display: grid; place-items: center; flex: 0 0 28px; border-radius: 50%; background: #e7e7e2; color: #55575e; font-size: 10px; font-weight: 800; }
.workspace-owner div { min-width: 0; display: flex; flex-direction: column; }.workspace-owner small, .workspace-plan-row small { color: #92949a; font-size: 9.5px; margin-bottom: 2px; }.workspace-owner strong { font-size: 11px; overflow: hidden; text-overflow: ellipsis; }
.workspace-plan-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 0 2px 14px; }.workspace-plan-row > span { display: flex; flex-direction: column; }.workspace-plan-row strong { font-size: 11.5px; }
.seat-usage { padding: 13px 0 16px; border-top: 1px solid #eeeeea; }.seat-usage > div:first-child { display: flex; justify-content: space-between; margin-bottom: 8px; color: #777981; font-size: 10.5px; }.seat-usage strong { color: #3f4147; }.seat-track { height: 5px; overflow: hidden; border-radius: 999px; background: #edede9; }.seat-track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #f2a919, #ffc34b); }
.workspace-card-footer { display: flex; justify-content: space-between; align-items: center; padding-top: 13px; border-top: 1px solid #eeeeea; }.workspace-card-footer > span { color: #a0a1a7; font-size: 9.5px; }.workspace-card-footer a { color: #25262b; font-size: 10.5px; font-weight: 750; transition: color .18s; }.workspace-card-footer a:hover { color: #bb7b00; }.workspace-card-footer b { margin-left: 4px; color: #d88f00; }
.workspace-empty { grid-column: 1/-1; text-align: center; padding: 55px 20px; border: 1px dashed #d9d9d3; border-radius: 18px; color: #7c7e85; background: rgba(255,255,255,.5); }.workspace-empty > span { width: 45px; height: 45px; margin: 0 auto 12px; display: grid; place-items: center; border-radius: 13px; background: #f0f0ec; color: #a4a59f; font-size: 21px; }.workspace-empty h3 { color: #292a2f; margin: 0 0 5px; }.workspace-empty p { margin: 0 0 8px; font-size: 12px; }.filtered-empty { margin-top: 16px; }

/* SaaS onboarding */
.platform-form-header { max-width: 720px; margin: 9px 0 25px; }.platform-form-header h1 { margin: 0 0 8px; font-size: 31px; letter-spacing: -.035em; }.platform-form-header p { margin: 0; color: #787a82; }
.onboarding-layout { display: grid; grid-template-columns: minmax(0, 850px) minmax(260px, 330px); align-items: start; gap: 20px; }
.platform-form-card, .workspace-info-card, .workspace-users-card { border: 1px solid var(--platform-line); border-radius: 18px; background: #fff; box-shadow: 0 5px 20px rgba(25,26,30,.035); }
.form-section { display: grid; grid-template-columns: 38px 175px 1fr; gap: 16px; padding: 26px; border-bottom: 1px solid #ecece8; }
.form-section-number { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 9px; background: #fff4d8; color: #a46b00; font-size: 9px; font-weight: 800; }
.form-section-heading h2 { margin: 2px 0 5px; font-size: 14px; }.form-section-heading p { margin: 0; color: #92939a; font-size: 10.5px; line-height: 1.55; }
.platform-fields { display: grid; gap: 15px; }.platform-fields.two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.platform-field label { display: block; margin-bottom: 6px; color: #5f6168; font-size: 10.5px; font-weight: 750; }
.platform-field input, .platform-field select { width: 100%; min-height: 41px; padding: 10px 11px; border: 1px solid #deded9; border-radius: 9px; background: #fff; color: #1d1e22; font: 12px inherit; outline: none; transition: border-color .18s, box-shadow .18s; }
.platform-field input:focus, .platform-field select:focus { border-color: #dfa329; box-shadow: 0 0 0 3px rgba(242,169,25,.12); }
.slug-input { display: flex; align-items: center; overflow: hidden; border: 1px solid #deded9; border-radius: 9px; background: #f5f5f2; transition: border-color .18s, box-shadow .18s; }.slug-input:focus-within { border-color: #dfa329; box-shadow: 0 0 0 3px rgba(242,169,25,.12); }.slug-input span { padding-left: 10px; color: #9a9ba1; font-size: 10px; }.slug-input input { border: 0; box-shadow: none !important; background: transparent; padding-left: 2px; }
.logo-upload { grid-column: 1/-1; min-height: 68px; display: flex; align-items: center; gap: 11px; padding: 12px; border: 1px dashed #d4d4ce; border-radius: 11px; background: #fafaf8; cursor: pointer; transition: border-color .18s, background .18s; }.logo-upload:hover { border-color: #dea02a; background: #fffaf0; }.logo-upload input { position: absolute; width: 1px; height: 1px; opacity: 0; }.upload-visual { width: 44px; height: 44px; flex: 0 0 44px; display: grid; place-items: center; overflow: hidden; border: 1px solid #e0e0da; border-radius: 10px; background: #fff; }.logo-upload .upload-icon { width: 100%; height: 100%; display: grid; place-items: center; color: #b27602; font-size: 18px; }.logo-live-preview { width: 100%; height: 100%; padding: 3px; object-fit: contain; background: #fff; }.logo-upload > span:nth-child(2) { min-width: 0; flex: 1; display: flex; flex-direction: column; }.logo-upload strong { font-size: 11.5px; }.logo-upload small { margin-top: 3px; color: #96979d; font-size: 9.5px; }.logo-upload b { padding: 7px 10px; border: 1px solid #deded9; border-radius: 7px; background: #fff; font-size: 9.5px; }
.logo-upload.has-file { border-style: solid; border-color: #79bd98; background: #f2fbf6; }.logo-upload.has-file .upload-visual { border-color: #b9dec9; }
.platform-form-actions { padding: 18px 26px; display: flex; justify-content: flex-end; align-items: center; gap: 17px; }.platform-form-actions > a { color: #777980; font-size: 11.5px; font-weight: 650; }.platform-form-actions.right { padding: 20px 0 0; border-top: 1px solid #ecece8; margin-top: 20px; }.platform-submit { min-height: 40px; padding: 0 17px; border: 0; border-radius: 9px; background: #17181c; color: #fff; font: 700 11.5px inherit; cursor: pointer; transition: transform .18s, background .18s, box-shadow .18s; }.platform-submit:hover { transform: translateY(-1px); background: #26272c; box-shadow: 0 8px 18px rgba(20,21,24,.16); }
.platform-submit:disabled { cursor: wait; opacity: .78; }.platform-submit.is-loading { min-width: 158px; }
.platform-form-error { margin: 20px 26px 0; padding: 12px 14px; display: flex; align-items: center; gap: 10px; border: 1px solid #f0c9c5; border-radius: 10px; color: #9d2d26; background: #fff5f4; }.platform-form-error > span { width: 27px; height: 27px; flex: 0 0 27px; display: grid; place-items: center; border-radius: 50%; background: #fbe2df; font-weight: 800; }.platform-form-error p { display: flex; flex-direction: column; margin: 0; }.platform-form-error strong { font-size: 11px; }.platform-form-error small { margin-top: 2px; font-size: 9.5px; color: #b15e58; }
.platform-field:has(.errors) input, .platform-field:has(.errors) select, .platform-field:has(.errors) .slug-input { border-color: #cf5d54; box-shadow: 0 0 0 3px rgba(207,93,84,.09); }
.onboarding-aside { min-height: 390px; position: sticky; top: 92px; overflow: hidden; padding: 26px; border-radius: 18px; color: #fff; background: #17181c; box-shadow: 0 17px 38px rgba(20,21,24,.14); }.aside-glow { position: absolute; width: 180px; height: 180px; right: -70px; top: -70px; border-radius: 50%; background: rgba(242,169,25,.13); filter: blur(4px); }.aside-icon { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 11px; background: var(--pc-accent); color: #17181c; }.onboarding-aside h2 { margin: 22px 0; font-size: 18px; }.onboarding-aside ol { list-style: none; padding: 0; margin: 0; }.onboarding-aside li { display: flex; gap: 11px; margin-bottom: 19px; }.onboarding-aside li i { width: 24px; height: 24px; flex: 0 0 24px; display: grid; place-items: center; border: 1px solid #424349; border-radius: 50%; color: #d1d2d6; font: normal 700 9px inherit; }.onboarding-aside li span { display: flex; flex-direction: column; }.onboarding-aside li strong { font-size: 11px; }.onboarding-aside li small { margin-top: 4px; color: #8f9199; font-size: 9.5px; line-height: 1.45; }.aside-security { margin-top: 26px; padding: 11px; border: 1px solid #34353a; border-radius: 9px; color: #b8dac8; background: #202722; font-size: 9.5px; }

/* SaaS workspace detail */
.workspace-detail-hero { min-height: 220px; position: relative; overflow: hidden; padding: 30px 32px; border-radius: 21px; color: #fff; background: radial-gradient(circle at 90% 10%, rgba(242,169,25,.14), transparent 28%), #141519; }
.workspace-detail-brand { display: flex; align-items: center; gap: 15px; }.workspace-detail-brand > img, .workspace-detail-brand > span { width: 62px; height: 62px; display: grid; place-items: center; object-fit: contain; padding: 5px; border-radius: 15px; border: 1px solid #34353a; background: #fff; color: #17181c; font-size: 22px; font-weight: 800; }.detail-kicker { color: #d3a13f; font-size: 9px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }.workspace-detail-brand h1 { margin: 4px 0; font-size: 25px; letter-spacing: -.025em; }.workspace-detail-brand p { margin: 0; color: #9698a0; font-size: 11px; }.detail-health { position: absolute; right: 30px; top: 31px; padding: 7px 10px; }.detail-hero-stats { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 29px; padding-top: 20px; border-top: 1px solid #303136; }.detail-hero-stats > span { display: flex; flex-direction: column; border-right: 1px solid #303136; padding-left: 20px; }.detail-hero-stats > span:first-child { padding-left: 0; }.detail-hero-stats > span:last-child { border-right: 0; }.detail-hero-stats small { color: #7e8088; font-size: 9px; text-transform: uppercase; letter-spacing: .09em; }.detail-hero-stats strong { margin-top: 5px; font-size: 12px; }
.workspace-detail-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(250px, .85fr); gap: 18px; margin-top: 18px; align-items: start; }.settings-card { padding: 24px; }.settings-heading { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 22px; }.unsaved-hint { height: max-content; padding: 5px 8px; border-radius: 6px; background: #f3f3ef; color: #8a8c92; font-size: 9px; }.compact-upload { margin-top: 18px; }
.workspace-info-card { padding: 24px; }.workspace-info-card h2 { margin-bottom: 18px; }.info-list { display: flex; flex-direction: column; gap: 2px; }.info-list > div { display: flex; align-items: center; gap: 11px; padding: 12px 0; border-bottom: 1px solid #eeeeea; }.info-list > div:last-child { border: 0; }.info-list > div > span { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 8px; background: #f4f4f0; color: #a36d04; font-size: 11px; font-weight: 800; }.info-list p { display: flex; flex-direction: column; margin: 0; }.info-list small { color: #92939a; font-size: 9px; }.info-list strong { margin-top: 3px; font-size: 10.5px; }
.workspace-users-card { margin-top: 18px; padding: 24px; }.workspace-users-card .workspace-section-head { align-items: center; }.seat-ring { --usage: 0; width: 48px; height: 48px; position: relative; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--pc-accent) calc(var(--usage) * 1%), #ecece7 0); }.seat-ring::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: #fff; }.seat-ring span { position: relative; font-size: 11px; font-weight: 800; }
.modern-table-wrap { overflow-x: auto; border: 1px solid #ecece8; border-radius: 12px; }.modern-table { width: 100%; border-collapse: collapse; }.modern-table th { padding: 11px 14px; text-align: left; background: #f7f7f4; color: #888a91; font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }.modern-table td { padding: 13px 14px; border-top: 1px solid #eeeeea; color: #55575e; font-size: 10.5px; }.modern-table tbody tr { transition: background .16s; }.modern-table tbody tr:hover { background: #fbfbf8; }.table-user { display: flex; align-items: center; gap: 10px; }.table-user > span { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 9px; color: #815500; background: #fff2cf; font-size: 10px; font-weight: 800; }.table-user p { display: flex; flex-direction: column; margin: 0; }.table-user strong { color: #25262b; font-size: 11px; }.table-user small { color: #9a9ba1; margin-top: 2px; font-size: 9.5px; }.access-pill { padding: 5px 8px; border-radius: 6px; background: #f0f0ec; color: #55575e; font-size: 9.5px; font-weight: 700; }

.plan-explainer { margin: 20px 26px 0; padding: 16px; border: 1px solid #e7e7e2; border-radius: 12px; background: #f8f8f5; }
.plan-explainer-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.plan-explainer-head strong { font-size: 11px; }
.plan-explainer-head span { color: #9899a0; font-size: 9px; }
.plan-guide-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.plan-guide-grid > div { padding: 11px; border-radius: 9px; background: #fff; }
.plan-guide-grid b { color: #2b2c31; font-size: 10px; }
.plan-guide-grid p { margin: 5px 0 0; color: #898b92; font-size: 9px; line-height: 1.5; }
.access-control-bar { display: flex; align-items: center; gap: 12px; margin-top: 18px; padding: 15px 17px; border: 1px solid; border-radius: 14px; }
.access-open { border-color: #cce7d8; background: #f1faf5; }
.access-blocked { border-color: #efd2ce; background: #fff6f5; }
.access-control-icon { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; border-radius: 10px; font-size: 16px; font-weight: 800; }
.access-open .access-control-icon { color: #217b50; background: #dcefe5; }
.access-blocked .access-control-icon { color: #aa3931; background: #f7dedb; }
.access-control-bar > div { flex: 1; }
.access-control-bar strong { color: #292a2f; font-size: 11.5px; }
.access-control-bar p { margin: 3px 0 0; color: #7e8087; font-size: 9.5px; }
.access-action { padding: 8px 11px; border: 1px solid; border-radius: 8px; background: #fff; font: 700 10px inherit; cursor: pointer; transition: transform .18s, box-shadow .18s; }
.access-action.danger { border-color: #e3bdb9; color: #9f332c; }
.access-action.success { border-color: #a9d5bc; color: #24734d; }
.access-action:hover { box-shadow: 0 4px 12px rgba(22,23,26,.08); transform: translateY(-1px); }
.current-plan-note { display: flex; gap: 11px; margin-top: 18px; padding: 13px; border-radius: 11px; background: #f8f8f5; }
.current-plan-note > span { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; border-radius: 9px; color: #8d5d00; background: #fff0c9; font-weight: 800; }
.current-plan-note > div { display: flex; flex-direction: column; }
.current-plan-note strong { font-size: 10.5px; }
.current-plan-note p { margin: 3px 0; color: #74767d; font-size: 9.5px; }
.current-plan-note small { color: #a06c09; font-size: 8.5px; }
.workspace-danger-zone { margin-top: 18px; padding: 22px 24px; display: flex; align-items: center; justify-content: space-between; gap: 25px; border: 1px solid #edcfcb; border-radius: 16px; background: #fffafa; }
.workspace-danger-zone h2 { margin: 0; color: #6f2925; font-size: 16px; }
.workspace-danger-zone p { max-width: 630px; margin: 6px 0 0; color: #8c706e; font-size: 10px; line-height: 1.55; }
.workspace-danger-zone form { min-width: 330px; }
.workspace-danger-zone label { display: block; margin-bottom: 6px; color: #7b5c5a; font-size: 9px; }
.workspace-danger-zone form > div { display: flex; gap: 7px; }
.workspace-danger-zone input { min-width: 0; flex: 1; padding: 9px 10px; border: 1px solid #e0c8c5; border-radius: 8px; outline: 0; font: 10px inherit; }
.workspace-danger-zone input:focus { border-color: #bb5a52; box-shadow: 0 0 0 3px rgba(187,90,82,.09); }
.workspace-danger-zone button { padding: 9px 11px; border: 0; border-radius: 8px; background: #a23a33; color: #fff; font: 700 9.5px inherit; cursor: pointer; }
.archived-label { padding: 8px 10px; border-radius: 8px; background: #f3dfdd; color: #8d342e; font-size: 10px; font-weight: 750; }

@media (max-width: 1180px) {
  .platform-metrics { grid-template-columns: repeat(2, 1fr); }
  .workspace-section-head { align-items: flex-start; flex-direction: column; }
  .workspace-tools { width: 100%; }.workspace-search { flex: 1; }
  .onboarding-layout { grid-template-columns: 1fr 280px; }.form-section { grid-template-columns: 38px 1fr; }.form-section-heading { grid-column: 2; }.form-section .platform-fields { grid-column: 1/-1; }
  .workspace-danger-zone { align-items: flex-start; flex-direction: column; }.workspace-danger-zone form { min-width: 0; width: 100%; }
}
@media (max-width: 900px) {
  .platform-ui .content { padding: 22px 20px 38px; }.platform-ui .topbar { padding: 0 20px; }
  .platform-hero { min-height: 300px; align-items: flex-start; flex-direction: column; padding: 31px; }.platform-primary-action { align-self: flex-start; }
  .platform-metrics { margin: -18px 13px 29px; }
  .workspace-grid, .workspace-detail-layout, .onboarding-layout { grid-template-columns: 1fr; }
  .onboarding-aside { position: relative; top: auto; min-height: 0; }
}
@media (max-width: 680px) {
  .platform-ui .content { padding: 15px 13px 30px; }.platform-ui .topbar { padding: 0 14px; }.platform-ui .topbar .user-chip small { display: none; }
  .platform-hero { padding: 25px 22px; border-radius: 17px; }.platform-hero h1 { font-size: 30px; }
  .platform-metrics { grid-template-columns: 1fr; margin: 14px 0 25px; }.platform-metric { min-height: 100px; }
  .workspace-tools { align-items: stretch; flex-direction: column; }.workspace-search { width: 100%; flex: none; }.workspace-filters { overflow-x: auto; }
  .workspace-card-top { flex-wrap: wrap; }.workspace-health { margin-left: 55px; }.workspace-card-footer { align-items: flex-start; flex-direction: column; gap: 9px; }
  .access-control-bar { align-items: flex-start; flex-wrap: wrap; }.access-control-bar form { width: 100%; margin-left: 46px; }.plan-guide-grid { grid-template-columns: 1fr; }.plan-explainer-head { flex-direction: column; }.workspace-danger-zone form > div { flex-direction: column; }
  .platform-fields.two-col { grid-template-columns: 1fr; }.form-section { padding: 21px 18px; }.form-section-number { grid-row: 1; }.form-section-heading { grid-row: 1; }.logo-upload b { display: none; }
  .workspace-detail-hero { padding: 23px 20px; }.detail-health { position: static; margin-top: 18px; }.detail-hero-stats { grid-template-columns: repeat(2, 1fr); gap: 15px 0; }.detail-hero-stats > span:nth-child(2) { border-right: 0; }.detail-hero-stats > span:nth-child(3) { padding-left: 0; }.settings-heading { flex-direction: column; }.unsaved-hint { width: max-content; }
}
@media (prefers-reduced-motion: reduce) {
  .platform-ui *, .platform-ui *::before, .platform-ui *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
.muted { color: var(--pc-text-muted); }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

/* ---------- Landing page editor ---------- */
.landing-editor { grid-template-columns: minmax(0, 1fr) 280px; }
.landing-side .panel { position: sticky; top: 20px; }
.landing-save { flex-wrap: wrap; margin-top: 16px; }
.landing-panel-intro { margin: -6px 0 14px; font-size: 13px; }
.landing-subtitle { margin: 18px 0 12px; font-size: 13.5px; }
.landing-list-hint { margin: -6px 0 12px; }
.landing-rows { display: grid; gap: 10px; margin-bottom: 8px; }
.landing-row { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; align-items: start; padding: 12px 12px 0; border: 1px solid var(--pc-border); border-radius: 10px; }
.landing-row-index { width: 24px; height: 24px; margin-top: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--pc-accent); color: #15161a; font-size: 11px; font-weight: 700; }
.landing-row-fields { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 12px; }
.landing-row-fields.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.landing-row-fields.single { grid-template-columns: 1fr; }
.landing-row .field { margin-bottom: 12px; }
.landing-uploads { display: grid; gap: 18px; }
.landing-upload { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 16px; align-items: start; }
.landing-upload strong { display: block; font-size: 13.5px; }
.landing-upload .hint { display: block; margin: 2px 0 10px; font-size: 11.5px; color: var(--pc-text-muted); }
.landing-upload form { margin-bottom: 8px; }
.landing-upload-form { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.landing-upload-preview { width: 64px; height: 64px; border: 1px solid var(--pc-border); border-radius: 10px; overflow: hidden; background: #070908; }
.landing-upload-preview.wide { width: 120px; height: 72px; }
.landing-upload-preview img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 1000px) {
  .landing-editor { grid-template-columns: 1fr; }
  .landing-side { order: -1; }
  .landing-side .panel { position: static; }
}
@media (max-width: 640px) {
  .landing-row-fields, .landing-row-fields.three { grid-template-columns: 1fr; }
  .landing-upload { grid-template-columns: 1fr; }
}
