:root {
  --rp-accent: #00b4d8;
  --rp-accent-2: #0077b6;
  --rp-ready: #10b981;
  --rp-main: #ef4444;
  --rp-card-radius: 1rem;
}

body.layout-fixed {
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(0, 180, 216, 0.12), transparent 55%),
    radial-gradient(900px 400px at 100% 0%, rgba(0, 119, 182, 0.10), transparent 50%),
    var(--bs-body-bg);
}

.app-sidebar {
  border-right: 1px solid rgba(255,255,255,.06);
}

.sidebar-brand .brand-text {
  font-weight: 700 !important;
  letter-spacing: .02em;
  color: #fff !important;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--rp-accent), var(--rp-accent-2));
  color: #fff;
  margin-right: .6rem;
  font-size: 1rem;
}

.app-header {
  backdrop-filter: blur(8px);
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  display: inline-block;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, .7);
  animation: pulseLive 1.6s infinite;
  margin-right: .4rem;
}

@keyframes pulseLive {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .55); }
  70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.stat-tile {
  border: 0;
  border-radius: var(--rp-card-radius);
  overflow: hidden;
  color: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .12);
}
.stat-tile .inner { padding: 1.1rem 1.25rem; }
.stat-tile h3 { margin: 0; font-weight: 700; font-size: 1.75rem; }
.stat-tile p { margin: .15rem 0 0; opacity: .9; }
.stat-tile.bg-cyan { background: linear-gradient(135deg, #00b4d8, #0077b6); }
.stat-tile.bg-emerald { background: linear-gradient(135deg, #34d399, #059669); }
.stat-tile.bg-rose { background: linear-gradient(135deg, #fb7185, #e11d48); }
.stat-tile.bg-amber { background: linear-gradient(135deg, #fbbf24, #d97706); }

.ps-unit-card {
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: var(--rp-card-radius);
  overflow: hidden;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .08);
  height: 100%;
  transition: transform .15s ease, box-shadow .15s ease;
}
.ps-unit-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(15, 23, 42, .12);
}
.ps-unit-card .unit-head {
  color: #fff;
  padding: 1rem 1.1rem;
}
.ps-unit-card.is-ready .unit-head {
  background: linear-gradient(135deg, #14b8a6, #059669);
}
.ps-unit-card.is-main .unit-head {
  background: linear-gradient(135deg, #f43f5e, #e11d48);
}
.ps-unit-card .unit-label {
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .68rem;
  opacity: .8;
}
.ps-unit-card .unit-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin: .2rem 0 0;
}
.ps-unit-card .unit-body { padding: 1rem 1.1rem 1.15rem; }
.ps-unit-card .meta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .5rem;
  margin-bottom: .85rem;
}
.ps-unit-card .meta-box {
  background: #f8fafc;
  border-radius: .75rem;
  padding: .55rem .6rem;
}
.ps-unit-card .meta-box .k {
  display: block;
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #64748b;
}
.ps-unit-card .meta-box .v {
  font-weight: 700;
  font-size: .92rem;
  color: #0f172a;
}
.session-box {
  border: 1px solid #e2e8f0;
  border-radius: .85rem;
  padding: .85rem .95rem;
  background: #f8fafc;
}
.session-box .row-line {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  font-size: .9rem;
  margin-bottom: .35rem;
}
.session-box .row-line:last-child { margin-bottom: 0; }
.session-box .k { color: #64748b; }
.session-box .timer {
  font-weight: 700;
  color: #059669;
  font-variant-numeric: tabular-nums;
}
.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: .9rem;
}
.btn-glow {
  border-radius: .65rem;
  font-weight: 600;
}
.page-subtitle { color: #64748b; margin-top: .2rem; }
.toolbar-live {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .85rem;
  color: #64748b;
  background: #ecfeff;
  border: 1px solid #a5f3fc;
  border-radius: 999px;
  padding: .25rem .7rem;
}

.login-hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(800px 400px at 20% 10%, rgba(0,180,216,.25), transparent 60%),
    radial-gradient(700px 400px at 90% 80%, rgba(0,119,182,.22), transparent 55%),
    #0b1220;
}
.login-hero .card {
  border: 0;
  border-radius: 1.25rem;
  box-shadow: 0 20px 50px rgba(0,0,0,.35);
  overflow: hidden;
  width: min(420px, 92vw);
}
.login-hero .card-header {
  background: linear-gradient(135deg, #00b4d8, #0077b6);
  color: #fff;
  border: 0;
  padding: 1.25rem 1.5rem;
}
.login-brand-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: .75rem;
  background: rgba(255,255,255,.95);
  padding: 4px;
  flex-shrink: 0;
}
.public-bill .card {
  border: 0;
  border-radius: 1.25rem;
  box-shadow: 0 16px 40px rgba(15,23,42,.12);
}

@media (max-width: 576px) {
  .ps-unit-card .meta-grid { grid-template-columns: 1fr; }
}

/* Owner pages */
.owner-kpi {
  background: #fff;
  border: 1px solid rgba(15,23,42,.08);
  border-radius: 1rem;
  padding: 1.1rem 1.2rem;
  box-shadow: 0 8px 24px rgba(15,23,42,.06);
  height: 100%;
}
.owner-kpi .k {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #64748b;
}
.owner-kpi .v {
  margin-top: .35rem;
  font-size: 1.75rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
}
.owner-kpi .hint {
  margin-top: .35rem;
  font-size: .75rem;
  color: #94a3b8;
}
.owner-kpi.accent-blue { border-color: rgba(0,180,216,.35); }
.owner-kpi.accent-blue .k { color: #0284c7; }
.owner-kpi.accent-pink { border-color: rgba(244,63,94,.3); }
.owner-kpi.accent-pink .k { color: #e11d48; }
.owner-kpi.accent-teal { border-color: rgba(20,184,166,.35); }
.owner-kpi.accent-teal .k { color: #0f766e; }

.branch-card, .chart-card, .filter-card, .table-card {
  border: 0;
  border-radius: 1rem;
  box-shadow: 0 8px 24px rgba(15,23,42,.08);
}
.meta-mini {
  background: #f8fafc;
  border-radius: .75rem;
  padding: .55rem .7rem;
}
.meta-mini span {
  display: block;
  font-size: .7rem;
  color: #64748b;
  text-transform: uppercase;
}
.meta-mini strong { font-size: .95rem; }

.detail-panel {
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  padding: 1rem 1.25rem 1.25rem;
}
.summary-pill {
  border: 1px solid #e2e8f0;
  border-radius: .9rem;
  padding: .9rem 1rem;
  background: #fff;
}
.border-dashed { border-style: dashed !important; }
.table-card thead th {
  background: #f8fafc;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: #64748b;
  border-bottom-width: 1px;
}

/* Karyawan POS actions */
.pos-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .5rem;
}
.pos-actions .btn {
  border-radius: .75rem;
  font-weight: 650;
  padding: .7rem .5rem;
}
.pos-actions .btn-start {
  background: linear-gradient(135deg, #f43f5e, #fb7185);
  border: 0;
  color: #fff;
}
.pos-actions .btn-start:disabled { opacity: .45; }
.pos-actions .btn-reset {
  background: #0f172a;
  border: 1px solid #334155;
  color: #e2e8f0;
}
.pos-actions .btn-finish {
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  border: 0;
  color: #fff;
}
.pos-actions .btn-pindah {
  background: linear-gradient(135deg, #0ea5e9, #22d3ee);
  border: 0;
  color: #fff;
}
.pos-actions .btn-order {
  grid-column: 1 / -1;
  border: 1px solid #94a3b8;
  background: #fff;
  color: #0284c7;
}
.tarif-box {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: .85rem;
  padding: .85rem 1rem;
}
.cart-box {
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  padding: 1rem;
  background: #f8fafc;
  position: sticky;
  top: 0;
}
.menu-item {
  border: 1px solid #e2e8f0;
  border-radius: .85rem;
  padding: .85rem 1rem;
  background: #fff;
}
.menu-item:hover {
  border-color: #38bdf8;
  box-shadow: 0 6px 16px rgba(14,165,233,.12);
}
.ps-unit-card.paket-expired {
  outline: 2px solid #f59e0b;
  box-shadow: 0 0 0 4px rgba(245,158,11,.18);
}
.ps-unit-card.paket-expired .unit-head {
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
}
.ps-unit-card.has-orders {
  outline: 2px solid #f97316;
  box-shadow: 0 0 0 4px rgba(249, 115, 22, .16);
}
.ps-unit-card.has-orders .unit-head {
  position: relative;
}
.order-flag {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #fdba74;
  border-radius: 999px;
  padding: .2rem .55rem;
  font-size: .72rem;
  font-weight: 700;
}
.order-toast {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 1090;
  width: min(380px, calc(100vw - 1.5rem));
  background: #0f172a;
  color: #fff;
  border-radius: .85rem;
  padding: .95rem 1rem;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .45);
  border: 1px solid #f59e0b;
}
.order-toast-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  margin-bottom: .45rem;
}
.order-toast-close {
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 .2rem;
}
.order-toast-body {
  font-size: .95rem;
  margin-bottom: .5rem;
}
.order-toast-list {
  margin: 0 0 .75rem;
  padding-left: 1.1rem;
  max-height: 140px;
  overflow: auto;
  font-size: .85rem;
  color: #e2e8f0;
}
.order-toast-btn {
  width: 100%;
  border: 0;
  border-radius: .55rem;
  padding: .55rem .75rem;
  font-weight: 700;
  background: #f59e0b;
  color: #0f172a;
  cursor: pointer;
}
