/* Inti Web - design system
 * Ported from the approved design (/tmp/inti_design/inti-web-design.html):
 * a neutral paper/ink base, a single restrained slate-blue accent, and a
 * green/amber/red status vocabulary kept visually separate from that
 * accent. One typeface (Public Sans) at varying weights throughout.
 *
 * Dark-mode tokens are pulled over for future-proofing per the design's
 * own :root[data-theme] + prefers-color-scheme setup, even though the app
 * has no theme toggle yet - light values are what actually renders today
 * unless the OS is in dark mode, matching the design source exactly.
 */

:root {
    --ink: oklch(19% 0.012 250);
    --ink-soft: oklch(43% 0.012 250);
    --ink-faint: oklch(60% 0.01 250);
    --paper: oklch(97.5% 0.004 250);
    --surface: oklch(100% 0 0);
    --border: oklch(89% 0.006 250);
    --border-soft: oklch(93% 0.005 250);
    --accent: oklch(40% 0.09 235);
    --accent-dark: oklch(32% 0.09 235);
    --accent-soft: oklch(94% 0.02 235);
    --verified: oklch(43% 0.11 150);
    --verified-soft: oklch(94% 0.035 150);
    --pending: oklch(52% 0.13 75);
    --pending-soft: oklch(95% 0.05 85);
    --danger: oklch(48% 0.17 25);
    --danger-soft: oklch(95% 0.03 25);
    --radius-sm: 7px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --shadow-card: 0 24px 50px -30px oklch(20% 0.02 265 / 0.35);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --ink: oklch(94% 0.004 250);
        --ink-soft: oklch(78% 0.008 250);
        --ink-faint: oklch(63% 0.01 250);
        --paper: oklch(16% 0.008 250);
        --surface: oklch(21% 0.01 250);
        --border: oklch(29% 0.01 250);
        --border-soft: oklch(26% 0.01 250);
        --accent: oklch(70% 0.09 235);
        --accent-dark: oklch(78% 0.08 235);
        --accent-soft: oklch(28% 0.03 235);
    }
}

:root[data-theme="dark"] {
    --ink: oklch(94% 0.004 250);
    --ink-soft: oklch(78% 0.008 250);
    --ink-faint: oklch(63% 0.01 250);
    --paper: oklch(16% 0.008 250);
    --surface: oklch(21% 0.01 250);
    --border: oklch(29% 0.01 250);
    --border-soft: oklch(26% 0.01 250);
    --accent: oklch(70% 0.09 235);
    --accent-dark: oklch(78% 0.08 235);
    --accent-soft: oklch(28% 0.03 235);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
    margin: 0;
    font-family: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--ink);
    background: var(--paper);
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1, h2, h3 {
    font-family: "Public Sans", -apple-system, sans-serif;
    font-weight: 800;
    margin: 0 0 0.5em;
    letter-spacing: -0.015em;
}

h1 { font-size: 1.9rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; }

a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

p { line-height: 1.6; }

.eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-dark);
}

/* --- top nav (public / customer pages) --- */
.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding: 18px 40px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.site-header .brand {
    display: flex;
    align-items: center;
    gap: 9px;
    font-family: "Public Sans", sans-serif;
    font-size: 20px;
    font-weight: 800;
    color: var(--ink);
    text-decoration: none;
}

.site-header .brand svg { flex-shrink: 0; }

.site-header nav {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.site-header nav a {
    font-size: 14.5px;
    font-weight: 500;
    color: var(--ink-soft);
    text-decoration: none;
}

.site-header nav a:hover { color: var(--ink); }
.site-header nav a.current { color: var(--ink); font-weight: 700; }
.site-header nav a.admin-link { font-size: 12.5px; color: var(--ink-faint); }

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}

/* --- page shell --- */
.container {
    max-width: 1120px;
    width: 100%;
    margin: 0 auto;
    padding: 2.75rem 2.5rem 4rem;
    flex: 1;
}

.container-narrow { max-width: 720px; }
.container-wide { max-width: 1120px; }

.site-footer {
    text-align: center;
    color: var(--ink-faint);
    font-size: 13px;
    padding: 2rem 0;
    border-top: 1px solid var(--border-soft);
}

/* --- cards --- */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
}

.card-flush { padding: 0; overflow: hidden; }
.card-lift { box-shadow: var(--shadow-card); }

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.1rem;
}

.card-link {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    color: inherit;
    text-decoration: none;
}
.card-link:hover { border-color: var(--ink-faint); text-decoration: none; }
.card-link h3 { color: var(--ink); }

.card-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.25rem;
}

.stack { display: flex; flex-direction: column; gap: 0.9rem; }

/* --- buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: "Public Sans", sans-serif;
    font-weight: 600;
    font-size: 14.5px;
    padding: 11px 20px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
    background: none;
}
.btn:hover { text-decoration: none; }

.btn-primary { background: var(--ink); color: var(--surface); }
.btn-primary:hover { opacity: 0.9; }

.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-dark); }

.btn-outline { background: transparent; border-color: var(--border); color: var(--ink); }
.btn-outline:hover { border-color: var(--ink-faint); }

.btn-verified { background: var(--verified); color: #fff; }
.btn-verified:hover { opacity: 0.9; }

.btn-danger, .btn-danger-outline { }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { opacity: 0.9; }
.btn-danger-outline { background: transparent; border-color: var(--danger); color: var(--danger); }
.btn-danger-outline:hover { background: var(--danger-soft); }

.btn-secondary { background: transparent; border-color: var(--border); color: var(--ink); }
.btn-secondary:hover { border-color: var(--ink-faint); }

.btn-sm, .btn-small { padding: 7px 14px; font-size: 13px; border-radius: var(--radius-sm); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

/* --- badges --- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px 4px 8px;
    border-radius: 999px;
    white-space: nowrap;
}
.badge-neutral { background: var(--border-soft); color: var(--ink-soft); }
.badge-verified,
.badge-approved,
.badge-active { background: var(--verified-soft); color: var(--verified); }
.badge-pending { background: var(--pending-soft); color: var(--pending); }
.badge-rejected,
.badge-inactive { background: var(--danger-soft); color: var(--danger); }

/* --- forms --- */
.form-group { margin-bottom: 1.1rem; }
.field-label,
.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 6px;
}
.field-hint { font-size: 12.5px; color: var(--ink-faint); margin-top: 5px; }

input[type=text], input[type=email], input[type=password], input[type=tel],
input[type=datetime-local], input[type=file], select, textarea,
.form-group input, .form-group select {
    width: 100%;
    font-family: "Public Sans", sans-serif;
    font-size: 15px;
    padding: 11px 13px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--ink);
}
input:disabled, select:disabled, textarea:disabled { background: var(--border-soft); color: var(--ink-faint); }
textarea { resize: vertical; font-family: inherit; }
input[type=file] { padding: 9px; }

.form-error {
    color: var(--danger);
    font-size: 12.5px;
    margin-top: 5px;
}

.section-num {
    width: 26px;
    height: 26px;
    border-radius: 999px;
    background: var(--ink);
    color: #fff;
    font-size: 12.5px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.form-section { display: flex; gap: 14px; }
.form-section + .form-section { margin-top: 26px; padding-top: 26px; border-top: 1px solid var(--border-soft); }
.form-section-body { flex: 1; min-width: 0; }
.form-section h2 { font-size: 15.5px; margin-bottom: 16px; }

.dropzone {
    border: 1.5px dashed var(--border);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    background: oklch(98% 0.003 250);
}
.dropzone svg { flex-shrink: 0; color: var(--ink-faint); }
.dropzone .dz-title { font-size: 14px; font-weight: 600; }

.doc-tile {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: inherit;
}
.doc-tile:hover { border-color: var(--ink-faint); text-decoration: none; background: var(--border-soft); }
.doc-tile svg { flex-shrink: 0; color: var(--accent-dark); }
.doc-tile .doc-title { font-size: 14px; font-weight: 600; color: var(--ink); }
.doc-tile .doc-meta { font-size: 12px; color: var(--ink-faint); }

/* --- alerts --- */
.alert {
    padding: 0.85rem 1.1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.1rem;
    font-size: 0.9rem;
    border: 1px solid transparent;
}
.alert-error { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in oklch, var(--danger) 25%, transparent); }
.alert-success { background: var(--verified-soft); color: var(--verified); border-color: color-mix(in oklch, var(--verified) 25%, transparent); }

/* --- tables --- */
table { width: 100%; border-collapse: collapse; }
th {
    text-align: left;
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ink-faint);
    font-weight: 700;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}
td {
    padding: 15px 16px;
    border-bottom: 1px solid var(--border-soft);
    font-size: 14.5px;
    vertical-align: middle;
}
tr:last-child td { border-bottom: none; }
.card-flush table th:first-child, .card-flush table td:first-child { padding-left: 24px; }
.card-flush table th:last-child, .card-flush table td:last-child { padding-right: 24px; }

.actions { text-align: right; white-space: nowrap; }
.actions form { display: inline; }
.actions > a, .actions > form, .actions > button { margin-left: 6px; }
.actions > a:first-child, .actions > form:first-child { margin-left: 0; }

.text-muted { color: var(--ink-faint); }

/* --- status chips / tab filters --- */
.tabs, .chips { display: flex; gap: 10px; flex-wrap: wrap; margin: 1rem 0; }
.tabs a, .chip {
    padding: 8px 15px;
    border-radius: 999px;
    border: 1px solid var(--border);
    font-size: 13px;
    font-weight: 500;
    color: var(--ink-soft);
    background: var(--surface);
    text-decoration: none;
    white-space: nowrap;
}
.tabs a:hover { text-decoration: none; border-color: var(--ink-faint); }
.tabs a.active, .chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }

.tabbar { display: flex; background: var(--border-soft); border-radius: 9px; padding: 4px; }
.tabbar .tab {
    flex: 1;
    text-align: center;
    padding: 9px;
    border-radius: 6px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ink-faint);
    cursor: pointer;
    text-decoration: none;
}
.tabbar .tab.active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px oklch(30% 0.02 265 / 0.12); }

/* --- stat tiles (dashboards) --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 0.85rem;
    margin: 0 0 1.75rem;
}
.stat-tile {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1rem 1.1rem;
}
.stat-tile .stat-value { font-family: "Public Sans", sans-serif; font-size: 1.6rem; font-weight: 800; }
.stat-tile .stat-label { color: var(--ink-faint); font-size: 0.78rem; margin-top: 2px; }
.stat-tile .stat-value.stat-verified { color: var(--verified); }
.stat-tile .stat-value.stat-pending { color: var(--pending); }
.stat-tile .stat-value.stat-rejected { color: var(--danger); }

/* --- detail rows (dl) --- */
.detail-row { display: flex; padding: 12px 0; border-bottom: 1px solid var(--border-soft); font-size: 14.5px; gap: 12px; }
.detail-row:last-child { border-bottom: none; }
.detail-row dt {
    width: 155px;
    flex-shrink: 0;
    font-weight: 600;
    color: var(--ink-faint);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.detail-row dd { margin: 0; color: var(--ink); line-height: 1.55; }

/* --- message cards (contact inbox) --- */
.msg-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px 22px;
}
.msg-card .msg-meta { margin: 0 0 6px; font-size: 12.5px; color: var(--ink-faint); }
.msg-card h3 { font-size: 15.5px; margin-bottom: 6px; }
.msg-card p { margin: 0; font-size: 14px; color: var(--ink-soft); }

/* --- media placeholders (video tour) --- */
.media-placeholder {
    aspect-ratio: 16 / 7;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--accent-soft), var(--border-soft));
    display: flex;
    align-items: center;
    justify-content: center;
}
.media-placeholder .caption {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--accent-dark);
    font-size: 13px;
    font-weight: 600;
}

/* --- two-column layouts --- */
.two-col {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 40px;
    align-items: start;
}
.two-col .side { position: sticky; top: 24px; }
@media (max-width: 860px) {
    .two-col { grid-template-columns: 1fr; }
    .two-col .side { position: static; }
}

/* --- auth split panel --- */
.auth-shell {
    min-height: calc(100vh - 1px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 20px;
}
.auth-panel {
    width: 100%;
    max-width: 920px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 30px 70px -35px oklch(30% 0.03 265 / 0.3);
    border: 1px solid var(--border);
}
.auth-pitch {
    background: var(--ink);
    color: #fff;
    padding: 48px 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 24px;
}
.auth-pitch .brand { color: #fff; }
.auth-pitch h2 { color: #fff; font-size: 24px; line-height: 1.35; }
.auth-pitch p { color: oklch(80% 0.006 250); font-size: 14px; }
.auth-pitch .fine { color: oklch(58% 0.006 250); font-size: 12px; }
.auth-form {
    background: var(--surface);
    padding: 48px 40px;
}
@media (max-width: 760px) {
    .auth-panel { grid-template-columns: 1fr; }
    .auth-pitch { padding: 32px; }
    .auth-form { padding: 32px; }
}

/* --- admin sidebar layout --- */
.admin-shell { display: flex; min-height: 100vh; align-items: stretch; }
.sidebar {
    width: 230px;
    flex-shrink: 0;
    background: var(--ink);
    padding: 26px 18px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.side-brand { display: flex; align-items: center; gap: 9px; padding: 6px 10px 26px; }
.side-brand span { font-family: "Public Sans", sans-serif; font-size: 17px; font-weight: 800; color: #fff; }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; }
.sidebar a {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: oklch(78% 0.008 250);
    text-decoration: none;
}
.sidebar a:hover { color: #fff; text-decoration: none; }
.sidebar a.active { background: oklch(31% 0.014 250); color: #fff; }
.sidebar .sidebar-spacer { flex: 1; }
.sidebar .sidebar-account {
    padding: 12px;
    border-top: 1px solid oklch(34% 0.012 250);
    margin-top: 12px;
}
.sidebar .sidebar-account .name { font-size: 13px; color: #fff; font-weight: 600; }
.sidebar .sidebar-account .role { font-size: 11.5px; color: oklch(63% 0.006 250); margin-bottom: 12px; text-transform: capitalize; }
.sidebar .sidebar-account form { margin: 0; }
.sidebar .sidebar-account button {
    background: none;
    border: none;
    padding: 0;
    font-size: 12.5px;
    color: oklch(70% 0.006 250);
    cursor: pointer;
    font-family: inherit;
}
.sidebar .sidebar-account button:hover { color: #fff; text-decoration: underline; }

.admin-main { flex: 1; padding: 40px 44px; min-width: 0; }
.admin-main.admin-main-narrow { max-width: 940px; }

@media (max-width: 900px) {
    .admin-shell { flex-direction: column; }
    .sidebar { width: 100%; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 14px 18px; }
    .sidebar nav { flex-direction: row; flex-wrap: wrap; }
    .side-brand { padding: 0 12px 0 0; }
    .sidebar .sidebar-spacer { display: none; }
    .sidebar .sidebar-account { border-top: none; margin-top: 0; padding: 0; display: flex; align-items: center; gap: 10px; }
    .admin-main { padding: 24px; }
}

/* --- misc utility --- */
.back-link { font-size: 13.5px; color: var(--ink-faint); display: inline-block; margin-bottom: 10px; }
.divider { height: 1px; background: var(--border-soft); margin: 20px 0; border: none; }
.page-header { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 8px; }
.page-lede { color: var(--ink-soft); font-size: 14.5px; max-width: 620px; margin-bottom: 1.75rem; }
.hero {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 48px;
    align-items: center;
    padding: 4rem 0;
}
@media (max-width: 900px) {
    .hero { grid-template-columns: 1fr; }
}
.hero h1 { font-size: 2.6rem; line-height: 1.1; }
.hero-stats { display: flex; gap: 32px; margin-top: 10px; }
.hero-stats .num { font-family: "Public Sans", sans-serif; font-size: 1.7rem; font-weight: 800; }
.hero-stats .label { font-size: 12.5px; color: var(--ink-faint); }

.pitch-band { background: var(--ink); border-radius: var(--radius-lg); padding: 2.5rem; margin: 2.5rem 0; }
.pitch-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 760px) { .pitch-grid { grid-template-columns: 1fr; } }
.pitch-card {
    background: oklch(25% 0.012 250);
    border: 1px solid oklch(33% 0.012 250);
    border-radius: var(--radius-md);
    padding: 32px;
}
.pitch-card h3 { color: #fff; font-size: 22px; margin: 8px 0 10px; }
.pitch-card p { color: oklch(80% 0.006 250); font-size: 14.5px; margin-bottom: 20px; }
