:root {
    --sidebar-width: 250px;
    --sidebar-bg: #1f2a37;
    --sidebar-fg: #c9d3df;
    --brand: #7a1f3d;
}

body.app-body { background: #f4f6f9; font-size: .925rem; }

.app-wrapper { display: flex; min-height: 100vh; }

.app-sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: var(--sidebar-fg);
    position: fixed; top: 0; bottom: 0; left: 0;
    overflow-y: auto; z-index: 1040;
    transition: transform .2s ease;
}
.sidebar-brand { padding: 1rem 1.25rem; font-weight: 600; font-size: 1.05rem; color: #fff; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar-brand i { color: #e8a0b8; margin-right: .4rem; }
.sidebar-nav { padding: .5rem 0 2rem; }
.sidebar-nav a { display: block; padding: .45rem 1.25rem; color: var(--sidebar-fg); text-decoration: none; border-left: 3px solid transparent; }
.sidebar-nav a i { width: 1.4rem; display: inline-block; }
.sidebar-nav a:hover { background: rgba(255,255,255,.05); color: #fff; }
.sidebar-nav a.active { background: rgba(255,255,255,.08); color: #fff; border-left-color: #e8a0b8; }
.nav-section { padding: .9rem 1.25rem .3rem; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: #7f8ea3; }

.app-main { flex: 1; margin-left: var(--sidebar-width); display: flex; flex-direction: column; min-width: 0; }
.app-topbar { background: #fff; border-bottom: 1px solid #e3e7ed; padding: .55rem 1.25rem; display: flex; align-items: center; gap: .75rem; position: sticky; top: 0; z-index: 1030; }
.topbar-search { position: relative; align-items: center; width: 340px; }
.topbar-search i { position: absolute; left: .6rem; color: #8a94a3; }
.topbar-search input { padding-left: 1.9rem; }
.app-content { padding: 1.25rem; flex: 1; }
.app-footer { padding: .75rem 1.25rem; border-top: 1px solid #e3e7ed; background: #fff; }

@media (max-width: 991.98px) {
    .app-sidebar { transform: translateX(-100%); }
    .app-sidebar.show { transform: translateX(0); box-shadow: 0 0 30px rgba(0,0,0,.3); }
    .app-main { margin-left: 0; }
}

.card { border: 1px solid #e3e7ed; border-radius: .5rem; }
.card-header { background: #fff; font-weight: 600; }
.stat-card .stat-value { font-size: 1.6rem; font-weight: 600; line-height: 1.2; }
.stat-card .stat-label { color: #6b7685; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.stat-card .stat-icon { font-size: 1.8rem; opacity: .35; }

.table > :not(caption) > * > * { padding: .5rem .6rem; }
.table thead th { font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: #5b6676; background: #f8f9fb; white-space: nowrap; }
.table-amount, td.amount, th.amount { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.badge-status-draft { background: #ffc107; color: #3d2f00; }
.badge-status-finalized { background: #0d6efd; }
.badge-status-published { background: #198754; }
.badge-status-superseded { background: #6c757d; }
.badge-status-missing { background: #dc3545; }

.guest-body { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #1f2a37 0%, #3b1d2b 100%); }
.guest-card { width: 100%; max-width: 420px; margin: 1rem; border-radius: .75rem; }
.guest-logo { font-size: 2.4rem; color: var(--brand); }

.preview-frame { width: 100%; height: 80vh; min-height: 600px; border: 1px solid #d5dae1; border-radius: .4rem; background: #525659; }
.design-form .accordion-button { padding: .6rem .9rem; font-weight: 600; }
.design-form .form-label { margin-bottom: .15rem; font-size: .82rem; }
.design-sticky { position: sticky; top: 70px; }
.asset-thumb { max-height: 80px; max-width: 200px; object-fit: contain; background: repeating-conic-gradient(#eee 0% 25%, #fff 0% 50%) 50% / 16px 16px; border: 1px solid #ddd; padding: 4px; border-radius: 4px; }
.calc-table td { padding: .3rem .5rem; }
.formula { font-family: SFMono-Regular, Consolas, monospace; font-size: .82rem; }
.sticky-actions { position: sticky; bottom: 0; background: #fff; border-top: 1px solid #e3e7ed; padding: .75rem; z-index: 5; }

@media print {
    .app-sidebar, .app-topbar, .app-footer, .no-print, .btn, form.filters { display: none !important; }
    .app-main { margin-left: 0; }
    body.app-body { background: #fff; }
    .card { border: none; }
}
