/* =========================================================
   Aneka HMS — Design System
   Palette: deep emerald + warm brass on soft ivory.
   A hospitality feel — calm, premium, easy on the eyes for
   long shifts at reception or the POS terminal.
   ========================================================= */

:root {
  --aneka-emerald-900: #0F2B22;
  --aneka-emerald-700: #1B4332;
  --aneka-emerald-500: #2D6A4F;
  --aneka-brass-500:   #C9A227;
  --aneka-brass-300:   #E4C55E;
  --aneka-ivory-100:   #FAF8F3;
  --aneka-ivory-200:   #F1EDE2;
  --aneka-ink-900:     #1E211F;
  --aneka-ink-500:     #5B6560;
  --aneka-border:      #E1DCCB;
  --aneka-danger:      #B3261E;
  --aneka-success:     #1B7A43;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Source Sans 3', 'Segoe UI', Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--aneka-ivory-100);
  color: var(--aneka-ink-900);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
}

h1, h2, h3, .brand-word {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.2px;
}

a { color: var(--aneka-emerald-700); }

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

.app-sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--aneka-emerald-900);
  color: var(--aneka-ivory-100);
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
}

.app-sidebar .brand {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--aneka-ivory-100);
  margin-bottom: 4px;
}

.app-sidebar .brand .accent { color: var(--aneka-brass-300); }

.app-sidebar .brand-sub {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(250,248,243,0.55);
  margin-bottom: 28px;
}

.nav-group-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(250,248,243,0.45);
  margin: 18px 0 8px 6px;
}

.nav-link {
  display: block;
  padding: 9px 12px;
  border-radius: 8px;
  color: rgba(250,248,243,0.85);
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 2px;
  transition: background 0.15s ease;
}

.nav-link:hover { background: rgba(250,248,243,0.08); }
.nav-link.active {
  background: var(--aneka-brass-500);
  color: var(--aneka-emerald-900);
  font-weight: 600;
}

/* Not-yet-built pages: visibly disabled, not a dead link that looks live */
.nav-link-disabled {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 8px;
  color: rgba(250,248,243,0.35);
  font-size: 14px;
  margin-bottom: 2px;
  cursor: default;
}
.nav-link-disabled .soon-pill {
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(250,248,243,0.12);
  color: rgba(250,248,243,0.55);
  padding: 2px 7px;
  border-radius: 999px;
  white-space: nowrap;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(250,248,243,0.12);
  font-size: 12.5px;
  color: rgba(250,248,243,0.6);
}

/* ---------- Main area ---------- */
.app-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.app-topbar {
  height: 64px;
  background: #fff;
  border-bottom: 1px solid var(--aneka-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
}

.topbar-title { font-family: var(--font-display); font-size: 19px; }

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
}

.role-badge {
  background: var(--aneka-emerald-700);
  color: var(--aneka-ivory-100);
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.app-content { padding: 28px; }

/* ---------- Cards / stats ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: #fff;
  border: 1px solid var(--aneka-border);
  border-radius: 12px;
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--aneka-brass-500);
}

.stat-card .label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--aneka-ink-500);
  margin-bottom: 6px;
}

.stat-card .value {
  font-family: var(--font-display);
  font-size: 30px;
  color: var(--aneka-emerald-900);
}

.panel {
  background: #fff;
  border: 1px solid var(--aneka-border);
  border-radius: 12px;
  padding: 22px;
  margin-bottom: 22px;
}

.panel h2 {
  font-size: 17px;
  margin: 0 0 14px 0;
  color: var(--aneka-emerald-900);
}

/* ---------- Tables ---------- */
table.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data-table th {
  text-align: left;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--aneka-ink-500);
  border-bottom: 2px solid var(--aneka-border);
  padding: 8px 10px;
}
table.data-table td {
  padding: 10px;
  border-bottom: 1px solid var(--aneka-border);
}
table.data-table tr:last-child td { border-bottom: none; }

/* ---------- Forms / buttons ---------- */
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--aneka-ink-900);
}
.field input[type="text"],
.field input[type="password"] {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--aneka-border);
  border-radius: 8px;
  font-size: 14.5px;
  background: var(--aneka-ivory-100);
}
.field input:focus {
  outline: none;
  border-color: var(--aneka-emerald-500);
  box-shadow: 0 0 0 3px rgba(45,106,79,0.15);
}

.btn-primary {
  background: var(--aneka-emerald-700);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px 22px;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
}
.btn-primary:hover { background: var(--aneka-emerald-500); }

/* ---------- Inline action links (row actions in tables, outside the dark
   sidebar) — deliberately NOT .nav-link, which is styled near-white for the
   sidebar's dark background and renders invisible against a white/ivory
   table row if reused here without a color override. ---------- */
.action-link {
  color: var(--aneka-emerald-700);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}
.action-link:hover { text-decoration: underline; }
.action-link.bordered {
  display: inline-block;
  padding: 4px 10px;
  border: 1px solid var(--aneka-border);
  border-radius: 6px;
  text-decoration: none;
}
.action-link.bordered:hover { background: var(--aneka-ivory-200); text-decoration: none; }

.alert-error {
  background: #FBEAE9;
  border: 1px solid var(--aneka-danger);
  color: var(--aneka-danger);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13.5px;
  margin-bottom: 16px;
}

/* ---------- Login page ---------- */
.login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, var(--aneka-emerald-900) 0%, var(--aneka-emerald-700) 55%, var(--aneka-emerald-500) 100%);
}

.login-card {
  background: var(--aneka-ivory-100);
  width: 380px;
  padding: 40px 36px;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(15,43,34,0.35);
}

.login-card .brand {
  font-family: var(--font-display);
  font-size: 26px;
  text-align: center;
  color: var(--aneka-emerald-900);
  margin-bottom: 2px;
}
.login-card .brand .accent { color: var(--aneka-brass-500); }

.login-card .tagline {
  text-align: center;
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--aneka-ink-500);
  margin-bottom: 28px;
}

/* ---------- Status pills ---------- */
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600; }
.pill-vacant { background: #E4F3EA; color: var(--aneka-success); }
.pill-occupied { background: #FDEFE0; color: #A9611A; }
.pill-dirty { background: #FBEAE9; color: var(--aneka-danger); }
.pill-cleaning { background: #E9EEFB; color: #2A4FAE; }

/* ---------- Phase 2: POS screen ---------- */
.pos-shell {
  display: flex;
  gap: 22px;
  align-items: flex-start;
}

.pos-menu {
  flex: 1;
  min-width: 0;
}

.pos-category-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--aneka-ink-500);
  margin: 18px 0 10px 0;
}
.pos-category-label:first-child { margin-top: 0; }

.pos-tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.pos-tile {
  background: #fff;
  border: 1px solid var(--aneka-border);
  border-radius: 10px;
  padding: 16px 14px;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.1s ease;
  user-select: none;
}
.pos-tile:hover { border-color: var(--aneka-brass-500); transform: translateY(-1px); }
.pos-tile:active { transform: translateY(0); }
.pos-tile-name { font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.pos-tile-price { font-size: 13px; color: var(--aneka-emerald-700); font-weight: 600; }

.pos-ticket {
  width: 340px;
  flex-shrink: 0;
  position: sticky;
  top: 20px;
}

.pos-radio-row { display: flex; gap: 18px; font-size: 14px; }
.pos-radio-row label { display: flex; align-items: center; gap: 6px; font-weight: 400; }

.cart-list { margin: 14px 0; max-height: 260px; overflow-y: auto; }
.cart-empty { color: var(--aneka-ink-500); font-size: 13.5px; }

.cart-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--aneka-border);
  font-size: 13.5px;
}
.cart-line-name { flex: 1; }
.cart-line-qty { display: flex; align-items: center; gap: 6px; }
.cart-line-qty button {
  width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--aneka-border);
  background: #fff; cursor: pointer; font-size: 13px; line-height: 1;
}
.cart-line-total { font-weight: 600; min-width: 70px; text-align: right; }

.cart-totals {
  border-top: 2px solid var(--aneka-border);
  padding-top: 10px;
  margin-top: 6px;
}
.cart-totals div { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 4px; }
.cart-totals strong { font-family: var(--font-display); font-size: 17px; }

.pos-payment-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 6px;
  margin-bottom: 10px;
}
.pos-payment-row select, .pos-payment-row input {
  padding: 8px; border: 1px solid var(--aneka-border); border-radius: 6px; font-size: 12.5px;
}

.btn-secondary {
  background: var(--aneka-ivory-200);
  color: var(--aneka-emerald-900);
  border: 1px solid var(--aneka-border);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 13px;
  cursor: pointer;
}
.btn-secondary:hover { background: var(--aneka-border); }

@media (max-width: 900px) {
  .pos-shell { flex-direction: column; }
  .pos-ticket { width: 100%; position: static; }
}

/* ---------- Printable receipts / invoices ----------
   Thermal POS printers are monochrome and can't render true gray — a
   mid-gray fill or light-gray text gets dithered into a faint, stippled
   pattern. Everything here is pure black (#000) with bold weight on the
   numbers that matter, never a color/opacity trick, so it stays crisp on
   a thermal head instead of just looking fine on a screen. ---------- */
.receipt-print-area {
  background: #fff;
  color: #000;
  font-family: var(--font-body);
  font-size: 13.5px;
  margin: 0 auto;
}
.receipt-header { text-align: center; margin-bottom: 12px; }
.receipt-hotel { font-family: var(--font-display); font-size: 20px; font-weight: 700; color: #000; }
.receipt-hotel .accent { color: #000; }
.receipt-outlet { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; font-weight: 700; color: #000; margin-top: 2px; }
.receipt-number { font-size: 12px; font-weight: 600; color: #000; margin-top: 2px; }
.receipt-meta {
  font-size: 12.5px; font-weight: 600; color: #000;
  border-top: 1px solid #000; border-bottom: 1px solid #000;
  padding: 8px 0; margin: 10px 0;
}
.receipt-meta div { margin-bottom: 2px; }
table.receipt-items { width: 100%; border-collapse: collapse; font-size: 12.5px; margin-bottom: 8px; }
table.receipt-items th {
  text-align: left; font-size: 11px; text-transform: uppercase; font-weight: 700;
  color: #000; border-bottom: 1px solid #000; padding: 4px 2px;
}
table.receipt-items td { padding: 4px 2px; font-weight: 600; color: #000; border-bottom: 1px dashed #000; }
.receipt-totals { border-top: 2px solid #000; margin-top: 6px; padding-top: 8px; }
.receipt-total-row { display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; color: #000; margin-bottom: 4px; }
.receipt-grand-total { font-weight: 700; font-size: 17px; border-top: 1px solid #000; padding-top: 6px; margin-top: 4px; }
.receipt-footer { text-align: center; font-size: 12px; font-weight: 600; color: #000; margin-top: 16px; }
.receipt-actions { display: flex; gap: 10px; max-width: 460px; margin: 0 auto 20px auto; }

/* Applies on EVERY page that uses Site.Master, not just the pages that
   remember to add their own @media print block — a printable page that
   forgets this rule ends up printing the whole dark sidebar/topbar chrome
   alongside its content (the sidebar's light-on-dark nav text turns
   near-invisible once the dark background itself doesn't print). */
@media print {
  .app-sidebar, .app-topbar, .no-print { display: none !important; }
  .app-shell, .app-main, .app-content { display: block !important; padding: 0 !important; margin: 0 !important; }
  body { background: #fff !important; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
