:root {
    --red-950: #4b0d11;
    --red-900: #681318;
    --red-800: #8f1e22;
    --red-700: #ad2a2f;
    --red-100: #f8e7e7;
    --red-50: #fdf5f5;
    --ink-950: #191616;
    --ink-800: #302b2a;
    --ink-600: #6d6462;
    --ink-400: #9c9290;
    --line: #e8e2e0;
    --surface: #ffffff;
    --canvas: #f7f5f4;
    --success: #247551;
    --warning: #8a5b16;
    --shadow: 0 20px 60px rgba(64, 31, 31, .10);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink-950);
    background: var(--canvas);
    font-synthesis: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-height: 100%; background: var(--canvas); }
body { margin: 0; min-height: 100vh; font-size: 16px; line-height: 1.5; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.auth-body { background: var(--surface); }
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(420px, 1fr) minmax(520px, 1.05fr); }
.auth-story { position: relative; overflow: hidden; color: white; background: radial-gradient(circle at 15% 12%, rgba(255,255,255,.14), transparent 28%), linear-gradient(145deg, var(--red-700), var(--red-950)); }
.auth-story::before { content: ""; position: absolute; width: 70%; aspect-ratio: 1; right: -28%; bottom: -18%; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; box-shadow: 0 0 0 80px rgba(255,255,255,.035), 0 0 0 160px rgba(255,255,255,.025); }
.auth-story::after { content: ""; position: absolute; inset: 0; opacity: .14; background-image: linear-gradient(115deg, transparent 48%, rgba(255,255,255,.2) 49%, transparent 50%); background-size: 38px 38px; }
.auth-story-inner { position: relative; z-index: 1; min-height: 100%; padding: clamp(34px, 5vw, 72px); display: flex; flex-direction: column; }
.brand { display: inline-flex; align-items: center; gap: 12px; width: fit-content; }
.brand strong { display: block; font-size: 18px; letter-spacing: -.02em; }
.brand small { display: block; color: var(--ink-600); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.brand--light small { color: rgba(255,255,255,.72); }
.brand-mark { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; color: white; background: var(--red-800); font-weight: 800; letter-spacing: -.06em; box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); }
.brand-mark--light { color: var(--red-900); background: white; }
.auth-copy { margin: auto 0; max-width: 630px; padding: 72px 0; }
.auth-copy h1 { margin: 12px 0 24px; max-width: 620px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(44px, 5vw, 74px); line-height: .99; letter-spacing: -.045em; font-weight: 500; }
.auth-copy > p:last-child { max-width: 520px; color: rgba(255,255,255,.76); font-size: 18px; }
.auth-meta { margin: 0; color: rgba(255,255,255,.6); font-size: 14px; }
.eyebrow { margin: 0 0 6px; color: var(--red-700); font-size: 12px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.eyebrow--light { color: rgba(255,255,255,.7); }
.auth-form-panel { display: grid; place-items: center; padding: clamp(28px, 6vw, 96px); background: linear-gradient(180deg, #fff, #fcfbfb); }
.login-card { width: min(100%, 440px); }
.login-card h2 { margin: 0; font-size: clamp(32px, 4vw, 46px); letter-spacing: -.045em; line-height: 1.1; }
.form-intro { margin: 14px 0 30px; color: var(--ink-600); }
.mobile-brand { display: none; align-items: center; gap: 12px; margin-bottom: 56px; }
.mobile-brand strong, .mobile-brand small { display: block; }
.mobile-brand small { color: var(--ink-600); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.stack-form { display: grid; gap: 20px; }
label > span { display: block; margin-bottom: 8px; color: var(--ink-800); font-size: 14px; font-weight: 700; }
label > small { display: block; margin-top: 6px; color: var(--ink-600); font-size: 12px; }
input, select, textarea { width: 100%; min-height: 52px; padding: 0 15px; color: var(--ink-950); background: #fff; border: 1px solid #d9d1cf; border-radius: 12px; outline: none; transition: border-color .18s ease, box-shadow .18s ease; }
textarea { min-height: 128px; padding-block: 13px; resize: vertical; line-height: 1.55; }
input:focus, select:focus, textarea:focus { border-color: var(--red-700); box-shadow: 0 0 0 4px rgba(173, 42, 47, .11); }
input:disabled { color: var(--ink-600); background: var(--canvas); }
.button { min-height: 48px; padding: 0 20px; display: inline-flex; align-items: center; justify-content: center; gap: 12px; border: 0; border-radius: 12px; font-weight: 800; cursor: pointer; transition: transform .18s ease, background .18s ease, box-shadow .18s ease; }
.button:hover { transform: translateY(-1px); }
.button:focus-visible, .nav-link:focus-visible, .user-chip:focus-visible { outline: 3px solid rgba(173,42,47,.24); outline-offset: 2px; }
.button--primary { color: white; background: var(--red-800); box-shadow: 0 10px 24px rgba(143,30,34,.2); }
.button--primary:hover { background: var(--red-900); }
.button--light { color: var(--red-900); background: white; }
.button--secondary { color: var(--red-800); background: var(--red-50); border: 1px solid #edcfd0; box-shadow: none; }
.button--ghost { color: var(--ink-800); background: white; border: 1px solid var(--line); box-shadow: none; }
.button--quiet { width: 100%; color: var(--ink-800); background: white; border: 1px solid var(--line); box-shadow: none; }
.button--full { width: 100%; margin-top: 4px; }
.security-note { margin: 26px 0 0; color: var(--ink-600); font-size: 13px; text-align: center; }
.security-note span { color: var(--success); font-size: 9px; }
.notice { margin: 0 0 22px; padding: 14px 16px; border-radius: 12px; font-size: 14px; }
.notice p { margin: 0; }
.notice p + p { margin-top: 6px; }
.notice--error { color: #76191d; background: var(--red-100); border: 1px solid #efc9ca; }
.notice--success { color: #18573c; background: #e9f6ef; border: 1px solid #c8ead7; }
.notice--warning { color: #68430c; background: #fff7e8; border: 1px solid #efd9ad; }

.app-body { background: var(--canvas); }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 260px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 28px 18px 22px; display: flex; flex-direction: column; color: rgba(255,255,255,.82); background: linear-gradient(180deg, var(--red-950), #32090c); }
.brand--sidebar { padding: 0 10px; color: white; }
.brand--sidebar .brand-mark { color: var(--red-900); background: white; }
.brand--sidebar small { color: rgba(255,255,255,.55); }
.main-nav { display: grid; gap: 5px; margin-top: 50px; }
.nav-link { min-height: 48px; padding: 0 12px; display: flex; align-items: center; gap: 12px; border-radius: 11px; font-size: 14px; font-weight: 700; }
.nav-link:hover:not(.is-disabled), .nav-link.is-active { color: white; background: rgba(255,255,255,.11); }
.nav-link.is-disabled { opacity: .45; cursor: default; }
.nav-link small { margin-left: auto; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.nav-icon { width: 24px; text-align: center; font-size: 18px; }
.sidebar-footer { display: grid; gap: 5px; margin-top: auto; }
.sidebar-footer form { margin: 0; }
.nav-button { width: 100%; color: inherit; background: transparent; border: 0; cursor: pointer; text-align: left; }
.main-content { min-width: 0; padding: 34px clamp(24px, 4vw, 64px) 64px; }
.topbar { min-height: 68px; margin-bottom: 30px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.topbar h1 { margin: 0; font-size: clamp(28px, 3vw, 38px); letter-spacing: -.04em; line-height: 1.1; }
.user-chip { padding: 7px 12px 7px 7px; display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.user-chip strong, .user-chip small { display: block; }
.user-chip strong { font-size: 13px; }
.user-chip small { color: var(--ink-600); font-size: 11px; }
.avatar { width: 36px; height: 36px; display: grid; place-items: center; flex: 0 0 auto; color: white; background: var(--red-800); border-radius: 11px; font-weight: 800; }
.avatar--large { width: 58px; height: 58px; border-radius: 17px; font-size: 20px; }
.welcome-panel { position: relative; overflow: hidden; min-height: 220px; padding: clamp(28px, 4vw, 46px); display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; color: white; background: radial-gradient(circle at 90% 10%, rgba(255,255,255,.16), transparent 24%), linear-gradient(135deg, var(--red-700), var(--red-950)); border-radius: 24px; box-shadow: var(--shadow); }
.welcome-panel::after { content: ""; position: absolute; width: 320px; height: 320px; right: -120px; top: -180px; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; box-shadow: 0 0 0 52px rgba(255,255,255,.035); }
.welcome-panel > * { position: relative; z-index: 1; }
.welcome-panel h2 { margin: 14px 0 10px; font-size: clamp(30px, 4vw, 48px); line-height: 1; letter-spacing: -.045em; }
.welcome-panel p { max-width: 670px; margin: 0; color: rgba(255,255,255,.72); }
.status-pill { width: fit-content; padding: 7px 10px; display: flex; align-items: center; gap: 7px; color: rgba(255,255,255,.84); background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.14); border-radius: 999px; font-size: 12px; font-weight: 800; }
.status-pill span { width: 7px; height: 7px; background: #72dfa8; border-radius: 50%; box-shadow: 0 0 0 4px rgba(114,223,168,.15); }
.stats-grid { margin: 22px 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.stat-card { min-height: 128px; padding: 22px; display: flex; align-items: center; gap: 16px; background: white; border: 1px solid var(--line); border-radius: 18px; }
.stat-icon { width: 44px; height: 44px; display: grid; place-items: center; flex: 0 0 auto; color: var(--red-800); background: var(--red-50); border-radius: 13px; font-weight: 900; }
.stat-card small, .stat-card strong, .stat-card p { display: block; margin: 0; }
.stat-card small { color: var(--ink-600); font-size: 12px; font-weight: 700; }
.stat-card strong { margin: 1px 0; font-size: 23px; letter-spacing: -.03em; }
.stat-card p { color: var(--ink-600); font-size: 12px; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(300px, .75fr); gap: 22px; }
.card, .settings-card { padding: clamp(24px, 3vw, 34px); background: white; border: 1px solid var(--line); border-radius: 20px; }
.card-heading, .section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.card h2, .section-heading h2 { margin: 0; font-size: 22px; letter-spacing: -.03em; }
.section-heading p { margin: 6px 0 0; color: var(--ink-600); }
.progress-label { color: var(--ink-600); font-size: 12px; font-weight: 700; }
.progress { height: 7px; margin: 22px 0 14px; overflow: hidden; background: var(--red-50); border-radius: 999px; }
.progress span { display: block; height: 100%; background: var(--red-700); border-radius: inherit; }
.setup-list { margin: 0; padding: 0; list-style: none; }
.setup-list li { padding: 14px 0; display: flex; align-items: center; gap: 14px; border-bottom: 1px solid var(--line); }
.setup-list li:last-child { border: 0; padding-bottom: 0; }
.setup-list li > span { width: 30px; height: 30px; display: grid; place-items: center; flex: 0 0 auto; color: var(--ink-600); background: var(--canvas); border-radius: 10px; font-size: 12px; font-weight: 800; }
.setup-list .is-done > span { color: white; background: var(--success); }
.setup-list strong, .setup-list small { display: block; }
.setup-list strong { font-size: 14px; }
.setup-list small { color: var(--ink-600); font-size: 12px; }
.profile-hero { margin: 22px 0 24px; display: flex; align-items: center; gap: 14px; }
.profile-hero h2, .profile-hero p { margin: 0; }
.profile-hero h2 { font-size: 18px; }
.profile-hero p { color: var(--ink-600); font-size: 13px; overflow-wrap: anywhere; }
.profile-summary dl { margin: 0; }
.profile-summary dl div { padding: 12px 0; display: flex; justify-content: space-between; gap: 14px; border-top: 1px solid var(--line); }
.profile-summary dt, .profile-summary dd { margin: 0; font-size: 13px; }
.profile-summary dt { color: var(--ink-600); }
.profile-summary dd { font-weight: 700; text-align: right; }
.text-link { margin-top: 22px; display: flex; justify-content: space-between; color: var(--red-800); font-size: 14px; font-weight: 800; }
.settings-tabs { margin-bottom: 20px; display: flex; gap: 6px; border-bottom: 1px solid var(--line); }
.settings-tabs a { position: relative; padding: 12px 16px; color: var(--ink-600); font-size: 14px; font-weight: 800; }
.settings-tabs a.is-active { color: var(--red-800); }
.settings-tabs a.is-active::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 3px; background: var(--red-700); border-radius: 3px 3px 0 0; }
.settings-card { max-width: 960px; }
.settings-card--narrow { max-width: 680px; }
.settings-card .notice { margin-top: 22px; }
.settings-form { margin-top: 28px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.form-actions { margin-top: 28px; padding-top: 22px; display: flex; justify-content: flex-end; border-top: 1px solid var(--line); }
.mobile-nav { display: none; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.page-actions { margin: -4px 0 26px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.page-actions p { max-width: 680px; margin: 0; color: var(--ink-600); }
.filter-tabs { margin-bottom: 22px; padding: 5px; display: flex; gap: 4px; width: fit-content; max-width: 100%; overflow-x: auto; background: #ede9e7; border-radius: 13px; }
.filter-tabs a { padding: 9px 13px; display: flex; align-items: center; gap: 8px; color: var(--ink-600); border-radius: 9px; white-space: nowrap; font-size: 13px; font-weight: 800; }
.filter-tabs a span { min-width: 21px; height: 21px; padding: 0 6px; display: inline-grid; place-items: center; background: rgba(0,0,0,.055); border-radius: 999px; font-size: 11px; }
.filter-tabs a.is-active { color: var(--red-900); background: white; box-shadow: 0 3px 12px rgba(42,28,28,.08); }
.resource-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.resource-card { position: relative; min-height: 330px; padding: 22px; display: flex; flex-direction: column; background: white; border: 1px solid var(--line); border-radius: 20px; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.resource-card:hover { transform: translateY(-2px); border-color: #d9cecb; box-shadow: 0 18px 40px rgba(64,31,31,.08); }
.resource-card.is-inactive { opacity: .65; }
.resource-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.resource-symbol { width: 50px; height: 50px; display: grid; place-items: center; color: var(--resource-color); background: color-mix(in srgb, var(--resource-color) 11%, white); border: 1px solid color-mix(in srgb, var(--resource-color) 20%, white); border-radius: 15px; font-size: 23px; font-weight: 900; }
.state-badge { width: fit-content; padding: 5px 9px; display: inline-flex; align-items: center; gap: 6px; color: var(--ink-600); background: #f0edec; border-radius: 999px; font-size: 11px; font-weight: 800; }
.state-badge::before { content: ""; width: 6px; height: 6px; background: var(--ink-400); border-radius: 50%; }
.state-badge.is-active { color: #18573c; background: #e9f6ef; }
.state-badge.is-active::before { background: #2c9667; }
.resource-card-body { margin: 24px 0 22px; }
.resource-type { margin: 0 0 5px; color: var(--red-700); font-size: 11px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.resource-card h2 { margin: 0; font-size: 22px; letter-spacing: -.035em; }
.resource-description { display: -webkit-box; overflow: hidden; margin: 9px 0 0; color: var(--ink-600); font-size: 14px; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.resource-meta { margin-top: auto; display: grid; gap: 8px; color: var(--ink-600); font-size: 12px; }
.resource-meta > div { display: flex; align-items: center; gap: 8px; }
.resource-meta strong { color: var(--ink-800); }
.meta-icon { width: 20px; text-align: center; color: var(--red-700); font-size: 15px; }
.resource-card-link { margin: 20px -22px -22px; padding: 15px 22px; display: flex; justify-content: space-between; color: var(--red-800); background: var(--red-50); border-radius: 0 0 19px 19px; font-size: 13px; font-weight: 900; }
.empty-state { min-height: 450px; padding: 50px 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; background: white; border: 1px dashed #d7cdca; border-radius: 22px; }
.empty-icon { width: 70px; height: 70px; margin-bottom: 22px; display: grid; place-items: center; color: var(--red-800); background: var(--red-50); border-radius: 22px; font-size: 30px; }
.empty-state h2 { max-width: 520px; margin: 0; font-size: 28px; letter-spacing: -.04em; }
.empty-state > p:not(.eyebrow) { max-width: 580px; margin: 12px 0 26px; color: var(--ink-600); }
.breadcrumb { margin: -8px 0 22px; display: flex; gap: 8px; color: var(--ink-600); font-size: 13px; }
.breadcrumb a { color: var(--red-800); font-weight: 800; }
.editor-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; align-items: start; gap: 22px; }
.editor-main { min-width: 0; display: grid; gap: 22px; }
.editor-form { display: grid; gap: 22px; }
.editor-section { max-width: none; }
.type-picker { margin: 26px 0 28px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; border: 0; }
.type-option { cursor: pointer; }
.type-option > input { position: absolute; opacity: 0; pointer-events: none; }
.type-option-card { position: relative; min-height: 118px; padding: 17px; display: flex; align-items: flex-start; gap: 12px; background: white; border: 1px solid var(--line); border-radius: 15px; transition: border-color .18s ease, background .18s ease, box-shadow .18s ease; }
.type-option-card strong, .type-option-card small { display: block; }
.type-option-card strong { margin-top: 1px; color: var(--ink-800); font-size: 14px; }
.type-option-card small { margin-top: 5px; color: var(--ink-600); font-size: 11px; line-height: 1.4; }
.type-option-icon { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; color: var(--red-800); background: var(--red-50); border-radius: 10px; font-size: 17px; font-weight: 900; }
.radio-dot { position: absolute; width: 17px; height: 17px; right: 11px; top: 11px; border: 2px solid #cfc5c2; border-radius: 50%; }
.type-option > input:checked + .type-option-card { background: var(--red-50); border-color: var(--red-700); box-shadow: 0 0 0 3px rgba(173,42,47,.08); }
.type-option > input:checked + .type-option-card .radio-dot { border: 5px solid var(--red-700); background: white; }
.type-option > input:focus-visible + .type-option-card { outline: 3px solid rgba(173,42,47,.2); outline-offset: 2px; }
.form-grid--editor { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field-wide { grid-column: 1 / -1; }
.color-field { margin: 0; padding: 0; border: 0; }
.color-field legend { margin-bottom: 10px; color: var(--ink-800); font-size: 14px; font-weight: 700; }
.color-options { display: flex; flex-wrap: wrap; gap: 10px; }
.color-option { cursor: pointer; }
.color-option input { position: absolute; opacity: 0; pointer-events: none; }
.color-option span { width: 34px; height: 34px; display: block; background: var(--choice-color); border: 4px solid white; border-radius: 50%; box-shadow: 0 0 0 1px #d8cecc; }
.color-option input:checked + span { box-shadow: 0 0 0 3px white, 0 0 0 5px var(--choice-color); }
.sticky-actions { position: sticky; z-index: 8; bottom: 16px; padding: 12px; display: flex; justify-content: flex-end; gap: 10px; background: rgba(255,255,255,.91); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 14px 40px rgba(50,20,20,.12); backdrop-filter: blur(14px); }
.editor-aside { position: sticky; top: 24px; display: grid; gap: 16px; }
.side-card { padding: 22px; background: white; border: 1px solid var(--line); border-radius: 18px; }
.side-card--quiet { background: transparent; border-style: dashed; }
.resource-preview { height: 112px; margin: -8px -8px 22px; display: grid; place-items: center; color: white; background: radial-gradient(circle at 70% 20%, rgba(255,255,255,.2), transparent 30%), var(--resource-color); border-radius: 14px; }
.resource-preview > span { font-size: 42px; font-weight: 900; }
.side-card h2 { margin: 2px 0 12px; font-size: 20px; letter-spacing: -.03em; }
.side-card h3 { margin: 0 0 6px; font-size: 15px; }
.side-card > p { margin: 0 0 16px; color: var(--ink-600); font-size: 13px; }
.side-card dl { margin: 22px 0 0; }
.side-card dl div { padding: 10px 0; display: flex; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); }
.side-card dt, .side-card dd { margin: 0; font-size: 12px; }
.side-card dt { color: var(--ink-600); }
.side-card dd { font-weight: 800; text-align: right; }
.section-heading--action { align-items: center; }
.count-badge { min-width: 32px; height: 32px; display: grid; place-items: center; color: var(--red-800); background: var(--red-50); border-radius: 10px; font-size: 13px; font-weight: 900; }
.inline-empty { margin-top: 24px; padding: 20px; display: flex; gap: 14px; color: var(--ink-600); background: var(--canvas); border: 1px dashed #d9cfcc; border-radius: 14px; }
.inline-empty > span { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 auto; color: var(--red-800); background: white; border-radius: 11px; }
.inline-empty strong { display: block; color: var(--ink-800); font-size: 14px; }
.inline-empty p { margin: 3px 0 0; font-size: 12px; }
.feed-list { margin-top: 24px; display: grid; gap: 10px; }
.feed-row { padding: 14px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 13px; border: 1px solid var(--line); border-radius: 14px; }
.feed-row.is-inactive { opacity: .6; }
.feed-icon { width: 42px; height: 42px; display: grid; place-items: center; color: var(--red-800); background: var(--red-50); border-radius: 11px; font-size: 11px; font-weight: 900; }
.feed-details { min-width: 0; }
.feed-details strong, .feed-details span, .feed-details small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-details strong { font-size: 14px; }
.feed-details span { color: var(--ink-600); font-size: 12px; }
.feed-details small { color: var(--ink-400); font-size: 11px; }
.icon-button { width: 36px; height: 36px; padding: 0; display: grid; place-items: center; color: var(--ink-600); background: white; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.add-feed-form { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line); }
.add-feed-form .button { margin-top: 18px; }
.action-group { display: flex; align-items: center; gap: 10px; }
.action-group form { margin: 0; }
.booking-list { display: grid; gap: 10px; }
.booking-row { min-height: 96px; padding: 14px 16px; display: grid; grid-template-columns: auto minmax(260px, 1fr) minmax(110px, .35fr) minmax(110px, .3fr) auto; align-items: center; gap: 16px; background: white; border: 1px solid var(--line); border-radius: 16px; }
.booking-row.needs-review { border-left: 4px solid var(--warning); }
.date-tile { width: 54px; height: 62px; display: grid; place-content: center; text-align: center; color: var(--resource-color); background: color-mix(in srgb, var(--resource-color) 10%, white); border-radius: 13px; line-height: 1; }
.date-tile strong { font-size: 22px; }
.date-tile span { margin-top: 4px; font-size: 10px; font-weight: 900; text-transform: uppercase; }
.booking-title-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.booking-primary h2 { margin: 0; font-size: 17px; letter-spacing: -.025em; }
.booking-primary p { margin: 4px 0 0; color: var(--ink-600); font-size: 13px; }
.review-badge, .change-badge { padding: 4px 7px; border-radius: 999px; font-size: 10px; font-weight: 900; }
.review-badge { color: #765018; background: #fff3da; }
.change-badge { color: var(--red-800); background: var(--red-50); }
.missing-note { display: block; margin-top: 4px; color: var(--red-700); font-size: 11px; font-weight: 700; }
.cleaning-note { display: block; margin-top: 4px; color: var(--ink-600); font-size: 11px; font-weight: 700; }
.cleaning-note.is-done { color: var(--success); }
.cleaning-note.is-open { color: var(--warning); }
.booking-source small, .booking-source strong, .booking-money small, .booking-money strong { display: block; }
.booking-source small, .booking-money small { color: var(--ink-400); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.booking-source strong, .booking-money strong { font-size: 13px; }
.booking-money { text-align: right; }
.booking-money strong { font-size: 16px; }
.booking-money span { color: var(--ink-600); font-size: 11px; }
.payment-state { display: inline-flex !important; align-items: center; justify-content: flex-end; gap: 5px; font-weight: 800; }
.payment-state i { width: 8px; height: 8px; flex: 0 0 auto; background: var(--ink-400); border-radius: 50%; box-shadow: 0 0 0 3px rgba(156,146,144,.12); }
.payment-state.is-paid { color: #247551; }
.payment-state.is-paid i { background: #2c9667; box-shadow: 0 0 0 3px rgba(44,150,103,.13); }
.payment-state.is-partial { color: #8a5b16; }
.payment-state.is-partial i { background: #d69b33; box-shadow: 0 0 0 3px rgba(214,155,51,.15); }
.payment-state.is-unpaid { color: var(--red-800); }
.payment-state.is-unpaid i { background: var(--red-700); box-shadow: 0 0 0 3px rgba(173,42,47,.13); }
.row-action { color: var(--red-800); }
.booking-editor { display: grid; grid-template-columns: minmax(0, 1fr) 320px; align-items: start; gap: 22px; }
.booking-form { min-width: 0; display: grid; gap: 22px; }
.booking-summary { position: sticky; top: 24px; }
.summary-card { padding: 24px; background: white; border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 15px 45px rgba(65,31,31,.07); }
.summary-card h2 { margin: 0 0 20px; font-size: 22px; letter-spacing: -.03em; }
.price-summary { margin: 0; }
.price-summary + .price-summary { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.price-summary > div { padding: 6px 0; display: flex; justify-content: space-between; gap: 14px; }
.price-summary dt, .price-summary dd { margin: 0; font-size: 12px; }
.price-summary dt { color: var(--ink-600); }
.price-summary dd { font-weight: 800; text-align: right; }
.price-summary .summary-total { margin-top: 7px; padding-top: 12px; border-top: 1px solid var(--line); }
.price-summary .summary-total dt, .price-summary .summary-total dd { color: var(--ink-950); font-size: 14px; font-weight: 900; }
.balance-box { margin-top: 22px; padding: 16px; color: #18573c; background: #e9f6ef; border-radius: 14px; }
.nightly-earning { margin-top: 20px; padding: 16px; color: var(--red-900); background: linear-gradient(135deg, var(--red-50), #fff); border: 1px solid #efd7d8; border-radius: 14px; }
.nightly-earning span, .nightly-earning strong, .nightly-earning small { display: block; }
.nightly-earning span { font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; }
.nightly-earning strong { margin: 2px 0; font-size: 25px; letter-spacing: -.03em; }
.nightly-earning small { color: var(--ink-600); font-size: 10px; }
.balance-box.has-balance { color: #76191d; background: var(--red-50); }
.balance-box span, .balance-box strong, .balance-box small { display: block; }
.balance-box span { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.balance-box strong { margin: 2px 0; font-size: 25px; letter-spacing: -.03em; }
.balance-box small { opacity: .72; font-size: 11px; }
.booking-form-grid { margin-top: 26px; }
.money-fields input { font-variant-numeric: tabular-nums; }
.subsection-label { margin-top: 8px; padding: 14px 16px; display: flex; justify-content: space-between; gap: 12px; background: var(--canvas); border-radius: 12px; }
.subsection-label strong { font-size: 13px; }
.subsection-label span { color: var(--ink-600); font-size: 12px; text-align: right; }
.import-note { padding: 16px; color: var(--ink-600); background: #f4f1f0; border-radius: 12px; }
.import-note strong { color: var(--ink-800); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.import-note p { margin: 6px 0 0; font-size: 13px; }
.payments-card { max-width: none; margin-top: 22px; }
.payment-balance { text-align: right; }
.payment-balance small, .payment-balance strong { display: block; }
.payment-balance small { color: var(--ink-600); font-size: 11px; }
.payment-balance strong { color: var(--red-800); font-size: 22px; }
.payment-list { margin-top: 24px; display: grid; }
.payment-row { padding: 13px 0; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; border-bottom: 1px solid var(--line); }
.payment-number { width: 30px; height: 30px; display: grid; place-items: center; color: var(--red-800); background: var(--red-50); border-radius: 9px; font-size: 11px; font-weight: 900; }
.payment-row strong, .payment-row small { display: block; }
.payment-row strong { font-size: 14px; }
.payment-row small { color: var(--ink-600); font-size: 12px; }
.payment-form { margin-top: 26px; padding-top: 24px; border-top: 1px solid var(--line); }
.payment-form .button { margin-top: 20px; }
.partner-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; align-items: start; gap: 22px; }
.partner-layout > .settings-card { max-width: none; }
.partner-create-card { position: sticky; top: 24px; }
.partner-create-card h2 { margin: 0 0 22px; font-size: 22px; letter-spacing: -.03em; }
.partner-list { margin-top: 24px; display: grid; gap: 12px; }
.partner-row { padding: 16px; background: var(--canvas); border: 1px solid var(--line); border-radius: 15px; }
.partner-row.is-inactive { opacity: .62; }
.partner-edit-form { display: grid; grid-template-columns: minmax(180px, 1fr) 170px auto; align-items: end; gap: 12px; }
.cleaner-edit-form { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(140px, .8fr) 150px; align-items: end; gap: 12px; }
.cleaner-edit-form .button { width: fit-content; }
.partner-toggle-form { margin-top: 12px; padding-top: 12px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); }
.text-button { padding: 5px; color: var(--red-800); background: transparent; border: 0; cursor: pointer; font-size: 12px; font-weight: 800; }
.percent-input { position: relative; }
.price-input { position: relative; }
.percent-input input, .price-input input { padding-right: 42px; }
.percent-input > span, .price-input > span { position: absolute; right: 15px; top: 50%; transform: translateY(-50%); color: var(--ink-600); font-size: 13px; font-weight: 800; }
.error-card, .simple-error { max-width: 620px; margin: 10vh auto; padding: 40px; text-align: center; background: white; border: 1px solid var(--line); border-radius: 24px; }
.error-card > span { color: var(--red-700); font-size: 13px; font-weight: 900; letter-spacing: .14em; }
.error-card h1, .simple-error h1 { margin: 14px 0 8px; font-size: 32px; letter-spacing: -.04em; }
.error-card p, .simple-error p { margin: 0 0 24px; color: var(--ink-600); }
.simple-error .brand-mark { margin: 0 auto; }

@media (max-width: 980px) {
    .auth-shell { grid-template-columns: 1fr; }
    .auth-story { display: none; }
    .auth-form-panel { min-height: 100vh; }
    .mobile-brand { display: flex; }
    .app-shell { grid-template-columns: 86px minmax(0, 1fr); }
    .sidebar { padding-inline: 14px; }
    .brand--sidebar { padding: 0; justify-content: center; }
    .brand--sidebar > span:last-child, .nav-link > span:not(.nav-icon), .nav-link small { display: none; }
    .nav-link { justify-content: center; padding: 0; }
    .content-grid { grid-template-columns: 1fr; }
    .resource-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .editor-layout { grid-template-columns: 1fr; }
    .editor-aside { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .booking-row { grid-template-columns: auto minmax(220px, 1fr) minmax(100px, .3fr) auto; }
    .booking-source { display: none; }
    .booking-editor { grid-template-columns: 1fr; }
    .booking-summary { position: static; grid-row: 1; }
    .partner-layout { grid-template-columns: 1fr; }
    .partner-create-card { position: static; grid-row: 1; }
}

@media (max-width: 700px) {
    body { padding-bottom: 74px; }
    .app-shell { display: block; }
    .sidebar { display: none; }
    .main-content { padding: 22px 16px 34px; }
    .topbar { min-height: 52px; margin-bottom: 22px; }
    .topbar .eyebrow { display: none; }
    .topbar h1 { font-size: 27px; }
    .user-chip { padding: 5px; border: 0; background: transparent; }
    .user-chip > span:last-child { display: none; }
    .welcome-panel { min-height: 280px; padding: 28px; display: block; border-radius: 20px; }
    .welcome-panel .button { margin-top: 28px; }
    .stats-grid { grid-template-columns: 1fr; gap: 12px; }
    .stat-card { min-height: 98px; }
    .card, .settings-card { padding: 22px 18px; border-radius: 18px; }
    .form-grid { grid-template-columns: 1fr; }
    .field-wide { grid-column: auto; }
    .form-actions .button { width: 100%; }
    .page-actions { align-items: stretch; flex-direction: column; }
    .page-actions .button { width: 100%; }
    .filter-tabs { width: 100%; }
    .resource-grid { grid-template-columns: 1fr; }
    .resource-card { min-height: 300px; }
    .type-picker { grid-template-columns: 1fr; }
    .type-option-card { min-height: 86px; align-items: center; }
    .editor-aside { grid-template-columns: 1fr; }
    .sticky-actions { bottom: 82px; }
    .sticky-actions .button { flex: 1; padding-inline: 12px; }
    .feed-row { grid-template-columns: auto minmax(0, 1fr) auto; }
    .feed-row .state-badge { display: none; }
    .action-group { align-items: stretch; flex-direction: column; }
    .action-group .button, .action-group form { width: 100%; }
    .booking-row { padding: 14px; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; }
    .booking-money { display: none; }
    .booking-primary p { line-height: 1.4; }
    .row-action { grid-column: 3; grid-row: 1; }
    .subsection-label { align-items: flex-start; flex-direction: column; }
    .subsection-label span { text-align: left; }
    .payment-balance { display: none; }
    .partner-edit-form { grid-template-columns: 1fr; }
    .partner-edit-form .button, .cleaner-edit-form .button { width: 100%; }
    .cleaner-edit-form { grid-template-columns: 1fr; }
    .mobile-nav { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; height: calc(68px + env(safe-area-inset-bottom)); padding: 7px 8px env(safe-area-inset-bottom); display: grid; grid-template-columns: repeat(4, 1fr); color: var(--ink-600); background: rgba(255,255,255,.96); border-top: 1px solid var(--line); backdrop-filter: blur(14px); }
    .mobile-nav a, .mobile-nav > span { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 10px; font-weight: 800; }
    .mobile-nav a > span, .mobile-nav > span > span { font-size: 19px; }
    .mobile-nav .is-active { color: var(--red-800); }
    .mobile-nav .is-disabled { opacity: .42; }
    .settings-tabs { overflow-x: auto; }
}

@media (max-width: 460px) {
    .auth-form-panel { align-items: start; padding: 28px 20px; }
    .mobile-brand { margin-bottom: 64px; }
    .login-card h2 { font-size: 36px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
