/* Super Admin Portal shell + pages — ported from the standalone mockup (Public Sans / indigo / slate). */

.pa-scope { font-family: 'Public Sans', system-ui, sans-serif; color: #0f1729; background: #f7f8fa; min-height: 100vh; }
.pa-scope *, .pa-scope *::before, .pa-scope *::after { box-sizing: border-box; }

/* Top nav */
.pa-header { position: sticky; top: 0; z-index: 40; background: #fff; border-bottom: 1px solid #e7e9ee; }
.pa-header-in { max-width: 1440px; margin: 0 auto; padding: 0 24px; height: 64px; display: flex; align-items: center; gap: 24px; }
.pa-brand { display: flex; align-items: center; gap: 11px; flex-shrink: 0; }
.pa-logo { width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(135deg,#4f46e5,#6366f1); display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: 17px; box-shadow: 0 2px 8px rgba(79,70,229,.35); }
.pa-brand-name { font-weight: 800; font-size: 16px; letter-spacing: -.2px; line-height: 1; }
.pa-brand-sub { font-size: 10.5px; color: #8a93a2; font-weight: 600; letter-spacing: .4px; text-transform: uppercase; }

.pa-nav { display: flex; align-items: center; gap: 2px; flex: 1; overflow-x: auto; }
.pa-tab { height: 34px; padding: 0 14px; border: none; background: transparent; border-radius: 8px; color: #64748b; font-weight: 600; font-size: 13.5px; font-family: inherit; cursor: pointer; white-space: nowrap; }
.pa-tab:hover { background: #f1f5f9; color: #334155; }
.pa-tab.active { background: #eef0ff; color: #4338ca; }

.pa-right { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.pa-search { position: relative; display: flex; align-items: center; }
.pa-search span { position: absolute; left: 11px; color: #9aa2b1; font-size: 14px; }
.pa-search input { width: 190px; height: 38px; padding: 0 12px 0 30px; border: 1px solid #e3e6ec; border-radius: 9px; background: #f7f8fa; font-size: 13.5px; outline: none; font-family: inherit; }
.pa-sep { width: 1px; height: 26px; background: #e7e9ee; }
.pa-user { display: flex; align-items: center; gap: 9px; background: none; border: none; cursor: pointer; font-family: inherit; padding: 0; }
.pa-avatar { width: 34px; height: 34px; border-radius: 50%; background: #1e293b; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex-shrink: 0; }
.pa-user-name { font-size: 13px; font-weight: 700; text-align: left; line-height: 1.2; color: #0f1729; }
.pa-user-role { font-size: 11px; color: #8a93a2; text-align: left; }
.pa-signout { background: none; border: 1px solid #e3e6ec; border-radius: 8px; height: 34px; padding: 0 12px; color: #475569; font-weight: 600; font-size: 12.5px; font-family: inherit; cursor: pointer; }
.pa-signout:hover { background: #f1f5f9; }

/* Main + page head */
.pa-main { max-width: 1440px; margin: 0 auto; padding: 28px 24px 64px; }
.pa-page-head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-bottom: 22px; }
.pa-h1 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -.5px; color: #0f1729; }
.pa-sub { margin: 6px 0 0; color: #64748b; font-size: 14px; }
.pa-btn-primary { height: 42px; padding: 0 18px; border: none; border-radius: 10px; background: #4f46e5; color: #fff; font-weight: 700; font-size: 14px; cursor: pointer; box-shadow: 0 2px 10px rgba(79,70,229,.3); font-family: inherit; }
.pa-btn-primary:hover { filter: brightness(1.06); }

/* Cards + KPIs */
.pa-card { background: #fff; border: 1px solid #e7e9ee; border-radius: 14px; padding: 22px; }
.pa-kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 24px; }
.pa-kpi { background: #fff; border: 1px solid #e7e9ee; border-radius: 14px; padding: 18px 20px; }
.pa-kpi-top { display: flex; align-items: center; justify-content: space-between; }
.pa-kpi-label { font-size: 12.5px; color: #64748b; font-weight: 600; }
.pa-kpi-value { font-size: 30px; font-weight: 800; letter-spacing: -1px; margin-top: 10px; }
.pa-kpi-sub { font-size: 12px; color: #94a3b8; margin-top: 3px; }
.pa-chip { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }

.pa-ov-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; margin-bottom: 16px; }
@media (max-width: 980px) { .pa-ov-grid { grid-template-columns: 1fr; } }

.pa-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.pa-card-title { margin: 0; font-size: 16px; font-weight: 700; }
.pa-pill { font-size: 12px; color: #64748b; background: #f1f5f9; padding: 4px 10px; border-radius: 20px; font-weight: 600; }

/* Revenue bars */
.pa-bars { display: flex; align-items: flex-end; gap: 14px; height: 190px; padding-top: 8px; }
.pa-bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.pa-bar-amt { font-size: 11.5px; font-weight: 700; color: #4f46e5; }
.pa-bar { width: 100%; max-width: 46px; background: linear-gradient(180deg,#6366f1,#4f46e5); border-radius: 8px 8px 4px 4px; }
.pa-bar-month { font-size: 12px; color: #94a3b8; font-weight: 600; }

/* Company mix + alerts */
.pa-mix-row { display: flex; justify-content: space-between; margin-bottom: 7px; }
.pa-mix-label { font-size: 13.5px; font-weight: 600; }
.pa-mix-count { font-size: 13.5px; font-weight: 700; color: #0f1729; }
.pa-track { height: 9px; background: #eef0f4; border-radius: 6px; overflow: hidden; }
.pa-track > div { height: 100%; border-radius: 6px; }
.pa-hr { height: 1px; background: #eef0f4; margin: 22px 0; }
.pa-alert { display: flex; gap: 11px; align-items: flex-start; }
.pa-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; }
.pa-alert-title { font-size: 13px; font-weight: 600; line-height: 1.3; }
.pa-alert-meta { font-size: 12px; color: #94a3b8; }

/* Activity */
.pa-act { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid #f1f3f6; }
.pa-act-ic { width: 36px; height: 36px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.pa-act-text { font-size: 13.5px; font-weight: 600; }
.pa-act-sub { font-size: 12px; color: #94a3b8; }
.pa-act-time { font-size: 12px; color: #b0b7c3; flex-shrink: 0; }

/* SBW-3292 — Platform Overview: hero banner + elevated cards (homeowner-dashboard layout, SuperAdmin indigo palette) */
.pa-hero { position: relative; overflow: hidden; border-radius: 18px; padding: 26px 30px; margin-bottom: 22px;
  background: linear-gradient(120deg, #4f46e5 0%, #4338ca 48%, #6366f1 100%); color: #fff;
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.pa-hero::after { content: ""; position: absolute; right: -70px; top: -70px; width: 260px; height: 260px;
  background: radial-gradient(circle, rgba(255,255,255,.18), transparent 70%); pointer-events: none; }
.pa-hero-l { position: relative; z-index: 1; }
.pa-hero-title { font-size: 26px; font-weight: 800; letter-spacing: -.02em; margin: 0; }
.pa-hero-sub { margin: 6px 0 0; font-size: 14px; color: rgba(255,255,255,.85); }
.pa-hero-r { position: relative; z-index: 1; display: flex; align-items: center; gap: 26px; }
.pa-hero-stat { text-align: right; }
.pa-hero-stat b { display: block; font-size: 22px; font-weight: 800; line-height: 1.1; }
.pa-hero-stat span { font-size: 12px; color: rgba(255,255,255,.82); }
.pa-hero-cta { display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 11px;
  background: #fff; color: #4338ca; font-weight: 700; font-size: 14px; text-decoration: none; white-space: nowrap;
  border: none; cursor: pointer; box-shadow: 0 6px 18px rgba(0,0,0,.16); transition: transform .15s, box-shadow .15s; }
.pa-hero-cta:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(0,0,0,.22); }
.pa-kpi { transition: transform .18s ease, box-shadow .18s ease; }
.pa-kpi:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(15,23,41,.10); }
.pa-kpi-ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-size: 17px;
  background: #eef0ff; color: #4338ca; }
.pa-card-lift { transition: transform .18s ease, box-shadow .18s ease; }
.pa-card-lift:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(15,23,41,.08); }
.pa-empty-sm { color: #94a3b8; font-size: 13px; padding: 8px 0; }
@media (max-width: 760px) { .pa-hero { flex-direction: column; align-items: flex-start; } .pa-hero-r { width: 100%; justify-content: space-between; } }

.pa-placeholder { color: #64748b; font-size: 14px; }

/* Companies management (SBW-3264) */

/* Table */
.pa-table-wrap { overflow-x: auto; }
.pa-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.pa-table thead th { text-align: left; padding: 10px 14px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #64748b; border-bottom: 1px solid #e7e9ee; white-space: nowrap; }
.pa-table tbody td { padding: 13px 14px; border-bottom: 1px solid #f1f3f7; color: #334155; vertical-align: middle; }
.pa-table tbody tr:last-child td { border-bottom: none; }
.pa-table tbody tr:hover { background: #fafbfc; }
.pa-td-strong { font-weight: 700; color: #0f172a; }
/* Left-align so buttons sit directly under the ACTIONS header. The header rule
   `.pa-table thead th` outranks a bare `.pa-table-actions`, so qualify both. */
.pa-table td.pa-table-actions,
.pa-table thead th.pa-table-actions { text-align: left; white-space: nowrap; }

/* Status badges */
.pa-badge { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; line-height: 1.5; white-space: nowrap; }
.pa-badge-green { background: #ecfdf5; color: #047857; }
.pa-badge-red { background: #fef2f2; color: #dc2626; }
.pa-badge-amber { background: #fff7ed; color: #c2410c; }
.pa-badge-indigo { background: #eef0ff; color: #4338ca; }
.pa-badge-slate { background: #f1f5f9; color: #475569; }

/* Row / dialog buttons */
.pa-btn-danger, .pa-btn-secondary, .pa-btn-ghost { height: 34px; padding: 0 14px; border-radius: 8px; font-weight: 700; font-size: 13px; cursor: pointer; font-family: inherit; }
.pa-btn-danger { border: none; background: #dc2626; color: #fff; }
.pa-btn-danger:hover:not(:disabled) { filter: brightness(1.06); }
.pa-btn-secondary { border: none; background: #4f46e5; color: #fff; }
.pa-btn-secondary:hover:not(:disabled) { filter: brightness(1.06); }
.pa-btn-ghost { border: 1px solid #d5d9e2; background: #fff; color: #334155; }
.pa-btn-ghost:hover:not(:disabled) { background: #f6f7f9; }
.pa-btn-danger:disabled, .pa-btn-secondary:disabled, .pa-btn-ghost:disabled { opacity: .6; cursor: default; }

.pa-inline-error { display: flex; align-items: center; gap: 14px; color: #b91c1c; font-size: 14px; }

/* Confirm modal */
.pa-modal-backdrop { position: fixed; inset: 0; background: rgba(15,23,42,.45); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 1000; }
.pa-modal { background: #fff; border-radius: 16px; padding: 24px; width: 100%; max-width: 420px; box-shadow: 0 20px 60px rgba(15,23,42,.25); }
.pa-modal-title { margin: 0 0 10px; font-size: 18px; font-weight: 800; color: #0f172a; }
.pa-modal-body { margin: 0 0 8px; font-size: 14px; color: #475569; line-height: 1.5; }
.pa-modal-error { margin: 8px 0 0; font-size: 13px; color: #dc2626; font-weight: 600; }
.pa-modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.pa-modal-actions button { height: 40px; padding: 0 18px; }

/* Row actions: space View next to Suspend/Reactivate */
.pa-table-actions button + button { margin-left: 8px; }
.pa-link { color: #4338ca; text-decoration: none; font-weight: 700; cursor: pointer; }
.pa-link:hover { text-decoration: underline; }

/* Company detail (view a company + scoped context) */
.pa-back-link { display: inline-block; margin-bottom: 6px; font-size: 13px; font-weight: 600; color: #64748b; text-decoration: none; cursor: pointer; }
.pa-back-link:hover { color: #4338ca; }
.pa-detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 18px; margin-top: 18px; }
.pa-detail-label { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #94a3b8; margin-bottom: 4px; }
.pa-detail-value { font-size: 14.5px; font-weight: 600; color: #0f172a; word-break: break-word; }
.pa-tabs { display: flex; gap: 4px; }

/* New Partner wizard (SBW-3271) */
.pa-steps { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.pa-step { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 10px; background: #fff; border: 1px solid #e7e9ee; font-size: 13px; font-weight: 600; color: #64748b; }
.pa-step.active { border-color: #4f46e5; color: #4338ca; background: #eef0ff; }
.pa-step.done { color: #047857; }
.pa-step-dot { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 999px; background: #f1f5f9; font-size: 12px; font-weight: 800; }
.pa-step.active .pa-step-dot { background: #4f46e5; color: #fff; }
.pa-step.done .pa-step-dot { background: #10b981; color: #fff; }

.pa-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 14px; }
.pa-field { display: flex; flex-direction: column; gap: 6px; }
.pa-label { font-size: 12.5px; font-weight: 700; color: #475569; }
.pa-input { height: 40px; padding: 0 12px; border: 1px solid #d5d9e2; border-radius: 8px; font-size: 14px; font-family: inherit; background: #fff; }
.pa-input:focus { outline: none; border-color: #4f46e5; box-shadow: 0 0 0 3px rgba(79,70,229,.15); }
.pa-hint { font-size: 12px; color: #94a3b8; }

.pa-chip-zip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: #f1f5f9; font-size: 13px; font-weight: 700; color: #334155; }
.pa-chip-x { border: none; background: transparent; color: #94a3b8; font-size: 16px; line-height: 1; cursor: pointer; padding: 0; }
.pa-chip-x:hover { color: #dc2626; }

.pa-checklist { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.pa-check-row { display: flex; align-items: center; gap: 10px; font-size: 14px; color: #334155; }

.pa-wizard-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

/* Platform fees (SBW-3277) — form field used in the set-fee modal */
.pa-field { margin: 4px 0; }
.pa-fee-input { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.pa-input { height: 40px; padding: 0 12px; border: 1px solid #e3e6ec; border-radius: 9px; background: #fff; font-size: 14px; font-family: inherit; color: #0f1729; outline: none; width: 140px; }
.pa-input:focus { border-color: #4f46e5; }
.pa-fee-suffix { font-size: 14px; color: #64748b; font-weight: 600; }

/* Monospace identifier chip (e.g. PaymentIntent id in the fee ledger) */
.pa-mono { display: inline-block; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; color: #475569; background: #f1f5f9; border: 1px solid #e7e9ee; padding: 2px 8px; border-radius: 6px; white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
