:root {
  color-scheme: dark;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  color: #f3f4f7;
  background: #111318;
  --ink: #f3f4f7;
  --muted: #a6adba;
  --line: #303540;
  --yellow: #efc452;
  --surface: #1c2028;
  --surface-raised: #242933;
  --green: #85dfb0;
  --red: #ffa69d;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea, summary { outline-offset: 4px; }
:focus-visible { outline: 2px solid var(--yellow); }
button { cursor: pointer; }
button:disabled { opacity: .5; cursor: wait; }
a { color: inherit; }
button, .button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 11px 17px; border: 1px solid #3e4654;
  border-radius: 9px; background: #292f3a; color: var(--ink);
  font-size: .875rem; font-weight: 600; line-height: 1.3; text-decoration: none;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
button:hover:not(:disabled), .button:hover { background: #343c49; border-color: #667084; }
button.primary, .button.primary { background: var(--yellow); border-color: var(--yellow); color: #211b0c; }
button.primary:hover:not(:disabled), .button.primary:hover { background: #f8d77d; border-color: #f8d77d; box-shadow: 0 3px 14px #efc45216; }
button.dark, .button.dark { background: #e6e8ed; border-color: #e6e8ed; color: #1b2028; }
button.dark:hover:not(:disabled), .button.dark:hover { background: #fff; border-color: #fff; }
.danger { color: var(--red); border-color: #87453e; }
.small { padding: 8px 12px; min-height: 38px; }
.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.whatsapp { color: #9ceac0; background: #20382e; border-color: #355c48; }
.whatsapp:hover { color: #c6f7db; background: #294c3a; border-color: #538967; }
.muted { color: var(--muted); }
.boot { padding: 40px; color: var(--muted); }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 9px; font-size: 2rem; font-weight: 650; letter-spacing: -.9px; line-height: 1.2; }
h2 { margin-bottom: 16px; font-size: 1.125rem; font-weight: 650; line-height: 1.4; letter-spacing: -.2px; }
h3 { font-size: 1rem; line-height: 1.5; }
p { line-height: 1.65; }
label { display: grid; gap: 9px; font-size: .875rem; font-weight: 550; color: #d6dae3; }
input, select, textarea {
  width: 100%; min-width: 0; min-height: 46px; padding: 12px 14px;
  border: 1px solid #444c5b; border-radius: 9px; background: #15191f; color: var(--ink);
}
input::placeholder, textarea::placeholder { color: #8f98a7; opacity: 1; }
textarea { min-height: 96px; resize: vertical; line-height: 1.6; }
input:focus, select:focus, textarea:focus { border-color: var(--yellow); outline: 2px solid #efc45233; outline-offset: 1px; }
input[type=checkbox] { width: 20px; height: 20px; min-height: 20px; accent-color: var(--yellow); }
input[type=search] { max-width: 440px; }
form { display: grid; gap: 20px; }
.eyebrow { font-size: .75rem; letter-spacing: 1.6px; text-transform: uppercase; font-weight: 650; }
.layout { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100dvh; }
.sidebar {
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100dvh;
  overflow-y: auto; padding: 18px 16px; background: #191c23; border-right: 1px solid #2b303a;
  scrollbar-width: thin; scrollbar-color: #414958 transparent;
}
.brand { display: flex; flex-direction: column; align-items: center; padding: 0 10px 21px; gap: 13px; }
.brand-logo { display: block; width: 154px; max-width: 100%; height: auto; border-radius: 9px; }
.brand-caption { font-size: .75rem; color: var(--muted); letter-spacing: .8px; }
.nav { display: grid; gap: 4px; }
.nav-label { color: #8d96a7; font-size: .75rem; font-weight: 550; letter-spacing: 1.1px; text-transform: uppercase; padding: 15px 14px 9px; }
.nav button { justify-content: flex-start; gap: 12px; min-height: 43px; padding: 11px 14px; color: #b2bac9; background: transparent; border: 1px solid transparent; font-weight: 500; }
.nav button svg { width: 19px; height: 19px; flex: none; }
.nav button.active { background: #efc452; color: #201a0d; font-weight: 650; box-shadow: 0 4px 18px #0002; }
.nav button:hover:not(.active) { background: #282e38; color: #fff; border-color: transparent; }
.sidebar-bottom { margin-top: auto; padding: 24px 12px 4px; }
.sidebar-bottom .eyebrow { display: block; padding-top: 20px; border-top: 1px solid var(--line); color: #8d96a7; margin-bottom: 14px; }
.sidebar-bottom strong { display: block; font-size: .875rem; overflow-wrap: anywhere; }
.sidebar-bottom small { display: block; color: var(--muted); margin: 5px 0 12px; font-size: .75rem; }
.account-actions { display: grid; gap: 2px; }
.account-actions button { justify-content: flex-start; padding: 6px 0; min-height: 32px; font-size: .8125rem; }
.main { display: flex; flex-direction: column; min-width: 0; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 20px; min-height: 85px; padding: 18px 34px; background: #191c23; border-bottom: 1px solid #2b303a; }
.breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; font-size: .8125rem; color: var(--muted); }
.breadcrumb strong { color: #e0e4eb; font-weight: 550; }
.top-user { display: flex; gap: 15px; align-items: center; }
.top-identity { display: grid; gap: 4px; text-align: right; }
.top-identity strong { font-size: .875rem; font-weight: 600; }
.top-identity small { font-size: .75rem; color: var(--muted); }
.avatar { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid #695835; background: #3b3322; color: #f3d994; font-size: .8125rem; font-weight: 700; }
.account-menu { position: relative; }
.account-menu summary { display: grid; place-items: center; width: 32px; min-height: 38px; cursor: pointer; list-style: none; color: var(--muted); font-size: 1.25rem; border-radius: 6px; }
.account-menu summary::-webkit-details-marker { display: none; }
.account-menu summary:hover, .account-menu[open] summary { background: var(--surface-raised); color: #fff; }
.account-menu > div { position: absolute; z-index: 5; top: calc(100% + 10px); right: 0; min-width: 204px; padding: 8px; border: 1px solid #495261; border-radius: 10px; background: #242a34; box-shadow: 0 12px 36px #0006; }
.account-menu button { width: 100%; justify-content: flex-start; color: #e4e7ed; }
.content { width: 100%; max-width: 1600px; padding: 29px 34px 38px; margin: 0 auto; flex: 1; }
.page-context { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 13px; color: #9ba4b4; }
.page-context .eyebrow { color: #c9aa66; }
.page-context time { font-size: .8125rem; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 22px; margin-bottom: 27px; }
.page-head p { color: var(--muted); margin-bottom: 0; font-size: .9375rem; }
.page-head > .actions { flex-shrink: 0; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-bottom: 24px; }
.stat { position: relative; padding: 20px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.stat-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.stat .label { color: #c1c8d4; font-size: .875rem; line-height: 1.45; }
.stat-icon { display: grid; place-items: center; flex: none; width: 35px; height: 35px; border-radius: 9px; background: #2a303b; color: #b8c3d6; }
.stat-icon svg { width: 19px; height: 19px; }
.stat strong { display: block; margin: 16px 0 12px; font-size: clamp(1.75rem, 2.2vw, 2.25rem); font-weight: 650; line-height: 1.15; letter-spacing: -.8px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stat small { display: block; font-size: .8125rem; line-height: 1.5; color: var(--muted); }
.stat.featured { border-color: #655536; background: linear-gradient(120deg, #30302a, #252720); }
.stat.featured .stat-icon { background: #4a412b; color: #f4cc68; }
.stat.featured strong { color: #f3d17b; }
.grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.card { min-width: 0; margin-bottom: 22px; padding: 24px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 22px; }
.card-head h2 { margin: 0; }
.card-head > .small { background: transparent; border-color: transparent; color: #d8c28c; padding: 5px 0; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.table-wrap { max-width: 100%; overflow: auto; scrollbar-width: thin; scrollbar-color: #4c5668 #1a1e26; }
table { width: 100%; border-collapse: collapse; font-size: .875rem; line-height: 1.5; text-align: left; }
th { padding: 13px 14px; border-bottom: 1px solid #3a424f; background: #232832; color: #aeb9ca; font-size: .75rem; text-transform: uppercase; letter-spacing: .8px; font-weight: 600; white-space: nowrap; }
th:first-child { border-radius: 7px 0 0 7px; }
th:last-child { border-radius: 0 7px 7px 0; }
td { padding: 19px 14px; border-bottom: 1px solid #303640; vertical-align: middle; color: #d1d7e2; font-variant-numeric: tabular-nums; }
td:not(.cell-actions) { min-width: 105px; }
td.cell-primary { min-width: 160px; }
td .cell-value { overflow-wrap: anywhere; }
td strong { display: block; font-weight: 600; color: #eff1f6; }
td small { display: block; margin-top: 5px; color: var(--muted); font-size: .8125rem; }
td .pill { white-space: nowrap; }
td.cell-actions { min-width: 215px; max-width: 290px; }
td.cell-actions .actions { gap: 7px; }
td .small { font-size: .8125rem; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #ffffff03; }
.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 168px; padding: 32px 20px; text-align: center; color: var(--muted); border: 1px dashed #3b4351; border-radius: 10px; font-size: .875rem; line-height: 1.6; background: #171c230a; }
.empty strong { display: block; color: #dbe1eb; font-size: .9375rem; font-weight: 550; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 6px; border: 1px solid #465060; background: #2a323e; color: #c3cddd; font-size: .8125rem; font-weight: 550; line-height: 1.35; }
.pill.good { background: #203c30; border-color: #3a604c; color: #97e4b9; }
.pill.warn { background: #443821; border-color: #675336; color: #f3d083; }
.pill.bad { background: #422927; border-color: #69413d; color: #ffb2a9; }
.pill.dark { background: #332e46; border-color: #554a6d; color: #cfbfec; }
.entry { position: relative; overflow: hidden; margin-bottom: 22px; padding: 26px; border: 1px solid #695b37; border-radius: 13px; background: linear-gradient(110deg, #302d23, #222620); }
.entry h2 { font-size: 1.3rem; margin-bottom: 8px; }
.entry p { margin-bottom: 22px; color: #c0beb2; font-size: .9375rem; }
.entry form { grid-template-columns: minmax(0, 1fr) auto; gap: 12px; }
.entry input { min-height: 52px; font-size: 1.125rem; letter-spacing: 1.5px; border-color: #5c5848; background: #151917; }
.entry input::placeholder { font-size: .9375rem; letter-spacing: 1px; }
.entry-result { margin-top: 18px; padding: 14px; color: #f5e7bf; background: #423c29; border: 1px solid #70603b; border-radius: 8px; font-size: .9375rem; line-height: 1.6; }
.entry-result:empty { display: none; }
.list-item { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 17px 0; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; padding-bottom: 0; }
.list-item > div { min-width: 0; }
.list-item strong { display: block; font-size: .9375rem; font-weight: 550; overflow-wrap: anywhere; }
.list-item p { margin: 5px 0 0; font-size: .8125rem; color: var(--muted); }
.list-item .button { flex-shrink: 0; }
.plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.plan { display: flex; flex-direction: column; padding: 25px; border: 1px solid #3e444e; border-top: 3px solid #baa061; border-radius: 13px; background: linear-gradient(150deg, #252933, #1c2028 70%); }
.plan h2 { font-size: 1.15rem; margin: 25px 0 0; }
.plan .price { font-size: 2.5rem; font-weight: 650; letter-spacing: -1.3px; font-variant-numeric: tabular-nums; margin: 20px 0 10px; color: #f4d88f; }
.plan p { color: #b5bdcb; font-size: .9375rem; margin-bottom: 26px; }
.plan > button { margin-top: auto; width: 100%; }
.plan.inactive { border-top-color: #606b7d; }
.plan.inactive .price { color: #b2bbca; }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.help { color: var(--muted); font-size: .8125rem; line-height: 1.65; }
.balance { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 20px; margin: 4px 0; border: 1px solid #655737; border-radius: 9px; background: #333024; color: #d6cba9; }
.balance strong { font-size: 1.5rem; font-variant-numeric: tabular-nums; color: #f4d584; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; padding-top: 22px; border-top: 1px solid var(--line); }
.stack { display: grid; gap: 12px; }
.history { display: grid; }
.history-item { position: relative; padding: 20px 20px 20px 25px; border-left: 1px solid #4a4332; border-bottom: 1px solid var(--line); margin-left: 5px; font-size: .875rem; line-height: 1.65; }
.history-item::before { content: ''; position: absolute; left: -4px; top: 29px; width: 7px; height: 7px; background: #b8a571; border-radius: 50%; }
.history-item small { display: block; margin-top: 6px; color: var(--muted); font-size: .8125rem; }
.history-item details { margin-top: 9px; color: #c6cfdd; }
.history-item summary { cursor: pointer; width: fit-content; }
.history-item pre { white-space: pre-wrap; overflow-wrap: anywhere; padding: 14px; border-radius: 8px; background: #141820; font: inherit; font-size: .8125rem; line-height: 1.6; }
dialog { width: calc(100% - 32px); max-width: 640px; max-height: 90dvh; padding: 0; border: 1px solid #49515f; border-radius: 15px; background: #1e232c; color: var(--ink); box-shadow: 0 30px 120px #0008; }
dialog::backdrop { background: #080b12bf; backdrop-filter: blur(6px); }
#modal-content { padding: 28px; }
#modal-content > p { color: #c3ccda; }
#modal-content > .actions { margin-bottom: 22px; }
#modal-content > .table-wrap { margin-bottom: 26px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; padding-bottom: 18px; border-bottom: 1px solid #353d49; }
.modal-head h2 { font-size: 1.35rem; margin: 0; }
.modal-head button { flex: none; min-width: 38px; min-height: 38px; padding: 8px; }
#toast { display: none; position: fixed; z-index: 10; bottom: 24px; left: 50%; transform: translateX(-50%); max-width: calc(100% - 32px); padding: 15px 22px; border: 1px solid #77705a; border-radius: 10px; background: #303127; color: #f4edd8; box-shadow: 0 8px 35px #0005; font-size: .9375rem; line-height: 1.5; }
#toast.show { display: block; }
.notice, .error { padding: 14px 17px; border: 1px solid #6b5531; border-radius: 9px; background: #3b3222; color: #efd290; font-size: .875rem; line-height: 1.65; }
.notice { margin-bottom: 22px; }
.error { background: #3b2827; border-color: #69423c; color: #ffb7ae; }
.error:empty { display: none; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 24px; }
.toolbar input { max-width: 420px; }
.checkbox { display: flex; align-items: center; gap: 12px; }
.report-total { font-size: 2rem; font-weight: 650; }
.no-margin { margin: 0; }
.app-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin: 0 34px; padding: 22px 0; border-top: 1px solid #292e38; color: #8f98a8; font-size: .75rem; }
.app-footer > span:first-child { color: #c0b18c; letter-spacing: 1.7px; font-weight: 650; }
.app-footer > span:first-child span { color: #8f98a8; font-weight: 400; letter-spacing: 1px; }
.welcome-preview { min-height: 290px; font-weight: 400; line-height: 1.7; background: #161b22; }
.login { display: grid; grid-template-columns: 1.05fr 1fr; min-height: 100dvh; }
.login-art { display: flex; flex-direction: column; justify-content: center; padding: 60px; background: radial-gradient(ellipse at center, #3b321b 0%, #181812 50%, #101215 85%); border-right: 1px solid #39352b; }
.login-art img { align-self: center; width: 100%; max-width: 560px; border-radius: 20px; }
.login-art .eyebrow { margin-top: 35px; color: var(--yellow); text-align: center; }
.login-art p { margin-top: 14px; color: #afa891; text-align: center; }
.login-panel { display: flex; align-items: center; justify-content: center; min-height: 100dvh; padding: 48px; background: #161a21; }
.login-box { width: 100%; max-width: 400px; }
.login-box h1 { margin: 18px 0 14px; font-size: 2.3rem; line-height: 1.2; }
.login-box > p { margin-bottom: 32px; }
.login-box form { gap: 22px; }
.login-box .primary { min-height: 48px; }
.login-box > .help { margin: 27px 0 0; padding-top: 22px; border-top: 1px solid var(--line); }
@media (max-width: 1250px) {
  .layout { grid-template-columns: 212px minmax(0, 1fr); }
  .sidebar { padding-inline: 12px; }
  .content { padding: 27px 24px 34px; }
  .topbar { padding-inline: 24px; }
  .breadcrumb > span { display: none; }
  .stats { gap: 13px; }
  .stat { padding: 18px 15px; }
  .stat-head { align-items: flex-start; }
  .stat-icon { width: 28px; height: 28px; }
  .stat-icon svg { width: 17px; height: 17px; }
  .grid { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 18px; }
  .entry form { grid-template-columns: 1fr; }
  .card { padding: 21px; }
  .app-footer { margin-inline: 24px; }
}
@media (max-width: 1050px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-head { align-items: center; }
  .stat strong { font-size: 2rem; }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .entry form { grid-template-columns: minmax(0, 1fr) auto; }
  .plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .top-identity { display: none; }
  .page-head { align-items: flex-start; }
}
@media (max-width: 720px) {
  .layout { display: block; }
  .sidebar { position: static; height: auto; padding: 13px 16px 9px; overflow: visible; border-right: 0; border-bottom: 1px solid #353b46; }
  .brand { flex-direction: row; justify-content: space-between; padding: 0 2px 13px; gap: 16px; }
  .brand-logo { width: 91px; }
  .brand-caption { font-size: .8125rem; letter-spacing: .4px; }
  .nav { display: flex; gap: 7px; overflow-x: auto; padding: 3px 2px 8px; scrollbar-width: thin; }
  .nav-label, .sidebar-bottom { display: none; }
  .nav button { white-space: nowrap; flex: none; min-height: 42px; padding: 10px 12px; gap: 8px; }
  .nav button svg { width: 17px; height: 17px; }
  .topbar { padding: 12px 18px; min-height: 65px; gap: 10px; }
  .top-user { gap: 9px; }
  .top-user .pill { font-size: .75rem; }
  .avatar { width: 33px; height: 33px; font-size: .75rem; }
  .account-menu summary { width: 24px; }
  .content { padding: 24px 16px 28px; }
  .page-context { margin-bottom: 12px; }
  .page-context .eyebrow { font-size: .75rem; letter-spacing: 1px; }
  .page-context time { font-size: .75rem; }
  .page-head { flex-wrap: wrap; gap: 18px; margin-bottom: 22px; }
  .page-head h1 { font-size: 1.8rem; }
  .page-head p { font-size: .9375rem; }
  .page-head > .actions { width: 100%; }
  .page-head > .actions:empty { display: none; }
  .page-head > .actions > button { min-height: 44px; }
  .stats { gap: 12px; margin-bottom: 20px; }
  .stat { padding: 16px 14px; border-radius: 11px; }
  .stat .label { font-size: .875rem; }
  .stat-icon { display: none; }
  .stat strong { font-size: 1.75rem; margin: 17px 0 10px; }
  .stat small { font-size: .75rem; }
  .card { padding: 18px; margin-bottom: 18px; }
  .card-head { gap: 12px; margin-bottom: 18px; }
  .card-head h2 { font-size: 1.0625rem; }
  .card-head .small { font-size: .8125rem; }
  .entry { padding: 22px 18px; margin-bottom: 18px; }
  .entry form { grid-template-columns: 1fr; }
  .entry p { font-size: .875rem; }
  .entry button { min-height: 48px; }
  .two { grid-template-columns: 1fr; }
  .plan-grid { grid-template-columns: 1fr; gap: 18px; }
  .plan { padding: 23px; }
  .plan h2 { margin-top: 20px; }
  .toolbar { flex-direction: column; align-items: stretch; margin-bottom: 20px; }
  .toolbar input { max-width: none; }
  .table-wrap { overflow: visible; }
  table, tbody { display: block; }
  thead { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  tr { display: grid; grid-template-columns: 1fr; padding: 10px 0 16px; border-bottom: 1px solid #3b4350; margin-bottom: 13px; }
  tr:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
  td, td:not(.cell-actions), td.cell-primary, td.cell-actions { display: grid; grid-template-columns: minmax(80px, .75fr) minmax(0, 1.5fr); align-items: start; gap: 14px; min-width: 0; max-width: none; padding: 8px 0; border: 0; }
  td::before { content: attr(data-label); color: #a8b3c4; font-size: .8125rem; line-height: 1.6; }
  td.cell-primary { display: block; padding: 2px 0 15px; font-size: 1rem; }
  td.cell-primary::before { display: none; }
  td.cell-actions { display: block; padding-top: 14px; }
  td.cell-actions::before { display: none; }
  td .small { min-height: 42px; padding: 10px 12px; font-size: .875rem; }
  td.cell-actions .actions { gap: 9px; }
  td .pill { max-width: 100%; white-space: normal; }
  .list-item { gap: 10px; }
  .list-item strong { font-size: .875rem; }
  .list-item .small { min-height: 42px; }
  #modal-content { padding: 22px 18px; }
  .modal-head h2 { font-size: 1.2rem; }
  .modal-head { margin-bottom: 22px; }
  .form-actions button { flex: 1; }
  .app-footer { margin-inline: 16px; padding-block: 19px; font-size: .75rem; }
  .app-footer > span:last-child { display: none; }
  .login { grid-template-columns: 1fr; }
  .login-art { padding: 24px; border-right: 0; border-bottom: 1px solid #39352b; }
  .login-art img { width: 215px; }
  .login-art .eyebrow, .login-art p { display: none; }
  .login-panel { padding: 32px 24px; min-height: auto; }
  main.login-panel { min-height: 100dvh; }
  .login-box h1 { font-size: 2rem; }
}
@media (max-width: 360px) {
  .stats { grid-template-columns: 1fr; }
  .topbar { padding-inline: 14px; }
  .top-user .avatar { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

/* Shared cues keep the daily tools recognizable across views. */
.section-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.section-title h2 { margin: 0; }
.section-icon { display: grid; place-items: center; width: 31px; height: 31px; border: 1px solid #414957; border-radius: 8px; background: #272e39; color: #c1bdad; flex: none; }
.section-icon svg { width: 17px; height: 17px; }
.entry-heading { display: flex; align-items: center; gap: 15px; margin-bottom: 17px; }
.entry-heading .eyebrow { display: block; margin-bottom: 7px; font-size: .75rem; color: #d4bc83; letter-spacing: 1.3px; }
.entry-heading h2 { margin-bottom: 0; }
.entry-icon { display: grid; place-items: center; width: 47px; height: 47px; border-radius: 11px; color: #f1d28a; background: #4c422a; border: 1px solid #6e5d37; flex: none; }
.entry-icon svg { width: 24px; height: 24px; }
.shift-card > .dark { width: 100%; }
.shift-card > .muted { font-size: .875rem; }
.shift-amount { display: grid; gap: 8px; margin: 6px 0 12px; }
.shift-amount span { color: #b8c2d1; font-size: .875rem; }
.shift-amount strong { font-size: 1.9rem; font-weight: 650; letter-spacing: -.7px; font-variant-numeric: tabular-nums; }
.plan-duration { display: flex; align-items: center; gap: 8px; color: #e3d8b9; font-size: .875rem; padding: 15px 0; margin: 2px 0 13px; border-bottom: 1px solid #3d424a; }
.plan-duration svg { width: 16px; height: 16px; flex: none; }
button[data-action="payment"] { background: #514328; border-color: #846d3e; color: #f5d994; }
button[data-action="payment"]:hover { background: #655332; border-color: #b99550; }
button[data-action="welcome"] { color: #9ceac0; background: #20382e; border-color: #355c48; }
button[data-action="welcome"]:hover { background: #294c3a; border-color: #538967; }
@media (min-width: 721px) and (max-width: 1400px) {
  .grid .card-head { flex-wrap: wrap; row-gap: 8px; }
}
@media (max-width: 720px) {
  .section-icon { display: none; }
  .entry-icon { width: 42px; height: 42px; }
  .entry-heading { gap: 12px; }
}

/* Appearance preferences */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.settings-card { max-width: 900px; }
.theme-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; min-width: 0; border: 0; padding: 0; margin: 25px 0 20px; }
.theme-option { display: grid; grid-template-columns: 42px minmax(0, 1fr) 20px; align-items: center; gap: 14px; padding: 22px 18px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-raised); cursor: pointer; }
.theme-option:hover { border-color: #8a94a5; }
.theme-option.selected { border-color: var(--yellow); box-shadow: 0 0 0 1px var(--yellow); }
.theme-option:focus-within { outline: 2px solid var(--yellow); outline-offset: 5px; }
.theme-symbol { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 10px; }
.theme-symbol svg { width: 23px; height: 23px; }
.theme-symbol.light { background: #fff3d0; color: #785515; }
.theme-symbol.dark { background: #323b50; color: #d6def1; }
.theme-copy { display: grid; gap: 7px; }
.theme-copy strong { font-size: 1rem; color: var(--ink); }
.theme-copy > span { color: var(--muted); font-size: .875rem; font-weight: 400; line-height: 1.5; }
.theme-option input { width: 20px; height: 20px; min-height: 20px; margin: 0; accent-color: var(--yellow); cursor: pointer; }
.theme-status { margin: 16px 0 0; color: var(--green); font-size: .875rem; line-height: 1.6; }
.theme-status:empty { display: none; }

/* Light appearance: the same layouts, controls and brand accents. */
:root[data-theme="light"] {
  color-scheme: light;
  color: #232c3b;
  background: #f3f5f9;
  --ink: #232c3b;
  --muted: #5d6878;
  --line: #d5dce6;
  --surface: #ffffff;
  --surface-raised: #f3f5f9;
  --green: #216a44;
  --red: #a43128;
}
[data-theme="light"] :is(button, .button) { background: #f0f3f8; border-color: #bec8d6; color: var(--ink); }
[data-theme="light"] :is(button:hover:not(:disabled), .button:hover) { background: #e4eaf2; border-color: #8999af; }
[data-theme="light"] :is(button.primary, .button.primary) { background: var(--yellow); border-color: var(--yellow); color: #211b0c; }
[data-theme="light"] :is(button.primary:hover:not(:disabled), .button.primary:hover) { background: #f8d77d; border-color: #f8d77d; }
[data-theme="light"] :is(button.dark, .button.dark) { background: #293445; color: #fff; border-color: #293445; }
[data-theme="light"] :is(button.dark:hover:not(:disabled), .button.dark:hover) { background: #3c4b61; border-color: #3c4b61; }
[data-theme="light"] .ghost { background: transparent; border-color: transparent; color: var(--muted); }
[data-theme="light"] .danger { color: var(--red); border-color: #d6a39c; }
[data-theme="light"] :is(.whatsapp, button[data-action="welcome"]) { background: #e8f5ed; color: #23613e; border-color: #a7d2b7; }
[data-theme="light"] :is(.whatsapp:hover, button[data-action="welcome"]:hover) { background: #d6edde; color: #164f30; border-color: #6ea083; }
[data-theme="light"] label { color: #374357; }
[data-theme="light"] :is(input, select, textarea) { background: #fff; border-color: #aebaca; color: var(--ink); }
[data-theme="light"] :is(input::placeholder, textarea::placeholder) { color: #68758a; }
[data-theme="light"] :is(input:focus, select:focus, textarea:focus) { border-color: #9f741e; outline-color: #b887283d; }
[data-theme="light"] :focus-visible { outline-color: #946715; }
[data-theme="light"] :is(.sidebar, .topbar) { background: #fff; border-color: var(--line); }
[data-theme="light"] .sidebar { scrollbar-color: #aeb8c8 transparent; }
[data-theme="light"] :is(.nav-label, .sidebar-bottom .eyebrow, .page-context) { color: var(--muted); }
[data-theme="light"] .nav button { background: transparent; border-color: transparent; color: #536075; }
[data-theme="light"] .nav button.active { background: var(--yellow); color: #201a0d; box-shadow: 0 3px 12px #ad892318; }
[data-theme="light"] .nav button:hover:not(.active) { background: #edf1f7; border-color: transparent; color: #263246; }
[data-theme="light"] :is(.breadcrumb strong, .account-menu button) { color: var(--ink); }
[data-theme="light"] .avatar { background: #fff0c9; border-color: #dfc88d; color: #715118; }
[data-theme="light"] :is(.account-menu summary:hover, .account-menu[open] summary) { color: var(--ink); }
[data-theme="light"] .account-menu > div { background: #fff; border-color: var(--line); box-shadow: 0 12px 36px #27375024; }
[data-theme="light"] :is(.page-context .eyebrow, .card-head > .small) { color: #806019; }
[data-theme="light"] .card-head > .small { background: transparent; border-color: transparent; }
[data-theme="light"] .stat .label { color: #4d5b70; }
[data-theme="light"] .stat-icon { background: #eef2f8; color: #526581; }
[data-theme="light"] .stat.featured { background: linear-gradient(120deg, #fff5d8, #fffdf5); border-color: #dcc891; }
[data-theme="light"] .stat.featured .stat-icon { background: #f9e6b3; color: #7d5d19; }
[data-theme="light"] :is(.stat.featured strong, .plan .price) { color: #795512; }
[data-theme="light"] .table-wrap { scrollbar-color: #aeb8c8 #f1f4f8; }
[data-theme="light"] th { background: #f1f4f8; color: #53647a; border-color: #c7d1df; }
[data-theme="light"] :is(td, tr) { border-color: var(--line); }
[data-theme="light"] td { color: #39465b; }
[data-theme="light"] td::before { color: var(--muted); }
[data-theme="light"] :is(td strong, .empty strong) { color: var(--ink); }
[data-theme="light"] tbody tr:hover { background: #f7f9fc; }
[data-theme="light"] .empty { background: #f9fafc; border-color: #c7d1e0; }
[data-theme="light"] .pill { background: #edf1f7; border-color: #c7d2e1; color: #465a74; }
[data-theme="light"] .pill.good { background: #e8f5ed; border-color: #b5d7c2; color: #23613e; }
[data-theme="light"] .pill.warn { background: #fff3d6; border-color: #e5d09e; color: #77551c; }
[data-theme="light"] .pill.bad { background: #fcecea; border-color: #e3beb8; color: #993c31; }
[data-theme="light"] .pill.dark { background: #f0ecf8; border-color: #d2c5e6; color: #6b4e91; }
[data-theme="light"] .entry { background: linear-gradient(110deg, #fff3d1, #fffdf5); border-color: #d8c594; }
[data-theme="light"] .entry p { color: #6d6145; }
[data-theme="light"] .entry input { background: #fff; border-color: #beab7f; }
[data-theme="light"] .entry-result { color: #654c15; background: #fff6df; border-color: #d6bb7d; }
[data-theme="light"] .plan { background: linear-gradient(150deg, #fffaf0, #fff 70%); border-color: #d5dce6; border-top-color: #bca05f; }
[data-theme="light"] .plan p { color: var(--muted); }
[data-theme="light"] .plan.inactive { border-top-color: #8b99ac; }
[data-theme="light"] .plan.inactive .price { color: #66738a; }
[data-theme="light"] .balance { background: #fff6df; border-color: #dfcd9b; color: #705e33; }
[data-theme="light"] .balance strong { color: #755217; }
[data-theme="light"] .history-item { border-left-color: #cebd94; }
[data-theme="light"] .history-item details { color: #4f5f77; }
[data-theme="light"] .history-item pre { background: #f1f4f8; }
[data-theme="light"] dialog { background: #fff; border-color: #c2ccd9; box-shadow: 0 30px 120px #1f2c3f45; }
[data-theme="light"] dialog::backdrop { background: #17233480; }
[data-theme="light"] #modal-content > p { color: #4c5c73; }
[data-theme="light"] .modal-head { border-color: var(--line); }
[data-theme="light"] #toast { color: #614b1b; background: #fff8e5; border-color: #ceba82; box-shadow: 0 8px 35px #35415224; }
[data-theme="light"] .notice { background: #fff5df; border-color: #ddc692; color: #795b22; }
[data-theme="light"] .error { background: #fff0ed; border-color: #e0b1a9; color: #923c32; }
[data-theme="light"] .app-footer { color: var(--muted); border-color: var(--line); }
[data-theme="light"] .app-footer > span:first-child { color: #7b652f; }
[data-theme="light"] .app-footer > span:first-child span { color: var(--muted); }
[data-theme="light"] .welcome-preview { background: #f6f8fb; }
[data-theme="light"] .login-panel { background: #f8f9fc; }
[data-theme="light"] .section-icon { background: #f1f4f8; border-color: #ccd4e0; color: #675b3c; }
[data-theme="light"] .entry-heading .eyebrow { color: #816122; }
[data-theme="light"] .entry-icon { background: #fae8b4; color: #7b5c1a; border-color: #d9c285; }
[data-theme="light"] .shift-amount span { color: var(--muted); }
[data-theme="light"] .plan-duration { color: #76613c; border-color: #dfdfda; }
[data-theme="light"] button[data-action="payment"] { background: #fff1ca; border-color: #d4b977; color: #73531a; }
[data-theme="light"] button[data-action="payment"]:hover { background: #f7e2aa; border-color: #ab8a45; }
[data-theme="light"] .theme-option.selected { border-color: #9d741e; box-shadow: 0 0 0 1px #9d741e; }
[data-theme="light"] .theme-option:focus-within { outline-color: #946715; }
[data-theme="light"] .theme-option input { accent-color: #916614; }
@media (max-width: 1050px) {
  .theme-options { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .theme-option { padding: 20px 14px; gap: 12px; }
}

.setting-value { display: grid; gap: 10px; padding: 18px; background: var(--surface-raised); border: 1px solid var(--line); border-radius: 9px; }
.setting-value span { font-size: .875rem; color: var(--muted); }
.setting-value strong { font-size: 1.4rem; font-variant-numeric: tabular-nums; }
.settings-card > .help { margin-top: 20px; }
.entry-result { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; }
.toolbar .checkbox { font-weight: 400; }
