:root {
  --font: 'DM Sans', system-ui, sans-serif;
  --mono: 'JetBrains Mono', 'Cascadia Code', monospace;
  --bg: #f0f2f5;
  --card: #fff;
  --border: #e0e4ea;
  --text: #1a1d23;
  --muted: #6b7280;
  --pri: #4f46e5;
  --pri-lt: #eef2ff;
  --ok: #059669;
  --ok-lt: #dcfce7;
  --err: #dc2626;
  --err-lt: #fee2e2;
  --warn: #d97706;
  --warn-lt: #fef3c7;
  --r: 8px;
  --hdr: #0f172a;
  --row-alt: #f8fafc;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px
}

/* ═══ APP SHELL ═══ */
.app-shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

.app-header {
  background: var(--hdr);
  color: #fff;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 48px;
  flex-shrink: 0;
}

.app-header .logo {
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px
}

.eb-brand-link {
  cursor: pointer;
  user-select: none;
}

.eb-brand-link:focus {
  outline: 2px solid rgba(99, 102, 241, .8);
  outline-offset: 2px;
}

.eb-logo-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  display: inline-block;
  flex-shrink: 0;
}

.eb-logo-text {
  display: inline-flex;
  align-items: center;
}

.app-header .logo span {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 500
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px
}

.header-actions button {
  background: rgba(255, 255, 255, .1);
  border: none;
  color: #fff;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
}

.header-actions button:hover {
  background: rgba(255, 255, 255, .2)
}

/* ═══ TAB BAR ═══ */
.tab-bar {
  background: #1e293b;
  display: flex;
  gap: 0;
  padding: 0 16px;
  overflow-x: auto;
  flex-shrink: 0;
}

.tab {
  padding: 10px 14px;
  color: #64748b;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: .15s;
  letter-spacing: .3px;
  white-space: nowrap;
}

.tab:hover {
  color: #94a3b8
}

.tab.act {
  color: #c7d2fe;
  border-color: #6366f1
}

/* ═══ KPI BAR ═══ */
.kpi-bar {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 6px 16px;
  display: flex;
  gap: 16px;
  flex-shrink: 0;
  overflow-x: auto;
}

.kp {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap
}

.kp .kl {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: .3px
}

.kp .kv {
  font-size: 14px;
  font-weight: 700
}

.kp.bl .kv {
  color: var(--pri)
}

.kp.gn .kv {
  color: var(--ok)
}

.kp.rd .kv {
  color: var(--err)
}

.kp.yw .kv {
  color: var(--warn)
}

/* ═══ PANELS ═══ */
.panel {
  flex: 1;
  display: none;
  overflow: auto;
  position: relative
}

.panel.show {
  display: flex;
  flex-direction: column
}

.panel>h2 {
  font-size: 18px;
  font-weight: 700;
  padding: 20px 24px 0;
  margin: 0
}

/* ═══ CARDS ═══ */
.C {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 16px
}

.C h3 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px
}

/* ═══ FORMS ═══ */
.fg {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 12px
}

.fi {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px
}

.fi label {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .3px
}

.fi input,
.fi select,
.fi textarea {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  font-size: 13px;
  font-family: var(--font);
  background: #fff;
  color: var(--text);
  transition: border-color .15s;
}

.fi input:focus,
.fi select:focus {
  outline: none;
  border-color: var(--pri);
  box-shadow: 0 0 0 2px rgba(79, 70, 229, .15)
}

.fbar {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
  padding: 16px 0;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border)
}

.brow {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap
}

/* ═══ BUTTONS ═══ */
.btn {
  padding: 8px 16px;
  border: none;
  border-radius: var(--r);
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  font-family: var(--font);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: opacity .15s
}

.btn:hover {
  opacity: .85
}

.bp {
  background: var(--pri);
  color: #fff
}

.bg {
  background: var(--ok);
  color: #fff
}

.br {
  background: var(--err);
  color: #fff
}

.bm {
  background: var(--ok);
  color: #fff
}

.bw {
  background: var(--warn);
  color: #fff
}

.btn-s {
  padding: 8px 16px;
  border: none;
  border-radius: var(--r);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer
}

.btn-pri {
  background: var(--pri);
  color: #fff
}

.btn-ok {
  background: var(--ok);
  color: #fff
}

.btn-warn {
  background: var(--warn);
  color: #fff
}

.btn-ghost {
  background: var(--ok);
  border: none;
  color: #fff
}

/* ═══ INLINE BUTTONS ═══ */
.ib {
  padding: 2px 5px;
  border: none;
  border-radius: 3px;
  font-size: 9px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font);
  white-space: nowrap
}

.ib-p {
  background: var(--pri);
  color: #fff
}

.ib-g {
  background: var(--ok);
  color: #fff
}

.ib-r {
  background: var(--err);
  color: #fff
}

.ib-y {
  background: var(--warn);
  color: #fff
}

/* ═══ STATUS BADGES ═══ */
.st {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 10px;
  font-size: 9px;
  font-weight: 700
}

.st-a {
  background: var(--ok-lt);
  color: #065f46
}

.st-p {
  background: var(--warn-lt);
  color: #92400e
}

.st-s {
  background: var(--err-lt);
  color: #991b1b
}

/* ═══ TABLES ═══ */
.panel table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin-top: 8px
}

.panel table:not(.sheet) th {
  text-align: left;
  padding: 8px 10px;
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .3px;
  border-bottom: 2px solid var(--border);
  background: var(--bg)
}

.panel table:not(.sheet) td {
  padding: 8px 10px;
  border-bottom: 1px solid #f1f5f9;
  font-family: var(--font);
  font-size: 12px;
  vertical-align: middle
}

.panel table:not(.sheet) tr:hover td {
  background: #f8fafc
}

/* ═══ SHEET (SPREADSHEET) ═══ */
.sheet-wrap {
  flex: 1;
  overflow: auto;
  position: relative
}

table.sheet {
  width: max-content;
  border-collapse: collapse;
  font-size: 12px
}

table.sheet thead {
  position: sticky;
  top: 0;
  z-index: 10
}

table.sheet th {
  background: var(--hdr);
  color: #94a3b8;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .4px;
  font-weight: 600;
  padding: 4px 8px;
  border: 1px solid #1e293b;
  white-space: nowrap;
  text-align: center;
  user-select: none
}

table.sheet td {
  padding: 3px 6px;
  border: 1px solid var(--border);
  white-space: nowrap;
  vertical-align: middle;
  background: var(--card);
  font-family: var(--mono);
  font-size: 11px
}

table.sheet tr:nth-child(even) td {
  background: var(--row-alt)
}

table.sheet tr:hover td {
  background: #e0e7ff !important
}

table.sheet td.name {
  font-family: var(--font);
  font-weight: 600;
  font-size: 12px;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  position: sticky;
  left: 0;
  z-index: 2;
  background: inherit
}

table.sheet td.num {
  text-align: right
}

table.sheet td.editable {
  cursor: cell
}

table.sheet td.editable:hover {
  background: #fefce8 !important;
  outline: 2px solid var(--warn)
}

td.dc {
  text-align: center;
  min-width: 36px
}

td.dc.z {
  color: #d1d5db
}

td.dc.v {
  font-weight: 600
}

td.dc.ov {
  background: #fffbeb !important;
  color: var(--warn)
}

td.dc.fu {
  color: #94a3b8;
  font-style: italic
}

.day-hdr {
  background: #1e293b !important;
  color: #c7d2fe !important;
  min-width: 36px;
  font-size: 9px
}

.day-hdr.today {
  background: #312e81 !important;
  color: #fff !important
}

.day-hdr.sun {
  color: #f87171 !important
}

.bill-col {
  background: #f0fdf4 !important
}

.bal-pos {
  color: var(--err);
  font-weight: 600
}

.bal-zero {
  color: var(--ok)
}

/* ═══ MODAL ═══ */
.modal-bg {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .5);
  z-index: 100;
  align-items: center;
  justify-content: center
}

.modal-bg.open {
  display: flex
}

.modal {
  background: var(--card);
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
  max-width: 640px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  padding: 20px;
  position: relative
}

.modal h2 {
  font-size: 16px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px
}

.mclose {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--muted)
}

/* ═══ KPIS ═══ */
.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 16px
}

.sb {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  text-align: center
}

.sb .kl {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  font-weight: 600;
  display: block;
  margin-bottom: 4px
}

.sb .kv {
  font-size: 20px;
  font-weight: 700
}

/* ═══ ANALYTICS ═══ */
.an {
  padding: 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
  overflow-y: auto
}

.ac {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px
}

.ac h3 {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 12px;
  text-transform: uppercase
}

.ac .bn {
  font-size: 28px;
  font-weight: 700
}

.ac .sn {
  font-size: 11px;
  color: var(--muted)
}

/* ═══ SETTINGS ═══ */
.stg {
  padding: 24px;
  max-width: 800px;
  margin: 0 auto;
  width: 100%
}

.stg h2 {
  font-size: 16px;
  margin-bottom: 16px
}

.stg h3 {
  font-size: 13px;
  color: var(--muted);
  margin: 16px 0 8px;
  text-transform: uppercase
}

.cr {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px
}

.cr label {
  font-size: 12px;
  font-weight: 600;
  min-width: 180px
}

.cr input {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  font-family: var(--mono);
  font-size: 12px
}

/* ═══ LOADING ═══ */
.ld {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 30px;
  font-size: 13px;
  color: var(--muted)
}

.sp {
  width: 20px;
  height: 20px;
  border: 3px solid var(--border);
  border-top-color: var(--pri);
  border-radius: 50%;
  animation: spin .7s linear infinite
}

@keyframes spin {
  to {
    transform: rotate(360deg)
  }
}

/* ═══ TOASTS ═══ */
.ta {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 6px
}

.tt {
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  animation: fadeIn .2s
}

.tt.ok {
  background: var(--ok)
}

.tt.er {
  background: var(--err)
}

.tt.in {
  background: var(--pri)
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px)
  }

  to {
    opacity: 1;
    transform: translateY(0)
  }
}

/* ═══ TOOLBAR ═══ */
.toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  flex-shrink: 0;
}

.toolbar input,
.toolbar select {
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  font-size: 11px;
  font-family: var(--font);
  background: #fff;
}

.toolbar .tb-btn {
  padding: 4px 10px;
  border: none;
  border-radius: var(--r);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  background: var(--ok);
  color: #fff;
  font-family: var(--font);
}

.toolbar .tb-btn:hover {
  opacity: .85
}

.toolbar .tb-btn.act {
  background: var(--pri);
  color: #fff
}

.pg-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto
}

.pg-nav button {
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  font-size: 12px
}

.pg-nav span {
  font-size: 11px;
  color: var(--muted);
  min-width: 80px;
  text-align: center
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 768px) {
  .fg {
    grid-template-columns: 1fr
  }

  .kpi-bar {
    gap: 8px
  }

  .toolbar {
    gap: 4px
  }
}

.muted {
  color: var(--muted);
  font-size: 12px
}

/* ═══ LEGACY PORT MIGRATION STYLES ═══ */

/* HEADERS & NAVIGATION */
.hdr {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
  padding: 12px 18px;
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hdr .logo {
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px
}

.hdr .sub {
  font-size: 10px;
  opacity: .8;
  margin-top: 1px
}

.hdr-r {
  display: flex;
  align-items: center;
  gap: 10px
}

/* NOTIFICATIONS & BADGES */
.bell {
  position: relative;
  background: none;
  border: none;
  color: rgba(255, 255, 255, .8);
  font-size: 20px;
  cursor: pointer;
  padding: 4px
}

.bell .bdg {
  position: absolute;
  top: -2px;
  right: -4px;
  background: #ef4444;
  color: #fff;
  font-size: 8px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 10px;
  min-width: 14px;
  text-align: center
}

.notif-panel {
  display: none;
  position: fixed;
  top: 50px;
  right: 10px;
  width: 300px;
  max-height: 70vh;
  overflow-y: auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .15);
  z-index: 60;
  padding: 12px
}

.notif-panel .notif-item {
  padding: 8px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 12px
}

.notif-panel .notif-item:last-child {
  border: none
}

.notif-panel .notif-item b {
  font-size: 11px
}

.notif-panel .notif-item .nt {
  font-size: 10px;
  color: var(--muted)
}

.notif-panel.open {
  display: block
}

/* LAYOUT UTILS */
.content {
  padding: 14px 16px;
  max-width: 700px;
  margin: 0 auto;
  padding-bottom: 80px
}

.S {
  display: none
}

.S.act {
  display: block
}

/* BOTTOM NAVIGATION */
.bnav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #0f172a;
  display: flex;
  justify-content: space-around;
  padding: 5px 0 max(5px, env(safe-area-inset-bottom));
  z-index: 50
}

.bnav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #64748b;
  text-decoration: none;
  font-size: 9px;
  gap: 1px;
  padding: 3px 8px;
  cursor: pointer;
  border-radius: 6px;
  transition: .15s
}

.bnav a .ic {
  font-size: 17px
}

.bnav a.act {
  color: #fff;
  background: #1e293b
}

/* MARKETING WIZARD */
.steps-nav {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e2e8f0;
  transition: .3s
}

.dot.act {
  background: var(--pri);
  transform: scale(1.2)
}

.step {
  display: none
}

.step.act {
  display: block;
  animation: fadeIn .3s
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* DELIVERY DASHBOARD */
.gps-bar {
  background: #1e293b;
  color: #94a3b8;
  padding: 4px 16px;
  font-size: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: space-between
}

.gps-bar .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0
}

.gps-bar .dot.on {
  background: #22c55e;
  box-shadow: 0 0 6px #22c55e
}

.gps-bar .dot.off {
  background: #ef4444
}

.gps-bar .coords {
  font-family: monospace;
  font-size: 9px
}

.kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 12px
}

.kpi {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
  text-align: center
}

.kpi .l {
  font-size: 9px;
  color: var(--muted);
  text-transform: uppercase
}

.kpi .v {
  font-size: 18px;
  font-weight: 700;
  margin-top: 2px
}

.area-hdr {
  font-size: 10px;
  font-weight: 700;
  color: var(--pri);
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 8px 0 4px;
  border-bottom: 2px solid var(--pri);
  display: flex;
  justify-content: space-between;
  align-items: center
}

.rc {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  margin: 6px 0;
  transition: .15s
}

.rc.has-change {
  border-left: 3px solid var(--warn)
}

.rc.no-order {
  opacity: .55
}

.rc.done-card {
  border-left: 3px solid var(--ok);
  opacity: .7
}

.rc .name {
  font-weight: 600;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap
}

.rc .meta {
  font-size: 10px;
  color: var(--muted);
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap
}

.rc .change-tag {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 10px;
  font-size: 9px;
  font-weight: 600;
  background: #fef3c7;
  color: #92400e
}

.rc .prods {
  margin-top: 6px
}

.rc .prod-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 3px 0;
  border-top: 1px solid #f1f5f9
}

.rc .pqty {
  display: flex;
  align-items: center;
  gap: 3px
}

.rc .pqty button {
  width: 24px;
  height: 24px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: #f8f9fb;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center
}

.rc .pqty span {
  min-width: 24px;
  text-align: center;
  font-weight: 600;
  font-size: 13px
}

.map-wrap {
  width: 100%;
  height: 200px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 10px;
  position: relative
}

.map-wrap .map-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  background: #e2e8f0;
  color: var(--muted);
  font-size: 12px
}

.map-toggle {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 5
}

/* CUSTOMER PORTAL SPECIFIC */
.top {
  background: linear-gradient(135deg, #4338ca, #7c3aed);
  color: #fff;
  padding: 20px 16px 24px;
  border-radius: 0 0 24px 24px
}

.top .hello {
  font-size: 14px;
  opacity: .85
}

.top .bal {
  font-size: 32px;
  font-weight: 700;
  margin-top: 4px
}

.top .bal small {
  font-size: 14px;
  font-weight: 400;
  opacity: .7
}

.quick {
  display: flex;
  gap: 8px;
  padding: 0 16px;
  margin-top: -16px;
  overflow-x: auto
}

.qb {
  flex: 1;
  background: var(--card);
  border-radius: 12px;
  padding: 12px 8px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
  cursor: pointer;
  border: none;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  min-width: 70px
}

.qb:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .12)
}

.qb .qi {
  font-size: 22px;
  display: block;
  margin-bottom: 4px
}

.sect {
  display: none;
  padding-bottom: 70px
}

.sect.act {
  display: block
}

.sub {
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center
}

.sub .sl {
  font-size: 13px
}

.sub .sr {
  text-align: right;
  font-size: 12px
}

.tg {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600
}

.tg-g {
  background: #d1fae5;
  color: #065f46
}

.tg-y {
  background: #fef3c7;
  color: #92400e
}

.tg-r {
  background: #fee2e2;
  color: #991b1b
}

.tg-b {
  background: var(--pri-lt);
  color: var(--pri)
}

.nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: var(--card);
  border-top: 1px solid var(--border);
  display: flex;
  padding: 8px 0 12px;
  z-index: 50
}

.nav a {
  flex: 1;
  text-align: center;
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  cursor: pointer;
  padding: 4px 0
}

.nav a.act {
  color: var(--pri)
}

.nav a .ni {
  font-size: 20px;
  display: block
}

/* CALENDAR GRID */
.cal {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  font-size: 11px;
  margin-top: 8px
}

.cal .ch {
  text-align: center;
  font-weight: 700;
  color: var(--muted);
  padding: 4px;
  font-size: 10px
}

.cal .cd {
  min-height: 36px;
  padding: 2px;
  border-radius: 6px;
  text-align: center;
  cursor: pointer;
  border: 1px solid transparent
}

.cal .cd.has {
  background: #d1fae5;
  border-color: #a7f3d0
}

.cal .cd.skip {
  background: #fee2e2;
  border-color: #fca5a5
}

.cal .cd.today {
  border-color: var(--pri);
  background: var(--pri-lt)
}

.cal .cd .dn {
  font-weight: 700;
  font-size: 10px
}

.cal .cd .dq {
  font-size: 9px;
  color: var(--ok);
  font-weight: 600
}
