:root {
    --ink: #14231d;
    --muted: #68756f;
    --paper: #f4f0e6;
    --panel: #fffdf7;
    --line: #ded9cc;
    --forest: #1f5b47;
    --forest-deep: #123f31;
    --mint: #dcebdd;
    --teal: #2b7a78;
    --coral: #d55f4b;
    --amber: #d99d38;
    --blue: #396b8d;
    --shadow: 0 16px 45px rgba(30, 48, 39, .08);
    --radius: 22px;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--paper); }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--paper); font-family: "Trebuchet MS", "Gill Sans", sans-serif; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button, .button { transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
button:hover, .button:hover { transform: translateY(-1px); }

.shell { min-height: 100vh; display: grid; grid-template-columns: 245px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 28px 20px 22px; display: flex; flex-direction: column; color: #f8f4e9; background:
    radial-gradient(circle at 20% 5%, rgba(76, 153, 122, .38), transparent 28%),
    linear-gradient(165deg, #173f33 0%, #102d27 56%, #0c2520 100%); z-index: 20; }
.sidebar::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .08; background-image: linear-gradient(45deg, transparent 48%, #fff 49%, #fff 51%, transparent 52%); background-size: 17px 17px; }
.brand { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; margin: 0 8px 38px; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; flex: 0 0 auto; color: #173f33; background: #e5b75c; border-radius: 14px 5px 14px 5px; font: 800 13px/1 Georgia, serif; box-shadow: inset 0 0 0 1px rgba(255,255,255,.35); }
.brand-mark.large { width: 58px; height: 58px; font-size: 17px; border-radius: 19px 7px 19px 7px; }
.brand b { display: block; font: 700 19px/1.05 Georgia, serif; }
.brand small { display: block; margin-top: 3px; color: #b8d0c6; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.nav { position: relative; z-index: 1; display: grid; gap: 5px; }
.nav a { display: flex; align-items: center; gap: 13px; padding: 11px 12px; color: #c7d8d1; border-radius: 12px; font-size: 14px; }
.nav a span { color: #6f9a87; font: 700 10px/1 Georgia, serif; letter-spacing: .08em; }
.nav a:hover { color: white; background: rgba(255,255,255,.06); }
.nav a.active { color: #102d27; background: #f2c66d; box-shadow: 0 8px 20px rgba(0,0,0,.16); }
.nav a.active span { color: #74551c; }
.sidebar-foot { position: relative; z-index: 1; margin-top: auto; padding: 17px 9px 0; border-top: 1px solid rgba(255,255,255,.12); }
.admin-chip { display: flex; gap: 9px; align-items: center; }
.admin-chip > span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: #173f33; background: #f0dfae; font-weight: 800; }
.admin-chip b, .admin-chip small { display: block; }
.admin-chip b { font-size: 13px; }.admin-chip small { color: #92afa3; font-size: 10px; margin-top: 2px; }
.link-button { margin: 12px 0 0 43px; padding: 0; color: #9eb8ad; border: 0; background: transparent; cursor: pointer; font-size: 12px; }

.main { min-width: 0; padding: 28px clamp(22px, 3vw, 48px) 24px; background:
    radial-gradient(circle at 90% 0%, rgba(215, 170, 77, .17), transparent 24%),
    linear-gradient(180deg, #f7f3ea 0, var(--paper) 420px); }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 25px; }
.topbar h1 { margin: 2px 0 0; font: 700 clamp(28px, 3vw, 43px)/1 Georgia, serif; letter-spacing: -.03em; }
.eyebrow { margin: 0; color: var(--teal); font: 800 10px/1.2 "Trebuchet MS", sans-serif; text-transform: uppercase; letter-spacing: .16em; }
.live-pill { padding: 9px 13px; display: flex; align-items: center; gap: 7px; border: 1px solid #c9d8ce; border-radius: 999px; color: var(--forest); background: rgba(255,255,255,.65); font-size: 12px; font-weight: 700; }
.live-pill i, .auth-signal i { width: 8px; height: 8px; border-radius: 50%; background: #43a26f; box-shadow: 0 0 0 5px rgba(67,162,111,.13); }
.menu-button { display: none; }
.toast { margin: -8px 0 18px; padding: 13px 16px; border-radius: 13px; font-size: 13px; box-shadow: var(--shadow); }
.toast.success { color: #174b35; background: #dcebdd; border: 1px solid #bdd9c4; }
.toast.error, .form-error { color: #7d2d22; background: #f9dfd9; border: 1px solid #eabbb0; }
.footer { padding: 34px 0 4px; color: #87918c; font-size: 11px; text-align: center; }

.period-strip, .filter-panel { margin-bottom: 22px; padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border: 1px solid rgba(208,200,184,.9); border-radius: 18px; background: rgba(255,253,247,.72); backdrop-filter: blur(8px); }
.period-strip > div b, .period-strip > div span { display: block; }.period-strip > div b { font: 700 15px/1.25 Georgia, serif; }.period-strip > div span { margin-top: 4px; color: var(--muted); font-size: 11px; }
.period-form { display: flex; align-items: end; gap: 8px; }
label { display: grid; gap: 6px; color: #596760; font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
input, select { min-width: 0; height: 39px; padding: 0 12px; color: var(--ink); border: 1px solid #d5d0c5; border-radius: 10px; outline: none; background: #fffefa; font-size: 13px; letter-spacing: 0; text-transform: none; }
input:focus, select:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(43,122,120,.12); }
.button { min-height: 39px; padding: 0 17px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 10px; color: white; background: var(--forest); cursor: pointer; font-weight: 800; font-size: 12px; }
.button:hover { box-shadow: 0 8px 18px rgba(31,91,71,.18); }
.button.compact { height: 39px; min-height: 39px; }.button.wide { width: 100%; min-height: 48px; }
.button.primary { background: var(--forest); }.button.ghost { color: var(--forest); background: #fffefa; border-color: #cad4cd; }
.button.danger-button { color: white; background: var(--coral); }.button.danger-button:hover { box-shadow: 0 8px 18px rgba(213,95,75,.2); }
.button.warning-button { color: #67460d; border-color: #e0c47f; background: #f5e7be; }
.excel-button { color: #1f6b45 !important; border-color: #a9c9b4 !important; background: #eef7f0 !important; }

.metric-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.metric { min-height: 132px; padding: 17px; display: flex; flex-direction: column; justify-content: space-between; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); box-shadow: 0 8px 24px rgba(39,50,44,.04); }
.metric span { color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.metric strong { margin: 10px 0 4px; font: 700 clamp(25px, 2.5vw, 38px)/1 Georgia, serif; letter-spacing: -.03em; }.metric small { color: #839089; font-size: 10px; }
.metric.featured { color: white; border-color: transparent; background: linear-gradient(145deg, #1f5b47, #173f33); box-shadow: 0 15px 30px rgba(25,74,57,.18); }.metric.featured span, .metric.featured small { color: #c2dbcf; }
.metric.danger strong { color: var(--coral); }
.compact-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }.metric .date-value { font-size: 20px; }

.dashboard-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.panel { min-width: 0; padding: 21px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); box-shadow: 0 10px 32px rgba(31,52,42,.045); }
.panel.span-2 { grid-column: span 2; }
.panel-head { min-height: 39px; display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.panel-head h2, .section-heading h2 { margin: 5px 0 0; font: 700 20px/1.15 Georgia, serif; letter-spacing: -.02em; }.panel-head a { color: var(--teal); font-size: 11px; font-weight: 800; }
.soft-badge { padding: 6px 9px; color: var(--forest); border-radius: 999px; background: var(--mint); font-size: 10px; font-weight: 800; }
.vertical-chart { height: 220px; margin-top: 20px; padding: 28px 3px 22px; display: grid; grid-template-columns: repeat(var(--columns), minmax(34px, 1fr)); align-items: end; gap: clamp(3px, .5vw, 7px); overflow-x: auto; overflow-y: hidden; border-bottom: 1px solid #ddd8ce; background: repeating-linear-gradient(to top, transparent 0, transparent 48px, rgba(62,85,73,.07) 49px, transparent 50px); scrollbar-width: thin; scrollbar-color: #b7c8bf transparent; }
.vertical-chart.short { height: 180px; }
.vbar { height: 100%; min-width: 0; display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; position: relative; }
.vbar-column { min-height: 3px; position: relative; }
.vbar-column i { width: 100%; height: 100%; display: block; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, #5da185, #1f5b47); animation: grow .5s ease both; transform-origin: bottom; }
.vbar-value { position: absolute; bottom: calc(100% + 5px); left: 50%; z-index: 1; color: #244f3f; font: 700 9px/1 Georgia, serif; transform: translateX(-50%); white-space: nowrap; }
.vbar > span { position: absolute; top: calc(100% + 7px); left: 50%; color: #87918c; font-size: 8px; transform: translateX(-50%); white-space: nowrap; }
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.loyal-rings { margin-top: 28px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }.loyal-ring { aspect-ratio: 1; display: grid; place-content: center; text-align: center; border: 8px solid #e2e0d6; border-radius: 50%; }.loyal-ring strong { font: 700 25px/1 Georgia, serif; }.loyal-ring span { margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.25; }.loyal-ring.hard { border-color: #d7a94d; }.loyal-ring.medium { border-color: #4e8f79; }.loyal-ring.low { border-color: #8eada1; }
.rank-list { margin-top: 18px; display: grid; gap: 14px; }.rank-list > div { position: relative; padding-bottom: 6px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; font-size: 11px; }.rank-list > div i { position: absolute; bottom: 0; left: 0; height: 3px; min-width: 2px; border-radius: 2px; background: #72a18c; }.rank-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.rank-list b { font-family: Georgia, serif; }
.people-list { margin-top: 15px; display: grid; }.people-list a { padding: 8px 0; display: grid; grid-template-columns: 31px minmax(0,1fr) auto; align-items: center; gap: 9px; border-bottom: 1px solid #ece8df; }.people-list a:last-child { border: 0; }.avatar { width: 31px; height: 31px; display: inline-grid; place-items: center; flex: 0 0 auto; border-radius: 10px 4px 10px 4px; color: var(--forest-deep); background: #dce9df; font-style: normal; font-size: 11px; font-weight: 800; }.people-list div { min-width: 0; }.people-list b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }.people-list i { margin-top: 6px; display: block; height: 2px; background: #c7d8cf; }.people-list strong { font: 700 13px/1 Georgia, serif; }
.timeline { margin-top: 13px; display: grid; }.timeline a { padding: 9px 0; display: grid; grid-template-columns: 113px 10px minmax(0,1fr); align-items: start; gap: 10px; border-bottom: 1px solid #ece8df; }.timeline a:last-child { border: 0; }.timeline time { color: #8a948f; font-size: 9px; }.event-dot { width: 8px; height: 8px; display: inline-block; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px rgba(43,122,120,.1); }.event-dot.red { background: var(--coral); box-shadow: 0 0 0 4px rgba(213,95,75,.1); }.event-dot.amber { background: var(--amber); box-shadow: 0 0 0 4px rgba(217,157,56,.12); }.event-dot.green { background: #3e9b6b; }.timeline b, .timeline small { display: block; }.timeline b { font-size: 11px; }.timeline small { margin-top: 3px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 9px; }

.filter-panel { display: block; }.filter-grid { display: grid; grid-template-columns: minmax(220px, 1.5fr) minmax(150px, .7fr) 145px 145px auto auto; align-items: end; gap: 10px; }.filter-grid label input, .filter-grid label select { width: 100%; }.users-filter { grid-template-columns: minmax(300px, 1fr) 145px 145px 125px auto; }.messages-filter { grid-template-columns: minmax(210px,1fr) minmax(180px,.7fr) 145px 145px auto auto; }
.section-heading { margin: 28px 2px 13px; display: flex; align-items: end; justify-content: space-between; gap: 20px; }.section-heading p:not(.eyebrow) { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.table-panel { padding: 0; overflow: hidden; }.data-table { width: 100%; }.table-row { min-height: 69px; padding: 12px 17px; display: grid; align-items: center; gap: 14px; border-bottom: 1px solid #e8e4db; font-size: 11px; }.table-row:last-child { border: 0; }.table-row:not(.table-head):hover { background: #faf7ee; }.table-row span { min-width: 0; }.table-row b, .table-row small { display: block; }.table-row b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }.table-row small { margin-top: 4px; color: #829089; font-size: 9px; }.table-head { min-height: 43px; color: #7c8983; background: #f4f1e9; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.events-table .table-row { grid-template-columns: 135px minmax(160px,.7fr) minmax(180px,.8fr) minmax(240px,1.5fr); }.users-table .table-row { grid-template-columns: minmax(230px,1.4fr) .7fr .7fr .8fr .65fr; }.loyal-table .table-row { grid-template-columns: minmax(240px,1.3fr) .55fr .7fr .7fr .75fr .8fr; }
.wrap { line-height: 1.45; overflow-wrap: anywhere; }.event-tag, .level-tag { width: max-content; max-width: 100%; padding: 5px 8px; display: inline-block; color: #53635b; border-radius: 7px; background: #edf0eb; font-style: normal; font-size: 9px; font-weight: 800; }.event-tag.red { color: #8c3225; background: #f9dfd9; }.event-tag.amber { color: #805913; background: #f5e8c9; }.event-tag.green { color: #286847; background: #dfeee3; }
.user-cell { display: flex; align-items: center; gap: 10px; }.large-number { font: 700 16px/1 Georgia, serif !important; }.pagination { margin: 16px 0; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 7px; }.pagination a, .pagination span { padding: 8px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); font-size: 11px; }.pagination a.active { color: white; border-color: var(--forest); background: var(--forest); }.pagination .pagination-gap { padding-left: 4px; padding-right: 4px; border-color: transparent; background: transparent; }.empty-state { padding: 45px 20px; color: var(--muted); text-align: center; font-size: 12px; }.empty { color: var(--muted); font-size: 11px; }

.context-note { margin-bottom: 18px; padding: 15px 18px; display: flex; gap: 15px; align-items: baseline; color: #285341; border: 1px solid #c9d9ce; border-left: 5px solid var(--teal); border-radius: 13px; background: #edf4ed; font-size: 11px; }.context-note b { flex: 0 0 auto; }.context-note span { color: #587064; line-height: 1.45; }.context-note.subtle { color: var(--ink); border-left-color: #d2a755; background: #faf4e4; }
.message-stream { display: grid; gap: 10px; }.message-card { padding: 15px 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }.message-card header { display: flex; align-items: center; gap: 9px; }.message-card header a { color: var(--teal); font-size: 12px; font-weight: 800; }.message-card header span { color: #8b9691; font-size: 9px; }.message-card header time { margin-left: auto; color: #7c8983; font-size: 9px; }.message-card p { margin: 12px 0; line-height: 1.48; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }.message-card footer { color: #929b96; font-size: 8px; }

.profile-hero { margin-bottom: 15px; padding: 24px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; color: white; border-radius: 24px; background: linear-gradient(135deg, #1d5845, #183a31 64%, #6e5932); box-shadow: 0 16px 34px rgba(25,65,51,.15); }.avatar.huge { width: 66px; height: 66px; color: #244b3d; background: #f0d68f; border-radius: 22px 7px 22px 7px; font-size: 25px; }.profile-main span { color: #a9c7bb; font-size: 9px; letter-spacing: .08em; }.profile-main h2 { margin: 5px 0; font: 700 28px/1 Georgia, serif; }.profile-main p { margin: 0; color: #bed0c9; font-size: 10px; }.profile-actions form { display: flex; gap: 8px; }.split-grid { margin-top: 15px; display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }.compact-feed { max-height: 485px; margin-top: 14px; display: grid; overflow: auto; }.compact-feed > div { padding: 10px 0; display: flex; align-items: flex-start; gap: 10px; border-bottom: 1px solid #e9e5dc; }.compact-feed > div:last-child { border: 0; }.compact-feed time { width: 112px; flex: 0 0 auto; color: #839089; font-size: 9px; }.compact-feed span:not(.avatar) { min-width: 0; flex: 1; }.compact-feed b, .compact-feed small { display: block; }.compact-feed b { font-size: 11px; }.compact-feed small { margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.35; overflow-wrap: anywhere; }.message-feed small { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }

.loyal-levels { margin-bottom: 18px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }.level-card { min-height: 125px; padding: 18px; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); }.level-card > span { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }.level-card > div { margin: auto 0 6px; display: flex; align-items: center; gap: 10px; }.level-card strong { font: 700 34px/1 Georgia, serif; }.level-card small { color: var(--muted); font-size: 9px; }.level-card.hard { border-top: 5px solid #d4a64a; }.level-card.medium { border-top: 5px solid #4d8f78; }.level-card.low { border-top: 5px solid #88aa9d; }.level-card.all { border-top: 5px solid #487491; }.level-card.active { color: white; background: var(--forest); border-color: var(--forest); box-shadow: var(--shadow); }.level-card.active small { color: #c3d8cf; }.level-tag.hard { color: #6f4b0e; background: #f5e6bd; }.level-tag.medium { color: #235f4b; background: #dcece4; }.level-tag.low { color: #47685c; background: #e6eeea; }.place { width: 28px; height: 28px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 8px; background: #eee9dd; font: 700 11px/1 Georgia, serif; }.positive { color: #347555; }.negative { color: var(--coral); }.trend { padding: 5px 7px; border-radius: 7px; background: rgba(52,117,85,.11); font-size: 10px; font-style: normal; font-weight: 900; white-space: nowrap; }.trend.negative { background: rgba(213,95,75,.11); }.level-card.active .trend { color: #eff9f3; background: rgba(255,255,255,.13); }.metric-pair { display: flex; align-items: center; gap: 7px; }.metric-pair .trend { font-size: 8px; }
.loyal-status-grid { margin-bottom: 18px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }.loyal-status-card { min-height: 104px; padding: 16px 18px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 7px 14px; border: 1px solid var(--line); border-left: 5px solid #4d8f78; border-radius: 16px; background: var(--panel); box-shadow: 0 8px 24px rgba(39,50,44,.035); }.loyal-status-card > span { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }.loyal-status-card strong { grid-row: span 2; font: 700 30px/1 Georgia, serif; }.loyal-status-card small { color: #839089; font-size: 9px; }.loyal-status-card.new { border-left-color: #4d7893; }.loyal-status-card.returned { border-left-color: #d2a755; }

.trigger-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }.trigger-card { align-self: start; }.card-hint { min-height: 30px; margin: 10px 0 15px; color: var(--muted); font-size: 10px; line-height: 1.45; }.inline-add { display: grid; grid-template-columns: 1fr auto; gap: 8px; }.chip-cloud { max-height: 230px; margin-top: 14px; display: flex; flex-wrap: wrap; gap: 6px; overflow: auto; }.chip-cloud form { margin: 0; }.chip-cloud button { padding: 6px 8px; color: #355246; border: 1px solid #d7dfd8; border-radius: 8px; background: #eef4ee; cursor: pointer; font-size: 9px; }.chip-cloud button i { color: #9b5548; font-style: normal; font-weight: 900; }.term-list { max-height: 290px; margin-top: 13px; overflow: auto; }.term-list > div { padding: 7px 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid #ece8df; font-size: 10px; }.term-list > div.disabled span { color: #a1a7a4; text-decoration: line-through; }.term-list form { display: flex; gap: 4px; }.term-list button, .mini-button { padding: 4px 6px; color: var(--teal); border: 0; border-radius: 5px; background: #edf2ef; cursor: pointer; font-size: 8px; }

.alert-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; align-items: start; gap: 16px; }.alert-history { display: grid; gap: 12px; }.alert-card { padding: 20px; border: 1px solid var(--line); border-left: 6px solid var(--amber); border-radius: 18px; background: var(--panel); }.alert-card.red { border-left-color: var(--coral); }.alert-card.recovery { border-left-color: #3d9a69; }.alert-card header { display: flex; justify-content: space-between; }.alert-level { color: #805d1e; font-size: 9px; font-weight: 900; text-transform: uppercase; letter-spacing: .1em; }.alert-card.red .alert-level { color: #9d3c2e; }.alert-card.recovery .alert-level { color: #2c704c; }.alert-card time { color: #89938e; font-size: 9px; }.alert-card h3 { margin: 11px 0 6px; font: 700 18px/1.2 Georgia, serif; }.alert-card > p { margin: 0; color: var(--muted); font-size: 11px; }.alert-stats { margin: 15px 0; display: flex; gap: 8px; }.alert-stats span { padding: 7px 9px; border-radius: 8px; background: #f2efe7; font-size: 9px; }.alert-stats b { font-family: Georgia, serif; }.alert-card details { border-top: 1px solid #e8e4da; padding-top: 11px; }.alert-card summary { color: var(--teal); cursor: pointer; font-size: 10px; font-weight: 800; }.quote-stack { margin-top: 10px; display: grid; gap: 7px; }.quote-stack blockquote { margin: 0; padding: 10px 12px; border-left: 3px solid #8aafa0; background: #f4f6f1; }.quote-stack b { color: var(--teal); font-size: 9px; }.quote-stack p { margin: 4px 0; font-size: 10px; line-height: 1.4; }.quote-stack small { color: var(--muted); font-size: 8px; }.decision-log { position: sticky; top: 20px; }.decision-log > div:not(.panel-head) { padding: 11px 0; display: flex; gap: 10px; border-bottom: 1px solid #e9e5dc; }.decision-log p { margin: 0; }.decision-log b, .decision-log small { display: block; font-size: 10px; }.decision-log small { margin-top: 3px; color: var(--muted); font-size: 8px; }

.moderation-console { margin-bottom: 15px; padding: 25px; display: grid; grid-template-columns: minmax(260px,.8fr) minmax(480px,1.2fr); align-items: center; gap: 35px; color: white; border-radius: 24px; background: linear-gradient(135deg, #163f32, #102f28); }.moderation-console h2 { margin: 6px 0; font: 700 24px/1 Georgia, serif; }.moderation-console p:not(.eyebrow) { margin: 0; color: #b8ccc3; font-size: 10px; line-height: 1.45; }.moderation-console form { display: grid; gap: 10px; }.moderation-console label { color: #b8ccc3; }.moderation-console input { width: 100%; }.action-buttons { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }.moderation-tabs { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 15px; }.moderation-tabs .compact-feed { max-height: 550px; }.moderation-tabs .compact-feed form { margin-left: auto; }.amber-avatar { color: #6f4b0e; background: #f4e4b9; }.red-avatar { color: #813326; background: #f6ddd7; }
.system-grid .compact-feed { max-height: 700px; }.table-counts { max-height: 700px; overflow: auto; }.audit-feed time { width: 105px; }
.account-grid { margin-top: 0; margin-bottom: 15px; }.password-form { margin-top: 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }.password-form label:first-of-type { grid-column: span 2; }.password-form .button { align-self: end; }

.auth-body { overflow-x: hidden; background: #122f27; }.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(360px, .9fr) minmax(480px, 1.1fr); }.auth-story { min-height: 100vh; padding: clamp(38px, 6vw, 80px); display: flex; flex-direction: column; justify-content: space-between; color: #f5f0e5; position: relative; overflow: hidden; background:
    radial-gradient(circle at 80% 20%, rgba(212,166,75,.28), transparent 22%),
    radial-gradient(circle at 10% 85%, rgba(54,136,107,.35), transparent 30%),
    linear-gradient(145deg, #173f33, #102c26); }
.auth-story::before { content: ""; position: absolute; width: 430px; height: 430px; top: 46%; left: 52%; border: 1px solid rgba(255,255,255,.09); border-radius: 50%; box-shadow: 0 0 0 60px rgba(255,255,255,.025), 0 0 0 120px rgba(255,255,255,.018); }.auth-brand { position: relative; display: flex; align-items: center; gap: 14px; }.auth-brand b { font: 700 18px/1.1 Georgia, serif; }.auth-story > div:nth-child(2) { position: relative; z-index: 1; }.auth-story h1 { margin: 12px 0 20px; font: 700 clamp(48px, 6vw, 82px)/.92 Georgia, serif; letter-spacing: -.055em; }.auth-story p:not(.eyebrow) { max-width: 440px; color: #b8ccc3; font-size: 14px; line-height: 1.55; }.auth-signal { position: relative; display: flex; align-items: center; gap: 9px; color: #bed2c9; font-size: 11px; }.auth-back { position: relative; color: #c5d8d0; font-size: 11px; }.auth-card-wrap { min-height: 100vh; padding: 30px; display: grid; place-items: center; background:
    linear-gradient(rgba(255,255,255,.6), rgba(255,255,255,.6)),
    repeating-linear-gradient(135deg, #f7f2e8 0, #f7f2e8 18px, #f0ebdf 19px, #f0ebdf 20px); }.auth-card { width: min(430px, 100%); padding: 38px; border: 1px solid #ded7c9; border-radius: 26px; background: #fffdf7; box-shadow: 0 26px 70px rgba(28,45,37,.14); }.auth-card h2 { margin: 8px 0 8px; font: 700 31px/1 Georgia, serif; letter-spacing: -.03em; }.auth-card .muted { margin: 0 0 26px; color: var(--muted); font-size: 11px; line-height: 1.5; }.auth-card label { margin-bottom: 15px; }.auth-card input { width: 100%; height: 48px; }.auth-card .button { margin-top: 5px; }.form-error { margin-bottom: 17px; padding: 11px 13px; border-radius: 9px; font-size: 10px; line-height: 1.4; }.microcopy { margin: 15px 0 0; color: #8b958f; text-align: center; font-size: 9px; line-height: 1.45; }.code-input { height: 64px !important; font: 700 30px/1 Georgia, serif !important; text-align: center; letter-spacing: .35em !important; }

.auth-story > div:nth-child(2) { margin: auto 0; }
.auth-card > h2 + label { margin-top: 22px; }
.action-buttons { grid-template-columns: repeat(5, 1fr); }
.profile-actions form { flex-wrap: wrap; justify-content: flex-end; }

@media (max-width: 1220px) {
    .metric-grid { grid-template-columns: repeat(3, 1fr); }
    .dashboard-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }.panel.span-2 { grid-column: span 2; }
    .filter-grid, .messages-filter { grid-template-columns: 1fr 1fr 145px 145px; }.filter-grid .button { width: 100%; }
    .moderation-console { grid-template-columns: 1fr; }.moderation-tabs { grid-template-columns: 1fr 1fr; }
    .alert-layout { grid-template-columns: 1fr; }.decision-log { position: static; }
}

@media (max-width: 860px) {
    .shell { display: block; }.sidebar { position: fixed; left: -270px; width: 245px; transition: left .22s ease; box-shadow: 15px 0 50px rgba(0,0,0,.25); }.sidebar.open { left: 0; }
    .main { padding: 20px 15px; }.menu-button { display: inline-flex; padding: 8px 10px; color: var(--forest); border: 1px solid #ccd5ce; border-radius: 9px; background: white; font-size: 10px; }.topbar { justify-content: flex-start; }.topbar .live-pill { margin-left: auto; }.topbar h1 { font-size: 30px; }
    .metric-grid, .compact-metrics { grid-template-columns: repeat(2, 1fr); }.dashboard-grid, .split-grid { grid-template-columns: 1fr; }.panel.span-2 { grid-column: auto; }
    .period-strip { align-items: stretch; flex-direction: column; }.period-form { flex-wrap: wrap; }.period-form label { flex: 1; }.period-form input { width: 100%; }
    .filter-grid, .users-filter, .messages-filter { grid-template-columns: 1fr 1fr; }
    .data-table { min-width: 820px; }.table-panel { overflow-x: auto; }
    .trigger-grid, .moderation-tabs { grid-template-columns: 1fr; }
    .password-form { grid-template-columns: 1fr; }.password-form label:first-of-type { grid-column: auto; }
    .loyal-levels { grid-template-columns: 1fr 1fr; }.level-card { min-height: 110px; }
    .loyal-status-grid { grid-template-columns: 1fr 1fr 1fr; }
    .profile-hero { grid-template-columns: auto 1fr; }.profile-actions { grid-column: span 2; }.profile-actions form { flex-wrap: wrap; }
    .auth-shell { grid-template-columns: 1fr; }.auth-story { min-height: 43vh; padding: 35px; }.auth-story h1 { font-size: 50px; }.auth-story p:not(.eyebrow), .auth-signal { display: none; }.auth-card-wrap { min-height: 57vh; padding: 20px; }.auth-card { padding: 27px; transform: translateY(-25px); }
}

@media (max-width: 520px) {
    .metric-grid, .compact-metrics { grid-template-columns: 1fr 1fr; gap: 8px; }.metric { min-height: 112px; padding: 14px; }.metric strong { font-size: 25px; }
    .live-pill { display: none; }.filter-grid, .users-filter, .messages-filter { grid-template-columns: 1fr; }
    .loyal-levels { grid-template-columns: 1fr 1fr; gap: 8px; }.level-card { padding: 14px; }.level-card strong { font-size: 27px; }
    .loyal-status-grid { grid-template-columns: 1fr; gap: 8px; }.loyal-status-card { min-height: 88px; }
    .context-note { align-items: flex-start; flex-direction: column; gap: 6px; }.alert-stats { flex-wrap: wrap; }.action-buttons { grid-template-columns: 1fr 1fr; }
    .moderation-console { padding: 20px; }.profile-hero { padding: 18px; }.profile-main h2 { font-size: 21px; }
}
