/* ── Simprofire · Fire Protection Branding ───────────────
   Paleta fuego: rojo SIMPRO, blanco limpio, charcoal.
   Optimizada para captura en campo en tablets/móviles.
─────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600&display=swap');

:root {
    --bg: #f5f5f5;
    --card: #ffffff;
    --text: #1a1a1a;
    --muted: #6b7076;
    --line: #e3e3e3;
    --line-strong: #cdcdcd;
    --primary: #E11D27;        /* SIMPRO fire red */
    --primary-dark: #A8121A;
    --primary-soft: #f8d5d7;
    --accent: #E11D27;
    --accent-soft: #A8121A;
    --accent-cream: #ffffff;
    --accent-cream-2: #f5f5f5;
    --danger: #b00020;
    --success: #2e7d32;
    --warn: #f59e0b;
    --sidebar: #1A1A1A;
    --sidebar-soft: #262626;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.10);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.14);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --font-sans: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-brand: 'Quicksand', 'Outfit', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
    margin: 0;
    font-family: var(--font-sans);
    font-weight: 300;
    font-size: 15px;
    line-height: 1.55;
    letter-spacing: 0.01em;
    background: var(--bg);
    color: var(--text);
}
a { color: var(--accent); text-decoration: none; transition: color .18s; }
a:hover { color: var(--accent-soft); }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3, h4 {
    font-family: var(--font-brand);
    font-weight: 400;
    letter-spacing: -0.005em;
    color: var(--text);
}
h1 { font-size: 28px; }
h2 { font-size: 22px; }
h3 { font-size: 18px; }
strong, b { font-weight: 500; }

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 400;
    font-size: 13px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
}
input, textarea, select {
    width: 100%;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-md);
    padding: 13px 16px;
    font-family: inherit;
    font-weight: 300;
    font-size: 15px;
    color: var(--text);
    background: #fff;
    transition: border-color .18s, box-shadow .18s;
}
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(45, 50, 54, 0.08);
}
textarea { resize: vertical; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th {
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: transparent;
}

/* ── Guest / login ─────────────────────────────────── */
.guest-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at 15% 20%, rgba(214, 212, 200, 0.45), transparent 55%),
        radial-gradient(circle at 85% 80%, rgba(45, 50, 54, 0.08), transparent 60%),
        var(--bg);
    padding: 24px;
}
.guest-shell { width: min(440px, calc(100vw - 32px)); }
.login-card {
    background: var(--card);
    border-radius: var(--radius-xl);
    padding: 40px 36px;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(45, 50, 54, 0.04);
}
.login-brand {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--line);
}
.login-brand h1 {
    font-family: var(--font-brand);
    font-weight: 300;
    font-size: 26px;
    letter-spacing: -0.01em;
}
.login-brand p {
    color: var(--muted);
    font-size: 13px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-top: 4px;
}
.brand-mark {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    background: var(--accent);
    color: var(--accent-cream);
    font-family: var(--font-brand);
    font-weight: 300;
    font-size: 22px;
    letter-spacing: -0.02em;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}
.brand-logo {
    max-width: 160px;
    max-height: 60px;
    object-fit: contain;
    display: block;
}
.brand-logo-login { max-width: 130px; }
.login-hint {
    margin-top: 24px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: var(--muted);
    font-size: 13px;
}
.login-hint strong {
    color: var(--text);
    font-weight: 400;
    font-size: 14px;
}

/* ── App shell ─────────────────────────────────────── */
.app-shell { display: flex; min-height: 100vh; align-items: flex-start; }

.sidebar {
    width: 268px;
    background: var(--sidebar);
    color: var(--accent-cream-2);
    padding: 34px 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 32px;
    flex-shrink: 0;
    align-self: flex-start;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}
.sidebar h1 {
    font-family: var(--font-brand);
    font-weight: 300;
    font-size: 26px;
    letter-spacing: -0.01em;
    margin-top: 18px;
    color: #f4f1e6;
}
.sidebar p, .sidebar span { color: rgba(235, 231, 216, 0.55); font-weight: 300; font-size: 13px; letter-spacing: 0.02em; }
.sidebar .brand-mark { background: var(--accent-cream); color: var(--accent); }
.sidebar-nav { display: grid; gap: 4px; margin-top: 28px; }
.sidebar-nav a {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    color: rgba(235, 231, 216, 0.72);
    font-weight: 300;
    font-size: 15px;
    letter-spacing: 0.01em;
    transition: background .18s, color .18s;
    position: relative;
}
.sidebar-nav a:hover {
    background: rgba(235, 231, 216, 0.06);
    color: #f4f1e6;
}
.sidebar-nav a.is-active {
    background: rgba(214, 212, 200, 0.12);
    color: var(--accent-cream);
    font-weight: 400;
}
.sidebar-nav a.is-active::before {
    content: '';
    position: absolute;
    left: -24px;
    top: 14px;
    bottom: 14px;
    width: 2px;
    background: var(--accent-cream);
    border-radius: 2px;
}
.sidebar-user {
    display: grid;
    gap: 4px;
    font-size: 13px;
    padding: 16px;
    background: rgba(235, 231, 216, 0.05);
    border-radius: var(--radius-md);
}
.sidebar-user strong { color: #f4f1e6; font-weight: 400; font-size: 14px; }
.sidebar-user a {
    color: var(--accent-cream);
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-top: 4px;
}
.sidebar-user a:hover { color: #fff; }
.sidebar-footer-note {
    display: grid;
    gap: 10px;
    padding-top: 18px;
    border-top: 1px solid rgba(235, 231, 216, 0.08);
}
.sidebar-footer-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 12px;
}
.sidebar-footer-actions a,
.sidebar-footer-actions .link-button { color: var(--accent-cream); letter-spacing: 0.04em; }
.developer-trigger {
    padding: 0;
    border: 0;
    background: transparent;
    color: rgba(235, 231, 216, 0.28);
    text-align: left;
    font: inherit;
    font-weight: 300;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    transition: color .18s;
}
.developer-trigger:hover { color: rgba(235, 231, 216, 0.6); }

/* ── Content area ──────────────────────────────────── */
.content-area {
    flex: 1;
    padding: 40px 44px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-width: 0;
}
.page-header h2 {
    font-family: var(--font-brand);
    font-weight: 300;
    font-size: 32px;
    letter-spacing: -0.015em;
}
.page-header p { margin-top: 6px; color: var(--muted); font-weight: 300; }

.card {
    background: var(--card);
    border-radius: var(--radius-xl);
    padding: 28px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(45, 50, 54, 0.04);
}
.form-card { max-width: 960px; }
.stat-card { padding: 24px; }
.stat-card strong {
    font-family: var(--font-brand);
    font-size: 38px;
    font-weight: 300;
    letter-spacing: -0.02em;
    margin-top: 10px;
    display: block;
    color: var(--accent);
}
.section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}
.section-head h3 {
    font-family: var(--font-brand);
    font-weight: 400;
    font-size: 20px;
}
.section-head p { margin-top: 4px; color: var(--muted); font-size: 14px; }
.stack-md > * + * { margin-top: 18px; }
.stack-lg > * + * { margin-top: 24px; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.full-span { grid-column: 1 / -1; }

/* ── Buttons ───────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 12px 26px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 400;
    font-size: 14px;
    letter-spacing: 0.03em;
    min-height: 46px;
    transition: background .18s, color .18s, border-color .18s, transform .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
    background: var(--accent);
    color: var(--accent-cream);
}
.btn-primary:hover { background: var(--accent-soft); color: #fff; }
.btn-secondary {
    background: transparent;
    color: var(--accent);
    border-color: var(--line-strong);
}
.btn-secondary:hover { background: var(--accent-cream-2); border-color: var(--accent-cream); }
.btn-block { width: 100%; }

/* ── Alerts ────────────────────────────────────────── */
.alert {
    border-radius: var(--radius-md);
    padding: 14px 18px;
    font-size: 14px;
    font-weight: 300;
    border: 1px solid transparent;
}
.alert-success { background: #eef3ec; color: #3d5c3d; border-color: #d3e2d1; }
.alert-danger { background: #f6eaea; color: #7a4040; border-color: #e9d4d4; }
.error-list { margin: 0; padding-left: 18px; }

/* ── Tables ────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
.table-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.link-button {
    padding: 0;
    border: 0;
    background: none;
    color: var(--accent);
    font: inherit;
    font-weight: 400;
    cursor: pointer;
    border-bottom: 1px solid transparent;
    transition: border-color .18s;
}
.link-button:hover { border-bottom-color: var(--accent); }
.danger-link { color: var(--danger); }
.muted { color: var(--muted); font-weight: 300; }
.text-right { text-align: right; }

/* ── Info cards ────────────────────────────────────── */
.info-card {
    background: var(--accent-cream-2);
    border: 1px solid var(--accent-cream);
    border-radius: var(--radius-lg);
    padding: 20px;
}
.info-card span, .table-note { color: var(--accent-soft); font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; }
.info-card strong {
    display: block;
    margin-top: 8px;
    font-family: var(--font-brand);
    font-weight: 300;
    font-size: 26px;
    letter-spacing: -0.01em;
    color: var(--accent);
}
.detail-grid { font-size: 15px; font-weight: 300; }

/* ── Quotation form ────────────────────────────────── */
.quotation-form { max-width: 1160px; }
.item-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 20px;
    background: #fbfaf5;
}
.item-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.item-badge {
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.badge-product { background: var(--accent-cream-2); color: var(--accent); }
.badge-custom { background: rgba(45, 50, 54, 0.06); color: var(--accent-soft); }
.is-hidden { display: none; }

.totals-panel {
    margin-left: auto;
    width: min(380px, 100%);
    border-radius: var(--radius-lg);
    background: var(--accent-cream-2);
    padding: 22px;
    display: grid;
    gap: 12px;
    border: 1px solid var(--accent-cream);
}
.totals-panel div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 300;
}
.totals-panel strong {
    font-family: var(--font-brand);
    font-size: 22px;
    font-weight: 400;
    letter-spacing: -0.01em;
    color: var(--accent);
}

.actions-row { display: flex; flex-wrap: wrap; gap: 12px; }
.align-end-row { align-items: end; }
.page-actions { justify-content: flex-end; }
.status-field { min-width: min(260px, 100%); }
.guest-footer-note {
    margin: 18px 0 0;
    text-align: center;
    color: var(--muted);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-weight: 300;
}

/* ── Brand assets ──────────────────────────────────── */
.brand-assets-grid { align-items: stretch; }
.brand-asset-card {
    display: grid;
    gap: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 20px;
    background: #fbfaf5;
}
.brand-preview-image {
    max-width: 100%;
    max-height: 140px;
    object-fit: contain;
    border-radius: var(--radius-md);
    background: #fff;
    border: 1px solid var(--line);
    padding: 12px;
}
.brand-preview-qr { max-width: 140px; }
.brand-preview-placeholder {
    min-height: 110px;
    display: grid;
    place-items: center;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius-md);
    color: var(--muted);
    background: #fff;
    font-size: 13px;
    letter-spacing: 0.04em;
}

/* ── PIN modal ─────────────────────────────────────── */
.pin-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
}
.pin-modal[hidden] { display: none !important; }
.pin-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(45, 50, 54, 0.42);
    backdrop-filter: blur(4px);
}
.pin-modal-card {
    position: relative;
    width: min(460px, calc(100vw - 32px));
    background: #fff;
    border-radius: var(--radius-xl);
    padding: 32px;
    box-shadow: var(--shadow-lg);
}

/* ── Mobile top bar ────────────────────────────────── */
.mobile-topbar {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 150;
    height: 60px;
    background: var(--sidebar);
    padding: 0 16px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.mobile-topbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    overflow: hidden;
    min-width: 0;
}
.mobile-brand-logo {
    max-width: 110px;
    max-height: 38px;
    object-fit: contain;
    flex-shrink: 0;
}
.mobile-topbar .brand-mark {
    width: 38px; height: 38px;
    font-size: 15px;
    border-radius: 12px;
    flex-shrink: 0;
    background: var(--accent-cream);
    color: var(--accent);
}
.mobile-topbar-name {
    color: var(--accent-cream);
    font-family: var(--font-brand);
    font-size: 17px;
    font-weight: 300;
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: rgba(235, 231, 216, 0.08);
    cursor: pointer;
    flex-shrink: 0;
    padding: 0;
}
.hamburger span {
    display: block;
    width: 20px;
    height: 1.5px;
    background: var(--accent-cream);
    border-radius: 2px;
    transition: transform 0.22s, opacity 0.22s;
}
body.nav-open .hamburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.nav-open .hamburger span:nth-child(2) { opacity: 0; transform: scaleX(0); }
body.nav-open .hamburger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 140;
    background: rgba(45, 50, 54, 0.42);
    backdrop-filter: blur(2px);
}
body.nav-open .nav-overlay { display: block; }

.nav-close-btn { display: none; }
.nav-close-btn button {
    width: 36px; height: 36px;
    border: 0;
    background: rgba(235, 231, 216, 0.08);
    border-radius: 10px;
    color: var(--accent-cream);
    font-size: 22px;
    cursor: pointer;
    display: grid;
    place-items: center;
    line-height: 1;
}
.nav-close-btn button:hover { background: rgba(235, 231, 216, 0.18); }

/* ── Responsive: tablet / large mobile ─────────────── */
@media (max-width: 900px) {
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .content-area { padding: 32px 28px; }
}

/* ── Responsive: mobile ─────────────────────────────── */
@media (max-width: 768px) {
    .mobile-topbar { display: flex; }

    .sidebar {
        position: fixed;
        top: 0; left: 0;
        width: min(300px, 85vw);
        height: 100vh;
        transform: translateX(-105%);
        transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 160;
        align-self: auto;
    }
    body.nav-open .sidebar { transform: translateX(0); }

    .nav-close-btn {
        display: flex;
        justify-content: flex-end;
        margin-bottom: 6px;
    }

    .content-area { padding: 80px 18px 36px; gap: 18px; }

    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }

    .section-head { flex-direction: column; align-items: flex-start; gap: 12px; }
    .section-head .actions-row { width: 100%; }
    .section-head .actions-row .btn { flex: 1; justify-content: center; }

    .page-actions { justify-content: stretch; }
    .page-actions .btn { width: 100%; justify-content: center; }

    .btn { min-height: 48px; font-size: 15px; }

    input, select, textarea { font-size: 16px; }

    .totals-panel { width: 100%; margin-left: 0; }

    .status-field { min-width: 100%; }
    .align-end-row { flex-direction: column; align-items: stretch; }
    .align-end-row .btn { width: 100%; }

    .info-card strong { font-size: 20px; }

    .page-header h2 { font-size: 26px; }
    .page-header p { display: none; }

    th, td { padding: 12px 14px; }
    .table-actions { gap: 10px; }
}

/* ── Responsive: small phones ───────────────────────── */
@media (max-width: 480px) {
    .card { padding: 20px; border-radius: var(--radius-lg); }
    .item-card { padding: 16px; border-radius: var(--radius-md); }

    .stat-card { display: flex; align-items: center; justify-content: space-between; }
    .stat-card strong { font-size: 30px; margin-top: 0; }
}

/* ── Simprofire add-ons ─────────────────────────────── */

.badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary-dark);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.alert { padding: 12px 14px; border-radius: var(--radius-sm); margin-bottom: 12px; }
.alert-success { background: #e8f5e9; color: #2e7d32; }
.alert-danger { background: #fdecea; color: #b00020; }
.error-list { margin: 0; padding-left: 18px; }

fieldset {
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 16px;
    margin: 0;
}
fieldset legend {
    padding: 0 8px;
    font-family: var(--font-brand);
    font-weight: 600;
    color: var(--primary);
}

.inspection-items { display: flex; flex-direction: column; gap: 14px; }
.field-row {
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 12px;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.field-row-head {
    display: flex;
    gap: 10px;
    align-items: baseline;
    flex-wrap: wrap;
}
.field-row-head .num {
    background: var(--bg);
    border: 1px solid var(--line);
    color: var(--muted);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    min-width: 44px;
    text-align: center;
}
.field-row-head .q { flex: 1; font-weight: 500; }
.field-row-head .equipment {
    background: #f7f7f7;
    border: 1px solid var(--line);
    color: var(--text);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}
.field-row-head .freq {
    background: #fff5f5;
    color: var(--primary);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}
.field-row .grid { gap: 8px; }
.snn-radios {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.snn-opt {
    flex: 1;
    min-width: 60px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    text-align: center;
    cursor: pointer;
    transition: all .15s;
    background: #fff;
    user-select: none;
}
.snn-opt input { display: none; }
.snn-opt span { font-weight: 600; }
.snn-opt:has(input:checked) { background: var(--primary); color: #fff; border-color: var(--primary); }

.check-row { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; cursor: pointer; }
.check-list { display: flex; flex-direction: column; gap: 4px; max-height: 320px; overflow-y: auto; border: 1px solid var(--line); padding: 10px; border-radius: var(--radius-sm); background: #fff; }

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
}
.gallery-item {
    margin: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fff;
    overflow: hidden;
}
.gallery-item img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    background: var(--bg);
}
.gallery-item figcaption {
    padding: 10px 12px 0;
    color: var(--muted);
    font-size: 13px;
}
.gallery-item form {
    padding: 8px 12px 12px;
}

#equipment-table th small {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 500;
}

.signature-pad .sig-canvas-wrap {
    border: 2px dashed var(--line-strong);
    border-radius: var(--radius-sm);
    background: #fff;
    touch-action: none;
    overflow: hidden;
}
.signature-pad canvas {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 180px;
    touch-action: none;
    cursor: crosshair;
    background: #fff;
}

#autosave-status.ok { color: var(--success); }
#autosave-status.warn { color: var(--warn); }

.btn-danger { background: var(--danger); color: #fff; border: 1px solid var(--danger); }
.btn-danger:hover { background: #8a0019; color: #fff; }

.nav-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.nav-group + .nav-group { margin-top: 16px; }
.nav-group-title {
    color: rgba(255,255,255,.5);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: 0 14px 2px;
}
.sidebar-nav-button {
    width: 100%;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.wysiwyg-toolbar {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.wysiwyg-toolbar button {
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    min-height: 34px;
    padding: 6px 10px;
    cursor: pointer;
}
.wysiwyg-editor {
    min-height: 240px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fff;
    padding: 12px;
    line-height: 1.5;
}
.wysiwyg-editor:focus {
    outline: 2px solid var(--primary-soft);
    border-color: var(--primary);
}
.template-fields {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.template-field-row {
    display: grid;
    grid-template-columns: 1fr 1.4fr minmax(140px, .8fr) minmax(120px, .7fr) auto;
    gap: 8px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 10px;
    background: #fff;
}
.check-inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}
.acta-body {
    font-size: 10pt;
    line-height: 1.5;
}

/* Public verify page */
.verify-body {
    background: var(--bg);
    min-height: 100vh;
    padding: 24px 12px;
}
.verify-shell {
    max-width: 560px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.verify-header { text-align: center; }
.verify-header .verify-logo { max-height: 70px; margin-bottom: 8px; }
.verify-card { text-align: left; }
.verify-badge {
    display: inline-block;
    background: var(--success);
    color: #fff;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 8px;
}
.verify-grid {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 8px 14px;
    margin: 12px 0;
}
.verify-grid dt { color: var(--muted); font-size: 13px; }
.verify-grid dd { margin: 0; font-weight: 500; }
.verify-footer { text-align: center; color: var(--muted); font-size: 13px; }

@media (max-width: 600px) {
    .field-row-head { flex-wrap: wrap; }
    .snn-opt { font-size: 15px; padding: 14px 8px; }
    .verify-grid { grid-template-columns: 1fr; gap: 2px 0; }
    .verify-grid dt { margin-top: 8px; }
    .template-field-row { grid-template-columns: 1fr; }
}
