:root {
    color-scheme: light;
    --bg-color: #faf9f6;
    --card-bg: #ffffff;
    --border-color: #ece9e3;
    --primary: #f97316;
    --primary-hover: #ea650c;
    --orange-soft: #fff3e6;
    --orange-ink: #a9430c;
    --text-main: #191919;
    --text-muted: #706d67;
    --danger: #b42318;
    --success: #23704c;
    --sidebar-width: 240px;
    --shadow: 0 4px 20px rgb(49 35 18 / 3%);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--bg-color); color: var(--text-main); font: 14px/1.6 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
button, a, input, select, textarea { transition: background .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
:focus-visible { outline: 3px solid #b94c09; outline-offset: 4px; }
[hidden] { display: none !important; }
.icon { width: 20px; height: 20px; flex: 0 0 auto; vertical-align: middle; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; top: -70px; left: 20px; background: white; padding: 12px 20px; z-index: 1100; border-radius: 8px; }
.skip-link:focus { top: 12px; }
.eyebrow { color: var(--text-muted); font-size: 10px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.muted { color: var(--text-muted); }

/* Shared workspace shell */
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-width); background: white; border-right: 1px solid var(--border-color); display: flex; flex-direction: column; padding: 30px 20px 20px; z-index: 50; overflow-y: auto; }
.sidebar-brand { display: flex; align-items: center; gap: 12px; padding: 0 8px; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; flex-shrink: 0; border-radius: 13px; background: linear-gradient(135deg, #ffb65c, #ff812e); color: #241306; font-size: 15px; font-weight: 800; letter-spacing: -.07em; box-shadow: 0 4px 10px #f9731614; }
.brand-copy strong { display: block; font-size: 16px; letter-spacing: -.04em; }
.brand-copy small { color: var(--text-muted); font-size: 11px; }
.nav-label { margin: 42px 14px 12px; }
.sidebar-menu { list-style: none; display: grid; gap: 6px; }
.sidebar-menu a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid transparent; border-radius: 10px; color: var(--text-muted); font-size: 13px; font-weight: 500; }
.sidebar-menu a:hover { background: #faf8f4; color: var(--text-main); }
.sidebar-menu a.active { background: linear-gradient(100deg, #fff0dc, #fff7ed); color: var(--text-main); border-color: #ffdfb8; font-weight: 600; }
.sidebar-menu a.active .icon { color: #bd500c; }
.nav-count { margin-left: auto; border-radius: 5px; padding: 0 6px; background: #ffdfbd; color: #7c3109; font-size: 11px; }
.sidebar-note { margin: auto 0 22px; padding: 20px 16px; border: 1px solid #f3e8d9; border-radius: 12px; background: linear-gradient(140deg, #fffaf4, #fff3e2); }
.sidebar-note > .icon { color: #b85110; margin-bottom: 10px; }
.sidebar-note strong { display: block; font-size: 12px; }
.sidebar-note p { font-size: 11px; color: var(--text-muted); margin: 5px 0 14px; line-height: 1.7; }
.sidebar-note a { font-size: 11px; font-weight: 600; display: inline-flex; align-items: center; gap: 7px; }
.sidebar-note a:hover { color: var(--orange-ink); }
.sidebar-note a .icon { width: 14px; height: 14px; }
.sidebar-spacer { min-height: 60px; }
.sidebar-footer { border-top: 1px solid var(--border-color); padding-top: 18px; }
.profile-block { display: flex; align-items: center; gap: 10px; padding: 0 8px 14px; min-width: 0; }
.profile-copy { min-width: 0; }
.profile-copy strong { display: block; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-copy small { color: var(--text-muted); font-size: 10px; }
.avatar { display: grid; place-items: center; flex: 0 0 auto; width: 36px; height: 36px; border-radius: 50%; background: #f3ede5; color: #685240; font-size: 11px; font-weight: 600; }
.avatar-admin { background: #fff0dd; border: 1px solid #f4d6b1; color: #703408; }
.btn-logout { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; background: transparent; color: var(--text-muted); border-radius: 8px; font-size: 12px; }
.btn-logout:hover { background: #fff3ee; color: var(--danger); }
.btn-logout .icon { width: 17px; height: 17px; }
.workspace { margin-left: var(--sidebar-width); min-width: 0; }
.topbar { min-height: 78px; border-bottom: 1px solid var(--border-color); background: rgb(255 255 255 / 88%); padding: 16px 36px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.breadcrumb, .topbar-end { display: flex; align-items: center; gap: 13px; }
.breadcrumb { font-size: 12px; color: var(--text-muted); }
.breadcrumb strong { color: var(--text-main); font-weight: 500; }
.breadcrumb .icon { width: 15px; height: 15px; }
.date-label { font-size: 11px; color: var(--text-muted); }
.topbar-end .avatar { width: 32px; height: 32px; }
.topbar-divider { width: 1px; height: 24px; background: var(--border-color); }
.main-content { padding: 30px 36px 20px; max-width: 1530px; margin: 0 auto; }
.header { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 25px; }
.header h1 { font-size: 26px; font-weight: 650; line-height: 1.3; letter-spacing: -.055em; }
.header p { font-size: 12px; color: var(--text-muted); margin-top: 6px; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 39px; padding: 9px 15px; font-size: 12px; font-weight: 600; border: 1px solid var(--border-color); border-radius: 8px; background: white; color: var(--text-main); white-space: nowrap; }
.button .icon { width: 16px; height: 16px; }
.button:hover:not(:disabled) { background: #fcf7ef; border-color: #e6cbb0; box-shadow: 0 3px 9px #402b1208; }
.button:active:not(:disabled) { transform: translateY(1px); }
.button-primary { border-color: #f78b36; background: linear-gradient(110deg, #ffa547, #ff8a32); color: #261706; box-shadow: 0 3px 9px #f9731619; }
.button-primary:hover:not(:disabled) { border-color: #ee7b27; background: linear-gradient(110deg, #ff9c37, #ff8026); box-shadow: 0 4px 14px #f9731629; }
.icon-button { display: inline-grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 1px solid var(--border-color); border-radius: 8px; background: white; color: var(--text-main); }
.icon-button:hover { background: var(--orange-soft); }
.menu-toggle, .sidebar-close, .sidebar-backdrop { display: none; }
.page-footer { display: flex; justify-content: space-between; gap: 12px; padding: 23px 0 4px; color: var(--text-muted); font-size: 10px; }

/* Overview */
.welcome-banner { position: relative; isolation: isolate; display: flex; align-items: center; justify-content: space-between; overflow: hidden; min-height: 190px; padding: 28px 32px; margin-bottom: 25px; border: 1px solid #f2dcc0; border-radius: 15px; background: linear-gradient(110deg, #fff0d9 0%, #fff7eb 55%, #fffdf9 100%); }
.welcome-copy { position: relative; z-index: 2; }
.welcome-banner .eyebrow { color: #815530; font-size: 9px; }
.welcome-banner h2 { font-size: 28px; font-weight: 600; line-height: 1.3; letter-spacing: -.055em; margin: 9px 0 8px; overflow-wrap: anywhere; }
.welcome-banner p { color: #74604b; font-size: 12px; margin-bottom: 18px; max-width: 440px; }
.welcome-art { flex: 0 0 auto; position: relative; width: 200px; height: 145px; display: grid; place-items: center; margin-right: 20px; }
.welcome-art::before, .welcome-art::after { content: ''; position: absolute; width: 168px; height: 168px; border: 1px solid #f6dfc1; border-radius: 50%; }
.welcome-art::after { width: 235px; height: 235px; border-style: dashed; opacity: .65; }
.art-envelope { z-index: 1; display: grid; place-items: center; width: 106px; height: 86px; background: linear-gradient(140deg, #ffba67, #ff933a); border: 4px solid #fffaf2; border-radius: 20px; transform: rotate(-10deg); box-shadow: 0 16px 30px #9c540e1c; }
.art-envelope .icon { width: 48px; height: 48px; color: #633005; stroke-width: 1.3; }
.art-spark { position: absolute; top: 8px; right: 22px; color: #bf670e; transform: rotate(15deg); }
.art-check { position: absolute; bottom: 12px; right: 30px; z-index: 2; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: white; color: #ae510e; border: 1px solid #f7e2c9; box-shadow: 0 5px 12px #8c4d1210; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 14px; }
.section-heading h2 { font-size: 14px; font-weight: 600; letter-spacing: -.025em; }
.section-heading p, .section-caption { font-size: 11px; color: var(--text-muted); }
.metrics-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 28px; }
.metric-card { position: relative; display: block; padding: 18px; border: 1px solid var(--border-color); border-radius: 12px; background: white; box-shadow: var(--shadow); }
.metric-card:hover { transform: translateY(-3px); border-color: #e9c398; box-shadow: 0 8px 22px #6741180b; }
.metric-card.featured { background: linear-gradient(145deg, #fffaf3, white); border-color: #f0d8b9; }
.metric-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.metric-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: #faf5ee; color: #8c5929; }
.featured .metric-icon { background: #ffead0; color: #a84c08; }
.metric-icon .icon { width: 17px; height: 17px; }
.metric-arrow { color: #aaa299; }
.metric-arrow .icon { width: 14px; height: 14px; }
.metric-title { color: var(--text-muted); font-size: 11px; font-weight: 500; }
.metric-value { font-size: 30px; line-height: 1.35; letter-spacing: -.05em; font-weight: 650; margin: 2px 0 8px; font-variant-numeric: tabular-nums; }
.metric-description { display: block; font-size: 10px; color: var(--text-muted); }
.metric-description .status-dot { margin-right: 5px; }
.status-dot { display: inline-block; width: 5px; height: 5px; background: #ee8a34; border-radius: 50%; vertical-align: middle; }
.period-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 28px; }
.period-card { padding: 17px 20px; background: white; border: 1px solid var(--border-color); border-radius: 12px; box-shadow: var(--shadow); }
.period-top { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.period-card h3 { color: var(--text-muted); font-size: 11px; font-weight: 500; }
.period-card p { color: var(--text-muted); font-size: 10px; margin-top: 2px; }
.period-num { font-size: 25px; font-weight: 600; letter-spacing: -.06em; font-variant-numeric: tabular-nums; }
.activity-track { margin-top: 13px; height: 4px; border-radius: 3px; background: #f8efe4; overflow: hidden; }
.activity-fill { height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #ffbc66, #f8862e); transition: width .5s ease; }

/* Tables and inbox controls */
.panel { background: white; border: 1px solid var(--border-color); border-radius: 13px; box-shadow: var(--shadow); overflow: hidden; }
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 22px 24px; }
.panel-header h2 { font-size: 14px; font-weight: 600; letter-spacing: -.025em; }
.panel-header p { color: var(--text-muted); font-size: 11px; margin-top: 3px; }
.text-link { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.text-link:hover { color: var(--orange-ink); }
.text-link .icon { width: 15px; height: 15px; }
.table-container { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { padding: 11px 24px; background: #fcfbf9; border-block: 1px solid var(--border-color); color: var(--text-muted); font-size: 10px; font-weight: 500; white-space: nowrap; }
td { padding: 17px 24px; border-bottom: 1px solid #f1eee8; font-size: 11px; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fffcf7; }
.sender { display: flex; align-items: center; gap: 10px; }
.sender strong { display: block; color: var(--text-main); font-size: 11px; font-weight: 600; overflow-wrap: anywhere; }
.sender small { display: block; color: var(--text-muted); font-size: 10px; margin-top: 2px; overflow-wrap: anywhere; }
.sender .avatar { width: 33px; height: 33px; font-size: 10px; }
tbody tr:nth-child(3n + 2) .sender .avatar { background: #fff0dc; color: #91520f; }
tbody tr:nth-child(3n + 3) .sender .avatar { background: #eaece8; color: #4c5b46; }
.subject-link { font-weight: 500; overflow-wrap: anywhere; }
.subject-link:hover { color: var(--orange-ink); text-decoration: underline; text-underline-offset: 3px; }
.date-cell { white-space: nowrap; font-size: 10px; color: var(--text-muted); }
.status-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 5px; font-size: 9px; font-weight: 600; white-space: nowrap; background: #f2f1ee; color: #57534d; }
.status-badge::before { content: ''; height: 4px; width: 4px; background: currentColor; border-radius: 50%; }
.status-new { background: #fff0db; color: #9b4709; }
.status-read { background: #f1f0ed; color: #615b53; }
.status-replied { background: #edf5ee; color: #316342; }
.status-archived { background: #f7f0e4; color: #7a5a2e; }
.status-deleted { background: #fff0ee; color: #a93628; }
.toolbar { display: flex; justify-content: space-between; flex-wrap: wrap; align-items: center; gap: 14px; margin-bottom: 20px; padding: 16px; border: 1px solid var(--border-color); border-radius: 12px; background: white; }
.search-box { flex: 1 1 240px; position: relative; max-width: 400px; }
.search-box > .icon { position: absolute; left: 13px; top: 13px; width: 16px; height: 16px; color: var(--text-muted); pointer-events: none; }
.search-box input { padding-left: 39px; }
input, select, textarea { width: 100%; min-height: 42px; color: var(--text-main); border: 1px solid #e6e1d8; border-radius: 8px; padding: 10px 13px; background: #fdfcfb; font-size: 12px; }
input::placeholder, textarea::placeholder { color: #827b71; opacity: 1; }
input:focus, select:focus, textarea:focus { border-color: #dc812c; outline: 0; box-shadow: 0 0 0 3px #f973161a; background: white; }
.filter-options { display: flex; gap: 10px; flex-wrap: wrap; }
.select-filter { width: auto; cursor: pointer; }
.inbox-table { min-width: 780px; }
.action-btns { display: flex; gap: 6px; }
.btn-act { border: 1px solid var(--border-color); border-radius: 6px; padding: 6px 10px; min-height: 32px; background: white; color: #5f574c; font-size: 10px; font-weight: 500; }
.btn-view { border-color: #f2d4ad; color: #8e440d; background: #fff8ee; }
.btn-act:hover { background: #ffefd8; border-color: #e9bc86; color: var(--text-main); }
.btn-delete:hover { background: #fff0ee; color: var(--danger); border-color: #efc3bc; }
.pagination-container { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 24px; border-top: 1px solid var(--border-color); }
.pagination-info { font-size: 11px; color: var(--text-muted); }
.pagination-nav { display: flex; gap: 8px; }
.table-state { text-align: center; padding: 44px 24px; }
.table-state > .icon { width: 28px; height: 28px; color: #b87838; margin-bottom: 10px; }
.table-state strong { display: block; font-size: 13px; font-weight: 600; }
.table-state p { color: var(--text-muted); font-size: 11px; margin: 5px 0 12px; }
.notice { padding: 12px 16px; border: 1px solid #f1c2b4; border-radius: 9px; background: #fff3ed; color: #943a1e; margin-bottom: 20px; font-size: 12px; }
.spinning .icon, .loading-icon { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Conversation modal */
body.modal-open { overflow: hidden; }
.modal-overlay { position: fixed; inset: 0; background: rgb(40 30 20 / 32%); backdrop-filter: blur(5px); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 24px; }
.modal-card { width: 100%; max-width: 680px; max-height: 90vh; max-height: 90dvh; overflow-y: auto; background: white; border: 1px solid #ebdcc7; border-radius: 17px; box-shadow: 0 25px 90px #20150926; }
.modal-header { position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px; background: #fffaf2; border-bottom: 1px solid #f0e4d3; z-index: 1; }
.modal-header h2 { font-size: 17px; font-weight: 600; line-height: 1.4; letter-spacing: -.035em; overflow-wrap: anywhere; }
.modal-header .eyebrow { margin-bottom: 4px; }
.modal-close-btn { flex-shrink: 0; }
.modal-body { padding: 24px; }
.message-meta-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding: 18px; border-radius: 10px; border: 1px solid var(--border-color); background: #fcfbf8; margin-bottom: 24px; }
.meta-label, .message-body-content > label, .message-reply-box > label, #modal-replies-container > label { display: block; color: var(--text-muted); font-size: 10px; font-weight: 600; letter-spacing: .055em; text-transform: uppercase; margin-bottom: 5px; }
.message-meta-grid p { font-size: 12px; overflow-wrap: anywhere; }
.message-meta-grid a { color: var(--orange-ink); }
.message-meta-grid a:hover { text-decoration: underline; }
.text-block { padding: 16px; border: 1px solid var(--border-color); border-radius: 10px; font-size: 13px; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }
.replies-list { display: grid; gap: 12px; margin-top: 10px; }
.reply-item { padding: 14px 16px; border: 1px solid #f2e3d0; border-left: 3px solid #f9a04c; border-radius: 8px; background: #fffaf3; }
.reply-header { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 5px; font-size: 10px; color: var(--text-muted); margin-bottom: 8px; }
.reply-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; }
.message-reply-box, #modal-replies-container { margin-top: 24px; }
#reply-textarea { resize: vertical; min-height: 130px; line-height: 1.7; }
.reply-actions { margin-top: 12px; display: flex; justify-content: flex-end; gap: 10px; }
.toast { position: fixed; bottom: 24px; left: calc(50% + var(--sidebar-width) / 2); transform: translateX(-50%); max-width: min(480px, 90vw); z-index: 200; border: 1px solid #d6e4d8; border-radius: 10px; padding: 13px 20px; background: #f5fcf5; color: #295539; box-shadow: 0 8px 30px #1d1a1514; font-size: 12px; }
.toast.error { background: #fff4ef; border-color: #efcebf; color: #923b22; }

/* Sign in */
.login-page { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 32px 20px; background: radial-gradient(ellipse at 15% 15%, #ffebcd 0, transparent 50%), radial-gradient(ellipse at 90% 85%, #fff0dc 0, transparent 45%), #fcfaf6; }
.login-shell { width: 100%; max-width: 440px; }
.login-brand { justify-content: center; margin-bottom: 28px; }
.login-container { position: relative; padding: 36px; border: 1px solid #eedecc; border-radius: 18px; background: white; box-shadow: 0 15px 50px #67411809; overflow: hidden; }
.login-container::before { content: ''; position: absolute; inset: 0 0 auto; height: 4px; background: linear-gradient(90deg, #ffd49b, #ff933f, #ffdbad); }
.login-icon { display: grid; place-items: center; width: 44px; height: 44px; background: #fff3e3; border: 1px solid #f8e1c4; border-radius: 12px; color: #9e4b0e; margin-bottom: 22px; }
.login-container h1 { font-size: 27px; letter-spacing: -.055em; font-weight: 650; margin-bottom: 5px; }
.login-intro { color: var(--text-muted); font-size: 12px; margin-bottom: 28px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 11px; font-weight: 600; margin-bottom: 7px; }
.form-group input { min-height: 46px; }
.password-field { position: relative; }
.password-field input { padding-right: 55px; }
.password-toggle { position: absolute; top: 4px; right: 4px; border: 0; background: transparent; width: 38px; height: 38px; border-radius: 5px; display: grid; place-items: center; color: var(--text-muted); }
.password-toggle:hover { background: #fff2df; }
.password-toggle .icon { width: 17px; height: 17px; }
.btn-submit { width: 100%; min-height: 46px; margin-top: 5px; }
.login-footnote { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 23px; color: var(--text-muted); font-size: 10px; }
.login-footnote .icon { width: 13px; height: 13px; }
.login-caption { text-align: center; color: var(--text-muted); font-size: 11px; margin-top: 24px; }
.alert { display: none; border: 1px solid #f1c9bd; background: #fff4ef; color: #9a3d25; border-radius: 8px; padding: 12px; font-size: 12px; margin-bottom: 20px; }
.alert.success { color: #28603e; background: #f0f8ef; border-color: #d4e6d0; }

@media (min-width: 1600px) {
    .main-content { padding-top: 38px; }
    .metric-card { padding: 24px; }
    .metric-value { font-size: 36px; }
    td { padding-block: 20px; }
}
@media (max-width: 1199px) {
    :root { --sidebar-width: 215px; }
    .sidebar { padding-inline: 16px; }
    .main-content { padding: 26px 24px; }
    .topbar { padding-inline: 24px; }
    .metrics-grid { gap: 10px; }
    .metric-card { padding: 14px; }
    .metric-description { font-size: 9px; }
    th, td { padding-inline: 17px; }
    .welcome-art { margin-right: 0; width: 170px; }
}
@media (max-width: 960px) {
    .metrics-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .welcome-art { width: 140px; }
    .welcome-banner { padding: 24px; }
    .welcome-banner h2 { font-size: 24px; }
    .period-card { padding: 15px; }
    .period-top { gap: 8px; }
    .period-num { font-size: 23px; }
    .filter-options { width: 100%; }
    .filter-options select { flex: 1; min-width: 0; }
    .search-box { max-width: none; }
}
@media (max-width: 760px) {
    :root { --sidebar-width: 240px; }
    .workspace { margin-left: 0; }
    .sidebar { transform: translateX(-100%); transition: transform .2s ease; padding-top: 25px; }
    body.nav-open { overflow: hidden; }
    body.nav-open .sidebar { transform: translateX(0); }
    .menu-toggle { display: inline-grid; }
    .sidebar-close { display: inline-grid; position: absolute; top: 28px; right: 12px; width: 28px; height: 28px; border: 0; }
    .sidebar-close .icon { width: 16px; height: 16px; }
    body.nav-open .sidebar-backdrop { display: block; position: fixed; inset: 0; background: #231c1345; backdrop-filter: blur(2px); border: 0; z-index: 40; cursor: default; }
    .topbar { padding: 14px 20px; min-height: 68px; gap: 10px; }
    .breadcrumb { gap: 8px; }
    .breadcrumb > .icon:first-of-type { display: none; }
    .main-content { padding: 24px 20px; }
    .header h1 { font-size: 24px; }
    .date-label { display: none; }
    .topbar-divider { display: none; }
    .welcome-art { width: 150px; }
    .welcome-banner p { max-width: 340px; }
    .metrics-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .recent-table { min-width: 620px; }
    .toast { left: 50%; }
}
@media (max-width: 480px) {
    .main-content { padding: 22px 16px; }
    .topbar { padding-inline: 16px; }
    .breadcrumb { font-size: 11px; }
    .breadcrumb > span { display: none; }
    .breadcrumb > .icon { display: none; }
    .header { align-items: flex-start; gap: 10px; }
    .header h1 { font-size: 22px; }
    .header p { font-size: 11px; max-width: 225px; }
    .header-actions .button { padding: 9px 11px; }
    .header-actions .button-label { display: none; }
    .welcome-banner { padding: 24px 20px; min-height: 200px; }
    .welcome-banner h2 { font-size: 25px; }
    .welcome-banner p { max-width: 235px; }
    .welcome-art { position: absolute; width: 110px; right: -28px; bottom: 10px; opacity: .35; z-index: 0; }
    .art-envelope { width: 76px; height: 66px; }
    .art-envelope .icon { width: 36px; height: 36px; }
    .metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .metrics-grid .metric-card:first-child { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr auto; column-gap: 16px; }
    .metric-card:first-child .metric-top { grid-column: 1 / -1; margin-bottom: 6px; }
    .metric-card:first-child .metric-value { grid-column: 2; grid-row: 2 / 4; align-self: center; margin: 0; font-size: 34px; }
    .metric-card { padding: 17px; }
    .metric-description { font-size: 10px; }
    .period-grid { grid-template-columns: 1fr; gap: 10px; }
    .period-card { padding: 14px 18px; }
    .period-card h3 { font-size: 12px; }
    .section-caption { font-size: 10px; }
    .panel-header { padding: 18px; align-items: flex-start; }
    .panel-header .text-link { font-size: 10px; }
    .pagination-container { flex-direction: column; align-items: stretch; padding: 16px; }
    .pagination-nav { justify-content: space-between; }
    .filter-options { flex-direction: column; }
    .filter-options select { width: 100%; }
    .page-footer { flex-direction: column; gap: 4px; }
    .modal-overlay { padding: 12px; }
    .modal-header, .modal-body { padding: 18px; }
    .message-meta-grid { grid-template-columns: 1fr; padding: 14px; }
    .modal-card { max-height: 94vh; max-height: 94dvh; }
    .login-container { padding: 28px 24px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
