:root {
  --ink: #1b1c2e;
  --ink-2: #262842;
  --ink-3: #33355a;
  --paper: #f5f3ee;
  --card: #ffffff;
  --card-2: #fbfaf7;
  --coral: #ff6a4d;
  --coral-d: #ed5538;
  --coral-soft: #ffe7e0;
  --teal: #12b3a6;
  --teal-soft: #d4f4f0;
  --amber: #f6a623;
  --amber-soft: #fdeccc;
  --rose: #e54b6d;
  --rose-soft: #fbdfe6;
  --blue: #5b8def;
  --blue-soft: #e0ebfd;
  --muted: #71728a;
  --muted-2: #9a9bb0;
  --line: #e8e4db;
  --line-2: #f0ede6;
  --text: #1b1c2e;
  --text-2: #52536a;
  --ok: #15a572;
  --ok-soft: #d6f1e4;
  --shadow: 0 1px 2px rgba(27, 28, 46, 0.04), 0 8px 24px rgba(27, 28, 46, 0.06);
  --shadow-lg: 0 12px 40px rgba(27, 28, 46, 0.16);
  --radius: 14px;
  --radius-sm: 9px;
  --sans: "Inter", system-ui, sans-serif;
  --display: "Plus Jakarta Sans", system-ui, sans-serif;
  --mono: "JetBrains Mono", monospace;
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html,
body {
  height: 100%;
}
body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}
input,
select,
textarea {
  font-family: inherit;
  font-size: 14px;
}
a {
  color: inherit;
}
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-thumb {
  background: #d8d4ca;
  border-radius: 8px;
  border: 2px solid var(--paper);
}
::-webkit-scrollbar-thumb:hover {
  background: #c4c0b5;
}

/* ---------- Login screen ---------- */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper);
  padding: 20px;
}
.login-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 380px;
  padding: 32px 28px;
}
.login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 26px;
  text-align: center;
}
.login-mark {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--coral), var(--amber));
  display: grid;
  place-items: center;
  box-shadow: 0 6px 16px rgba(255, 106, 77, 0.35);
}
.login-mark svg {
  width: 26px;
  height: 26px;
  color: #fff;
}
.login-brand h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.2px;
}
.login-brand p {
  font-size: 12.5px;
  color: var(--muted);
}
.login-error {
  background: var(--rose-soft);
  color: #c02f51;
  font-size: 12.5px;
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 14px;
  display: none;
}
.login-error.show {
  display: block;
}

/* ---------- App shell ---------- */
.app {
  display: grid;
  grid-template-columns: 248px 1fr;
  min-height: 100vh;
}
.sidebar {
  background: var(--ink);
  color: #c8c9da;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand {
  padding: 20px 18px 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.brand-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
}
.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--coral), var(--amber));
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: 0 6px 16px rgba(255, 106, 77, 0.4);
}
.brand-mark svg {
  width: 20px;
  height: 20px;
  color: #fff;
}
.brand-name {
  font-family: var(--display);
  font-weight: 800;
  font-size: 16px;
  color: #fff;
  letter-spacing: -0.2px;
  line-height: 1.1;
}
.brand-sub {
  font-size: 11px;
  color: var(--muted-2);
  letter-spacing: 0.3px;
  text-transform: uppercase;
  margin-top: 2px;
}
.loc-switch {
  position: relative;
  width: 100%;
}
.loc-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9px;
  padding: 8px 10px;
  color: #f5f3ee;
  cursor: pointer;
  font-family: var(--display);
  font-weight: 600;
  font-size: 13px;
  transition: background 0.15s;
}
.loc-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}
.loc-btn.locked {
  cursor: default;
}
.loc-btn.locked:hover {
  background: rgba(255, 255, 255, 0.06);
}
.loc-pin {
  width: 14px;
  height: 14px;
  color: #d9b46a;
  display: flex;
}
.loc-pin svg {
  width: 14px;
  height: 14px;
}
.loc-chev {
  margin-left: auto;
  width: 14px;
  height: 14px;
  color: rgba(245, 243, 238, 0.6);
  display: flex;
}
.loc-chev svg {
  width: 14px;
  height: 14px;
}
.loc-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #23243a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
  z-index: 60;
  display: none;
  max-height: 280px;
  overflow-y: auto;
}
.loc-menu.open {
  display: block;
}
.loc-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  color: #f5f3ee;
}
.loc-item:hover {
  background: rgba(255, 255, 255, 0.06);
}
.loc-item .loc-ic {
  width: 18px;
  height: 18px;
  color: rgba(245, 243, 238, 0.55);
  display: flex;
  flex: none;
}
.loc-item .loc-ic svg {
  width: 18px;
  height: 18px;
}
.loc-item .loc-ic.ok {
  color: #3fd6c8;
}
.loc-tx b {
  font-family: var(--display);
  font-weight: 700;
  font-size: 13px;
  display: block;
  line-height: 1.1;
}
.loc-tx small {
  font-size: 10.5px;
  color: rgba(245, 243, 238, 0.5);
}
.loc-item.active {
  background: rgba(217, 180, 106, 0.12);
}
.nav {
  flex: 1;
  padding: 14px 12px;
  overflow-y: auto;
}
.nav-label {
  font-size: 10.5px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: #6f7090;
  padding: 14px 12px 7px;
  font-weight: 600;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  color: #b4b5cb;
  font-weight: 500;
  font-size: 13.5px;
  transition: 0.16s;
  position: relative;
  text-align: left;
}
.nav-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.8;
}
.nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}
.nav-item.active {
  background: linear-gradient(
    100deg,
    rgba(255, 106, 77, 0.22),
    rgba(255, 106, 77, 0.08)
  );
  color: #fff;
}
.nav-item.active svg {
  opacity: 1;
  color: var(--coral);
}
.nav-item.active::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 22px;
  background: var(--coral);
  border-radius: 0 3px 3px 0;
}
.nav-item.disabled {
  opacity: 0.45;
}
.nav-badge {
  margin-left: auto;
  background: var(--coral);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.sidebar-foot {
  padding: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  align-items: center;
  gap: 10px;
}
.avatar {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--ink-3);
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #fff;
  font-size: 13px;
  flex-shrink: 0;
}
.sidebar-foot .who {
  font-size: 12.5px;
  font-weight: 600;
  color: #e6e7f2;
}
.sidebar-foot .role {
  font-size: 11px;
  color: var(--muted-2);
}
.logout-btn {
  margin-left: auto;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: var(--muted-2);
  transition: 0.14s;
  flex-shrink: 0;
}
.logout-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.logout-btn svg {
  width: 16px;
  height: 16px;
}
.brand-img {
  width: 170px;
  height: auto;
}

.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.topbar {
  background: rgba(245, 243, 238, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  padding: 0 28px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 20px;
  position: sticky;
  top: 0;
  z-index: 30;
}
.topbar h1 {
  font-family: var(--display);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.3px;
}
.topbar .crumb {
  font-size: 12px;
  color: var(--muted);
  margin-top: 1px;
}
.top-spacer {
  flex: 1;
}
.top-date {
  font-size: 12.5px;
  color: var(--text-2);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 7px;
}
.top-date .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-soft);
}
.content {
  padding: 24px 28px 60px;
  flex: 1;
  animation: fade 0.3s ease;
}
@keyframes fade {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Generic ---------- */
.row {
  display: flex;
  gap: 16px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 13.5px;
  transition: 0.16s;
  white-space: nowrap;
}
.btn svg {
  width: 16px;
  height: 16px;
}
.btn-primary {
  background: var(--coral);
  color: #fff;
  box-shadow: 0 4px 12px rgba(255, 106, 77, 0.32);
}
.btn-primary:hover {
  background: var(--coral-d);
  transform: translateY(-1px);
  box-shadow: 0 7px 18px rgba(255, 106, 77, 0.4);
}
.btn-primary:disabled {
  opacity: 0.6;
  cursor: default;
  transform: none;
}
.btn-ghost {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--line);
}
.btn-ghost:hover {
  border-color: var(--muted-2);
  background: var(--card-2);
}
.btn-dark {
  background: var(--ink);
  color: #fff;
}
.btn-dark:hover {
  background: var(--ink-2);
}
.btn-sm {
  padding: 6px 12px;
  font-size: 12.5px;
  border-radius: 8px;
}
.btn-teal {
  background: var(--teal);
  color: #fff;
}
.btn-teal:hover {
  background: #0d9e92;
}
.btn-block {
  width: 100%;
  justify-content: center;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 30px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.4;
}
.chip .d {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.chip-teal {
  background: var(--teal-soft);
  color: #0a7c72;
}
.chip-coral {
  background: var(--coral-soft);
  color: var(--coral-d);
}
.chip-amber {
  background: var(--amber-soft);
  color: #b67708;
}
.chip-rose {
  background: var(--rose-soft);
  color: #c02f51;
}
.chip-blue {
  background: var(--blue-soft);
  color: #3567c4;
}
.chip-muted {
  background: #edeae3;
  color: var(--muted);
}
.chip-ok {
  background: var(--ok-soft);
  color: #0d7a54;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-pad {
  padding: 20px;
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
  flex-wrap: wrap;
}
.section-head h2 {
  font-family: var(--display);
  font-size: 16px;
  font-weight: 700;
}
.section-head .sub {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 2px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 22px;
}
.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 18px 16px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.stat .ico {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
}
.stat .ico svg {
  width: 20px;
  height: 20px;
}
.stat .v {
  font-family: var(--display);
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -0.6px;
  line-height: 1;
}
.stat .l {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 6px;
  font-weight: 500;
}
.ico-coral {
  background: var(--coral-soft);
  color: var(--coral-d);
}
.ico-teal {
  background: var(--teal-soft);
  color: #0a7c72;
}
.ico-amber {
  background: var(--amber-soft);
  color: #b67708;
}
.ico-blue {
  background: var(--blue-soft);
  color: #3567c4;
}
.ico-rose {
  background: var(--rose-soft);
  color: #c02f51;
}
.ico-ink {
  background: #e7e6ef;
  color: var(--ink);
}

.occ-bar {
  height: 9px;
  border-radius: 6px;
  background: var(--line-2);
  overflow: hidden;
  display: flex;
  margin-top: 14px;
}
.occ-bar span {
  display: block;
  height: 100%;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.grid-dash {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 16px;
}

.tbl-wrap {
  overflow-x: auto;
}
table.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
table.tbl th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  font-weight: 600;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.tbl td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-2);
  vertical-align: middle;
}
table.tbl tr:last-child td {
  border-bottom: none;
}
table.tbl tbody tr:hover {
  background: var(--card-2);
}
.code {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-3);
  background: #f0eee8;
  padding: 2px 7px;
  border-radius: 6px;
  letter-spacing: -0.3px;
}
.money {
  font-family: var(--mono);
  font-weight: 700;
  letter-spacing: -0.3px;
}

.field {
  margin-bottom: 16px;
}
.field label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 6px;
}
.input,
select.input,
textarea.input {
  width: 100%;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card-2);
  transition: 0.14s;
  color: var(--text);
}
.input:focus {
  outline: none;
  border-color: var(--coral);
  background: #fff;
  box-shadow: 0 0 0 3px var(--coral-soft);
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.modal-back {
  position: fixed;
  inset: 0;
  background: rgba(27, 28, 46, 0.5);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fade 0.2s;
}
.modal-back.show {
  display: flex;
}
.modal {
  background: var(--card);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 560px;
  max-height: 92vh;
  overflow-y: auto;
  animation: pop 0.25s cubic-bezier(0.2, 0.8, 0.3, 1.1);
}
.modal.wide {
  max-width: 720px;
}
@keyframes pop {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.modal-hd {
  padding: 20px 24px;
  border-bottom: 1px solid var(--line-2);
  display: flex;
  align-items: center;
  gap: 12px;
  position: sticky;
  top: 0;
  background: var(--card);
  z-index: 2;
}
.modal-hd h3 {
  font-family: var(--display);
  font-size: 17px;
  font-weight: 700;
}
.modal-hd .mh-sub {
  font-size: 12.5px;
  color: var(--muted);
}
.modal-close {
  margin-left: auto;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: var(--muted);
  transition: 0.14s;
}
.modal-close:hover {
  background: var(--line-2);
  color: var(--text);
}
.modal-body {
  padding: 22px 24px;
}
.modal-foot {
  padding: 16px 24px;
  border-top: 1px solid var(--line-2);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  position: sticky;
  bottom: 0;
  background: var(--card);
}

.toast-wrap {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  background: var(--ink);
  color: #fff;
  padding: 13px 18px;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 13.5px;
  font-weight: 500;
  animation: slideIn 0.3s;
  max-width: 340px;
}
.toast svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.toast.ok svg {
  color: var(--teal);
}
.toast.warn svg {
  color: var(--amber);
}
.toast.err svg {
  color: var(--rose);
}
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.g-ava {
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  flex-shrink: 0;
}
.fg-item {
  transition: 0.14s;
}
.fg-item:hover {
  background: var(--card-2);
}
.fg-item.active {
  background: var(--coral-soft);
}
.list-item {
  border-radius: 11px;
  transition: 0.14s;
}
.list-item:hover {
  background: var(--card-2);
}
.cart-line {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 7px;
  color: var(--text-2);
}

.rack-tile {
  width: 64px;
  height: 52px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: #fff;
  transition: 0.14s;
}
.rack-tile:hover {
  filter: brightness(0.94);
  transform: scale(1.03);
}
.rack-tile-num {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 12px;
}
.rack-tile-lbl {
  font-size: 9px;
  opacity: 0.85;
}
.set-tabs {
  display: inline-flex;
  gap: 4px;
  background: var(--line-2);
  padding: 4px;
  border-radius: 11px;
  margin-bottom: 20px;
}
.set-tab {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  transition: 0.14s;
}
.set-tab.active {
  background: var(--card);
  color: var(--text);
  box-shadow: var(--shadow);
}

.empty-state {
  text-align: center;
  padding: 50px 20px;
  color: var(--muted);
}
.empty-state svg {
  width: 54px;
  height: 54px;
  opacity: 0.35;
  margin-bottom: 14px;
}
.empty-state .es-t {
  font-weight: 600;
  font-size: 15px;
  color: var(--text-2);
  margin-bottom: 5px;
}

.search-box {
  position: relative;
  flex: 1;
  max-width: 300px;
}
.search-box svg {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--muted);
}
.search-box input {
  width: 100%;
  padding: 9px 13px 9px 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
}
.search-box input:focus {
  outline: none;
  border-color: var(--coral);
  box-shadow: 0 0 0 3px var(--coral-soft);
}

.seg {
  display: flex;
  background: var(--line-2);
  padding: 3px;
  border-radius: 9px;
}
.seg button {
  padding: 6px 13px;
  border-radius: 7px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
  transition: 0.14s;
}
.seg button.active {
  background: var(--card);
  color: var(--text);
  box-shadow: var(--shadow);
}

.skeleton {
  background: linear-gradient(
    90deg,
    var(--line-2) 25%,
    var(--card-2) 37%,
    var(--line-2) 63%
  );
  background-size: 400% 100%;
  animation: skel 1.4s ease infinite;
  border-radius: 10px;
  height: 80px;
}
@keyframes skel {
  0% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0 50%;
  }
}

.menu-toggle {
  display: none;
}
@media (max-width: 1100px) {
  .grid-dash,
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 760px) {
  .app {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: fixed;
    left: -260px;
    z-index: 90;
    width: 248px;
    transition: 0.25s;
    box-shadow: var(--shadow-lg);
  }
  .sidebar.open {
    left: 0;
  }
  .menu-toggle {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--card);
    border: 1px solid var(--line);
  }
  .menu-toggle svg {
    width: 20px;
    height: 20px;
  }
  .stat-grid {
    grid-template-columns: 1fr 1fr;
  }
  .content {
    padding: 18px 16px 50px;
  }
  .topbar {
    padding: 0 16px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
.scrim {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 80;
}
.scrim.show {
  display: block;
}

/* ---------- SweetAlert2 theme override ---------- */
.dnook-swal {
  border-radius: 18px !important;
  font-family: var(--sans) !important;
  padding: 26px 24px 24px !important;
}
.dnook-swal-title {
  font-family: var(--display) !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  color: var(--text) !important;
  padding-top: 6px !important;
}
.dnook-swal-text {
  font-size: 13.5px !important;
  color: var(--text-2) !important;
}
.swal2-icon.swal2-warning {
  border-color: var(--rose) !important;
  color: var(--rose) !important;
}
.swal2-icon.swal2-question {
  border-color: var(--coral) !important;
  color: var(--coral) !important;
}
.swal2-icon.swal2-success [class^="swal2-success-line"] {
  background-color: var(--teal) !important;
}
.swal2-icon.swal2-success .swal2-success-ring {
  border-color: var(--teal-soft) !important;
}
.swal2-actions {
  gap: 10px !important;
}
.swal2-styled {
  border-radius: 10px !important;
  font-weight: 600 !important;
  font-size: 13.5px !important;
  padding: 9px 18px !important;
  box-shadow: none !important;
}
.swal2-timer-progress-bar {
  background: var(--coral) !important;
}

/* ---------- Minibar POS ---------- */
.pos-layout {
  display: grid;
  grid-template-columns: 1.3fr 380px;
  gap: 18px;
  align-items: start;
}
.pos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}
.pos-tile {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 14px;
  text-align: left;
  cursor: pointer;
  transition: 0.16s;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 132px;
}
.pos-tile:hover {
  border-color: var(--coral);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.pos-tile:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  transform: none !important;
  box-shadow: none !important;
  border-color: var(--line) !important;
}
.pos-tile-ico {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 800;
  font-size: 14px;
  color: #fff;
}
.pos-tile-name {
  font-weight: 700;
  font-size: 13.5px;
  line-height: 1.25;
  font-family: var(--display);
}
.pos-tile-cat {
  font-size: 10.5px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-top: 2px;
}
.pos-tile-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px dashed var(--line-2);
}
.pos-tile-price {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 13px;
  color: var(--ink);
}
.pos-tile-stock {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  white-space: nowrap;
}
.pos-tile-stock.ok {
  background: var(--ok-soft);
  color: #0d7a54;
}
.pos-tile-stock.low {
  background: var(--amber-soft);
  color: #b67708;
}
.pos-tile-stock.out {
  background: var(--rose-soft);
  color: #c02f51;
}
.pos-cart {
  position: sticky;
  top: 84px;
}
.pos-cart-hd {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line-2);
  display: flex;
  align-items: center;
  gap: 9px;
}
.pos-cart-hd svg {
  width: 18px;
  height: 18px;
  color: var(--coral);
}
.pos-cart-hd h3 {
  font-family: var(--display);
  font-size: 15px;
  font-weight: 700;
}
.pos-cart-count {
  margin-left: auto;
  background: var(--coral-soft);
  color: var(--coral-d);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 20px;
}
.pos-cart-items {
  padding: 6px;
  min-height: 100px;
  max-height: 340px;
  overflow-y: auto;
}
.pos-cart-line {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 8px;
  border-radius: 10px;
  transition: 0.14s;
}
.pos-cart-line:hover {
  background: var(--card-2);
}
.pos-cart-line-name {
  font-size: 13px;
  font-weight: 600;
}
.pos-cart-line-sub {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 1px;
}
.pos-qty {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--line-2);
  border-radius: 8px;
  padding: 2px;
  flex-shrink: 0;
}
.pos-qty button {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: var(--text-2);
  transition: 0.14s;
}
.pos-qty button:hover {
  background: var(--card);
  color: var(--coral);
}
.pos-qty span {
  font-family: var(--mono);
  font-weight: 700;
  width: 16px;
  text-align: center;
  font-size: 12.5px;
}
.pos-cart-empty {
  text-align: center;
  padding: 36px 20px;
  color: var(--muted-2);
}
.pos-cart-empty svg {
  width: 38px;
  height: 38px;
  opacity: 0.35;
  margin-bottom: 10px;
  display: inline-block;
}
.pos-cart-foot {
  padding: 16px 18px;
  border-top: 1px solid var(--line-2);
}
.pos-total-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 14px;
}
.pos-total-row .l {
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.pos-total-row .v {
  font-family: var(--display);
  font-weight: 800;
  font-size: 21px;
  letter-spacing: -0.4px;
}
@media (max-width: 1100px) {
  .pos-layout {
    grid-template-columns: 1fr;
  }
  .pos-cart {
    position: static;
  }
}
