.settings-grid { display: grid; grid-template-columns: minmax(280px, .72fr) minmax(0, 1.45fr); gap: 16px; align-items: start; }
.settings-panel { padding-bottom: 18px; }
.settings-form { padding: 0 19px; }
.settings-form .field-help { margin: -2px 0 2px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.settings-form .retention-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.settings-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.danger-button { display: inline-flex; align-items: center; justify-content: center; padding: 9px 12px; border: 1px solid #e4b8b8; border-radius: 9px; background: #fff7f7; color: var(--danger); font-size: 11px; font-weight: 800; cursor: pointer; }
.danger-button:hover { background: var(--danger-bg); }
.retention-status { margin: 12px 19px 0; padding: 10px 11px; border-radius: 9px; background: #f7f9fc; color: var(--muted); font-size: 10px; line-height: 1.45; }
.audit-list { display: grid; }
.audit-row { display: grid; grid-template-columns: minmax(130px, .8fr) minmax(150px, 1fr) minmax(180px, 1.4fr); gap: 12px; padding: 12px 19px; border-top: 1px solid var(--border); align-items: center; }
.audit-row:first-child { border-top: 0; }
.audit-row strong { font-size: 11px; }
.audit-row span, .audit-row small { color: var(--muted); font-size: 10px; }
.audit-action { display: grid; gap: 2px; }
.audit-action strong { text-transform: capitalize; }
.audit-meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.settings-owner-note { padding: 0 19px 14px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.evidence-selection { margin: -2px 0 0; padding: 9px 10px; border: 1px solid #d9e2ef; border-radius: 9px; background: #f7f9fd; color: #44546a; font-size: 10px; line-height: 1.4; }
.evidence-selection.muted { color: var(--muted); background: #fafbfc; border-color: var(--border); }
.evidence-item-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.evidence-remove { border: 1px solid #e4b8b8; border-radius: 7px; padding: 5px 7px; background: #fff; color: var(--danger); font-size: 9px; font-weight: 800; cursor: pointer; }
.evidence-remove:hover { background: var(--danger-bg); }
.evidence-remove:disabled { opacity: .55; cursor: wait; }

/* Public homepage shown when there is no authenticated Sefixa session. */
body.public-mode { background: #ffffff; }
body.public-mode .app-shell { display: none !important; }
body.public-mode .auth-gate { display: none !important; }
.public-home { min-height: 100vh; background: #ffffff; color: #142033; }
.public-home.hidden { display: none !important; }
.public-home * { box-sizing: border-box; }
.public-nav { position: sticky; top: 0; z-index: 80; display: flex; align-items: center; gap: 28px; min-height: 72px; padding: 0 max(22px, calc((100vw - 1180px) / 2)); border-bottom: 1px solid #e8ecf1; background: rgba(255,255,255,.94); backdrop-filter: blur(14px); }
.public-brand { display: flex; align-items: center; gap: 10px; color: #142033; text-decoration: none; }
.public-brand .brand-mark { width: 34px; height: 34px; flex: 0 0 auto; }
.public-brand-copy { display: grid; gap: 1px; }
.public-brand-copy strong { font-size: 16px; letter-spacing: -.02em; }
.public-brand-copy small { color: #7a8796; font-size: 9px; }
.public-links { display: flex; align-items: center; gap: 22px; margin-left: auto; }
.public-links a { color: #536174; text-decoration: none; font-size: 12px; font-weight: 700; }
.public-links a:hover { color: #2456d8; }
.public-nav-actions { display: flex; gap: 8px; }
.public-button { border: 1px solid #d7dee7; border-radius: 9px; padding: 9px 13px; background: #fff; color: #243247; font: inherit; font-size: 11px; font-weight: 800; cursor: pointer; }
.public-button:hover { background: #f7f9fc; }
.public-button.primary { border-color: #2456d8; background: #2456d8; color: #fff; box-shadow: 0 6px 16px rgba(36,86,216,.15); }
.public-button.primary:hover { background: #193f9f; }
.public-main { overflow: hidden; }
.public-hero { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(420px, .92fr); gap: 64px; align-items: center; width: min(1180px, calc(100% - 44px)); min-height: 610px; margin: 0 auto; padding: 70px 0 76px; }
.public-kicker { margin: 0 0 13px; color: #2456d8; font-size: 10px; font-weight: 900; letter-spacing: .15em; }
.public-hero h1 { max-width: 720px; margin: 0; color: #111b2c; font-size: clamp(42px, 6vw, 68px); line-height: 1.02; letter-spacing: -.055em; }
.public-hero-copy > p:not(.public-kicker) { max-width: 660px; margin: 20px 0 0; color: #647184; font-size: 17px; line-height: 1.65; }
.public-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.public-hero-actions .public-button { min-height: 44px; padding: 0 17px; font-size: 12px; }
.public-proof { display: flex; flex-wrap: wrap; gap: 9px 18px; margin-top: 25px; color: #58677a; font-size: 10px; font-weight: 750; }
.public-proof span::before { content: '✓'; margin-right: 6px; color: #16744a; font-weight: 900; }
.public-demo { border: 1px solid #dfe5ed; border-radius: 18px; background: linear-gradient(160deg,#fbfcff,#f5f7fb); box-shadow: 0 28px 70px rgba(23,32,45,.10); overflow: hidden; }
.public-demo-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 17px; border-bottom: 1px solid #e4e9ef; background: #fff; }
.public-demo-head strong { font-size: 11px; }
.public-demo-head span { padding: 5px 7px; border-radius: 999px; background: #eef3ff; color: #3457a6; font-size: 8px; font-weight: 850; }
.public-demo-body { display: grid; gap: 11px; padding: 17px; }
.public-demo-label { color: #8591a1; font-size: 8px; font-weight: 900; letter-spacing: .1em; }
.public-demo-question { margin: 0; font-size: 14px; line-height: 1.45; font-weight: 800; }
.public-demo-evidence { padding: 11px 12px; border: 1px solid #d8e4f8; border-radius: 9px; background: #f7f9ff; }
.public-demo-evidence strong { display: block; margin-bottom: 4px; color: #3557a5; font-size: 9px; }
.public-demo-evidence p { margin: 0; color: #556579; font-size: 10px; line-height: 1.5; }
.public-demo-answer { padding: 13px; border: 1px solid #dce9e2; border-radius: 9px; background: #f8fcfa; }
.public-demo-answer strong { display: block; margin-bottom: 5px; color: #16744a; font-size: 9px; }
.public-demo-answer p { margin: 0; color: #344554; font-size: 11px; line-height: 1.55; }
.public-demo-footer { display: flex; justify-content: space-between; gap: 8px; color: #8a96a6; font-size: 8px; }
.public-band { border-top: 1px solid #edf0f4; border-bottom: 1px solid #edf0f4; background: #f8fafc; }
.public-band-inner { display: grid; grid-template-columns: repeat(3,1fr); width: min(1180px, calc(100% - 44px)); margin: 0 auto; }
.public-band article { padding: 25px 28px; border-right: 1px solid #e6eaf0; }
.public-band article:first-child { padding-left: 0; }
.public-band article:last-child { border-right: 0; }
.public-band strong { display: block; margin-bottom: 4px; font-size: 12px; }
.public-band p { margin: 0; color: #758294; font-size: 10px; line-height: 1.45; }
.public-section { width: min(1180px, calc(100% - 44px)); margin: 0 auto; padding: 82px 0; }
.public-section-head { max-width: 720px; margin-bottom: 28px; }
.public-section-head h2 { margin: 5px 0 9px; font-size: clamp(28px,4vw,42px); line-height: 1.12; letter-spacing: -.04em; }
.public-section-head p { margin: 0; color: #6b788a; font-size: 14px; line-height: 1.6; }
.public-card-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
.public-card { min-height: 180px; padding: 20px; border: 1px solid #e1e6ed; border-radius: 14px; background: #fff; }
.public-card-index { display: grid; place-items: center; width: 30px; height: 30px; margin-bottom: 28px; border-radius: 8px; background: #edf2ff; color: #2456d8; font-size: 10px; font-weight: 900; }
.public-card h3 { margin: 0 0 7px; font-size: 14px; }
.public-card p { margin: 0; color: #718093; font-size: 11px; line-height: 1.55; }
.public-blunt { width: min(1180px, calc(100% - 44px)); margin: 0 auto 20px; display: grid; grid-template-columns: .8fr 1.2fr; gap: 40px; align-items: center; padding: 38px 42px; border-radius: 18px; background: #111a27; color: #fff; }
.public-blunt .public-kicker { color: #8eabff; }
.public-blunt h2 { margin: 0; font-size: clamp(28px,4vw,40px); line-height: 1.1; letter-spacing: -.04em; }
.public-blunt-copy { color: #bac5d2; font-size: 13px; line-height: 1.65; }
.public-blunt-copy strong { color: #fff; }
.public-security-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.public-security-grid article { padding: 20px; border: 1px solid #e1e7ee; border-radius: 13px; background: #fafbfc; }
.public-security-grid strong { display: block; margin-bottom: 5px; font-size: 12px; }
.public-security-grid p { margin: 0; color: #748195; font-size: 10px; line-height: 1.5; }
.public-pricing { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 28px 30px; border: 1px solid #dce4ef; border-radius: 16px; background: linear-gradient(135deg,#f7f9ff,#fff); }
.public-pricing h3 { margin: 0 0 5px; font-size: 20px; letter-spacing: -.025em; }
.public-pricing p { margin: 0; color: #6f7d90; font-size: 11px; line-height: 1.5; }
.public-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; width: min(1180px, calc(100% - 44px)); margin: 0 auto; padding: 34px 0 54px; border-top: 1px solid #e8ecf1; color: #8390a0; font-size: 10px; }
.public-footer strong { color: #334154; }
.public-home::after { content: 'v0.4.0'; position: fixed; right: 14px; bottom: 12px; z-index: 90; padding: 4px 7px; border: 1px solid rgba(105,117,132,.22); border-radius: 6px; background: rgba(255,255,255,.9); color: #7a8796; font-size: 10px; font-weight: 750; line-height: 1; letter-spacing: .04em; box-shadow: 0 2px 8px rgba(20,32,48,.06); pointer-events: none; }
.auth-card { position: relative; }
.auth-home-back { position: absolute; top: 12px; right: 14px; border: 0; background: transparent; color: #6d7988; font-size: 10px; font-weight: 750; cursor: pointer; }
.auth-home-back:hover { color: #2456d8; }

@media (max-width: 900px) { .settings-grid { grid-template-columns: 1fr; } .public-links { display: none; } .public-hero { grid-template-columns: 1fr; min-height: 0; padding-top: 54px; } .public-demo { max-width: 680px; } .public-card-grid { grid-template-columns: 1fr; } .public-blunt { grid-template-columns: 1fr; } }
@media (max-width: 620px) { .settings-form .retention-row, .audit-row { grid-template-columns: 1fr; } .audit-row { gap: 4px; } .evidence-item-actions { align-items: flex-end; flex-direction: column; } .public-nav { min-height: 64px; padding: 0 14px; gap: 10px; } .public-brand-copy small { display: none; } .public-nav-actions { margin-left: auto; } .public-nav-actions .public-button { padding: 8px 10px; font-size: 10px; } .public-hero { width: min(100% - 28px,1180px); gap: 34px; padding: 46px 0 56px; } .public-hero h1 { font-size: clamp(40px,13vw,54px); } .public-hero-copy > p:not(.public-kicker) { font-size: 15px; } .public-band-inner { grid-template-columns: 1fr; width: min(100% - 28px,1180px); } .public-band article, .public-band article:first-child { padding: 18px 0; border-right: 0; border-bottom: 1px solid #e6eaf0; } .public-band article:last-child { border-bottom: 0; } .public-section { width: min(100% - 28px,1180px); padding: 60px 0; } .public-blunt { width: min(100% - 28px,1180px); padding: 28px 22px; } .public-security-grid { grid-template-columns: 1fr; } .public-pricing { align-items: flex-start; flex-direction: column; } .public-footer { width: min(100% - 28px,1180px); align-items: flex-start; flex-direction: column; padding-bottom: 78px; } .public-home::after { bottom: 12px; } }


/* Cohesive settings surfaces. Dynamic owner panels use these shared rules. */
.settings-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 18px; }
.settings-grid > .settings-panel { grid-column: span 6; min-width: 0; overflow: hidden; }
.settings-grid > .billing-panel,
.settings-grid > .team-panel,
.settings-grid > .diagnostics-panel,
.settings-grid > #pilot-metrics-panel { grid-column: 1 / -1; }
.settings-panel { padding-bottom: 20px; }
.settings-panel > .panel-heading { padding: 20px 20px 16px; border-bottom: 1px solid var(--border); }
.settings-panel > .panel-heading h2 { font-size: 16px; }
.settings-panel > .panel-heading p { margin-top: 4px; font-size: 11px; line-height: 1.5; }
.settings-form { padding: 18px 20px 0; }
.settings-owner-note { margin: 0; padding: 16px 20px; }
.settings-actions { padding: 0 20px; }
.settings-form .settings-actions { padding: 0; }
.retention-status { margin: 16px 20px 0; }
#billing-content,
#workspace-diagnostics-content { padding: 18px 20px 0; }
.billing-plan-row { margin-bottom: 14px !important; }
.team-invite-form { margin: 0 20px 18px !important; padding-top: 18px; }
.team-members { margin: 0 20px; }
.diagnostics-summary { margin-bottom: 16px !important; }
.diagnostics-actions button { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 8px 12px; border: 1px solid var(--border-strong); border-radius: 9px; background: #fff; color: #334155; font: inherit; font-size: 11px; font-weight: 800; cursor: pointer; }
.diagnostics-actions button:hover { border-color: #aeb9c7; background: #f7f9fc; }
#pilot-metrics-panel .pilot-metrics-body { margin: 18px 20px 0; padding: 0; background: transparent; }
.pilot-metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pilot-metric { display: grid; gap: 5px; min-height: 78px; padding: 13px 14px; border: 1px solid var(--border); border-radius: 10px; background: #fbfcfe; }
.pilot-metric span { color: var(--muted); font-size: 9px; font-weight: 800; line-height: 1.35; text-transform: uppercase; letter-spacing: .04em; }
.pilot-metric strong { align-self: end; font-size: 16px; line-height: 1.2; }
.pilot-metrics-note { margin: 12px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.pilot-feedback-form { margin: 18px 20px 0; padding-top: 18px; border-top: 1px solid var(--border); }
.pilot-feedback-form h3 { margin: 0 0 5px; font-size: 14px; }
.pilot-feedback-form > p { margin: 0 0 14px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.pilot-feedback-grid { display: grid; grid-template-columns: repeat(3, minmax(160px, 1fr)); gap: 12px; }
.pilot-feedback-actions { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
#pilot-feedback-status { color: var(--muted); font-size: 10px; }
.public-footer > div { display: grid; gap: 3px; }
.public-footer > div span { color: #667487; }
.public-footer > div small { color: #98a2af; }
.public-footer-nav { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px 18px; max-width: 650px; }
.public-footer-nav a { color: #667487; text-decoration: none; font-size: 10px; font-weight: 750; }
.public-footer-nav a:hover { color: #2456d8; }

@media (max-width: 980px) {
  .settings-grid > .settings-panel { grid-column: 1 / -1; }
  .pilot-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pilot-feedback-grid { grid-template-columns: repeat(2, minmax(160px, 1fr)); }
}
@media (max-width: 620px) {
  .pilot-metric-grid, .pilot-feedback-grid { grid-template-columns: 1fr; }
  .pilot-feedback-actions { align-items: stretch; flex-direction: column; }
  .pilot-feedback-actions .primary-button { width: 100%; }
  .public-footer-nav { justify-content: flex-start; }
}
