:root {
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --purple: #7c3aed;
  --purple-dark: #6d28d9;
  --indigo: #4f46e5;
  --ink: #172033;
  --text: #334155;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --line: #e2e8f0;
  --line-soft: #edf1f7;
  --surface: #ffffff;
  --surface-soft: #f7f8fc;
  --surface-blue: #eff6ff;
  --surface-purple: #f5f3ff;
  --green: #16a34a;
  --amber: #d97706;
  --red: #dc2626;
  --cyan: #0284c7;
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 14px 36px rgba(15, 23, 42, 0.08);
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 22px;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--surface-soft); }
body { min-height: 100vh; margin: 0; color: var(--text); background: var(--surface-soft); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 14px; font-weight: 400; line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
svg.icon { display: inline-block; flex: 0 0 auto; vertical-align: middle; }
code, pre { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }

.topbar { position: sticky; top: 0; z-index: 1000; width: 100%; height: 70px; background: rgba(255,255,255,.97); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px); }
.topbar-inner { width: 100%; height: 100%; padding: 0 24px; display: flex; align-items: center; gap: 16px; flex-wrap: nowrap; }
.brand { display: inline-flex; align-items: center; gap: 11px; min-width: 190px; flex: 0 0 auto; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--blue), var(--purple)); border-radius: 12px; font-size: 19px; font-weight: 600; box-shadow: 0 8px 18px rgba(79,70,229,.23); }
.brand-mark.large { width: 48px; height: 48px; border-radius: 15px; font-size: 24px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { color: var(--ink); font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.brand-text small { margin-top: 3px; color: var(--muted); font-size: 11px; font-weight: 500; }
.primary-nav { display: flex; align-items: center; gap: 3px; min-width: 0; flex: 1 1 auto; height: 100%; flex-wrap: nowrap; white-space: nowrap; }

/* Compatibility guard: prevents a stale template class from losing navigation layout. */
.main-nav { display: flex; align-items: center; gap: 3px; min-width: 0; flex: 1 1 auto; height: 100%; flex-wrap: nowrap; white-space: nowrap; }

.nav-link { height: 40px; padding: 0 12px; display: inline-flex; flex: 0 0 auto; align-items: center; gap: 7px; color: #475569; background: transparent; border: 0; border-radius: 10px; font-size: 13px; font-weight: 500; white-space: nowrap; transition: background .18s ease, color .18s ease; }
.nav-link:hover { color: var(--indigo); background: #f4f5fb; }
.nav-link.active { color: var(--indigo); background: linear-gradient(135deg, rgba(37,99,235,.10), rgba(124,58,237,.10)); }
.caret { margin-left: 1px; color: var(--muted-2); font-size: 13px; transform: translateY(-1px); }
.nav-dropdown { position: relative; height: 100%; display: flex; align-items: center; }
.nav-dropdown-panel { position: absolute; top: calc(100% - 5px); left: 0; width: 390px; display: none; grid-template-columns: 1fr; gap: 4px; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: 15px; box-shadow: var(--shadow-md); }
.nav-dropdown-panel.compact { width: 350px; }
.nav-dropdown-panel.wide { width: 650px; grid-template-columns: 1fr 1fr; }
.nav-dropdown-panel.align-right { left: auto; right: 0; }
.nav-dropdown.open > .nav-dropdown-panel { display: grid; }
.nav-dropdown-panel > a, .dropdown-form-button { width: 100%; display: flex; align-items: flex-start; gap: 10px; padding: 10px; color: var(--text); background: transparent; border: 0; border-radius: 11px; text-align: left; }
.nav-dropdown-panel > a:hover, .dropdown-form-button:hover { background: #f6f7fb; }
.nav-dropdown-panel a span:last-child, .dropdown-form-button span:last-child { min-width: 0; display: flex; flex-direction: column; }
.nav-dropdown-panel strong, .dropdown-form-button strong { color: var(--ink); font-size: 13px; font-weight: 600; }
.nav-dropdown-panel small, .dropdown-form-button small { margin-top: 2px; color: var(--muted); font-size: 11px; line-height: 1.35; }
.nav-icon-box { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; color: var(--indigo); background: linear-gradient(135deg, var(--surface-blue), var(--surface-purple)); border-radius: 9px; }
.dropdown-group { padding: 3px; }
.dropdown-group > p { margin: 7px 9px 5px; color: var(--muted-2); font-size: 10px; font-weight: 600; letter-spacing: .10em; text-transform: uppercase; }
.dropdown-group a { display: flex; gap: 10px; padding: 9px; border-radius: 10px; }
.dropdown-group a:hover { background: #f6f7fb; }
.dropdown-group a > span:last-child { display: flex; flex-direction: column; }
.topbar-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; flex: 0 0 auto; }
.icon-button { width: 39px; height: 39px; display: grid; place-items: center; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.icon-button:hover { color: var(--indigo); background: #f8f7ff; border-color: #d9d7fb; }
.user-button { height: 46px; padding: 5px 8px 5px 5px; display: flex; align-items: center; gap: 9px; color: var(--text); background: transparent; border: 0; border-radius: 12px; }
.user-button:hover { background: #f6f7fb; }
.avatar { width: 35px; height: 35px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--blue), var(--purple)); border-radius: 10px; font-size: 13px; font-weight: 600; }
.user-copy { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2; }
.user-copy strong { max-width: 130px; overflow: hidden; color: var(--ink); font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.user-copy small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.account-panel { width: 330px; }
.account-summary { grid-column: 1 / -1; padding: 10px 12px 12px; border-bottom: 1px solid var(--line-soft); }
.account-summary strong, .account-summary small { display: block; }
.account-summary strong { color: var(--ink); font-size: 13px; }
.account-summary small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.account-panel form { margin: 0; }
.mobile-menu-button { display: none; width: 40px; height: 40px; place-items: center; color: var(--text); background: #fff; border: 1px solid var(--line); border-radius: 10px; }

.app-main { width: 100%; max-width: none; padding: 26px 30px 48px; }
.app-main.narrow-content { max-width: 1180px; margin: 0 auto; }
.page-header { min-height: 82px; margin-bottom: 22px; display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.page-header h1 { margin: 5px 0 4px; color: var(--ink); font-size: clamp(26px, 2.4vw, 34px); font-weight: 600; letter-spacing: -.035em; line-height: 1.15; }
.page-header p { max-width: 720px; margin: 0; color: var(--muted); font-size: 14px; }
.eyebrow { color: var(--indigo); font-size: 10px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.eyebrow.light { color: #c7d2fe; }
.page-actions { display: flex; align-items: center; gap: 9px; padding-top: 9px; }

.button { min-height: 40px; padding: 0 16px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid transparent; border-radius: 10px; font-size: 13px; font-weight: 500; transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
.button:hover { transform: translateY(-1px); }
.button:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.button-primary { color: #fff; background: linear-gradient(135deg, var(--blue), var(--purple)); box-shadow: 0 7px 15px rgba(79,70,229,.18); }
.button-primary:hover { box-shadow: 0 10px 20px rgba(79,70,229,.24); }
.button-secondary { color: var(--ink); background: #fff; border-color: var(--line); }
.button-secondary:hover { color: var(--indigo); border-color: #c7d2fe; background: #fbfbff; }
.button-small { min-height: 34px; padding: 0 12px; font-size: 12px; }
.button-block { width: 100%; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-heading { min-height: 68px; padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; gap: 15px; border-bottom: 1px solid var(--line-soft); }
.card-heading > div:first-child { display: flex; align-items: center; gap: 11px; }
.card-heading h2, .form-section-heading h2 { margin: 0; color: var(--ink); font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.card-heading p, .form-section-heading p { margin: 2px 0 0; color: var(--muted); font-size: 11px; }
.card-heading > a { color: var(--indigo); font-size: 12px; font-weight: 500; }
.card-icon { width: 40px; height: 40px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 11px; }
.card-icon.blue, .metric-icon.blue { color: var(--blue); background: var(--surface-blue); }
.card-icon.purple, .metric-icon.purple { color: var(--purple); background: var(--surface-purple); }
.card-icon.indigo, .metric-icon.indigo { color: var(--indigo); background: #eef2ff; }
.card-icon.green, .metric-icon.green { color: var(--green); background: #f0fdf4; }
.card-icon.amber, .metric-icon.amber { color: var(--amber); background: #fffbeb; }
.card-icon.red, .metric-icon.red { color: var(--red); background: #fef2f2; }

.metric-grid { margin-bottom: 20px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; }
.metric-card { min-width: 0; padding: 18px; display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.metric-card:hover { transform: translateY(-2px); border-color: #d4d7f8; box-shadow: var(--shadow-md); }
.metric-icon { width: 45px; height: 45px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 13px; }
.metric-copy { min-width: 0; display: flex; flex: 1; flex-direction: column; }
.metric-copy > span { color: var(--muted); font-size: 11px; font-weight: 500; }
.metric-copy strong { margin-top: 2px; overflow: hidden; color: var(--ink); font-size: 22px; font-weight: 600; letter-spacing: -.025em; text-overflow: ellipsis; white-space: nowrap; }
.metric-copy small { margin-top: 2px; color: var(--muted-2); font-size: 10px; }
.metric-arrow { color: var(--muted-2); }

.dashboard-grid { margin-bottom: 20px; display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(320px, .8fr); gap: 18px; }
.chart-card, .task-card { min-height: 340px; }
.bar-chart { height: 252px; padding: 26px 22px 18px; display: flex; align-items: flex-end; gap: 13px; }
.bar-column { height: 100%; min-width: 0; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 7px; }
.bar-value { width: 100%; overflow: hidden; color: var(--muted); font-size: 9px; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { width: min(44px, 70%); height: 170px; display: flex; align-items: flex-end; overflow: hidden; background: #f1f5f9; border-radius: 9px; }
.bar-fill { width: 100%; min-height: 8px; background: linear-gradient(180deg, var(--purple), var(--blue)); border-radius: 9px 9px 4px 4px; }
.bar-column > span { color: var(--muted); font-size: 10px; }
.task-list { padding: 10px 14px 15px; }
.task-item { padding: 13px 5px; display: flex; align-items: center; gap: 11px; border-bottom: 1px solid var(--line-soft); }
.task-item:last-child { border-bottom: 0; }
.task-item > span:nth-child(2) { display: flex; flex: 1; flex-direction: column; }
.task-item strong { color: var(--ink); font-size: 12px; font-weight: 600; }
.task-item small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.task-item b { min-width: 30px; height: 28px; display: grid; place-items: center; color: var(--ink); background: #f7f8fc; border-radius: 8px; font-size: 11px; font-weight: 600; }
.task-dot { width: 9px; height: 9px; flex: 0 0 auto; border-radius: 50%; }
.task-dot.blue { background: var(--blue); } .task-dot.purple { background: var(--purple); } .task-dot.amber { background: var(--amber); } .task-dot.red { background: var(--red); }
.success-check { width: 36px; height: 36px; display: grid; place-items: center; color: var(--green); background: #f0fdf4; border-radius: 50%; font-size: 18px; }

.table-card { overflow: hidden; }
.table-toolbar { min-height: 66px; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line-soft); }
.search-form { width: min(480px, 100%); height: 40px; display: flex; align-items: center; overflow: hidden; background: #f8fafc; border: 1px solid var(--line); border-radius: 10px; }
.search-form > span { width: 41px; display: grid; place-items: center; color: var(--muted); }
.search-form input { min-width: 0; height: 100%; flex: 1; color: var(--ink); background: transparent; border: 0; outline: 0; }
.search-form button { height: 30px; margin-right: 5px; padding: 0 12px; color: var(--indigo); background: #fff; border: 1px solid var(--line); border-radius: 8px; font-size: 11px; font-weight: 500; }
.table-count { color: var(--muted); font-size: 11px; white-space: nowrap; }
.table-count strong { color: var(--ink); }
.table-wrap { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.data-table th { padding: 11px 14px; color: var(--muted); background: #fafbfe; border-bottom: 1px solid var(--line); font-size: 10px; font-weight: 600; letter-spacing: .05em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.data-table td { min-width: 110px; padding: 13px 14px; color: #475569; border-bottom: 1px solid var(--line-soft); font-size: 12px; vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover td { background: #fcfcff; }
.data-table td strong { color: var(--ink); font-size: 12px; font-weight: 600; }
.data-table td small { display: block; margin-top: 2px; color: var(--muted-2); font-size: 9px; }
.wide-table { min-width: 1050px; }
.action-column { width: 100px; text-align: right !important; }
.row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 5px; min-width: 95px !important; }
.row-actions form { margin: 0; }
.table-action { width: 31px; height: 31px; display: grid; place-items: center; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.table-action:hover { color: var(--indigo); border-color: #c7d2fe; }
.table-action.danger:hover { color: var(--red); border-color: #fecaca; background: #fef2f2; }
.pagination { min-height: 60px; padding: 11px 16px; display: flex; align-items: center; justify-content: space-between; gap: 15px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: 11px; }
.pagination > div { display: flex; gap: 7px; }

.badge, .status-chip { display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; font-size: 9px; font-weight: 600; white-space: nowrap; }
.badge { min-height: 23px; padding: 0 9px; }
.badge.success, .status-chip.success { color: #15803d; background: #f0fdf4; border: 1px solid #bbf7d0; }
.badge.warning, .status-chip.warning { color: #b45309; background: #fffbeb; border: 1px solid #fde68a; }
.badge.danger, .status-chip.danger { color: #b91c1c; background: #fef2f2; border: 1px solid #fecaca; }
.badge.info, .status-chip.info { color: #0369a1; background: #f0f9ff; border: 1px solid #bae6fd; }
.badge.neutral, .status-chip.neutral { color: #64748b; background: #f8fafc; border: 1px solid #e2e8f0; }
.status-chip { min-height: 25px; padding: 0 10px; }
.status-chip > span { width: 6px; height: 6px; margin-right: 6px; background: currentColor; border-radius: 50%; }

.alert { margin-bottom: 16px; padding: 12px 14px; display: flex; align-items: flex-start; gap: 10px; border: 1px solid; border-radius: 11px; }
.alert-success { color: #166534; background: #f0fdf4; border-color: #bbf7d0; }
.alert-danger { color: #991b1b; background: #fef2f2; border-color: #fecaca; }
.alert-warning { color: #92400e; background: #fffbeb; border-color: #fde68a; }
.alert-dot { width: 8px; height: 8px; margin-top: 7px; flex: 0 0 auto; background: currentColor; border-radius: 50%; }
.alert strong { font-size: 12px; font-weight: 600; }
.alert p, .alert ul { margin: 2px 0 0; font-size: 11px; }
.alert a { font-weight: 600; text-decoration: underline; }
.alert ul { padding-left: 17px; }

.record-form { overflow: hidden; }
.form-section-heading { padding: 20px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line-soft); }
.form-grid { padding: 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 17px 18px; }
.form-field { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.form-field > span:first-child { color: #475569; font-size: 11px; font-weight: 500; }
.form-field > span b { color: var(--red); font-weight: 500; }
.form-field input, .form-field select, .form-field textarea { width: 100%; color: var(--ink); background: #fff; border: 1px solid #cfd8e6; border-radius: 10px; outline: 0; transition: border-color .15s ease, box-shadow .15s ease; }
.form-field input, .form-field select { height: 42px; padding: 0 12px; }
.form-field textarea { min-height: 110px; padding: 11px 12px; resize: vertical; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,.13); }
.form-field.span-2 { grid-column: 1 / -1; }
.form-actions { padding: 15px 20px; display: flex; justify-content: flex-end; gap: 9px; background: #fafbfe; border-top: 1px solid var(--line-soft); }
.toggle-field { height: 42px; padding: 0 12px; display: flex; align-items: center; gap: 9px; background: #f8fafc; border: 1px solid #cfd8e6; border-radius: 10px; }
.toggle-field input { width: 17px; height: 17px; margin: 0; accent-color: var(--indigo); }
.toggle-field span { color: var(--text); font-size: 12px; }
.form-stack { display: flex; flex-direction: column; gap: 15px; }

.empty-state { min-height: 190px; padding: 28px; display: flex; align-items: center; justify-content: center; flex-direction: column; color: var(--muted); text-align: center; }
.empty-state.compact { min-height: 170px; }
.empty-state h3 { margin: 10px 0 2px; color: var(--ink); font-size: 15px; font-weight: 600; }
.empty-state p { margin: 4px 0 0; font-size: 11px; }
.empty-icon { width: 66px; height: 66px; display: grid; place-items: center; color: var(--indigo); background: linear-gradient(135deg, var(--surface-blue), var(--surface-purple)); border-radius: 19px; }
.muted { color: var(--muted-2); font-size: 10px; }
.text-danger { color: var(--red); }

.app-footer { min-height: 58px; padding: 17px 30px; display: flex; align-items: center; justify-content: space-between; gap: 15px; color: var(--muted-2); background: #fff; border-top: 1px solid var(--line); font-size: 10px; }
.app-footer code { color: var(--muted); }

.setup-page { width: 100%; padding: 28px 30px 50px; }
.setup-hero { min-height: 270px; padding: 38px 44px; display: flex; align-items: center; justify-content: space-between; overflow: hidden; color: #fff; background: linear-gradient(120deg, #172554 0%, #312e81 48%, #6d28d9 100%); border-radius: var(--radius-lg); box-shadow: 0 20px 48px rgba(49,46,129,.2); }
.setup-hero-copy { position: relative; z-index: 2; max-width: 720px; }
.setup-hero h1 { margin: 8px 0 10px; font-size: clamp(32px, 4vw, 50px); font-weight: 600; letter-spacing: -.045em; line-height: 1.05; }
.setup-hero p { max-width: 670px; margin: 0; color: #dbeafe; font-size: 15px; }
.setup-badges { margin-top: 23px; display: flex; flex-wrap: wrap; gap: 8px; }
.setup-badges .status-chip { backdrop-filter: blur(8px); }
.setup-art { position: relative; width: 270px; height: 210px; flex: 0 0 auto; }
.setup-logo { position: absolute; inset: 50% auto auto 50%; width: 100px; height: 100px; display: grid; place-items: center; color: #fff; background: rgba(255,255,255,.13); border: 1px solid rgba(255,255,255,.22); border-radius: 28px; box-shadow: 0 18px 50px rgba(0,0,0,.2); font-size: 45px; font-weight: 600; transform: translate(-50%,-50%) rotate(-5deg); backdrop-filter: blur(16px); }
.orb { position: absolute; border-radius: 50%; filter: blur(1px); }
.orb-one { width: 150px; height: 150px; top: 0; right: 0; background: rgba(96,165,250,.28); }
.orb-two { width: 120px; height: 120px; bottom: 0; left: 10px; background: rgba(216,180,254,.24); }
.setup-grid { margin-top: 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.setup-card { overflow: hidden; }
.card-copy { margin: 0; padding: 17px 19px 10px; color: var(--muted); font-size: 12px; }
.variable-list { padding: 7px 18px 16px; }
.variable-row { min-height: 43px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line-soft); }
.variable-row:last-child { border-bottom: 0; }
.variable-row code { color: var(--ink); font-size: 11px; }
.help-details { margin: 0 18px 18px; border: 1px solid var(--line); border-radius: 10px; }
.help-details summary { padding: 11px 13px; color: var(--indigo); cursor: pointer; font-size: 11px; font-weight: 500; }
.help-details pre { margin: 0; padding: 13px; overflow-x: auto; color: #dbeafe; background: #172033; border-radius: 0 0 9px 9px; font-size: 10px; line-height: 1.7; }
.success-panel, .error-panel { margin: 17px 18px 10px; padding: 14px; border-radius: 11px; }
.success-panel { color: #166534; background: #f0fdf4; border: 1px solid #bbf7d0; }
.error-panel { color: #991b1b; background: #fef2f2; border: 1px solid #fecaca; }
.success-panel strong, .error-panel strong { font-size: 12px; font-weight: 600; }
.success-panel p, .error-panel p { margin: 3px 0 0; font-size: 11px; word-break: break-word; }
.detail-list { margin: 0; padding: 8px 18px 16px; }
.detail-list > div { min-height: 40px; display: flex; align-items: center; justify-content: space-between; gap: 15px; border-bottom: 1px solid var(--line-soft); }
.detail-list dt { color: var(--muted); font-size: 10px; }
.detail-list dd { margin: 0; color: var(--ink); font-size: 11px; font-weight: 500; text-align: right; }
.setup-card form { padding: 0 18px 18px; }
.deployment-proof { margin-top: 20px; padding: 20px; }
.deployment-proof > div:first-child { display: flex; align-items: center; gap: 12px; }
.deployment-proof h2 { margin: 0; color: var(--ink); font-size: 15px; font-weight: 600; }
.deployment-proof p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.fingerprint-grid { margin-top: 17px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.fingerprint-grid > div { padding: 12px; display: flex; flex-direction: column; background: #f8fafc; border: 1px solid var(--line); border-radius: 10px; }
.fingerprint-grid span { color: var(--muted); font-size: 9px; text-transform: uppercase; }
.fingerprint-grid code { margin-top: 4px; overflow: hidden; color: var(--indigo); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }

.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(420px, 1.1fr) minmax(420px, .9fr); }
.auth-visual { min-height: 100vh; padding: 38px 48px; display: flex; flex-direction: column; justify-content: space-between; color: #fff; background: radial-gradient(circle at 20% 18%, rgba(96,165,250,.34), transparent 30%), radial-gradient(circle at 85% 75%, rgba(192,132,252,.32), transparent 27%), linear-gradient(135deg, #172554, #312e81 50%, #6d28d9); }
.auth-brand { display: flex; align-items: center; gap: 12px; }
.auth-brand > span:last-child { display: flex; flex-direction: column; }
.auth-brand strong { font-size: 18px; font-weight: 600; }
.auth-brand small { color: #c7d2fe; font-size: 11px; }
.auth-message { max-width: 650px; }
.auth-message h1 { margin: 9px 0 13px; font-size: clamp(36px, 4.7vw, 64px); font-weight: 600; letter-spacing: -.05em; line-height: 1.02; }
.auth-message p { max-width: 600px; margin: 0; color: #dbeafe; font-size: 15px; }
.auth-features { display: flex; flex-wrap: wrap; gap: 11px; }
.auth-features span { padding: 10px 13px; display: inline-flex; align-items: center; gap: 7px; color: #e0e7ff; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.13); border-radius: 11px; font-size: 11px; backdrop-filter: blur(10px); }
.auth-form-panel { min-height: 100vh; padding: 40px; display: grid; place-items: center; background: #f7f8fc; }
.auth-form-card { width: min(430px, 100%); padding: 34px; background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-md); }
.auth-form-card h2 { margin: 7px 0 5px; color: var(--ink); font-size: 27px; font-weight: 600; letter-spacing: -.035em; }
.auth-form-card > p { margin: 0 0 21px; color: var(--muted); font-size: 12px; }
.auth-meta { margin-top: 18px; display: flex; justify-content: space-between; }
.auth-meta a { color: var(--indigo); font-size: 11px; font-weight: 500; }
.build-line { margin: 24px 0 0 !important; color: var(--muted-2) !important; font-size: 9px !important; text-align: center; }

.marketplace-main { background: #fff; }
.marketplace-hero { min-height: 510px; padding: 64px max(40px, 6vw); display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(400px, .9fr); align-items: center; gap: 40px; overflow: hidden; color: #fff; background: radial-gradient(circle at 75% 20%, rgba(96,165,250,.28), transparent 25%), radial-gradient(circle at 88% 85%, rgba(192,132,252,.30), transparent 24%), linear-gradient(120deg, #172554, #312e81 52%, #6d28d9); }
.marketplace-hero h1 { max-width: 820px; margin: 9px 0 15px; font-size: clamp(38px, 5vw, 68px); font-weight: 600; letter-spacing: -.055em; line-height: 1.01; }
.marketplace-hero p { max-width: 680px; margin: 0; color: #dbeafe; font-size: 16px; }
.marketplace-search { max-width: 720px; height: 58px; margin-top: 28px; padding: 5px; display: flex; align-items: center; overflow: hidden; background: #fff; border-radius: 14px; box-shadow: 0 15px 35px rgba(15,23,42,.24); }
.marketplace-search > span { width: 50px; display: grid; place-items: center; color: var(--muted); }
.marketplace-search input { min-width: 0; flex: 1; color: var(--ink); border: 0; outline: 0; }
.marketplace-search button { height: 46px; padding: 0 18px; color: #fff; background: linear-gradient(135deg, var(--blue), var(--purple)); border: 0; border-radius: 10px; font-size: 12px; font-weight: 500; }
.hero-proof { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 17px; color: #c7d2fe; font-size: 10px; }
.hero-proof span::before { content: '✓'; margin-right: 5px; color: #86efac; }
.marketplace-visual { position: relative; min-height: 350px; }
.visual-card { position: absolute; z-index: 2; width: 190px; padding: 18px; display: flex; flex-direction: column; color: var(--ink); background: rgba(255,255,255,.94); border: 1px solid rgba(255,255,255,.7); border-radius: 18px; box-shadow: 0 20px 50px rgba(15,23,42,.25); backdrop-filter: blur(15px); }
.visual-card strong { margin-top: 13px; font-size: 15px; font-weight: 600; }
.visual-card small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.card-a { top: 10px; left: 20px; transform: rotate(-3deg); }
.card-b { top: 95px; right: 10px; transform: rotate(4deg); }
.card-c { bottom: 5px; left: 70px; transform: rotate(2deg); }
.hero-orb { position: absolute; inset: 40px 40px 20px; background: linear-gradient(135deg, rgba(59,130,246,.45), rgba(168,85,247,.5)); border-radius: 50%; filter: blur(3px); }
.environment-notice { margin: 22px max(30px, 5vw) 0; padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; gap: 20px; background: #faf5ff; border: 1px solid #e9d5ff; border-radius: 14px; }
.environment-notice > div { display: flex; align-items: center; gap: 12px; }
.environment-notice strong { color: var(--ink); font-size: 13px; font-weight: 600; }
.environment-notice p { margin: 2px 0 0; color: var(--muted); font-size: 11px; }
.marketplace-section { padding: 48px max(30px, 5vw); }
.section-title { margin-bottom: 20px; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.section-title h2 { margin: 5px 0 0; color: var(--ink); font-size: 28px; font-weight: 600; letter-spacing: -.035em; }
.section-title > span { color: var(--muted); font-size: 11px; }
.category-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 13px; }
.category-card { min-height: 130px; padding: 16px; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-sm); transition: transform .18s ease, box-shadow .18s ease; }
.category-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.category-icon { width: 40px; height: 40px; display: grid; place-items: center; color: var(--indigo); background: linear-gradient(135deg, var(--surface-blue), var(--surface-purple)); border-radius: 11px; }
.category-card strong { margin-top: 14px; color: var(--ink); font-size: 12px; font-weight: 600; }
.category-card small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.product-card { min-width: 0; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-sm); transition: transform .18s ease, box-shadow .18s ease; }
.product-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.product-image { position: relative; height: 180px; display: grid; place-items: center; color: var(--indigo); background: linear-gradient(135deg, #eff6ff, #f5f3ff); }
.product-image > span { width: 78px; height: 78px; display: grid; place-items: center; background: rgba(255,255,255,.75); border: 1px solid rgba(255,255,255,.9); border-radius: 22px; }
.stock-pill { position: absolute; top: 12px; right: 12px; min-height: 23px; padding: 0 8px; display: inline-flex; align-items: center; background: #fff; border-radius: 999px; font-size: 8px; font-style: normal; font-weight: 600; }
.stock-pill.success { color: var(--green); } .stock-pill.warning { color: var(--amber); } .stock-pill.danger { color: var(--red); }
.product-content { padding: 16px; }
.product-content > small { color: var(--muted-2); font-size: 9px; }
.product-content h3 { min-height: 42px; margin: 5px 0 5px; color: var(--ink); font-size: 15px; font-weight: 600; line-height: 1.35; }
.product-content p { min-height: 34px; margin: 0; overflow: hidden; color: var(--muted); font-size: 10px; line-height: 1.5; }
.seller-line { margin-top: 10px; display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 9px; }
.price-line { margin-top: 15px; display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.price-line > div { display: flex; flex-direction: column; }
.price-line span { color: var(--muted-2); font-size: 9px; text-decoration: line-through; }
.price-line strong { color: var(--ink); font-size: 18px; font-weight: 600; }
.price-line small { color: var(--muted); font-size: 9px; }
.product-actions { padding: 12px 16px 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.empty-marketplace { grid-column: 1 / -1; min-height: 310px; padding: 35px; display: flex; align-items: center; justify-content: center; flex-direction: column; background: #fafbfe; border: 1px dashed #cfd8e6; border-radius: 16px; text-align: center; }
.empty-marketplace h3 { margin: 13px 0 3px; color: var(--ink); font-size: 18px; font-weight: 600; }
.empty-marketplace p { margin: 0 0 16px; color: var(--muted); font-size: 11px; }

.upload-card { padding-bottom: 20px; }
.upload-form { padding: 20px; display: flex; flex-direction: column; align-items: flex-start; gap: 15px; }
.file-drop { width: 100%; min-height: 230px; display: flex; align-items: center; justify-content: center; flex-direction: column; color: var(--muted); background: #fafbfe; border: 1px dashed #b8c2d3; border-radius: 14px; cursor: pointer; }
.file-drop:hover { background: #f8f7ff; border-color: #a5b4fc; }
.file-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop-icon { width: 58px; height: 58px; display: grid; place-items: center; color: var(--indigo); background: #eef2ff; border-radius: 16px; }
.file-drop strong { margin-top: 13px; color: var(--ink); font-size: 13px; font-weight: 600; }
.file-drop small { margin-top: 3px; font-size: 10px; }
.upload-requirements { margin: 0 20px; padding: 16px; background: #f8fafc; border: 1px solid var(--line); border-radius: 12px; }
.upload-requirements h3 { margin: 0; color: var(--ink); font-size: 12px; font-weight: 600; }
.upload-requirements p { margin: 9px 0 0; color: var(--muted); font-size: 10px; }
.code-tags { margin-top: 9px; display: flex; flex-wrap: wrap; gap: 6px; }
.code-tags code { padding: 5px 7px; color: var(--indigo); background: #eef2ff; border-radius: 6px; font-size: 9px; }
.result-grid { margin-bottom: 17px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.result-card { padding: 16px; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.result-card span { color: var(--muted); font-size: 10px; }
.result-card strong { margin-top: 3px; color: var(--ink); font-size: 24px; font-weight: 600; }
.result-card.success { background: #f0fdf4; border-color: #bbf7d0; } .result-card.success strong { color: var(--green); }
.result-card.danger { background: #fef2f2; border-color: #fecaca; } .result-card.danger strong { color: var(--red); }

.upi-layout { display: grid; grid-template-columns: minmax(340px, .8fr) minmax(400px, 1.2fr); gap: 20px; }
.upi-form { padding-bottom: 20px; }
.upi-form > .form-field, .upi-form > .alert, .upi-form > .button { margin-left: 20px; margin-right: 20px; }
.upi-form > .form-field { margin-top: 15px; }
.upi-form > .button { width: calc(100% - 40px); margin-top: 18px; }
.qr-card { min-height: 540px; padding: 30px; display: flex; align-items: center; justify-content: center; flex-direction: column; text-align: center; }
.qr-card img { width: min(360px, 90%); margin: 16px 0 5px; }
.qr-card h2 { margin: 6px 0 1px; color: var(--ink); font-size: 28px; font-weight: 600; }
.qr-card p { margin: 0; color: var(--muted); font-size: 11px; }
.qr-card details { width: 100%; margin-top: 16px; }
.qr-card summary { color: var(--indigo); cursor: pointer; font-size: 10px; font-weight: 500; }
.uri-code { margin-top: 8px; padding: 10px; display: block; overflow-wrap: anywhere; color: var(--text); background: #f8fafc; border-radius: 8px; font-size: 9px; text-align: left; }
.qr-note { margin-top: 14px; padding: 10px 12px; color: #075985; background: #f0f9ff; border: 1px solid #bae6fd; border-radius: 9px; font-size: 9px; }

.report-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.report-card { overflow: hidden; }

.error-page { min-height: calc(100vh - 128px); padding: 45px 25px; display: grid; place-items: center; }
.error-card { width: min(560px, 100%); padding: 42px; display: flex; align-items: center; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-md); text-align: center; }
.error-code { color: var(--muted-2); font-size: 10px; font-weight: 600; letter-spacing: .18em; }
.error-card .empty-icon { margin-top: 12px; }
.error-card h1 { margin: 17px 0 4px; color: var(--ink); font-size: 27px; font-weight: 600; letter-spacing: -.035em; }
.error-card p { max-width: 430px; margin: 0; color: var(--muted); font-size: 12px; }
.error-card > div:last-child { margin-top: 20px; display: flex; gap: 9px; }

@media (max-width: 1380px) {
  .topbar-inner { padding: 0 18px; gap: 12px; }
  .brand { min-width: 166px; }
  .nav-link { padding: 0 9px; gap: 5px; font-size: 12px; }
  .nav-link svg { display: none; }
  .user-copy strong { max-width: 100px; }
  .category-row { grid-template-columns: repeat(3, 1fr); }
  .product-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 1180px) {
  .topbar-inner { padding: 0 16px; }
  .mobile-menu-button { display: grid; order: 2; margin-left: auto; }
  .primary-nav, .main-nav { position: fixed; top: 70px; left: 0; right: 0; height: auto; max-height: calc(100vh - 70px); padding: 12px 16px 18px; display: none; align-items: stretch; flex-direction: column; overflow-y: auto; background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow-md); }
  .primary-nav.mobile-open, .main-nav.mobile-open { display: flex; }
  .nav-link { width: 100%; justify-content: flex-start; }
  .nav-link svg { display: inline-block; }
  .nav-dropdown { width: 100%; height: auto; display: block; }
  .nav-dropdown-panel, .nav-dropdown-panel.compact, .nav-dropdown-panel.wide { position: static; width: 100%; margin-top: 4px; grid-template-columns: 1fr; box-shadow: none; }
  .topbar-actions { order: 3; margin-left: 0; }
  .topbar-actions .icon-button { display: none; }
  .user-copy { display: none; }
  .app-main { padding: 23px 20px 42px; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .setup-grid { grid-template-columns: 1fr; }
  .fingerprint-grid { grid-template-columns: 1fr 1fr; }
  .marketplace-hero { grid-template-columns: 1fr; }
  .marketplace-visual { display: none; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-visual { min-height: 440px; }
  .auth-form-panel { min-height: auto; }
  .report-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .topbar { height: 64px; }
  .topbar-inner { gap: 8px; }
  .brand { min-width: 0; flex: 1; }
  .brand-text small { display: none; }
  .brand-text strong { font-size: 14px; }
  .brand-mark { width: 34px; height: 34px; border-radius: 10px; font-size: 17px; }
  .primary-nav, .main-nav { top: 64px; max-height: calc(100vh - 64px); }
  .user-button { padding: 4px; }
  .user-button .caret { display: none; }
  .mobile-menu-button { margin-left: 0; }
  .page-header { flex-direction: column; }
  .page-actions { width: 100%; padding-top: 0; flex-wrap: wrap; }
  .page-actions .button { flex: 1; }
  .metric-grid { grid-template-columns: 1fr; }
  .metric-card { padding: 15px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-field.span-2 { grid-column: auto; }
  .form-actions { flex-direction: column-reverse; }
  .form-actions .button { width: 100%; }
  .table-toolbar { align-items: stretch; flex-direction: column; }
  .search-form { width: 100%; }
  .pagination { align-items: stretch; flex-direction: column; }
  .setup-page { padding: 18px 14px 35px; }
  .setup-hero { min-height: 330px; padding: 28px 24px; }
  .setup-art { display: none; }
  .fingerprint-grid { grid-template-columns: 1fr; }
  .auth-visual { min-height: 400px; padding: 28px 24px; }
  .auth-message h1 { font-size: 36px; }
  .auth-features { display: none; }
  .auth-form-panel { padding: 22px 14px; }
  .auth-form-card { padding: 25px 20px; }
  .marketplace-hero { min-height: 520px; padding: 50px 22px; }
  .marketplace-hero h1 { font-size: 40px; }
  .marketplace-search { height: auto; padding: 7px; flex-wrap: wrap; }
  .marketplace-search > span { width: 36px; }
  .marketplace-search input { height: 42px; }
  .marketplace-search button { width: 100%; }
  .environment-notice { margin: 14px; align-items: stretch; flex-direction: column; }
  .marketplace-section { padding: 36px 18px; }
  .category-row { grid-template-columns: 1fr 1fr; }
  .product-grid { grid-template-columns: 1fr; }
  .upi-layout { grid-template-columns: 1fr; }
  .result-grid { grid-template-columns: 1fr; }
  .bar-chart { gap: 6px; padding-left: 10px; padding-right: 10px; }
  .bar-value { display: none; }
  .app-footer { padding: 14px 18px; align-items: flex-start; flex-direction: column; }
  .error-card { padding: 30px 20px; }
  .error-card > div:last-child { width: 100%; flex-direction: column; }
}

.account-grid { display: grid; grid-template-columns: minmax(300px, .75fr) minmax(440px, 1.25fr); gap: 20px; }
.profile-card { overflow: hidden; }
.profile-hero { padding: 28px 22px; display: flex; align-items: center; gap: 14px; color: #fff; background: linear-gradient(135deg, #1d4ed8, #6d28d9); }
.profile-avatar { width: 58px; height: 58px; display: grid; place-items: center; flex: 0 0 auto; color: var(--indigo); background: #fff; border-radius: 17px; font-size: 24px; font-weight: 600; }
.profile-hero h2 { margin: 0; font-size: 20px; font-weight: 600; }
.profile-hero p { margin: 3px 0 0; color: #dbeafe; font-size: 11px; }
.profile-details { padding-top: 14px; }
.form-grid.one-column { grid-template-columns: 1fr; }
.form-alert-wrap { padding: 18px 20px 0; }
.form-alert-wrap .alert { margin: 0; }
@media (max-width: 850px) { .account-grid { grid-template-columns: 1fr; } }

/* Procuraz 1.1 role workspaces */
.workspace-hero { margin-bottom: 18px; padding: 26px 28px; display: flex; align-items: center; justify-content: space-between; gap: 24px; color: #fff; background: linear-gradient(120deg,#1e3a8a 0%,#4338ca 52%,#7c3aed 100%); border-radius: 20px; box-shadow: 0 18px 42px rgba(67,56,202,.16); }
.workspace-hero h1 { margin: 4px 0 7px; font-size: clamp(28px,3vw,40px); line-height: 1.08; font-weight: 600; letter-spacing: -.035em; }
.workspace-hero p { max-width: 760px; margin: 0; color: #dbeafe; font-size: 13px; }
.workspace-hero p strong { color: #fff; font-weight: 600; }
.workspace-hero .eyebrow { color: #bfdbfe; }
.workspace-hero .button-secondary { color: #fff; background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.28); }
.workspace-hero .button-primary { color: #3730a3; background: #fff; box-shadow: none; }
.section-block { margin-top: 22px; }
.section-heading { margin-bottom: 11px; display: flex; align-items: flex-end; justify-content: space-between; }
.section-heading h2 { margin: 2px 0 0; color: var(--ink); font-size: 18px; font-weight: 600; letter-spacing: -.02em; }
.quick-action-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 11px; }
.quick-action-card { min-height: 96px; padding: 16px; display: flex; align-items: center; gap: 13px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-sm); transition: transform .15s ease,border-color .15s ease,box-shadow .15s ease; }
.quick-action-card:hover { transform: translateY(-2px); border-color: #c7d2fe; box-shadow: 0 12px 26px rgba(79,70,229,.08); }
.quick-action-card > span:nth-child(2) { min-width: 0; flex: 1; }
.quick-action-card strong { display: block; color: var(--ink); font-size: 13px; font-weight: 600; }
.quick-action-card small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.quick-action-icon { width: 42px; height: 42px; display: grid; place-items: center; color: var(--indigo); background: linear-gradient(135deg,var(--surface-blue),var(--surface-purple)); border-radius: 12px; }
.admin-overview-grid { grid-template-columns: minmax(0,1.45fr) minmax(320px,.75fr); }
.command-card { overflow: hidden; }
.composition-grid { padding: 4px 18px 17px; display: grid; grid-template-columns: repeat(4,1fr); gap: 9px; }
.composition-grid > div { padding: 14px; display: flex; flex-direction: column; background: #fafbff; border: 1px solid var(--line-soft); border-radius: 11px; }
.composition-grid span { color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .04em; }
.composition-grid strong { margin-top: 5px; color: var(--ink); font-size: 24px; font-weight: 600; }
.composition-grid a { margin-top: 6px; color: var(--indigo); font-size: 10px; font-weight: 500; }
.workspace-distribution { margin: 0 18px 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.workspace-distribution > div { padding: 8px 10px; display: flex; align-items: center; gap: 9px; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 999px; font-size: 10px; }
.workspace-distribution strong { color: var(--ink); }
.compact-metrics { grid-template-columns: repeat(4,minmax(0,1fr)); }
.role-section { margin-top: 24px; }
.role-card-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 11px; }
.role-card { min-height: 188px; padding: 17px; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-sm); }
.role-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.role-card-head > strong { color: var(--muted); font-size: 9px; font-weight: 500; }
.role-card h3 { margin: 16px 0 5px; color: var(--ink); font-size: 14px; font-weight: 600; }
.role-card p { margin: 0; flex: 1; color: var(--muted); font-size: 10px; line-height: 1.55; }
.role-card-actions { margin-top: 14px; display: flex; gap: 12px; }
.role-card-actions a { color: var(--indigo); font-size: 10px; font-weight: 500; }
.workspace-pill { min-height: 22px; padding: 0 8px; display: inline-flex; align-items: center; border-radius: 999px; font-size: 8px; font-weight: 600; letter-spacing: .05em; }
.workspace-pill.platform { color: #1d4ed8; background: #eff6ff; border: 1px solid #bfdbfe; }
.workspace-pill.seller { color: #6d28d9; background: #f5f3ff; border: 1px solid #ddd6fe; }
.workspace-pill.buyer { color: #047857; background: #ecfdf5; border: 1px solid #a7f3d0; }
.narrow-main { max-width: 1080px; margin: 0 auto; }
.record-form h2 { margin: 0; color: var(--ink); font-size: 14px; font-weight: 600; }
.record-form .form-section-heading p { margin: 2px 0 0; color: var(--muted); font-size: 10px; }
.role-help-grid { padding: 0 20px 20px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; }
.role-help-grid > div { padding: 12px; background: #fafbff; border: 1px solid var(--line-soft); border-radius: 10px; }
.role-help-grid strong { color: var(--ink); font-size: 10px; font-weight: 600; }
.role-help-grid p { margin: 3px 0 0; color: var(--muted); font-size: 9px; line-height: 1.45; }
.access-role-picker { margin-bottom: 16px; padding: 16px 18px; }
.access-role-picker form { display: flex; align-items: center; justify-content: space-between; gap: 25px; }
.access-role-picker label { min-width: 280px; display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: 10px; }
.access-role-picker select { height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.access-role-picker form > div { max-width: 650px; display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; align-items: center; }
.access-role-picker form > div strong { color: var(--ink); font-size: 13px; font-weight: 600; }
.access-role-picker form > div small { grid-column: 2; color: var(--muted); font-size: 10px; }
.permission-table th:not(:first-child), .permission-table td:not(:first-child) { text-align: center; }
.permission-toggle { display: inline-flex; }
.permission-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.permission-toggle span { width: 34px; height: 20px; position: relative; display: block; background: #cbd5e1; border-radius: 999px; transition: .15s; }
.permission-toggle span::after { content: ''; width: 14px; height: 14px; position: absolute; top: 3px; left: 3px; background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(15,23,42,.2); transition: .15s; }
.permission-toggle input:checked + span { background: linear-gradient(90deg,var(--blue),var(--purple)); }
.permission-toggle input:checked + span::after { transform: translateX(14px); }
.permission-toggle.disabled { opacity: .3; cursor: not-allowed; }
.role-summary-strip { margin-bottom: 15px; padding: 10px; display: flex; gap: 8px; overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.role-summary-strip > div { min-width: 150px; padding: 9px 11px; display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #fafbff; border-radius: 9px; }
.role-summary-strip span { color: var(--muted); font-size: 9px; white-space: nowrap; }
.role-summary-strip strong { color: var(--indigo); font-size: 14px; font-weight: 600; }
.metric-icon.red { color: #dc2626; background: #fef2f2; }

@media (max-width: 1180px) {
  .quick-action-grid,.role-card-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .composition-grid { grid-template-columns: repeat(2,1fr); }
  .admin-overview-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .workspace-hero { padding: 22px; align-items: flex-start; flex-direction: column; }
  .quick-action-grid,.role-card-grid,.compact-metrics,.role-help-grid { grid-template-columns: 1fr; }
  .composition-grid { grid-template-columns: 1fr 1fr; }
  .access-role-picker form { align-items: stretch; flex-direction: column; }
  .access-role-picker label { min-width: 0; }
}

/* Procuraz 2.0 actor and commercial workspace refinements */
.platform-health-strip { margin: 0 18px 18px; padding: 12px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; background: linear-gradient(135deg,#f8fbff,#f8f5ff); border: 1px solid var(--line-soft); border-radius: 12px; }
.platform-health-strip > div { padding: 11px 13px; display: flex; align-items: center; justify-content: space-between; gap: 12px; background: rgba(255,255,255,.78); border: 1px solid rgba(226,232,240,.8); border-radius: 10px; }
.platform-health-strip span { color: var(--muted); font-size: 10px; }
.platform-health-strip strong { color: var(--ink); font-size: 14px; font-weight: 600; }
.workspace-pill.company { color: #1d4ed8; background: #eff6ff; border: 1px solid #bfdbfe; }
.workspace-pill.vendor { color: #047857; background: #ecfdf5; border: 1px solid #a7f3d0; }
.workspace-pill.seller-partner { color: #6d28d9; background: #f5f3ff; border: 1px solid #ddd6fe; }
.alert-info { color: #1e40af; background: #eff6ff; border-color: #bfdbfe; }
@media (max-width: 760px) { .platform-health-strip { grid-template-columns: 1fr; } }
