:root {
  color-scheme: light;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button, select, input { font: inherit; }
button, select { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .52; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
main:focus { outline: none; }
[hidden] { display: none !important; }

.icon { width: 18px; height: 18px; flex: none; vertical-align: middle; }
.sr-only, .skip-link:not(:focus) {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.skip-link:focus {
  position: fixed; z-index: 30; left: 12px; top: 10px; background: var(--paper); color: var(--brand); padding: 10px 14px; border-radius: 7px;
}
.muted, .subtle, .empty { color: var(--muted); }
.subtle { font-size: .81rem; }
.inline { display: inline-flex; align-items: center; gap: 8px; }
.stack { display: grid; gap: 4px; }
.mono { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: .91em; }
.empty { text-align: center; padding: 28px 16px; }
.grid-2, .grid-3 { display: grid; gap: 15px; min-width: 0; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 > *, .grid-3 > * { min-width: 0; }
.toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.bank-logo { width: 28px; height: 28px; object-fit: contain; flex: none; }

.btn, .icon-button {
  display: inline-flex; justify-content: center; align-items: center; gap: 8px;
  line-height: 1.2; white-space: nowrap; font-weight: 650; font-size: .86rem;
  min-height: 36px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--paper); color: var(--navy); padding: 0 12px;
}
.btn:hover:not(:disabled), .icon-button:hover:not(:disabled) { background: var(--brand-soft); border-color: var(--brand-line); color: var(--brand-hover); }
.btn .icon, .icon-button .icon { width: 16px; height: 16px; }
.btn-primary { background: var(--brand); color: var(--paper); border-color: var(--brand); box-shadow: 0 2px 3px var(--brand-shadow); }
.btn-primary:hover:not(:disabled) { background: var(--brand-hover); color: var(--paper); border-color: var(--brand-hover); }
.icon-button { width: 34px; min-height: 34px; padding: 0; }
.text-link { display: inline-flex; align-items: center; gap: 3px; color: var(--brand); font-size: .82rem; font-weight: 650; }
.text-link .icon { width: 14px; height: 14px; }
.text-link:hover { text-decoration: underline; }

.brand { display: grid; justify-items: start; gap: 6px; }
.brand-betcris { display: block; width: 155px; max-width: 100%; height: auto; }
.brand-credit { color: var(--on-navy-muted); font-size: .72rem; }

.app-shell { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; display: flex; flex-direction: column; height: 100dvh;
  background: var(--navy); color: var(--on-navy-muted); padding: 23px 14px 15px;
}
.sidebar-brand { padding: 1px 11px 19px; border-bottom: 1px solid var(--white-10); }
.sidebar-brand > span { display: block; margin-top: 13px; color: var(--paper); font-size: 1.04rem; font-weight: 640; letter-spacing: .015em; }
.sidebar nav { padding: 10px 0; }
.nav-label { display: block; color: var(--on-navy-muted); font-size: .68rem; font-weight: 720; letter-spacing: .1em; margin: 18px 10px 8px; }
.nav-link {
  border-radius: 8px; margin-bottom: 4px; min-height: 42px; display: flex; align-items: center;
  gap: 11px; padding: 0 10px; color: var(--on-navy-muted); font-size: .94rem; font-weight: 550; border: 1px solid transparent;
}
.nav-link:hover { background: var(--white-06); color: var(--paper); }
.nav-link.active { background: var(--brand); color: var(--paper); border-color: var(--brand); box-shadow: inset 3px 0 var(--on-navy-accent); font-weight: 700; }
.sidebar :focus-visible, .topbar :focus-visible, .login-story :focus-visible { outline-color: var(--on-navy-accent); }
.nav-link.active .icon { color: var(--paper); }
.sidebar-foot { margin-top: auto; padding-top: 12px; }
.sidebar-health {
  display: flex; gap: 9px; align-items: flex-start; border: 1px solid var(--white-15); border-radius: 9px;
  background: var(--white-06); padding: 11px 9px; font-size: .77rem;
}
.sidebar-health i, .live-badge i, .demo-tag i, .login-kicker i, .login-preview-status i {
  display: inline-block; flex: none; width: 7px; height: 7px; border-radius: 50%;
  background: var(--success); box-shadow: 0 0 0 3px var(--success-halo);
}
.sidebar-health i { margin-top: 5px; }
.sidebar-health small { display: block; color: var(--on-navy-muted); margin-top: 2px; font-size: .73rem; }
.sidebar-overlay, .menu-button { display: none; }

.workspace { min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 3; min-height: 62px; padding: 9px 26px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--navy); color: var(--paper); border-bottom: 1px solid var(--navy-border);
}
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 13px; }
.topbar-brand { display: none; }
.topbar-section { font-size: .86rem; font-weight: 660; }
.role-badge {
  display: flex; align-items: center; gap: 7px; font-size: .83rem; color: var(--on-navy-muted);
}
.role-badge > span {
  width: 29px; height: 29px; display: grid; place-items: center; border-radius: 50%; background: var(--white-10); color: var(--paper);
}
.role-badge .icon { width: 15px; height: 15px; }
.logout-button { min-height: 33px; }
.topbar :is(.menu-button, .logout-button) { background: var(--white-06); color: var(--paper); border-color: var(--navy-border); }
.topbar :is(.menu-button, .logout-button):hover { background: var(--white-15); color: var(--paper); border-color: var(--navy-border); }
#main-content { max-width: 1740px; margin: 0 auto; padding: 22px 26px 34px; min-width: 0; }
.page-heading {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 18px;
}
.page-heading h1 { font-size: clamp(1.65rem, 2.1vw, 2.23rem); line-height: 1.14; letter-spacing: -.04em; }
.page-heading p { margin-top: 6px; color: var(--muted); font-size: .93rem; max-width: 69ch; }
.heading-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }

.panel, .metric {
  min-width: 0; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-muted); box-shadow: var(--shadow);
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 9px; min-height: 51px;
  padding: 11px 16px; border-bottom: 1px solid var(--line);
}
.panel-head h2 { font-size: 1.05rem; line-height: 1.2; font-weight: 720; }
.panel-body { padding: 15px 16px; min-width: 0; }
.panel-body:has(> .table-wrap:first-child) { padding: 0; }
.table-wrap { overflow-x: auto; max-width: 100%; border-radius: 0 0 11px 11px; }
.table-wrap:focus-visible { outline-offset: -3px; }
table { border-collapse: collapse; width: 100%; background: var(--paper); font-size: .86rem; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 10px 13px; border-bottom: 1px solid var(--line); }
thead th { background: var(--surface-muted); color: var(--ink); font-size: .73rem; font-weight: 750; letter-spacing: .035em; white-space: nowrap; }
tbody th { color: var(--ink); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--surface-muted); }

.chip {
  display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 3px 8px; border: 1px solid var(--line);
  font-size: .73rem; font-weight: 680; line-height: 1.2; color: var(--muted); background: var(--surface-muted); white-space: nowrap;
}
.chip-auto i, .chip-manual i { color: var(--success); }
.chip-pending i { color: var(--pending); }
.chip-rejected i, .chip-duplicate i { color: var(--danger); }
.chip i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.chip-auto, .chip-manual { background: var(--success-soft); color: var(--success-ink); border-color: var(--success-line); }
.chip-pending { background: var(--pending-soft); color: var(--pending-ink); border-color: var(--pending-line); }
.chip-rejected, .chip-duplicate { background: var(--danger-soft); color: var(--danger-ink); border-color: var(--danger-line); }
.chip-reading, .chip-searching { background: var(--navy-soft); color: var(--navy); border-color: var(--navy-soft); }

.dashboard-date { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: .84rem; font-weight: 600; white-space: nowrap; }
.dashboard-date .icon { width: 16px; height: 16px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(0, 1.13fr); gap: 12px; margin-bottom: 15px; }
.metric { padding: 13px 13px 12px; }
.metric-label { display: flex; align-items: center; gap: 7px; min-height: 32px; font-size: .85rem; color: var(--muted); font-weight: 680; }
.metric-icon { width: 28px; height: 28px; flex: none; border-radius: 8px; display: grid; place-items: center; }
.metric-icon .icon { width: 15px; height: 15px; }
.tone-brand { background: var(--brand-soft); color: var(--brand-hover); }
.tone-success { background: var(--success-soft); color: var(--success-ink); }
.tone-navy { background: var(--navy-soft); color: var(--navy); }
.tone-amber { background: var(--pending-soft); color: var(--pending-ink); }
.metric-value {
  display: block; margin-top: 8px; font-variant-numeric: tabular-nums; letter-spacing: -.045em;
  font-weight: 760; font-size: clamp(1.56rem, 2.18vw, 2.35rem); line-height: 1;
}
.metric-amount { font-size: clamp(1.12rem, 1.65vw, 1.75rem); white-space: nowrap; line-height: 1.35; }
.metric-caption { display: block; margin-top: 6px; font-size: .77rem; line-height: 1.22; color: var(--muted); }
.metric-usd { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--brand); font-size: .88rem; }
.dashboard-main { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 15px; margin-bottom: 15px; }
.dashboard-main > :first-child { display: flex; flex-direction: column; }
.dashboard-main > :first-child > .panel-body { flex: 1; display: grid; align-items: center; }
.period-filter select {
  min-height: 31px; max-width: 100%; padding: 3px 6px 3px 9px; background: var(--paper); color: var(--muted);
  border: 1px solid var(--line); border-radius: 7px; font-size: .79rem; font-weight: 620;
}
.bar-chart { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 7px; --bar-height: 159px; }
.bar-axis { position: relative; height: var(--bar-height); display: flex; flex-direction: column; justify-content: space-between; margin-top: -7px; padding-bottom: 0; color: var(--muted); font-size: .72rem; text-align: right; }
.bar-axis span:last-child { transform: translateY(13px); }
.bar-axis span:nth-child(2) { transform: translateY(3px); }
.bar-axis span:nth-child(3) { transform: translateY(6px); }
.bar-axis span:nth-child(4) { transform: translateY(10px); }
.bar-plot { position: relative; min-width: 0; }
.bar-grid {
  position: absolute; inset: 0 0 auto; height: calc(var(--bar-height) + 1px);
  background: repeating-linear-gradient(to bottom, var(--line) 0 1px, transparent 1px calc(var(--bar-height) / 4)); pointer-events: none;
}
.bar-columns { display: flex; position: relative; justify-content: space-around; }
.bar-column { flex: 1 1 0; min-width: 0; text-align: center; position: relative; }
.bar-stack {
  display: flex; flex-direction: column-reverse; width: min(58%, 51px); margin: 0 auto;
  height: var(--bar-height); border-radius: 4px 4px 0 0; overflow: hidden;
}
.bar-part { display: block; background: var(--brand); transition: height .3s ease; }
.bar-column:hover .bar-part-0 { background: var(--brand-hover); }
.bar-part-1 { background: var(--chart-manual); }
.bar-part-2 { background: var(--chart-pending); }
.bar-label { display: block; color: var(--muted); font-size: .72rem; margin-top: 7px; white-space: nowrap; }
.chart-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 15px; margin-top: 12px; font-size: .77rem; color: var(--muted); }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend i, .donut-legend i { display: inline-block; flex: none; width: 8px; height: 8px; border-radius: 3px; }
.legend-auto { background: var(--brand); }
.legend-manual { background: var(--chart-manual); }
.legend-other { background: var(--chart-pending); }

.dashboard-main > :last-child .panel-body { padding: 0; }
.live-badge {
  display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--success-line); border-radius: 99px;
  color: var(--success-ink); background: var(--success-soft); font-size: .76rem; font-weight: 670; padding: 4px 8px;
}
.live-badge i { width: 6px; height: 6px; background: var(--success); animation: live-pulse 2s ease-out infinite; }
.live-badge.paused { color: var(--muted); border-color: var(--line); background: var(--surface-muted); }
.live-badge.paused i { animation: none; background: var(--muted); box-shadow: none; }
@keyframes live-pulse { 65%, 100% { box-shadow: 0 0 0 6px transparent; } }
.feed-toggle { min-height: 29px; width: 30px; }
.feed-list { padding: 2px 14px 0; }
.feed-row {
  display: flex; align-items: center; gap: 8px; padding: 7px 3px; min-height: 48px;
  border-bottom: 1px solid var(--line);
}
.feed-row:hover, .feed-row.processing { background: var(--brand-soft); }
.feed-row.processing .feed-channel { animation: processing-pulse 1s ease-in-out infinite alternate; }
@keyframes processing-pulse { to { transform: scale(.88); opacity: .72; } }
.feed-channel {
  width: 27px; height: 27px; border-radius: 7px; flex: none; display: grid; place-items: center;
  color: var(--navy); background: var(--navy-soft);
}
.feed-channel .icon { width: 15px; height: 15px; }
.feed-channel.whatsapp { color: var(--navy); background: var(--navy-soft); }
.feed-main { flex: 1; min-width: 0; }
.feed-title, .feed-meta { display: flex; justify-content: space-between; align-items: center; gap: 5px; }
.feed-title { font-size: .83rem; }
.feed-title > span { font-weight: 690; white-space: nowrap; }
.feed-meta { margin-top: 3px; }
.feed-meta small { color: var(--muted); font-size: .72rem; white-space: nowrap; }
.feed-meta .chip { padding: 2px 6px; font-size: .69rem; }
.feed-footer {
  display: flex; align-items: center; justify-content: space-between; padding: 8px 15px; color: var(--brand); font-size: .81rem; font-weight: 700;
}
.feed-footer:hover { background: var(--brand-soft); }
.feed-footer .icon { width: 15px; height: 15px; }

.dashboard-segments .panel-body { padding-top: 12px; padding-bottom: 12px; }
.donut-block { display: flex; align-items: center; justify-content: center; gap: 12px; }
.donut {
  width: clamp(65px, 7.6vw, 116px); aspect-ratio: 1; flex: none; border-radius: 50%; display: grid; place-items: center;
}
.donut > div {
  width: 72%; aspect-ratio: 1; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--paper); line-height: 1.12;
}
.donut strong { font-size: 1.25rem; letter-spacing: -.035em; }
.donut small { color: var(--muted); font-size: .63rem; }
.donut-legend { flex: 1; min-width: 0; max-width: 220px; display: grid; gap: 6px; font-size: .75rem; color: var(--muted); }
.donut-legend > div { display: grid; align-items: center; gap: 6px; grid-template-columns: auto minmax(0, 1fr) auto; }
.donut-legend b, .split-row b { font-variant-numeric: tabular-nums; color: var(--ink); }
.split-list { display: grid; gap: 6px; }
.split-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; font-size: .76rem; }
.split-row:hover { color: var(--brand); }
.split-row .bank-logo { width: 22px; height: 22px; border: 1px solid var(--line); border-radius: 5px; padding: 1px; }
.split-row i { display: block; height: 4px; margin-top: 2px; border-radius: 99px; overflow: hidden; background: var(--line); }
.split-row em { display: block; height: 100%; border-radius: 99px; background: var(--brand); }
.channels-list { gap: 13px; }
.channel-row:last-child em { background: var(--navy); }

.toast {
  position: fixed; z-index: 20; bottom: 22px; right: 22px; max-width: min(420px, calc(100% - 32px));
  display: flex; align-items: center; gap: 9px; padding: 11px 15px; background: var(--surface-muted); color: var(--ink);
  border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 5px 24px var(--shadow-medium);
  opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity .18s ease, transform .18s ease;
}
.toast.visible { opacity: 1; transform: translateY(0); }
.toast .icon { color: var(--brand); }

.login-shell { display: grid; grid-template-columns: minmax(340px, .77fr) minmax(0, 1.23fr); min-height: 100dvh; background: var(--paper); }
.login-story {
  position: relative; overflow: hidden; isolation: isolate; display: flex; flex-direction: column; justify-content: space-between;
  align-items: flex-start; gap: 35px; padding: 31px clamp(26px, 4.15vw, 78px) 24px; color: var(--paper);
  background: var(--navy);
}
.login-story::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .38;
  background-image: linear-gradient(var(--white-15) 1px, transparent 1px), linear-gradient(90deg, var(--white-15) 1px, transparent 1px);
  background-size: 38px 38px; mask-image: radial-gradient(ellipse at 92% 1%, black 10%, transparent 65%);
}
.login-story .brand { gap: 9px; }
.login-story .brand-betcris { width: clamp(190px, 19vw, 318px); }
.login-story-content { width: 100%; max-width: 495px; }
.login-kicker {
  display: flex; align-items: center; gap: 9px; margin-bottom: 17px; color: var(--on-navy-accent); font-size: .76rem;
  font-weight: 740; text-transform: uppercase; letter-spacing: .12em;
}
.login-kicker i { width: 6px; height: 6px; background: var(--on-navy-accent); box-shadow: 0 0 0 3px var(--brand-glow); }
.login-story h1 { font-size: clamp(2.55rem, 4.7vw, 5.1rem); line-height: .99; letter-spacing: -.058em; font-weight: 740; }
.login-story h1 em { color: var(--on-navy-accent); font-style: normal; }
.login-story-content > p { max-width: 37ch; margin-top: 19px; color: var(--on-navy-muted); font-size: clamp(.94rem, 1.13vw, 1.15rem); }
.login-preview {
  margin-top: 30px; max-width: 425px; padding: 14px;
  border-radius: 13px; border: 1px solid var(--white-22); background: var(--white-06); box-shadow: 0 15px 32px var(--shadow-strong);
}
.login-preview-top { display: flex; align-items: center; gap: 9px; }
.login-preview-top > span:first-child { display: grid; place-items: center; border-radius: 8px; width: 33px; height: 33px; background: var(--brand-glow); color: var(--on-navy-accent); }
.login-preview-top strong { font-size: .88rem; display: block; }
.login-preview-top small { font-size: .75rem; color: var(--on-navy-muted); display: block; }
.login-preview-status {
  margin-left: auto; color: var(--paper); font-size: .73rem; background: var(--navy-raised); padding: 4px 7px;
  border-radius: 99px; border: 1px solid var(--white-22); display: flex; align-items: center; gap: 6px; white-space: nowrap;
}
.login-preview-status i { width: 5px; height: 5px; box-shadow: none; }
.login-preview-metrics {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; padding: 13px 0;
  margin: 12px 0; border-block: 1px solid var(--white-15);
}
.login-preview-metrics span { display: block; color: var(--on-navy-muted); font-size: .75rem; }
.login-preview-metrics strong { font-size: 2.05rem; font-weight: 740; letter-spacing: -.04em; line-height: 1.15; }
.login-preview-bars { display: flex; align-items: end; justify-content: space-between; gap: 4px; width: 42%; height: 49px; }
.login-preview-bars i { background: var(--on-navy-accent); border-radius: 3px 3px 0 0; flex: 1; opacity: .63; }
.login-preview-bars i:last-child { background: var(--brand); opacity: 1; }
.login-preview-bottom { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.login-preview-bottom > span { display: inline-flex; align-items: center; gap: 4px; font-size: .72rem; white-space: nowrap; color: var(--on-navy-muted); }
.login-preview-bottom .icon { width: 14px; height: 14px; color: var(--on-navy-accent); }
.login-preview-bottom > i { min-width: 3px; height: 1px; flex: 1; background: var(--navy-border); }
.login-story-footer { color: var(--on-navy-muted); font-size: .75rem; }

.login-main { display: grid; align-items: center; padding: 34px clamp(22px, 4.35vw, 86px); min-width: 0; }
.login-main-inner { width: 100%; max-width: 780px; margin: auto; }
.login-main-top { display: flex; margin-bottom: 14px; }
.demo-tag {
  display: inline-flex; align-items: center; gap: 8px; font-size: .8rem; font-weight: 680; color: var(--brand-hover);
  padding: 5px 9px; background: var(--brand-soft); border: 1px solid var(--brand-line); border-radius: 99px;
}
.demo-tag i { background: var(--brand); width: 6px; height: 6px; }
.login-heading { margin-bottom: 22px; }
.login-heading h2 { font-size: clamp(1.85rem, 2.65vw, 2.9rem); font-weight: 760; line-height: 1.1; letter-spacing: -.05em; }
.login-heading p { font-size: .96rem; color: var(--muted); margin-top: 7px; }
.login-columns { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(14px, 2.25vw, 37px); align-items: start; }
#login-form { display: flex; flex-direction: column; }
#login-form > label { display: block; font-size: .86rem; font-weight: 680; margin-bottom: 6px; }
.login-input {
  display: flex; align-items: center; gap: 8px; min-height: 43px; border: 1px solid var(--control-line); background: var(--surface-muted);
  border-radius: 8px; color: var(--muted); padding: 0 10px; margin-bottom: 15px;
}
.login-input:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-shadow); }
.login-input input { min-width: 0; width: 100%; padding: 10px 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: .89rem; }
.login-input input::placeholder { color: var(--muted); }
.login-input .icon { width: 15px; height: 15px; }
.login-input .icon-button { min-height: 27px; width: 25px; border: 0; background: transparent; color: inherit; }
.login-submit { width: 100%; min-height: 43px; justify-content: space-between; margin-top: 4px; font-size: .9rem; }
.login-error { padding: 0 0 9px; color: var(--danger-ink); font-size: .84rem; }
.demo-access { border-left: 1px solid var(--line); padding-left: clamp(12px, 1.7vw, 28px); min-width: 0; }
.demo-access h3 { font-size: .95rem; font-weight: 740; margin-top: -2px; }
.demo-access > p { font-size: .79rem; line-height: 1.3; color: var(--muted); margin: 3px 0 9px; }
.demo-role {
  display: flex; width: 100%; text-align: left; gap: 8px; align-items: center; padding: 8px;
  margin-bottom: 6px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-muted); color: var(--ink); box-shadow: var(--shadow);
}
.demo-role:hover, .demo-role[aria-pressed="true"] { border-color: var(--brand-line); background: var(--brand-soft); }
.demo-role-icon { display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 7px; background: var(--brand-soft); color: var(--brand-hover); }
.demo-role .icon { width: 15px; height: 15px; }
.demo-role > .icon { margin-left: auto; width: 13px; color: var(--navy); }
.demo-role-text { display: grid; gap: 1px; overflow-wrap: anywhere; min-width: 0; }
.demo-role strong { font-size: .83rem; }
.demo-role-text > span { color: var(--muted); font-size: .76rem; }
.demo-role code { color: var(--brand-hover); font-size: .74rem; font-weight: 650; }
.login-footer { display: flex; gap: 7px; align-items: center; color: var(--muted); border-top: 1px solid var(--line); margin-top: 18px; padding-top: 14px; font-size: .8rem; }
.login-footer .icon { color: var(--brand); width: 14px; height: 14px; }

@media (min-width: 1100px) and (max-width: 1599px) {
  #main-content { padding-top: 19px; }
  .dashboard-main .panel-body { padding-block: 12px; }
  .dashboard-main > :last-child .panel-body { padding: 0; }
  .dashboard-main .bar-chart { --bar-height: 145px; }
}

@media (min-width: 1100px) and (max-height: 800px) {
  #main-content:has(> .dashboard-main) { padding-block: 16px 12px; }
  .dashboard-main, .metric-grid { margin-bottom: 12px; }
  .dashboard-main .panel-head, .dashboard-segments .panel-head { min-height: 44px; padding-block: 7px; }
  .dashboard-main .bar-chart { --bar-height: 132px; }
  .feed-row { min-height: 44px; padding-block: 4px; }
  .dashboard-segments .panel-body { min-height: 0; padding-block: 9px; }
  .dashboard-segments .donut { width: 92px; }
}

@media (min-width: 1600px) {
  .app-shell { grid-template-columns: 242px minmax(0, 1fr); }
  .sidebar { padding-inline: 17px; }
  .topbar { padding-inline: 32px; }
  #main-content { padding: 28px 32px 38px; }
  .metric { padding: 17px; }
  .dashboard-main .bar-chart { --bar-height: 200px; }
  .feed-row { min-height: 58px; }
  .dashboard-segments .panel-body { min-height: 131px; }
}

@media (max-width: 1180px) {
  .app-shell { grid-template-columns: 185px minmax(0, 1fr); }
  .sidebar { padding-inline: 10px; }
  .sidebar-brand { padding-inline: 6px; }
  .topbar, #main-content { padding-inline: 17px; }
  .metric { padding-inline: 9px; }
  .metric-grid { gap: 8px; }
  .metric-label { font-size: .78rem; }
  .dashboard-main { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
  .dashboard-date { display: none; }
  .donut-block { gap: 7px; }
}

@media (max-width: 940px) {
  .app-shell { display: block; }
  .sidebar {
    position: fixed; z-index: 8; inset: 0 auto 0 0; width: 226px; transform: translateX(-100%);
    visibility: hidden; transition: transform .2s ease, visibility .2s;
  }
  .sidebar.is-open { visibility: visible; transform: translateX(0); }
  .sidebar-overlay.is-open { position: fixed; inset: 0; z-index: 7; display: block; background: var(--scrim); border: 0; }
  .menu-button { display: inline-flex; }
  .topbar-brand { display: block; }
  .topbar-brand .brand-betcris { width: 115px; }
  .topbar-left, .topbar-right { gap: 9px; }
  .login-shell { grid-template-columns: minmax(260px, .84fr) minmax(0, 1.16fr); }
  .login-columns { grid-template-columns: minmax(0, 1fr); }
  .demo-access { border: 0; border-top: 1px solid var(--line); padding: 13px 0 0; }
}

@media (max-width: 680px) {
  .topbar, #main-content { padding-inline: 12px; }
  .topbar { min-height: 53px; }
  .topbar-section, .logout-button span, .role-badge > span { display: none; }
  .role-badge { font-size: .76rem; }
  .logout-button { padding-inline: 7px; min-height: 32px; }
  .menu-button { width: 29px; min-height: 31px; }
  #main-content { padding-top: 16px; }
  .page-heading { align-items: flex-start; flex-direction: column; margin-bottom: 14px; gap: 10px; }
  .page-heading p { font-size: .86rem; }
  .heading-actions { gap: 6px; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric:last-child { grid-column: span 2; }
  .metric-label { min-height: 25px; }
  .metric-icon { width: 25px; height: 25px; }
  .metric { padding: 9px 10px; }
  .metric-amount { display: inline-block; padding-right: 9px; margin-right: 5px; border-right: 1px solid var(--line); }
  .metric-usd { display: inline-block; }
  .dashboard-main, .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); gap: 11px; }
  .dashboard-main, .metric-grid { margin-bottom: 11px; }
  .dashboard-main .bar-chart { --bar-height: 127px; }
  .bar-label { font-size: .64rem; }
  .bar-chart-dense .bar-column:last-child .bar-label { position: absolute; right: 0; }
  .donut { width: 90px; }
  .donut-block { gap: 17px; }
  .login-shell { grid-template-columns: minmax(0, 1fr); }
  .login-story { padding: 17px 20px 18px; gap: 13px; }
  .login-story .brand-betcris { width: 175px; }
  .login-story h1 { font-size: 2.03rem; }
  .login-story h1 br, .login-kicker, .login-preview, .login-story-footer { display: none; }
  .login-story h1 em::before { content: " "; }
  .login-story-content > p { margin-top: 7px; font-size: .84rem; }
  .login-main { padding: 17px 18px 25px; }
  .login-main-top { margin-bottom: 9px; }
  .login-heading { margin-bottom: 13px; }
  .login-heading p { font-size: .86rem; margin-top: 4px; }
  .login-input { min-height: 38px; margin-bottom: 9px; }
  .login-submit { min-height: 37px; }
  .login-columns { gap: 13px; }
  .demo-role { padding: 5px 7px; }
  .demo-role-text { grid-template-columns: auto 1fr; gap: 0 8px; }
  .demo-role-text strong { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
