:root {
    --font-sans: "Manrope", system-ui, sans-serif;
    --font-display: "Outfit", var(--font-sans);
    --sidebar: 272px;
    --radius: 18px;
    --accent: #2ee6a6;
    --accent-2: #7c9cff;
    --copper: #e8a87c;
    --bg: #08111f;
    --bg-elev: #101a2c;
    --bg-soft: #162033;
    --line: rgba(255, 255, 255, 0.08);
    --text: #e8eefc;
    --muted: #8b97b3;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

html[data-accent="blue"] { --accent: #4ea1ff; --accent-2: #7c9cff; }
html[data-accent="amber"] { --accent: #f5b942; --accent-2: #e8a87c; }
html[data-accent="rose"] { --accent: #ff6b9a; --accent-2: #c084fc; }
html[data-accent="teal"] { --accent: #2ee6a6; --accent-2: #7c9cff; }

html[data-theme="light"] {
    --bg: #f3f1eb;
    --bg-elev: #ffffff;
    --bg-soft: #ece8df;
    --line: rgba(18, 28, 45, 0.08);
    --text: #152033;
    --muted: #5c6b84;
    --shadow: 0 18px 40px rgba(21, 32, 51, 0.08);
}

* { box-sizing: border-box; scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--accent) 45%, var(--line)) transparent; }
html, body { height: 100%; }
body {
    margin: 0;
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    letter-spacing: -0.01em;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); }

.app-shell {
    min-height: 100vh;
    display: flex;
    background:
        radial-gradient(1200px 500px at -10% -10%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 50%),
        radial-gradient(800px 400px at 110% 0%, color-mix(in srgb, var(--accent-2) 14%, transparent), transparent 45%),
        var(--bg);
}

.app-sidebar {
    width: var(--sidebar);
    flex-shrink: 0;
    background: color-mix(in srgb, var(--bg-elev) 88%, transparent);
    backdrop-filter: blur(18px);
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 40;
}

.brand {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 22px 20px 12px;
}
.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    display: grid;
    place-items: center;
    font-family: var(--font-display);
    font-weight: 800;
    color: #062016;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 35%, transparent);
}
.brand-name { font-family: var(--font-display); font-weight: 800; letter-spacing: 0.04em; }
.brand-sub { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.16em; }

.side-nav { padding: 8px 12px; overflow: auto; flex: 1; }
.nav-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--muted);
    margin: 16px 10px 8px;
}
.side-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    padding: 10px 12px;
    border-radius: 12px;
    margin-bottom: 2px;
    font-weight: 600;
}
.side-nav .nav-link i { font-size: 1.05rem; }
.side-nav .nav-link:hover,
.side-nav .nav-link.active {
    color: var(--text);
    background: color-mix(in srgb, var(--accent) 12%, var(--bg-soft));
}
.side-nav .nav-link.active { box-shadow: inset 3px 0 0 var(--accent); }

.side-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-top: 1px solid var(--line);
}

.avatar {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--accent-2), var(--copper));
    color: #0b1220;
    font-weight: 800;
}
.avatar.sm { width: 32px; height: 32px; border-radius: 10px; font-size: 13px; }

.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.app-topbar {
    display: flex;
    align-items: center;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 30;
    padding: 14px 28px;
    background: color-mix(in srgb, var(--bg) 78%, transparent);
    backdrop-filter: blur(16px) saturate(140%);
    border-bottom: 1px solid var(--line);
}
.page-title {
    font-family: var(--font-display);
    font-size: 1.55rem;
    font-weight: 800;
}
.page-kicker { color: var(--muted); font-size: 0.85rem; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.user-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    padding: 4px 10px 4px 4px;
    border-radius: 999px;
    background: var(--bg-elev);
    border: 1px solid var(--line);
}
.app-content { padding: 8px 28px 40px; }

.card-surface {
    background: color-mix(in srgb, var(--bg-elev) 92%, transparent);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.stat-card {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: 18px 18px 16px;
}
.stat-card > * { position: relative; z-index: 1; }
.stat-card::after {
    content: "";
    position: absolute;
    right: -20px;
    top: -20px;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--accent) 16%, transparent);
}
.stat-label { color: var(--muted); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.stat-value { font-family: var(--font-display); font-size: 1.7rem; font-weight: 800; margin-top: 4px; overflow-wrap: anywhere; }
.stat-hint { color: var(--muted); font-size: 0.8rem; }

.money-stack { display: flex; flex-direction: column; line-height: 1.25; white-space: nowrap; font-variant-numeric: tabular-nums; }
.money-stack-end { align-items: flex-end; }
.money-stack-start { align-items: flex-start; }
.money-stack strong { font-weight: 700; font-size: .92rem; }
.money-stack small { color: var(--muted); font-size: .75rem; }

.report-doc { max-width: 100%; }
.report-kpis {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}
.report-kpi {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 14px 16px;
    background: color-mix(in srgb, var(--bg-elev) 92%, transparent);
    min-width: 0;
}
.report-kpi-label {
    display: block;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 6px;
}
.report-kpi-value {
    display: block;
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.15;
}
.report-kpi .money-stack strong { font-family: var(--font-display); font-size: 1.05rem; }
.report-note { color: var(--muted); font-size: .8rem; margin: 12px 0 0; }
.report-table { font-size: .86rem; }
.report-table td, .report-table th { vertical-align: middle; }
.report-table .num { text-align: right; }
.report-table .name-cell { min-width: 160px; max-width: 240px; }
.report-pct strong { display: block; font-variant-numeric: tabular-nums; }
.report-pct .progress { margin-top: 6px; }
.report-kpis.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) {
    .report-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .report-kpis.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
    .report-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.badge-soft {
    font-weight: 700;
    padding: 0.4em 0.7em;
    border-radius: 999px;
}
.badge-soft-success { background: rgba(46, 230, 166, 0.16); color: #2ee6a6; }
.badge-soft-danger { background: rgba(255, 92, 110, 0.16); color: #ff7a88; }
.badge-soft-warning { background: rgba(245, 185, 66, 0.16); color: #f5b942; }
.badge-soft-info { background: rgba(78, 161, 255, 0.16); color: #7cbcff; }
.badge-soft-primary { background: rgba(124, 156, 255, 0.16); color: #9bb4ff; }
.badge-soft-secondary { background: rgba(139, 151, 179, 0.16); color: var(--muted); }

.btn-accent {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #062016;
    border: 0;
    font-weight: 800;
    border-radius: 12px;
    padding: 0.55rem 1rem;
}
.btn-accent:hover { color: #062016; filter: brightness(1.05); }
.btn-ghost {
    background: transparent;
    border: 1px solid var(--line);
    color: var(--text);
    border-radius: 12px;
}
.btn-ghost:hover { background: var(--bg-soft); color: var(--text); }

.table-modern { color: var(--text); margin: 0; }
.table-modern > :not(caption) > * > * { background: transparent; border-bottom-color: var(--line); vertical-align: middle; }
.table-modern tbody tr:hover { background: color-mix(in srgb, var(--accent) 6%, transparent); }

.form-control, .form-select, .form-control:focus, .form-select:focus {
    background: var(--bg-soft);
    border-color: var(--line);
    color: var(--text);
    border-radius: 12px;
    box-shadow: none;
}
.form-label { font-weight: 700; font-size: 0.85rem; }

.progress { background: var(--bg-soft); height: 8px; border-radius: 99px; }
.progress-bar { background: linear-gradient(90deg, var(--accent), var(--accent-2)); }

.alert-soft-success { background: rgba(46, 230, 166, 0.12); color: var(--text); border: 1px solid rgba(46, 230, 166, 0.25); }
.alert-soft-danger { background: rgba(255, 92, 110, 0.12); color: var(--text); border: 1px solid rgba(255, 92, 110, 0.25); }

.glass-menu {
    background: var(--bg-elev) !important;
    border: 1px solid var(--line);
    color: var(--text);
}
.dropdown-item { color: var(--text); }
.dropdown-item:hover { background: var(--bg-soft); color: var(--text); }

.notif-dot {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 16px;
    height: 16px;
    border-radius: 99px;
    background: #ff5c6e;
    color: white;
    font-size: 10px;
    display: grid;
    place-items: center;
}

.msg-shell {
    display: grid;
    grid-template-columns: minmax(260px, 320px) 1fr;
    min-height: calc(100vh - 150px);
    overflow: hidden;
}
.msg-shell.card-surface:hover { transform: none; }
.msg-list {
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--line);
    min-height: 0;
}
.msg-list-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 16px 16px 8px;
}
.msg-kicker {
    font-size: .72rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 700;
}
.msg-search { padding: 8px 16px 12px; }
.msg-threads { overflow: auto; flex: 1; padding: 0 8px 12px; }
.msg-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
    text-align: left;
    border: 0;
    background: transparent;
    color: inherit;
    border-radius: 14px;
    padding: 10px 12px;
}
.msg-item:hover, .msg-item.is-on { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.msg-item-top {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    align-items: baseline;
}
.msg-item-top time { color: var(--muted); font-size: .75rem; white-space: nowrap; }
.msg-item-preview {
    color: var(--muted);
    font-size: .82rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.msg-item-tags { display: flex; align-items: center; gap: 8px; }
.msg-unread {
    margin-left: auto;
    min-width: 18px;
    height: 18px;
    border-radius: 99px;
    background: #ff5c6e;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    display: grid;
    place-items: center;
    padding: 0 5px;
}
.msg-pane { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.msg-empty {
    margin: auto;
    text-align: center;
    max-width: 380px;
    padding: 32px 16px;
    color: var(--muted);
}
.msg-empty i { font-size: 2.2rem; color: var(--accent); }
.msg-empty h2 { color: var(--text); font-size: 1.2rem; margin: 12px 0 8px; }
.msg-thread { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.msg-thread-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
}
.msg-feed {
    flex: 1;
    overflow: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.msg-bubble {
    max-width: min(72%, 520px);
    align-self: flex-start;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: 16px 16px 16px 6px;
    padding: 8px 12px;
}
.msg-bubble.is-mine {
    align-self: flex-end;
    background: color-mix(in srgb, var(--accent) 18%, var(--bg-elev));
    border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
    border-radius: 16px 16px 6px 16px;
}
.msg-who { font-size: .72rem; color: var(--muted); margin-bottom: 2px; }
.msg-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.msg-composer {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 16px 16px;
    border-top: 1px solid var(--line);
}
.msg-composer-row {
    display: flex;
    gap: 8px;
    align-items: flex-end;
    width: 100%;
}
.msg-composer textarea { resize: none; }
.msg-composer .btn { height: 42px; }
.msg-attach-btn {
    display: grid;
    place-items: center;
    min-width: 42px;
    cursor: pointer;
    margin: 0;
}
.msg-file-list { display: flex; flex-wrap: wrap; gap: 6px; }
.msg-chip {
    font-size: .75rem;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 2px 10px;
}
.msg-file {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 8px 10px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--bg) 55%, transparent);
    border: 1px solid var(--line);
    color: inherit;
    text-decoration: none;
    font-size: .82rem;
}
.msg-file:hover { color: inherit; border-color: var(--accent); }
.msg-file small { color: var(--muted); margin-left: auto; }
.msg-file.is-image { padding: 0; background: transparent; border: 0; display: block; }
.msg-file.is-image img {
    display: block;
    max-width: min(280px, 100%);
    max-height: 220px;
    border-radius: 12px;
    object-fit: cover;
}
.msg-media {
    display: block;
    width: 100%;
    max-width: 320px;
    margin-top: 8px;
    border-radius: 12px;
}
.modal-content {
    background: var(--bg-elev);
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 18px;
}
.modal-header, .modal-footer { border-color: var(--line); }
.modal-title { font-family: var(--font-display); }
@media (max-width: 991.98px) {
    .msg-shell { grid-template-columns: 1fr; min-height: calc(100vh - 130px); }
    .msg-shell.is-open .msg-list { display: none; }
    .msg-shell:not(.is-open) .msg-pane { display: none; }
}

.section-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }

.auth-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background:
        radial-gradient(900px 400px at 10% 10%, rgba(46, 230, 166, 0.18), transparent 50%),
        radial-gradient(700px 400px at 90% 90%, rgba(124, 156, 255, 0.16), transparent 50%),
        #08111f;
    color: #e8eefc;
}
.auth-card { width: min(440px, calc(100% - 32px)); padding: 32px; }
.auth-kicker { letter-spacing: 0.2em; text-transform: uppercase; font-size: 11px; color: #8b97b3; }

.empty-state { text-align: center; padding: 48px 16px; color: var(--muted); }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px 16px; }
.perm-item { display: flex; align-items: flex-start; gap: 8px; font-size: .92rem; cursor: pointer; }
.perm-item input { margin-top: 4px; }

.sidebar-backdrop { display: none; }

@media (max-width: 991.98px) {
    .app-sidebar {
        position: fixed;
        left: 0;
        transform: translateX(-105%);
        transition: transform 0.25s ease;
        box-shadow: 24px 0 60px rgba(0,0,0,.35);
    }
    .app-sidebar.open { transform: none; }
    .app-content, .app-topbar { padding-left: 16px; padding-right: 16px; }
    .sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 35;
        background: rgba(4, 8, 16, .55);
        backdrop-filter: blur(6px);
    }
    .sidebar-backdrop[hidden] { display: none; }
    body.sidebar-open { overflow: hidden; }
}

html[data-theme="dark"] { color-scheme: dark; }
html[data-theme="light"] { color-scheme: light; }
html[data-theme="light"] .btn-close { filter: none; }
html[data-theme="dark"] .btn-close { filter: invert(1); }

.app-content {
    animation: page-in .35s ease;
}
@keyframes page-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
    .app-content, .app-sidebar { animation: none; transition: none; }
}

.card-surface {
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.stat-card:hover, .card-surface:hover {
    border-color: color-mix(in srgb, var(--accent) 28%, var(--line));
}
.stat-card .money-stack strong {
    font-family: var(--font-display);
    font-size: 1.35rem;
}
.stat-card .money-stack small { font-size: .78rem; }

.btn-accent {
    transition: filter .15s ease, transform .15s ease;
}
.btn-accent:hover { transform: translateY(-1px); }
.form-control:focus, .form-select:focus {
    border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}
.password-field { position: relative; }
.password-field input { padding-right: 46px; }
.password-toggle {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: var(--muted);
    width: 36px;
    height: 36px;
    border-radius: 10px;
}
.password-toggle:hover { color: var(--text); background: var(--bg-elev); }

.chart-box { position: relative; height: 260px; }
.chart-box-sm { height: 220px; }
.chart-box canvas { width: 100% !important; height: 100% !important; }

.brand-logo {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    object-fit: contain;
    background: #fff;
    padding: 3px;
}

.print-body { background: #dfe6f0; min-height: 100vh; padding: 24px; color: #122; }
.service-card { display: flex; justify-content: center; align-items: flex-start; gap: 28px; flex-wrap: wrap; }
.sc-side { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.sc-caption { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; font-weight: 800; color: #5c6b84; }
.sc-front, .sc-back {
    width: 54mm;
    height: 86mm;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 18px 40px rgba(0,0,0,.28);
    display: flex;
    flex-direction: column;
    font-family: Manrope, sans-serif;
    position: relative;
}
.sc-front {
    background: linear-gradient(180deg, #0b1f3a 0%, #12345a 48%, #0e2a22 100%);
    color: #f4f7fb;
}
.sc-band {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: rgba(255,255,255,.08);
}
.sc-band img { height: 28px; width: 28px; object-fit: contain; background: #fff; border-radius: 6px; }
.sc-mark {
    width: 28px; height: 28px; border-radius: 6px;
    display: grid; place-items: center;
    background: #2ee6a6; color: #062016; font-weight: 800; font-size: 11px;
}
.sc-org { font-family: Outfit, sans-serif; font-size: 11px; font-weight: 800; line-height: 1.15; }
.sc-kicker { font-size: 8px; letter-spacing: .14em; text-transform: uppercase; opacity: .75; }
.sc-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 5px;
    padding: 7px 8px 6px;
    flex: 1;
    min-height: 0;
}
.sc-photo { flex-shrink: 0; }
.sc-photo, .sc-photo img, .sc-photo-fallback {
    width: 22mm; height: 26mm; object-fit: cover; border-radius: 6px; background: #e8eefc; color: #123;
}
.sc-photo-fallback { display: grid; place-items: center; font-weight: 800; font-size: 20px; }
.sc-meta { width: 100%; font-size: 8px; line-height: 1.3; flex: 0 1 auto; }
.sc-name { font-family: Outfit, sans-serif; font-size: 12px; font-weight: 800; line-height: 1.15; margin-bottom: 2px; }
.sc-role { color: #2ee6a6; font-weight: 700; margin-bottom: 4px; font-size: 9px; }
.sc-line { opacity: .9; }
.sc-qr-wrap {
    flex-shrink: 0;
    margin-top: auto;
    width: 18mm;
    height: 18mm;
    background: #fff;
    border-radius: 4px;
    padding: 2px;
    box-sizing: border-box;
    display: grid;
    place-items: center;
    overflow: hidden;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}
.sc-qr, .sc-qr-wrap svg {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #fff;
}
.sc-back {
    background: #f6f3ec;
    color: #122;
    border: 1px solid #d8d2c6;
}
.sc-back-inner {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 10px 10px 8px;
}
.sc-back-logo {
    flex: 1;
    display: grid;
    place-items: center;
    min-height: 0;
    padding: 6px 4px 8px;
}
.sc-back-logo img {
    width: 78%;
    max-height: 36mm;
    object-fit: contain;
}
.sc-back-mark {
    width: 28mm;
    height: 28mm;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: #0b1f3a;
    color: #fff;
    font-family: Outfit, sans-serif;
    font-size: 18px;
    font-weight: 800;
}
.sc-back-org {
    font-family: Outfit, sans-serif;
    font-size: 11px;
    font-weight: 800;
    text-align: center;
    line-height: 1.2;
}
.sc-back-kicker {
    text-align: center;
    font-size: 8px;
    letter-spacing: .16em;
    text-transform: uppercase;
    font-weight: 800;
    opacity: .7;
    margin: 2px 0 8px;
}
.sc-auth {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 6px;
}
.sc-sign { flex: 1; min-width: 0; text-align: left; }
.sc-auth-title { font-size: 7px; letter-spacing: .12em; text-transform: uppercase; font-weight: 800; margin-bottom: 2px; }
.sc-auth-given { font-family: Outfit, sans-serif; font-size: 11px; font-weight: 700; line-height: 1.15; }
.sc-auth-family { font-family: Outfit, sans-serif; font-size: 10px; font-weight: 800; letter-spacing: .03em; line-height: 1.15; text-transform: uppercase; }
.sc-signature { max-width: 34mm; height: 14mm; object-fit: contain; object-position: left center; display: block; margin-top: 1mm; mix-blend-mode: lighten; }
.sc-sign-line { border-bottom: 1px solid #8a8378; width: 28mm; height: 14mm; }
.sc-auth-hint { font-size: 7px; opacity: .55; margin-top: 2px; }
.sc-seal { flex-shrink: 0; width: 22mm; }
.sc-seal img { width: 22mm; height: 22mm; object-fit: contain; display: block; mix-blend-mode: lighten; }
.sc-seal-fallback {
    width: 22mm; height: 22mm; border: 1px dashed #8a8378; border-radius: 50%;
    display: grid; place-items: center; font-size: 7px; text-transform: uppercase; letter-spacing: .08em; opacity: .55;
}

.report-letterhead {
    margin-bottom: 22px;
    padding: 18px 20px 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--card, color-mix(in srgb, var(--accent) 4%, transparent));
}
.report-letterhead-top {
    display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
    padding-bottom: 14px; margin-bottom: 14px;
    border-bottom: 1px solid var(--line);
}
.report-brand { display: flex; align-items: center; gap: 12px; min-width: 220px; }
.report-logo { width: 56px; height: 56px; object-fit: contain; border-radius: 12px; background: #fff; padding: 4px; }
.report-mark {
    width: 56px; height: 56px; border-radius: 12px; display: grid; place-items: center;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #062016; font-weight: 800; font-family: Outfit, sans-serif;
}
.report-company { font-family: Outfit, sans-serif; font-weight: 800; font-size: 1.15rem; line-height: 1.15; }
.report-legal, .report-slogan, .report-org, .report-sub, .report-meta, .report-issued { color: var(--muted); font-size: .85rem; }
.report-org { text-align: right; line-height: 1.45; }
.report-letterhead-title { display: flex; justify-content: space-between; gap: 16px; align-items: end; flex-wrap: wrap; }
.report-kicker { letter-spacing: .16em; text-transform: uppercase; font-size: 11px; color: var(--accent); margin: 0 0 4px; }
.report-letterhead h1 { font-family: Outfit, sans-serif; font-weight: 800; font-size: 1.45rem; margin: 0; }
.report-sub, .report-meta { margin: 4px 0 0; }
.report-issued { text-align: right; }
.report-signoff {
    display: flex; justify-content: flex-end; align-items: flex-end; gap: 28px;
    margin-top: 28px; padding-top: 8px;
}
.report-signoff-sign { text-align: center; min-width: 180px; }
.report-signoff-title { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.report-signoff-name { font-family: Outfit, sans-serif; font-weight: 800; font-size: 1.05rem; margin-top: 4px; }
.report-signoff-signature { display: block; height: 64px; max-width: 220px; object-fit: contain; margin: 6px auto 0; mix-blend-mode: lighten; }
.report-signoff-stamp { width: 92px; height: 92px; object-fit: contain; mix-blend-mode: lighten; }
.table-modern thead th { font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }

@media print {
    .no-print, .app-sidebar, .app-topbar { display: none !important; }
    .print-body { background: white; padding: 10mm; }
    .sc-front, .sc-back { box-shadow: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .sc-qr-wrap, .sc-qr { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .app-shell, .app-main, .app-content { display: block !important; width: auto; background: #fff; color: #122; }
    .card-surface, .stat-card, .report-kpi, .report-letterhead {
        background: #fff !important;
        box-shadow: none !important;
        color: #122;
    }
    .stat-card { overflow: visible; }
    .stat-card::after { display: none; }
    .stat-value { font-size: 1.05rem; }
    .stat-label { letter-spacing: .04em; white-space: nowrap; }
    .report-letterhead {
        border-color: #ccc; border-radius: 0; padding: 0 0 10px; margin-bottom: 14px;
    }
    .report-letterhead-top, .report-letterhead-title { border-color: #ccc; }
    .report-company, .report-letterhead h1 { color: #122; }
    .report-org, .report-legal, .report-slogan, .report-sub, .report-meta, .report-issued, .report-signoff-title { color: #444; }
    .report-signoff-name { color: #122; }
    .report-signoff { break-inside: avoid; }
    .report-kpis { gap: 8px; margin-bottom: 14px; grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
    .report-kpis.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
    .report-kpi { border: 1px solid #ccc; border-radius: 0; padding: 10px 12px; }
    .report-kpi-label { color: #555; font-size: 8pt; }
    .report-kpi-value { font-size: 13pt; }
    .report-kpi .money-stack strong { font-size: 11pt; }
    .report-kpi .money-stack small, .money-stack small { color: #555; font-size: 8pt; }
    .table-modern thead { display: table-header-group; }
    .table-modern thead th { color: #333; border-bottom: 2px solid #122; }
    .report-table { font-size: 9.5pt; }
    .report-table td, .report-table th { padding: 7px 8px; }
    .card-surface { border: 1px solid #ccc; border-radius: 0; overflow: visible; }
    .table-responsive { overflow: visible !important; }
    a { color: inherit !important; text-decoration: none !important; }
    .badge { border: 1px solid #ccc; color: #122 !important; background: #f3f3f3 !important; }
    @page { size: A4 portrait; margin: 12mm; }
}

