/* Adoqa Analytics - Main Stylesheet */
/* Extracted from index.html */

.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}

.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* ════════════════════ NEXT BLOCK ════════════════════ */

.pin-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2.5px solid var(--y);
  transition: all 0.2s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

.pin-dot.active {
  background: var(--y);
  transform: scale(1.3);
  box-shadow: 0 0 15px var(--y);
  border-color: #fff;
}

:root {
  /* Shared Constants */
  --r: 14px;
  --nh: 64px;
  --gr: #10B981;
  --gr2: rgba(16, 185, 129, .12);
  --rd: #EF4444;
  --rd2: rgba(239, 68, 68, .12);
  --bl: #3B82F6;
  --bl2: rgba(59, 130, 246, .12);
  --or: #F59E0B;
  --pu: #8B5CF6;

  /* DEFAULT: Light Mode (Vibrant Retail Context) */
  --y: #F59E0B;
  --yd: #D97706;
  --yl: rgba(245, 158, 11, .1);
  --y15: rgba(245, 158, 11, .2);
  --bk: #FFFFFF;
  --bk2: #F8FAFC;
  --bk3: #EFF6FF;
  --bk4: #E2E8F0;
  --bk5: #94A3B8;
  --wh: #0F172A;
  --g1: rgba(15, 23, 42, .95);
  --g2: rgba(15, 23, 42, .65);
  --g3: rgba(15, 23, 42, .12);
  --g4: rgba(15, 23, 42, .06);
  --bd: 1px solid rgba(15, 23, 42, .1);
  --cs: light;
}

/* DARK MODE (Professional Dark Context) */
.dark-mode {
  --y: #F5C842;
  --yd: #C89800;
  --yl: rgba(245, 200, 66, .08);
  --y15: rgba(245, 200, 66, .15);
  --bk: #0A0C10;
  --bk2: #12151C;
  --bk3: #1B202B;
  --bk4: #252B3A;
  --bk5: #303748;
  --wh: #F8FAFC;
  --g1: rgba(248, 250, 252, .85);
  --g2: rgba(248, 250, 252, .55);
  --g3: rgba(248, 250, 252, .15);
  --g4: rgba(248, 250, 252, .05);
  --bd: 1px solid rgba(248, 250, 252, .1);
  --cs: dark;
}

html {
  font-size: 16px;
  -webkit-tap-highlight-color: transparent;
}

/* Light Mode (DEFAULT) Global Readability Overrides */
body:not(.dark-mode) {
  font-weight: 500;
}

body:not(.dark-mode) label,
body:not(.dark-mode) .kpi-lbl,
body:not(.dark-mode) .insight-label,
body:not(.dark-mode) .card-title {
  font-weight: 700 !important;
  color: var(--wh) !important;
  letter-spacing: 0.01em;
}

body:not(.dark-mode) .btn-y {
  color: #000 !important;
  font-weight: 600;
}

body:not(.dark-mode) .material-symbols-outlined {
  font-variation-settings: 'wght' 400;
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.1s ease;
}

html {
  font-size: 14px;
  -webkit-tap-highlight-color: transparent
}

body {
  background: var(--bk);
  color: var(--wh);
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  color-scheme: var(--cs);
}

input,
select,
button,
textarea {
  font-family: inherit
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px
}

::-webkit-scrollbar-track {
  background: transparent
}

::-webkit-scrollbar-thumb {
  background: var(--bk4);
  border-radius: 4px
}

/* ── LAYOUT ── */
#shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh
}

/* ── AUTH OVERLAY ── */
#auth-overlay {
  position: fixed;
  inset: 0;
  background: var(--bk);
  z-index: 5000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

#auth-overlay.open {
  display: flex;
}

.auth-card {
  background: var(--bk2);
  border: var(--bd);
  border-radius: 20px;
  padding: 30px 24px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

#topbar {
  position: sticky;
  top: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: 64px;
  background: var(--bk2);
  border-bottom: var(--bd);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  flex-shrink: 0
}

.tb-logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tb-logo img {
  height: 28px;
  width: auto;
  filter: brightness(0.85) contrast(1.1) saturate(1.2);
}

.tb-right {
  display: flex;
  align-items: center;
  gap: 8px
}

.tb-shop {
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  max-width: 180px;
  -webkit-tap-highlight-color: transparent;
  padding: 4px 0
}

.tb-shop-name {
  font-weight: 600;
  color: var(--wh);
  font-size: .88rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

.tb-date {
  font-size: .68rem;
  color: var(--g2);
  display: none
}

#bottomnav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: var(--bk2);
  border-top: var(--bd);
  height: 72px;
  padding-bottom: 8px;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
}

.bnav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  color: var(--g2);
  font-size: .56rem;
  letter-spacing: .02em;
  text-transform: uppercase;
  border: none;
  background: none;
  padding: 0;
  position: relative;
  -webkit-tap-highlight-color: transparent
}

.bnav-item.active {
  color: var(--y)
}

.bnav-item.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 15%;
  right: 15%;
  height: 2px;
  background: var(--y);
  border-radius: 0 0 3px 3px
}

.bnav-icon {
  font-size: 1.1rem;
  line-height: 1
}

#content {
  flex: 1;
  overflow-y: auto;
  padding: 20px 16px 110px;
  background: var(--bk);
}

.sec {
  display: none
}

.sec.active {
  display: block;
  min-height: 200px
}

/* ── CARDS ── */
.card {
  background: var(--bk2);
  border: var(--bd);
  border-radius: var(--r);
  padding: 14px;
  margin-bottom: 12px
}

.card-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px
}

.card-title {
  font-size: .7rem;
  font-weight: 700;
  color: var(--g2);
  text-transform: uppercase;
  letter-spacing: .1em
}

/* ── KPI GRID ── */
.kpi4 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-bottom: 12px
}

.kpi {
  background: var(--bk2);
  border: var(--bd);
  border-radius: var(--r);
  padding: 13px 12px;
  position: relative;
  overflow: hidden;
  cursor: default
}

.kpi::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--acc, var(--y))
}

.kpi-lbl {
  font-size: .62rem;
  color: var(--g2);
  text-transform: uppercase;
  letter-spacing: .09em;
  margin-bottom: 5px
}

.kpi-val {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--wh);
  line-height: 1;
  font-variant-numeric: tabular-nums
}

.kpi-sub {
  font-size: .68rem;
  margin-top: 5px;
  display: flex;
  align-items: center;
  gap: 4px
}

.kpi-badge {
  font-size: .6rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 20px
}

.up {
  color: var(--gr)
}

.dn {
  color: var(--rd)
}

.nt {
  color: var(--g2)
}

.kpi-icon {
  position: absolute;
  right: 10px;
  top: 10px;
  font-size: 1.4rem;
  opacity: .15
}

/* ── CHART ── */
.chart-wrap {
  position: relative;
  height: 175px
}

.chart-wrap-sm {
  position: relative;
  height: 140px
}

.chart-wrap-lg {
  position: relative;
  height: 220px
}

/* ── INSIGHT CARDS ── */
.insight {
  background: var(--bk3);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 8px;
  border-left: 3px solid var(--acc, var(--y))
}

.insight-label {
  font-size: .65rem;
  color: var(--g2);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 4px
}

.insight-val {
  font-size: .95rem;
  font-weight: 700;
  color: var(--wh)
}

.insight-sub {
  font-size: .75rem;
  color: var(--g2);
  margin-top: 3px
}

/* ── PROGRESS ── */
.prog {
  background: var(--bk3);
  border-radius: 4px;
  height: 5px;
  overflow: hidden;
  margin-top: 5px
}

.prog-fill {
  height: 100%;
  border-radius: 4px;
  transition: width .6s cubic-bezier(.34, 1.56, .64, 1)
}

.prog-y {
  background: var(--y)
}

.prog-g {
  background: var(--gr)
}

.prog-r {
  background: var(--rd)
}

.prog-b {
  background: var(--bl)
}

/* ── TABLE ── */
.tbl-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch
}

table {
  width: 100%;
  border-collapse: collapse
}

th {
  font-size: .63rem;
  color: var(--g2);
  text-transform: uppercase;
  letter-spacing: .07em;
  padding: 7px 10px;
  border-bottom: var(--bd);
  white-space: nowrap;
  text-align: left
}

td {
  padding: 9px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, .04);
  font-size: .83rem;
  vertical-align: middle
}

tr:last-child td {
  border-bottom: none
}

tr:hover td {
  background: var(--g4)
}

/* ── FORM ── */
.fg {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 11px
}

.fg-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px
}

.fg-row3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px
}

.fg label {
  font-size: .63rem;
  color: var(--g2);
  text-transform: uppercase;
  letter-spacing: .08em
}

input,
select,
textarea {
  background: var(--bk3) !important;
  border: 1px solid rgba(255, 255, 255, .1) !important;
  color: var(--wh) !important;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: .88rem;
  outline: none;
  transition: border-color .15s;
  width: 100%;
  -webkit-appearance: none;
  appearance: none
}

/* AUTOFILL FIX - Prevent browser from turning inputs white/yellow */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--wh) !important;
  -webkit-box-shadow: 0 0 0px 1000px var(--bk3) inset !important;
  transition: background-color 5000s ease-in-out 0s;
}

input:focus,
select:focus {
  border-color: rgba(245, 200, 66, .5)
}

input::placeholder {
  color: rgba(255, 255, 255, .2)
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23666'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: .83rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all .15s;
  white-space: nowrap;
  min-height: 42px
}

.btn-y {
  background: var(--y);
  color: var(--bk)
}

.btn-y:active {
  background: var(--yd)
}

.btn-ghost {
  background: var(--g4);
  color: var(--g1);
  border: var(--bd)
}

.btn-ghost:active {
  background: var(--g3)
}

.btn-rd {
  background: var(--rd2);
  color: var(--rd);
  border: 1px solid rgba(239, 68, 68, .25)
}

.btn-gr {
  background: var(--gr2);
  color: var(--gr);
  border: 1px solid rgba(34, 197, 94, .25)
}

.btn-full {
  width: 100%;
  padding: 13px
}

.btn-row {
  display: flex;
  gap: 8px;
  margin-top: 4px
}

/* ── BADGE ── */
.offline-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 8px;
  background: #f44336;
  color: #fff;
  text-align: center;
  font-weight: 700;
  font-size: 0.75rem;
  z-index: 100000;
  transform: translateY(-100%);
  transition: transform .3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px
}

.offline-bar.show {
  transform: translateY(0)
}

.sync-ic {
  animation: rotate 2s linear infinite;
  display: inline-block
}

@keyframes rotate {
  from {
    transform: rotate(0deg)
  }

  to {
    transform: rotate(360deg)
  }
}

.badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 20px;
  font-size: .65rem;
  font-weight: 700
}

.by {
  background: var(--y15);
  color: var(--y)
}

.bg_ {
  background: var(--gr2);
  color: var(--gr)
}

.br {
  background: var(--rd2);
  color: var(--rd)
}

.bb {
  background: var(--bl2);
  color: var(--bl)
}

.bpu {
  background: rgba(139, 92, 246, .15);
  color: var(--pu)
}

.bor {
  background: rgba(249, 115, 22, .15);
  color: var(--or)
}

/* ── ENTRY ROWS ── */
.erow {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--bk3);
  border-radius: 8px;
  margin-bottom: 6px;
  border: 1px solid transparent
}

.erow-info {
  flex: 1;
  min-width: 0
}

.erow-name {
  font-weight: 600;
  font-size: .88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.erow-meta {
  font-size: .72rem;
  color: var(--g2);
  margin-top: 1px
}

.erow-price {
  font-weight: 700;
  color: var(--y);
  font-size: .9rem;
  white-space: nowrap
}

.erow-del {
  background: none;
  border: none;
  color: var(--rd);
  cursor: pointer;
  padding: 6px;
  font-size: 1rem;
  flex-shrink: 0
}

/* ── SUGGESTIONS ── */
#sugg-box {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  background: var(--bk3);
  border: var(--bd);
  border-radius: 8px;
  z-index: 500;
  max-height: 220px;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0, 0, 0, .5);
  display: none
}

.sugg-item {
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: var(--bd);
  font-size: .88rem
}

.sugg-item:active {
  background: var(--bk4)
}

.sugg-highlighted {
  background: var(--bk4) !important;
  border-left: 3px solid var(--y)
}

.sugg-item strong {
  display: block
}

.sugg-item span {
  font-size: .73rem;
  color: var(--g2)
}

.input-wrap {
  position: relative
}

/* ── BILL TOTAL ── */
.bill-total-box {
  background: var(--yl);
  border: 1px solid rgba(245, 200, 66, .25);
  border-radius: 10px;
  padding: 13px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  gap: 12px
}

.bill-total-val {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--y)
}

/* ── WA REPORT ── */
#wa-pre {
  background: var(--bk3);
  border: 1px solid rgba(34, 197, 94, .18);
  border-radius: 8px;
  padding: 14px;
  font-size: .78rem;
  line-height: 1.85;
  white-space: pre-wrap;
  color: var(--g1);
  max-height: 60vh;
  overflow-y: auto;
  font-family: 'Courier New', monospace
}

/* ── TOAST ── */
#toast {
  position: fixed;
  bottom: 74px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  z-index: 9999;
  background: var(--bk3);
  border: var(--bd);
  border-radius: 10px;
  padding: 10px 18px;
  font-size: .85rem;
  opacity: 0;
  transition: all .25s;
  pointer-events: none;
  white-space: nowrap;
  box-shadow: 0 4px 24px rgba(0, 0, 0, .4);
  display: flex;
  align-items: center;
  gap: 7px
}

#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0)
}

/* ── OVERLAY / MODAL ── */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .78);
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
  backdrop-filter: blur(3px)
}

.overlay.open {
  opacity: 1;
  pointer-events: all
}

.modal {
  background: var(--bk2);
  border: var(--bd);
  border-radius: 16px 16px 0 0;
  padding: 20px 16px 32px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform .25s cubic-bezier(.32, 0, .67, 0)
}

.overlay.open .modal {
  transform: translateY(0)
}

.modal-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px
}

.modal-title {
  font-size: 1rem;
  font-weight: 700
}

.modal-close {
  background: var(--bk3);
  border: var(--bd);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: .85rem;
  color: var(--g2)
}

/* ── MISC ── */
hr {
  border: none;
  border-top: var(--bd);
  margin: 12px 0
}

.slbl {
  font-size: .62rem;
  color: var(--g2);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 7px;
  margin-top: 4px
}

.bnav-icon {
  font-size: 1.2rem;
  margin-bottom: 2px
}

/* OB DESIGN */
.ob-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 30px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.ob-step-pill {
  height: 4px;
  flex: 1;
  background: rgba(245, 200, 66, 0.1);
  border-radius: 2px;
  transition: all 0.4s ease;
}

.ob-step-pill.active {
  background: var(--y);
  box-shadow: 0 0 10px var(--y);
}

.glow-logo {
  animation: logoGlow 3s infinite alternate;
  display: inline-block;
}

@keyframes logoGlow {
  from {
    filter: drop-shadow(0 0 5px rgba(245, 200, 66, 0));
  }

  to {
    filter: drop-shadow(0 0 15px rgba(245, 200, 66, 0.4));
  }
}

.slide-in {
  animation: obSlide 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes obSlide {
  from {
    transform: translateY(20px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes bounce {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

.empty {
  text-align: center;
  padding: 32px 16px
}

.empty-ic {
  font-size: 2rem;
  margin-bottom: 10px;
  opacity: .3
}

.empty-txt {
  font-size: .85rem;
  color: var(--g2)
}

.divider {
  height: 1px;
  background: rgba(255, 255, 255, .06);
  margin: 10px 0
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 600;
  cursor: pointer;
  border: var(--bd);
  background: var(--g4);
  color: var(--g2);
  transition: all .15s
}

.pill.active {
  background: var(--y15);
  color: var(--y);
  border-color: rgba(245, 200, 66, .3)
}

.pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px
}

/* ── ANALYTICS SPECIFIC ── */
.forecast-band {
  background: linear-gradient(135deg, rgba(245, 200, 66, .06), rgba(245, 200, 66, .02));
  border: 1px solid rgba(245, 200, 66, .15);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 10px
}

.trend-arrow {
  font-size: 1.2rem;
  margin-right: 4px
}

.health-score {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 800;
  flex-shrink: 0
}

.score-great {
  background: rgba(34, 197, 94, .15);
  color: var(--gr);
  border: 2px solid rgba(34, 197, 94, .4)
}

.score-good {
  background: var(--y15);
  color: var(--y);
  border: 2px solid rgba(245, 200, 66, .4)
}

.score-warn {
  background: var(--rd2);
  color: var(--rd);
  border: 2px solid rgba(239, 68, 68, .4)
}

.heatmap-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px
}

.heatmap-cell {
  height: 28px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .58rem;
  font-weight: 600;
  color: rgba(255, 255, 255, .5)
}

.stock-bar {
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  background: var(--bk3);
  margin-top: 4px
}

.stock-fill {
  height: 100%;
  border-radius: 3px
}

.margin-ring {
  position: relative;
  width: 48px;
  height: 48px;
  flex-shrink: 0
}

.sticky-bill-bar {
  background: var(--bk2);
  border: var(--bd);
  border-radius: 12px;
  padding: 14px 15px;
  position: sticky;
  bottom: 68px;
  margin-top: 4px;
  z-index: 100;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, .2)
}

.qbtn {
  background: var(--bk4);
  border: var(--bd);
  color: var(--g1);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: .7rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .1s
}

.qbtn:active {
  background: var(--bk5);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--r);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn:active {
  transform: scale(0.96) translateY(1px);
}

.btn-y {
  background: linear-gradient(135deg, #F5C842, #EAB308);
  color: #000;
  box-shadow: 0 4px 15px rgba(245, 200, 66, 0.25);
}

.btn-gr {
  background: linear-gradient(135deg, #10B981, #059669);
  color: #fff;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.25);
}

.btn-rd {
  background: linear-gradient(135deg, #EF4444, #DC2626);
  color: #fff;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.2);
}

.btn-bl {
  background: linear-gradient(135deg, #3B82F6, #2563EB);
  color: #fff;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.2);
}

.btn-ghost {
  background: var(--bk2);
  border: 1px solid var(--g3);
  color: var(--g1);
}

.btn-full {
  width: 100%;
}

.fg label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--g2);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

input,
select,
textarea {
  width: 100%;
  background: var(--bk2);
  border: 1px solid var(--g3);
  border-radius: var(--r);
  padding: 13px 16px;
  color: var(--wh);
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.2s ease;
  appearance: none;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--y);
  background: var(--bk3);
  box-shadow: 0 0 0 4px var(--y15);
}

.calc-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px
}

.calc-btn {
  background: var(--bk3);
  border: var(--bd);
  color: var(--wh);
  padding: 12px;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer
}

.calc-btn:active {
  background: var(--bk4)
}

.calc-btn.op {
  background: var(--y15);
  color: var(--y)
}

.calc-display {
  background: var(--bk);
  border: var(--bd);
  border-radius: 8px;
  padding: 12px;
  text-align: right;
  font-size: 1.4rem;
  font-family: monospace;
  margin-bottom: 12px;
  min-height: 50px
}

.f-inp {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--g3);
  color: var(--y);
  font-weight: 700;
  width: 50px;
  text-align: center;
  padding: 2px;
  font-size: .85rem;
  outline: none
}

.f-inp:focus {
  border-bottom-color: var(--y)
}

/* ── MENU ITEMS (More Tab) ── */
.menu-item {
  display: flex;
  align-items: center;
  gap: 15px;
  background: var(--bk2);
  border: var(--bd);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: all .2s;
  -webkit-tap-highlight-color: transparent;
}

.menu-item:active {
  background: var(--bk3);
  transform: scale(.98);
}

.menu-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .2);
}

.menu-label {
  flex: 1;
  font-weight: 700;
  font-size: .98rem;
  color: var(--wh);
}

.menu-arrow {
  color: var(--g3);
  font-size: .8rem;
}

/* ── DESKTOP ── */
@media(min-width:768px) {
  #shell {
    flex-direction: row
  }

  #topbar {
    display: none !important;
  }

  #bottomnav {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 260px;
    flex-direction: column;
    height: 100vh !important;
    border-top: none;
    border-right: var(--bd);
    padding: 0;
    justify-content: flex-start;
    background: var(--bk2);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding-top: 20px;
  }

  .pc-logo {
    display: flex !important;
    padding: 20px 24px 30px !important;
    border-bottom: 1px solid var(--g4);
    margin-bottom: 15px;
  }

  .bnav-item {
    flex: none;
    flex-direction: row !important;
    justify-content: flex-start !important;
    padding: 14px 24px !important;
    gap: 16px !important;
    font-size: 0.92rem !important;
    text-transform: none;
    letter-spacing: .02em;
    border-radius: 12px !important;
    margin: 4px 16px !important;
    transform: none !important;
    width: auto !important;
    height: auto !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
  }

  .bnav-item span {
    color: var(--g1) !important;
  }

  .bnav-item.active {
    background: var(--y15) !important;
  }

  .bnav-item.active span {
    color: var(--y) !important;
  }

  .bnav-item .bnav-icon {
    font-size: 24px !important;
  }

  .bnav-item:active {
    transform: scale(0.9) !important;
  }

  .bnav-item.active::before {
    top: 0;
    bottom: 0;
    left: 0;
    right: auto;
    width: 3px;
    height: auto;
    border-radius: 0 3px 3px 0
  }

  .bnav-icon {
    font-size: .9rem
  }

  #content {
    margin-left: 260px;
    padding: 30px 40px 80px;
    width: calc(100% - 260px);
  }

  .sticky-bill-bar {
    bottom: 15px
  }

  .kpi4 {
    grid-template-columns: repeat(4, 1fr)
  }

  .d2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 13px
  }

  .d3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 13px
  }

  .tb-date {
    display: block
  }

  #topbar button:active {
    transform: scale(0.9);
  }
}

/* ── LANDING PAGE ── */
#landing-page {
  position: fixed;
  inset: 0;
  /* Force dark theme variables locally inside #landing-page */
  --bk: #0A0A0A;
  --wh: #FFFFFF;
  --bk2: #111111;
  --bk3: #1A1A1A;
  --bk4: #222222;
  --bk5: #2A2A2A;
  --g1: rgba(255, 255, 255, .75);
  --g2: rgba(255, 255, 255, .4);
  --g3: rgba(255, 255, 255, .12);
  --g4: rgba(255, 255, 255, .05);
  --bd: 1px solid rgba(255, 255, 255, .08);
  background: var(--bk) !important;
  color: var(--wh) !important;
  z-index: 100000;
  display: block;
  padding: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Landing Styles Removed */

/* ════════════════════ NEXT BLOCK ════════════════════ */

.chat-bubble {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.88rem;
  line-height: 1.4;
}

.chat-bubble.system {
  align-self: flex-start;
  background: var(--bk3);
  color: var(--wh);
  border-bottom-left-radius: 2px;
}

.chat-bubble.user {
  align-self: flex-end;
  background: var(--y);
  color: var(--bk);
  font-weight: 700;
  border-bottom-right-radius: 2px;
}

.faq-btn {
  background: var(--bk);
  border: 1px solid var(--bd);
  color: var(--wh);
  padding: 10px;
  border-radius: 10px;
  font-size: 0.82rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
}

.faq-btn:active {
  background: var(--bk3);
  transform: scale(0.98);
}

/* ════════════════════ NEXT BLOCK ════════════════════ */

.role-btn {
  background: var(--bk3);
  border: var(--bd);
  color: var(--g2);
  padding: 10px;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.role-btn.active {
  background: var(--y15);
  color: var(--y);
  border-color: var(--y);
}

/* ── PIN ROLES GRID ── */
.pin-roles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.pin-roles-grid>div[style*="span 2"],
.pin-roles-grid>div:last-child {
  grid-column: 1 / -1;
}