:root {
  --bg: #032316;
  --bg2: #0a4c2f;
  --card: rgba(246, 239, 227, 0.96);
  --card-soft: rgba(255, 250, 241, 0.92);
  --ink: #173425;
  --muted: #536757;
  --line: rgba(24, 72, 46, 0.16);
  --brand: #0e6a3d;
  --brand-dark: #0a4f2d;
  --brand-soft: #ebf6ef;
  --danger: #b23a35;
  --danger-soft: #fbe2dd;
  --blue-soft: rgba(243, 217, 184, 0.32);
  --cream: #f3d9b8;
  --cream-deep: #e7c79c;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Quicksand", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 0%, rgba(15, 122, 72, 0.52) 0%, rgba(15, 122, 72, 0) 28%),
    radial-gradient(circle at 82% 12%, rgba(243, 217, 184, 0.12) 0%, rgba(243, 217, 184, 0) 24%),
    linear-gradient(180deg, #06311d 0%, #032316 100%);
  min-height: 100vh;
  text-transform: uppercase;
}
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 18px;
}
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.title {
  margin: 0;
  font-size: clamp(24px, 3.3vw, 38px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--cream);
  text-shadow: 0 8px 22px rgba(0, 0, 0, 0.24);
}
.page-subtitle {
  margin: 3px 0 0;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 800;
  color: rgba(239, 247, 242, 0.78);
}
.quick-links { display: flex; gap: 8px; flex-wrap: wrap; }
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(243, 217, 184, 0.12);
  color: #fff3dd;
  border: 1px solid rgba(243, 217, 184, 0.34);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
}

.menu-logout {
  width: auto;
  min-height: 40px;
  padding: 7px 11px;
  font-size: 11px;
  letter-spacing: 0.1em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(180deg, #7b2438, #5a162b);
  color: #fff3ee;
  border-color: rgba(255, 216, 209, 0.16);
  box-shadow: 0 12px 24px rgba(74, 16, 35, 0.20);
}
.menu-logout-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  font-size: 12px;
  line-height: 1;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 16px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.20);
  backdrop-filter: blur(6px);
}
.card + .card { margin-top: 12px; }
.card-soft {
  background: var(--card-soft);
  border: 1px solid rgba(24, 72, 46, 0.12);
}
.card-success {
  background: linear-gradient(180deg, rgba(227, 244, 233, 0.96), rgba(240, 248, 242, 0.96));
  border: 1px solid rgba(46, 125, 50, 0.24);
}
.section-title {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 800;
  color: var(--brand-dark);
}
.muted-note {
  font-size: 15px;
  color: var(--muted);
  font-weight: 700;
}
.grid { display: grid; gap: 10px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
@media (max-width: 960px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

label {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 800;
  color: rgba(10, 79, 45, 0.70);
}
input, select, textarea, button {
  width: 100%;
  min-height: 56px;
  border: 1px solid rgba(10, 79, 45, 0.10);
  border-radius: 18px;
  padding: 16px 18px;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  color: #143522;
  background: #ffffff;
  box-shadow: inset 0 1px 2px rgba(6, 49, 29, 0.05);
}
input::placeholder, textarea::placeholder { color: #92a090; font-weight: 700; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: rgba(10, 79, 45, 0.42);
  box-shadow: 0 0 0 4px rgba(10, 79, 45, 0.10), inset 0 1px 2px rgba(6, 49, 29, 0.05);
  background: #fffef9;
}
button {
  cursor: pointer;
  font-weight: 800;
  letter-spacing: 0.08em;
}
.btn {
  background: linear-gradient(90deg, #0a5c35, #118a4f);
  border-color: transparent;
  color: #fff8ea;
  box-shadow: 0 18px 35px rgba(6, 49, 29, 0.24);
}
.btn:hover { filter: brightness(0.98); }
.btn-soft {
  background: linear-gradient(180deg, #f7e5c8, #efd4ad);
  color: #184327;
  border-color: rgba(139, 104, 59, 0.18);
  box-shadow: 0 12px 24px rgba(95, 66, 28, 0.10);
}
.btn-danger {
  background: linear-gradient(180deg, #fde7e3, #f6cec8);
  color: #8f241f;
  border-color: rgba(178, 58, 53, 0.22);
  box-shadow: 0 12px 24px rgba(143, 36, 31, 0.08);
}
.btn-sm {
  width: auto;
  min-height: 46px;
  padding: 12px 15px;
  border-radius: 14px;
  font-size: 14px;
}

.row { display: flex; gap: 10px; align-items: center; }
.row-wrap { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row-keep { flex-wrap: nowrap !important; }
.grow { flex: 1; }
.small { font-size: 16px; color: var(--muted); }
.hidden { display: none; }

.table-wrap {
  overflow: auto;
  border-radius: 16px;
  border: 1px solid rgba(24, 72, 46, 0.12);
  background: rgba(255, 251, 245, 0.82);
  -webkit-overflow-scrolling: touch;
}
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 9px 8px; border-bottom: 1px solid rgba(24, 72, 46, 0.08); text-align: left; vertical-align: top; }
th {
  background: linear-gradient(180deg, rgba(243, 217, 184, 0.42), rgba(243, 217, 184, 0.24));
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: #41604a;
  font-weight: 800;
}
tr:hover td { background: rgba(232, 244, 236, 0.6); }

a { color: #0f6a3d; }

.action-links a { font-weight: 800; }

.suggest-box {
  border: 1px solid rgba(23, 52, 37, 0.14);
  border-radius: 14px;
  max-height: 220px;
  overflow: auto;
  background: rgba(255, 251, 245, 0.98);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}
.suggest-item { padding: 10px 11px; border-bottom: 1px solid rgba(24, 72, 46, 0.08); cursor: pointer; }
.suggest-item:hover { background: rgba(232, 244, 236, 0.72); }

.kpi {
  border: 1px solid rgba(243, 217, 184, 0.24);
  background: linear-gradient(180deg, rgba(247, 234, 209, 0.98), rgba(243, 245, 236, 0.94));
  border-radius: 18px;
  padding: 12px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.10);
}
.kpi h4 {
  margin: 0;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #5b6e5d;
}
.kpi p { margin: 3px 0 0; font-size: 20px; font-weight: 800; color: #163724; }

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.status-open { background: #dcf4e2; color: #166534; border: 1px solid #97d7a6; }
.status-closed { background: #fbe2dd; color: #9a2e28; border: 1px solid #e8aaa4; }

.qty-box { width: 92px; }
.qty-x { font-size: 20px; font-weight: 800; color: var(--brand-dark); padding-bottom: 10px; }
.total-biaya {
  margin-top: 8px;
  max-width: 320px;
}
.total-biaya input {
  font-weight: 800;
  background: linear-gradient(180deg, #fffdf8, #f8f1e6);
  border: 2px solid rgba(20, 92, 58, 0.18);
  color: var(--brand-dark);
}

.print-ticket {
  width: 58mm;
  font-family: monospace;
  padding: 2mm;
  color: #000;
}
.print-ticket h1 { font-size: 13px; margin: 0; text-align: center; }
.print-ticket .line { border-top: 1px dashed #000; margin: 6px 0; }
.print-ticket .center { text-align: center; }
.print-ticket .tiny { font-size: 10px; }
.print-ticket .redeem-info {
  text-align: center;
  font-weight: 700;
  line-height: 1.25;
}
.print-ticket .redeem-info.receipt {
  font-size: 10px;
}
.print-ticket .redeem-info.coupon {
  font-size: 13px;
}
.print-ticket .redeem-info.coupon .redeem-title {
  font-size: 14px;
  font-weight: 800;
}
.print-ticket .redeem-end {
  display: inline-block;
  font-size: 15px;
  font-weight: 900;
}
.print-ticket .redeem-info.coupon .redeem-end {
  font-size: 20px;
}

@media (max-width: 640px) {
  .container { padding: 10px; }
  .page-head { gap: 8px; }
  .title { font-size: clamp(22px, 7vw, 30px); }
  .page-subtitle { font-size: 12px; letter-spacing: 0.11em; }
  .quick-links { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .quick-links .badge { width: 100%; padding: 9px 8px; font-size: 11px; }
  .card { border-radius: 18px; padding: 12px; }
  .section-title { font-size: 16px; }
  input, select, textarea, button { min-height: 42px; font-size: 16px; }
  .btn-sm { width: 100%; }
  .row { flex-wrap: wrap; }
  .row-keep { flex-wrap: nowrap !important; }
  .qty-box { width: 84px; }
  .qty-x { font-size: 17px; padding-bottom: 8px; }
  .total-biaya { max-width: 100%; }
  table { font-size: 12px; }
  th { font-size: 12px; letter-spacing: .08em; }
  th, td { padding: 7px 6px; }
}

@media print {
  @page { size: 58mm auto; margin: 2mm; }
  body { background: #fff; }
  .no-print { display: none !important; }
}

.floating-save-right {
  position: fixed !important;
  right: 1rem;
  top: 52%;
  transform: translateY(-50%);
  z-index: 9999;
  pointer-events: none;
}
.floating-save-right .btn {
  pointer-events: auto;
  width: max-content;
  min-width: 0;
  border-radius: 18px;
  padding: 1rem 1.15rem;
  line-height: 1.08;
  font-size: 1.14rem;
  color: #fff4ef;
  background: linear-gradient(180deg, #7b2438, #5a162b);
  border: 1px solid rgba(255, 216, 209, 0.14);
  box-shadow: 0 1.1rem 2.6rem rgba(74, 16, 35, 0.42);
}
@media (max-width: 640px) {
  .floating-save-right {
    position: fixed !important;
    right: .55rem;
    top: 56%;
    transform: translateY(-50%);
    z-index: 9999;
    pointer-events: none;
  }
  .floating-save-right .btn {
    pointer-events: auto;
    min-width: 0;
    width: auto;
    max-width: 82vw;
    font-size: 1rem;
    padding: .9rem 1.05rem;
    line-height: 1.06;
  }
}
