/* ============================================================
   Nest Workspaces — POS design system
   Brand: Nest orange / teal / green / lime / yellow, Poppins.
   Layers: 1) tokens  2) base  3) primitives  4) screens
   ============================================================ */

@font-face {
  font-family: "Poppins";
  src: url("../fonts/Poppins-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Poppins";
  src: url("../fonts/Poppins-Medium.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Poppins";
  src: url("../fonts/Poppins-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Poppins";
  src: url("../fonts/Poppins-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

/* ---------- 1. Tokens ---------- */
:root {
  /* Brand families — official palette, Nest_BrandDeck_01 p.3 */
  --teal-100: #69d6d3;
  --teal-200: #1ebdc1;
  --teal-500: #07a8a8;
  --teal-700: #008c88;
  --teal-900: #082b32;
  --orange-100: #ffdf9f;
  --orange-200: #ffc645;
  --orange-500: #fc961d;
  --orange-700: #ec622b;
  --orange-900: #602a17;
  --lime-100: #cce561;
  --lime-200: #a2cc2e;
  --lime-500: #93ba06;
  --lime-700: #81a000;
  --lime-900: #444c15;

  /* Brand aliases (semantic) */
  --nest-orange: var(--orange-700);      /* CTA orange — deck shade, keeps white text legible */
  --nest-orange-bright: var(--orange-500);
  --nest-orange-deep: #d1511f;           /* pressed state, derived from orange-700 */
  --nest-orange-soft: #fdeee4;
  --nest-teal: var(--teal-500);
  --nest-teal-dark: var(--teal-700);
  --nest-teal-soft: #e2f6f5;
  --nest-green: var(--lime-700);
  --nest-lime: var(--lime-500);
  --nest-yellow: var(--orange-200);

  /* Semantic surfaces & ink (ink derived from deck teal-900) */
  --ink: #10333c;
  --ink-strong: var(--teal-900);
  --ink-soft: #4f6871;
  --ink-faint: #7f959c;
  --paper: #f5f6f2;
  --paper-deep: #edefe8;
  --card: #ffffff;
  --line: #e4e7e0;
  --line-strong: #d4d9d1;
  --danger: #d64541;
  --danger-soft: #fbe9e8;
  --success: #6a8500;

  /* Radius scale */
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 26px;

  /* Elevation scale */
  --shadow-xs: 0 1px 2px rgba(8, 43, 50, 0.06);
  --shadow-sm: 0 1px 3px rgba(8, 43, 50, 0.05), 0 4px 14px rgba(8, 43, 50, 0.06);
  --shadow-md: 0 2px 6px rgba(8, 43, 50, 0.07), 0 10px 28px rgba(8, 43, 50, 0.10);
  --shadow-lg: 0 8px 20px rgba(8, 43, 50, 0.12), 0 24px 60px rgba(8, 43, 50, 0.18);
  --shadow-orange: 0 6px 18px rgba(236, 98, 43, 0.32);

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-pop: cubic-bezier(0.34, 1.4, 0.64, 1);
  --t-fast: 130ms;
  --t-med: 220ms;

  /* Focus ring */
  --ring: 0 0 0 3px rgba(7, 168, 168, 0.35);

  /* Z-index scale */
  --z-sticky: 10;
  --z-topbar: 20;
  --z-modal: 100;
  --z-toast: 200;

  /* Back-compat alias (older rules used --shadow) */
  --shadow: var(--shadow-sm);
}

/* ---------- 2. Base ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: "Poppins", system-ui, -apple-system, sans-serif;
  background:
    radial-gradient(1200px 600px at 100% -10%, rgba(255, 198, 69, 0.07), transparent 55%),
    radial-gradient(1000px 600px at -20% 110%, rgba(7, 168, 168, 0.06), transparent 55%),
    var(--paper);
  color: var(--ink);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(255, 198, 69, 0.45); }

button { font-family: inherit; cursor: pointer; touch-action: manipulation; }
input, select, textarea { font-family: inherit; }

:is(button, a, input, select, [tabindex]):focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 999px;
  border: 2px solid var(--paper);
}
::-webkit-scrollbar-thumb:hover { background: var(--ink-faint); }

/* Inline SVG icons */
.ico {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  vertical-align: -3px;
}
.ico.sm { width: 15px; height: 15px; vertical-align: -2px; }

/* ---------- 3. Primitives ---------- */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: var(--radius);
  padding: 14px 22px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.01em;
  background: linear-gradient(180deg, #0cb5b0, var(--nest-teal-dark));
  color: #fff;
  min-height: 48px;
  box-shadow: var(--shadow-xs);
  transition: filter var(--t-fast) var(--ease-out), transform var(--t-fast) var(--ease-out),
              box-shadow var(--t-fast) var(--ease-out);
}
.btn:hover { filter: brightness(1.06); box-shadow: var(--shadow-sm); }
.btn:active { transform: scale(0.965); }
.btn.primary {
  background: linear-gradient(180deg, #f5793d, var(--nest-orange) 60%, var(--nest-orange-deep));
  box-shadow: 0 1px 2px rgba(8, 43, 50, 0.08), 0 4px 14px rgba(236, 98, 43, 0.28);
}
.btn.primary:hover { box-shadow: var(--shadow-orange); }
.btn.ghost {
  background: var(--card);
  color: var(--ink-soft);
  border: 1.5px solid var(--line);
  box-shadow: none;
}
.btn.ghost:hover { border-color: var(--line-strong); color: var(--ink); filter: none; background: var(--paper); }
.btn.danger { background: linear-gradient(180deg, #e15550, var(--danger)); }
.btn.small { padding: 8px 14px; font-size: 13px; min-height: 36px; border-radius: var(--radius-sm); gap: 6px; }
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  filter: none;
}

/* Fields */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
}
.field input, .field select {
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 16px;
  background: #fff;
  color: var(--ink);
  outline: none;
  transition: border-color var(--t-fast) var(--ease-out), box-shadow var(--t-fast) var(--ease-out);
}
.field input::placeholder { color: var(--ink-faint); }
.field input:hover, .field select:hover { border-color: var(--line-strong); }
.field input:focus, .field select:focus {
  border-color: var(--nest-teal);
  box-shadow: 0 0 0 3px rgba(7, 168, 168, 0.14);
}

.error-msg { color: var(--danger); font-size: 14px; font-weight: 500; min-height: 20px; }

/* Cards & panels */
.card {
  background: var(--card);
  border: 1px solid rgba(228, 231, 224, 0.7);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  padding: 36px;
  width: 100%;
  max-width: 420px;
}
.card h1 { font-size: 23px; font-weight: 700; letter-spacing: -0.015em; margin-bottom: 4px; }
.card .sub { color: var(--ink-soft); font-size: 14px; line-height: 1.55; margin-bottom: 22px; }

.panel {
  background: var(--card);
  border: 1px solid rgba(228, 231, 224, 0.7);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  margin-bottom: 20px;
}
.panel h3 { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }

/* Tables */
table.data { width: 100%; border-collapse: collapse; }
table.data th {
  text-align: left;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  font-weight: 600;
  padding: 10px 12px;
  border-bottom: 2px solid var(--line);
}
table.data td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 14.5px;
  font-variant-numeric: tabular-nums;
}
table.data tbody tr { transition: background var(--t-fast) var(--ease-out); }
table.data tbody tr:hover { background: rgba(245, 246, 242, 0.75); }
table.data tr:last-child td { border-bottom: none; }

/* Badges */
.badge {
  display: inline-block;
  padding: 3.5px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.badge.admin { background: var(--nest-orange-soft); color: var(--nest-orange-deep); }
.badge.manager { background: var(--nest-teal-soft); color: var(--nest-teal-dark); }
.badge.front_desk { background: rgba(147, 186, 6, 0.16); color: var(--success); }
.badge.inactive { background: #edeff1; color: var(--ink-soft); }

.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(8, 43, 50, 0.5);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: var(--z-modal);
  animation: backdrop-in var(--t-med) var(--ease-out);
}
.modal {
  background: #fff;
  border-radius: var(--radius-xl);
  padding: 28px;
  width: 100%;
  max-width: 440px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modal-in var(--t-med) var(--ease-pop);
}
.modal h3 { font-size: 19px; font-weight: 700; letter-spacing: -0.015em; margin-bottom: 18px; }
.modal .modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; }

@keyframes backdrop-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-in {
  from { opacity: 0; transform: translateY(14px) scale(0.965); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Toast */
.toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink-strong);
  color: #fff;
  padding: 13px 24px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  z-index: var(--z-toast);
  animation: toast-in var(--t-med) var(--ease-pop);
}
.toast.error { background: var(--danger); }
@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 14px) scale(0.96); }
  to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

.placeholder-note {
  border: 2px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
  color: var(--ink-soft);
}

/* ---------- 4a. Full-screen panels (device login / lock) ---------- */
.fullscreen {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(1100px 540px at 88% -12%, rgba(255, 198, 69, 0.18), transparent 58%),
    radial-gradient(950px 540px at -12% 112%, rgba(7, 168, 168, 0.14), transparent 58%),
    radial-gradient(700px 400px at 50% 120%, rgba(252, 150, 29, 0.08), transparent 60%),
    var(--paper);
}
.fullscreen .logo {
  width: 180px;
  margin-bottom: 30px;
  filter: drop-shadow(0 2px 8px rgba(8, 43, 50, 0.08));
}

/* Lock screen */
.lock-card { max-width: 500px; text-align: center; }
.staff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
  margin: 20px 0;
}
.staff-tile {
  border: 2px solid var(--line);
  background: #fff;
  border-radius: var(--radius);
  padding: 18px 10px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-height: 104px;
  transition: border-color var(--t-fast) var(--ease-out), transform var(--t-fast) var(--ease-out),
              box-shadow var(--t-fast) var(--ease-out);
}
.staff-tile:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.staff-tile.selected {
  border-color: var(--nest-orange);
  background: linear-gradient(180deg, #fff, var(--nest-orange-soft));
  box-shadow: 0 4px 14px rgba(236, 98, 43, 0.18);
}
.staff-tile:active { transform: scale(0.97); }
.staff-tile .avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 17px;
  color: #fff;
  box-shadow: inset 0 -2px 4px rgba(0, 0, 0, 0.12);
}
.staff-tile .tile-name { font-weight: 600; font-size: 14px; }
.staff-tile .tile-role {
  font-size: 10.5px;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.pin-dots { display: flex; justify-content: center; gap: 14px; margin: 20px 0 14px; min-height: 16px; }
.pin-dots span {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--nest-teal);
  transition: background var(--t-fast) var(--ease-out), transform var(--t-fast) var(--ease-pop);
}
.pin-dots span.filled { background: var(--nest-teal); transform: scale(1.15); }

.keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  max-width: 292px;
  margin: 0 auto;
}
.keypad button {
  font-size: 24px;
  font-weight: 600;
  padding: 16px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  min-height: 66px;
  box-shadow: var(--shadow-xs);
  transition: background var(--t-fast) var(--ease-out), transform var(--t-fast) var(--ease-out),
              box-shadow var(--t-fast) var(--ease-out);
}
.keypad button:hover { background: var(--paper); box-shadow: var(--shadow-sm); }
.keypad button:active {
  background: var(--nest-yellow);
  border-color: var(--nest-yellow);
  transform: scale(0.94);
}
.keypad button.action { font-size: 15px; color: var(--ink-soft); }

/* ---------- 4b. App shell ---------- */
.shell { display: flex; min-height: 100vh; min-height: 100dvh; }

.sidebar {
  width: 236px;
  background: linear-gradient(180deg, #0e3d48 0%, var(--teal-900) 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 22px 14px;
  flex-shrink: 0;
}
.sidebar .logo { width: 128px; margin: 6px auto 28px; display: block; }
.sidebar nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #a8c3c8;
  text-decoration: none;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 14.5px;
  letter-spacing: 0.01em;
  transition: background var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out);
}
.sidebar nav a .ico { opacity: 0.75; transition: opacity var(--t-fast) var(--ease-out); }
.sidebar nav a:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
.sidebar nav a:hover .ico { opacity: 1; }
.sidebar nav a.active {
  background: linear-gradient(180deg, #f5793d, var(--nest-orange));
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(236, 98, 43, 0.35);
}
.sidebar nav a.active .ico { opacity: 1; }
.sidebar .nav-section {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 600;
  color: #5c7e85;
  padding: 18px 14px 6px;
}

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 28px;
  background: rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: var(--z-topbar);
}
.topbar .who { display: flex; align-items: center; gap: 12px; }
.topbar .who .avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  box-shadow: inset 0 -2px 4px rgba(0, 0, 0, 0.12);
}
.topbar .who .name { font-weight: 600; font-size: 15px; line-height: 1.25; }
.topbar .who .role { font-size: 12px; color: var(--ink-soft); text-transform: capitalize; }

.content {
  padding: 28px;
  flex: 1;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
}
.content h2 { font-size: 25px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 4px; }
.content .page-sub { color: var(--ink-soft); font-size: 14px; line-height: 1.55; margin-bottom: 24px; }

/* ---------- 4c. POS ---------- */
.pos-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 372px;
  gap: 22px;
  align-items: start;
}
.pos-layout > * { min-width: 0; }

.pos-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.pos-tab {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 20px;
  font-size: 14.5px;
  font-weight: 600;
  background: var(--card);
  color: var(--ink-soft);
  box-shadow: var(--shadow-xs);
  min-height: 44px;
  transition: background var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out),
              border-color var(--t-fast) var(--ease-out), transform var(--t-fast) var(--ease-out),
              box-shadow var(--t-fast) var(--ease-out);
}
.pos-tab:hover { color: var(--ink); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.pos-tab.active {
  background: var(--ink-strong);
  border-color: var(--ink-strong);
  color: #fff;
  box-shadow: 0 4px 12px rgba(8, 43, 50, 0.22);
}
.pos-tab.small { padding: 7px 14px; font-size: 13px; min-height: 36px; }

.pos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(156px, 1fr));
  gap: 14px;
}
.pos-item {
  position: relative;
  border: none;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0) 38%,
                    rgba(0, 0, 0, 0.10) 100%),
    var(--item-color);
  color: #fff;
  padding: 16px 14px 14px;
  min-height: 104px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  text-align: left;
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transition: transform var(--t-fast) var(--ease-out), box-shadow var(--t-fast) var(--ease-out),
              filter var(--t-fast) var(--ease-out);
}
.pos-item:hover { filter: brightness(1.05); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.pos-item:active { transform: scale(0.96); box-shadow: var(--shadow-xs); }
.pos-item-name {
  font-weight: 600;
  font-size: 14.5px;
  line-height: 1.3;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.22);
}
.pos-item-price {
  font-weight: 700;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  background: rgba(19, 27, 33, 0.28);
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.01em;
}

/* Cart */
.pos-cart { position: sticky; top: 86px; }
.pos-cart h3 {
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ink-soft);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.cart-lines { max-height: 42vh; overflow-y: auto; overscroll-behavior: contain; }
.cart-line {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  animation: line-in var(--t-med) var(--ease-out);
}
@keyframes line-in {
  from { opacity: 0; transform: translateX(-6px); }
  to { opacity: 1; transform: translateX(0); }
}
.cart-line-info { flex: 1; min-width: 0; }
.cart-line-name {
  display: block;
  font-weight: 600;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cart-line-price { font-size: 12px; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.cart-line-total {
  font-weight: 600;
  font-size: 14px;
  min-width: 76px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.qty-controls { display: flex; align-items: center; gap: 6px; }
.qty-controls button {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: #fff;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out),
              border-color var(--t-fast) var(--ease-out), transform var(--t-fast) var(--ease-out);
}
.qty-controls button:hover { background: var(--paper); color: var(--ink); border-color: var(--line-strong); }
.qty-controls button:active { transform: scale(0.9); background: var(--nest-teal-soft); }
.qty-controls span { min-width: 22px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }

.cart-summary { padding: 14px 0 6px; }
.sum-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  padding: 3px 0;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}
.sum-row.discount { color: var(--nest-orange-deep); font-weight: 500; }
.sum-row.total {
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink-strong);
  padding-top: 10px;
  margin-top: 6px;
  border-top: 2px solid var(--ink-strong);
}
.cart-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.cart-actions .btn { flex: 1 1 auto; }
.cart-actions .btn.primary { min-height: 54px; font-size: 17px; flex-basis: 100%; }

/* Tender */
.tender-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.tender-btn {
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 16px;
  font-size: 15.5px;
  font-weight: 600;
  min-height: 56px;
  color: var(--ink);
  transition: border-color var(--t-fast) var(--ease-out), background var(--t-fast) var(--ease-out),
              transform var(--t-fast) var(--ease-out), box-shadow var(--t-fast) var(--ease-out);
}
.tender-btn:hover { border-color: var(--line-strong); transform: translateY(-1px); box-shadow: var(--shadow-xs); }
.tender-btn:active { transform: scale(0.97); }
.tender-btn.selected {
  border-color: var(--nest-orange);
  background: var(--nest-orange-soft);
  color: var(--nest-orange-deep);
  box-shadow: 0 2px 10px rgba(236, 98, 43, 0.16);
}

/* Stat chips */
.stat-chip {
  background: var(--card);
  border: 1px solid rgba(228, 231, 224, 0.7);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  padding: 14px 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 128px;
  position: relative;
  overflow: hidden;
}
.stat-chip::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--orange-200), var(--orange-500));
  border-radius: 999px;
}
.stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: var(--ink-faint);
}
.stat-value {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

/* Color pickers & chips */
.color-row { display: flex; gap: 8px; flex-wrap: wrap; }
.color-swatch {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 3px solid transparent;
  padding: 0;
  box-shadow: inset 0 -2px 4px rgba(0, 0, 0, 0.12);
  transition: transform var(--t-fast) var(--ease-pop), border-color var(--t-fast) var(--ease-out);
}
.color-swatch:hover { transform: scale(1.1); }
.color-swatch.selected { border-color: var(--ink); transform: scale(1.08); }
.color-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 8px;
}

.promo-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 0 2px; }
.promo-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1.5px solid var(--nest-yellow);
  background: rgba(255, 198, 69, 0.12);
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  min-height: 38px;
  transition: background var(--t-fast) var(--ease-out), transform var(--t-fast) var(--ease-out);
}
.promo-chip:hover:not(:disabled) { transform: translateY(-1px); }
.promo-chip.selected { background: var(--nest-yellow); box-shadow: 0 2px 8px rgba(255, 198, 69, 0.45); }
.promo-chip:disabled { opacity: 0.45; cursor: not-allowed; }

.dow-row { display: flex; gap: 6px; flex-wrap: wrap; }
.dow-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color var(--t-fast) var(--ease-out), background var(--t-fast) var(--ease-out);
}
.dow-chip:hover { border-color: var(--nest-teal); background: var(--nest-teal-soft); }
.dow-chip input { width: auto; }

/* ---------- 4d. Dashboard ---------- */
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 900px) { .dash-grid { grid-template-columns: 1fr; } }

.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 168px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.bar-col {
  flex: 1;
  min-width: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  height: 100%;
}
.bar {
  width: 100%;
  min-height: 3px;
  background: linear-gradient(180deg, var(--orange-500), var(--orange-700));
  border-radius: 5px 5px 2px 2px;
  transition: filter var(--t-fast) var(--ease-out), transform var(--t-fast) var(--ease-out);
  transform-origin: bottom;
}
.bar-col:hover .bar { filter: brightness(1.12); transform: scaleY(1.02); }
.bar-label { font-size: 10px; color: var(--ink-faint); font-variant-numeric: tabular-nums; }

.cat-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.cat-name { width: 122px; font-size: 13.5px; font-weight: 500; flex-shrink: 0; }
.cat-bar-track {
  flex: 1;
  height: 12px;
  background: var(--paper-deep);
  border-radius: 999px;
  overflow: hidden;
}
.cat-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--orange-700), var(--orange-500));
  border-radius: 999px;
  min-width: 3px;
  transition: width 500ms var(--ease-out);
}
.cat-bar.teal { background: linear-gradient(90deg, var(--nest-teal-dark), var(--nest-teal)); }
.cat-amt {
  width: 128px;
  text-align: right;
  font-weight: 600;
  font-size: 13.5px;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

/* ---------- 4e. Receipt (thermal-friendly, 80mm) ---------- */
.receipt-paper {
  font-family: "Courier New", monospace;
  font-size: 13px;
  background: #fff;
  width: 300px;
  margin: 0 auto;
  padding: 8px;
  color: #000;
}
.r-center { text-align: center; }
.r-bold { font-weight: 700; }
.r-dim { color: #666; font-size: 12px; }
.r-line { border-top: 1px dashed #999; margin: 8px 0; }
.r-row { display: flex; justify-content: space-between; gap: 8px; padding: 1px 0; }

@media print {
  body * { visibility: hidden; }
  .receipt-paper, .receipt-paper * { visibility: visible; }
  .receipt-paper { position: absolute; left: 0; top: 0; width: 72mm; }
}

/* ---------- 5. Responsive ---------- */
@media (max-width: 1100px) {
  .pos-layout { grid-template-columns: minmax(0, 1fr) 330px; }
}
@media (max-width: 900px) {
  .pos-layout { grid-template-columns: 1fr; }
  .pos-cart { position: static; }
  .cart-lines { max-height: none; }
}

@media (max-width: 760px) {
  .shell { flex-direction: column; }
  .sidebar {
    width: 100%;
    flex-direction: row;
    align-items: center;
    overflow-x: auto;
    padding: 10px;
    position: sticky;
    top: 0;
    z-index: var(--z-topbar);
  }
  .sidebar .logo { width: 88px; margin: 0 14px 0 6px; }
  .sidebar nav { flex-direction: row; }
  .sidebar nav a { padding: 10px 12px; white-space: nowrap; }
  .sidebar .nav-section { display: none; }
  .topbar { position: static; padding: 10px 18px; }
  .content { padding: 18px; }
  .content h2 { font-size: 21px; }
  .card, .panel { padding: 20px; }
}

/* ---------- 6. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===== Home: bulletin board + bookings calendar ===== */
.home-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 900px) { .home-grid { grid-template-columns: 1fr; } }

.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 14px;
}
.panel-head h3 { display: flex; align-items: center; gap: 8px; }

.field textarea {
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 16px;
  background: #fff;
  outline: none;
  resize: vertical;
  min-height: 90px;
}
.field textarea:focus { border-color: var(--nest-teal); box-shadow: var(--ring); }

/* Bulletin memos */
.memo {
  border: 1.5px solid var(--line);
  border-left: 4px solid var(--nest-teal);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 10px;
  background: var(--card);
}
.memo.pinned {
  border-left-color: var(--nest-orange);
  background: var(--nest-orange-soft, #fdeee5);
}
.memo-top { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.memo-title { font-weight: 600; font-size: 15px; }
.memo-pin-badge {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--nest-orange); background: rgba(236, 98, 43, 0.14);
  padding: 2px 8px; border-radius: 999px;
}
.memo-body { font-size: 14px; line-height: 1.55; white-space: pre-wrap; }
.memo-meta {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-top: 8px; font-size: 12px; color: var(--ink-soft); flex-wrap: wrap;
}

/* Booking rows (today panel + day modal) */
.booking-row {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--line);
}
.booking-row:last-child { border-bottom: none; }
.booking-row.cancelled { opacity: 0.55; }
.booking-time {
  font-weight: 700; font-size: 14px; white-space: nowrap;
  font-variant-numeric: tabular-nums; color: var(--nest-teal-dark);
  min-width: 96px;
}
.booking-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.booking-room { font-weight: 600; font-size: 14px; }
.booking-cust { font-size: 13px; color: var(--ink-soft); }
.booking-notes { font-size: 12px; color: var(--ink-faint, var(--ink-soft)); }

/* Month calendar */
.cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px;
}
.cal-head { margin-bottom: 6px; }
.cal-head span {
  text-align: center; font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-soft);
}
.cal-cell {
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--card);
  min-height: 86px;
  padding: 6px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  text-align: left; font-family: inherit;
  transition: border-color var(--t-fast, 130ms), box-shadow var(--t-fast, 130ms);
}
.cal-cell:hover { border-color: var(--nest-teal); box-shadow: var(--shadow-sm, var(--shadow)); }
.cal-cell.other-month { opacity: 0.45; background: var(--paper); }
.cal-cell.today { border-color: var(--nest-orange); border-width: 2px; }
.cal-cell.today .cal-daynum { color: var(--nest-orange); }
.cal-daynum { font-weight: 700; font-size: 13px; }
.cal-chips { display: flex; flex-direction: column; gap: 2px; width: 100%; overflow: hidden; }
.cal-chip {
  font-size: 10.5px; font-weight: 600; line-height: 1.4;
  background: var(--nest-teal-soft, #e3f4f3); color: var(--nest-teal-dark);
  border-radius: 6px; padding: 1px 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.cal-chip.studio { background: rgba(255, 198, 69, 0.25); color: #7a5c00; }
.cal-chip.more { background: var(--paper-deep, var(--paper)); color: var(--ink-soft); }

@media (max-width: 760px) {
  .cal-cell { min-height: 56px; padding: 4px; }
  .cal-chip { display: none; }
  /* collapsed chips become a dot so busy days stay visible */
  .cal-cell .cal-chips:has(.cal-chip)::before {
    content: "●"; font-size: 9px; color: var(--nest-teal);
  }
}

/* Products table: category group headers */
.cat-header-row td {
  padding: 16px 12px 6px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  border-bottom: 2px solid var(--line-strong, var(--line));
  background: transparent;
}

/* ===== Owner view (mobile-first, read-only) ===== */
.owner-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.owner-cards .stat-chip { min-width: 0; }
.stat-sub { font-size: 12px; color: var(--ink-soft); }
.owner-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 900px) { .owner-two-col { grid-template-columns: 1fr; } }
.bar.teal-bar { background: var(--nest-teal); }

/* ===== Credit line + version ===== */
.sidebar-foot {
  margin-top: auto;
  padding: 14px 10px 6px;
  font-size: 10.5px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.45);
  text-align: center;
  letter-spacing: 0.02em;
}
.made-by {
  margin-top: 18px;
  font-size: 11.5px;
  color: var(--ink-faint, var(--ink-soft));
  text-align: center;
}

/* ===== Lock screen: side column (admin + bulletin/today panel) ===== */
.lock-layout {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  justify-content: center;
  flex-wrap: wrap;
  width: 100%;
  max-width: 900px;
}
.lock-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 340px;
  max-width: 100%;
  flex-shrink: 0;
}
.admin-card {
  background: var(--card);
  border: 1px solid rgba(228, 231, 224, 0.7);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 12px 14px;
}
.admin-card-label {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  margin-bottom: 8px;
}
.admin-card .staff-tile {
  width: 100%;
  min-height: 56px;
  flex-direction: row;
  justify-content: flex-start;
  padding: 8px 12px;
}
.admin-card .staff-tile .avatar { width: 34px; height: 34px; font-size: 14px; }
.lock-info {
  background: var(--card);
  border: 1px solid rgba(228, 231, 224, 0.7);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 18px;
  max-height: 56vh;
  overflow-y: auto;
}
.lock-info h3 {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  margin-bottom: 10px;
}
.lock-info .memo { padding: 10px 12px; }
.lock-info .memo-body { font-size: 13px; }
@media (max-width: 900px) {
  .lock-layout { flex-direction: column; align-items: center; }
  .lock-side { width: 100%; max-width: 480px; }
}

/* Discreet admin entry on the lock screen */
.admin-float {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink-faint);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.35;
  box-shadow: var(--shadow-xs);
  transition: opacity var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out);
  z-index: var(--z-sticky);
}
.admin-float:hover, .admin-float:focus-visible {
  opacity: 1;
  color: var(--ink);
}
