/* =================================================================
   Sidebar navigation
   ================================================================= */
.sidebar {
  flex: 0 0 var(--sidebar-w);
  width: var(--sidebar-w);
  position: sticky;
  top: 0;
  align-self: flex-start;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, var(--panel) 0%, #131418 100%);
  border-right: 1px solid var(--border);
  z-index: 40;
}

.sidebar-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 20px 18px 16px;
  border-bottom: 1px solid var(--border-soft);
}

.sidebar-close-btn {
  display: none;
  background: transparent; border: none; color: var(--muted); cursor: pointer;
  padding: 4px; border-radius: 6px; flex-shrink: 0;
}
.sidebar-close-btn:hover { color: var(--text); background: var(--panel-2); }

.nav-links {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 10px 10px 14px;
}

.nav-group { border: none; margin-bottom: 2px; }
.nav-group summary { list-style: none; cursor: pointer; }
.nav-group summary::-webkit-details-marker { display: none; }
.nav-group summary::marker { content: ""; }

.nav-group-header {
  display: flex; align-items: center; gap: 9px;
  padding: 10px 10px; margin: 6px 2px 2px;
  font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em;
  color: var(--muted-2);
  border-radius: var(--radius-sm);
  user-select: none;
}
.nav-group-header:hover { color: var(--muted); }
.nav-group-header.static { cursor: default; }
.nav-group-header .nav-group-icon { flex-shrink: 0; opacity: .75; }
.nav-group-header span:not(.nav-group-icon) { flex: 1; }
.nav-chevron { flex-shrink: 0; transition: transform .15s ease; opacity: .7; }
.nav-group[open] > summary .nav-chevron { transform: rotate(180deg); }

.nav-group-links { display: flex; flex-direction: column; gap: 1px; padding-bottom: 6px; }

.nav-link {
  display: flex; align-items: center; gap: 11px;
  color: var(--muted);
  text-decoration: none;
  font-size: .87rem;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  position: relative;
  transition: background .1s ease, color .1s ease;
}
.nav-link .nav-icon { flex-shrink: 0; opacity: .8; }
.nav-link:hover { color: var(--text); background: var(--panel-2); }
.nav-link.active {
  color: var(--gold);
  background: var(--gold-soft);
  font-weight: 600;
}
.nav-link.active .nav-icon { opacity: 1; }

.sidebar-footer {
  border-top: 1px solid var(--border-soft);
  padding: 12px 14px 16px;
  flex-shrink: 0;
}
.sidebar-footer-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }

.sidebar-backdrop {
  display: none;
  position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 39;
}

.mobile-menu-btn {
  display: none;
  background: var(--panel-2); border: 1px solid var(--border); color: var(--text);
  border-radius: var(--radius-sm); padding: 8px; cursor: pointer;
}
.mobile-topbar {
  display: none;
  align-items: center; gap: 8px;
}
.mobile-topbar .brand-icon { color: var(--gold); }
.brand-word.small { font-size: .96rem; }

main { flex: 1 1 auto; min-width: 0; padding: 26px 30px 60px; max-width: 1440px; margin: 0 auto; width: 100%; }

@media (max-width: 900px) {
  body { display: block; }
  .sidebar {
    position: fixed; top: 0; left: 0; height: 100vh; width: 272px;
    transform: translateX(-100%);
    transition: transform .22s ease;
    box-shadow: var(--shadow-lg);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-backdrop:not([hidden]) { display: block; }
  .sidebar-close-btn { display: inline-flex; }
  .mobile-menu-btn {
    display: inline-flex; align-items: center; justify-content: center;
    position: fixed; top: 12px; left: 14px; z-index: 41;
  }
  .mobile-topbar {
    display: flex; position: fixed; top: 0; left: 0; right: 0; height: 56px; z-index: 38;
    padding: 0 16px 0 58px; background: var(--panel); border-bottom: 1px solid var(--border);
  }
  main { padding-top: 76px; }
}

/* ---- Brand / wordmark ---- */
.brand-block { display: flex; flex-direction: column; gap: 2px; flex-shrink: 0; }
.brand-row { display: flex; align-items: center; gap: 8px; }
.brand-icon { color: var(--gold); flex-shrink: 0; }
.brand-word { font-size: 1.08rem; font-weight: 800; letter-spacing: .02em; color: var(--gold); white-space: nowrap; }
.brand-tagline { font-size: .64rem; color: var(--muted-2); letter-spacing: .02em; margin-left: 1px; white-space: nowrap; }
body.rtl .brand-tagline { margin-left: 0; margin-right: 1px; }

.login-card .brand-block { align-items: center; margin-bottom: 4px; }
.login-card .brand-icon { width: 40px; height: 40px; }
.login-card .brand-word { font-size: 1.4rem; white-space: normal; text-align: center; }
.login-card .brand-tagline { font-size: .74rem; margin: 2px 0 10px; }

h1 { font-size: 1.4rem; font-weight: 700; margin: 0 0 5px; letter-spacing: -.01em; }
.subtitle { color: var(--muted); font-size: .88rem; margin-bottom: 22px; line-height: 1.5; }

.legend { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 18px; font-size: .82rem; color: var(--muted); }
.legend .swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: middle; }

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

.room-card {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 13px;
  cursor: pointer;
  transition: transform .1s ease, box-shadow .1s ease, border-color .1s ease;
  border-left: 4px solid var(--vacant-clean);
  box-shadow: var(--shadow-sm);
}
.room-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--border-soft); }
.room-card .room-number { font-size: 1.05rem; font-weight: 700; }
.room-card .room-type { color: var(--muted); font-size: .78rem; margin-bottom: 8px; }
.room-card .guest { font-size: .82rem; margin-top: 6px; }
.room-card .badge {
  display: inline-block; font-size: .66rem; text-transform: uppercase; letter-spacing: .04em;
  padding: 2px 7px; border-radius: 5px; background: rgba(255,255,255,.07); margin-top: 6px;
}

.room-card.status-vacant_clean { border-left-color: var(--vacant-clean); }
.room-card.status-vacant_dirty { border-left-color: var(--vacant-dirty); }
.room-card.status-occupied_clean { border-left-color: var(--occupied-clean); }
.room-card.status-occupied_dirty { border-left-color: var(--occupied-dirty); }
.room-card.status-out_of_order { border-left-color: var(--ooo); }
.room-card.status-out_of_service { border-left-color: var(--oos); }

table { width: 100%; border-collapse: collapse; font-size: .87rem; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--border-soft); text-align: left; }
th { color: var(--muted-2); font-weight: 600; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; }
tbody tr { transition: background .1s ease; }
tbody tr:hover { background: rgba(255,255,255,.025); }

.btn {
  background: linear-gradient(180deg, var(--gold-hover), var(--gold)); color: #201a08; border: none; border-radius: var(--radius-sm);
  padding: 9px 16px; font-size: .85rem; font-weight: 700; cursor: pointer;
  box-shadow: 0 1px 0 rgba(255,255,255,.15) inset, var(--shadow-sm);
  transition: filter .1s ease, transform .05s ease;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(1px); }
.btn.secondary { background: var(--panel-2); color: var(--text); border: 1px solid var(--border); box-shadow: none; }
.btn.secondary:hover { border-color: var(--muted-2); filter: none; background: var(--panel-3); }
.btn.small { padding: 5px 10px; font-size: .76rem; }

input, select, textarea {
  background: var(--panel-2); border: 1px solid var(--border); color: var(--text);
  border-radius: var(--radius-sm); padding: 9px 11px; font-size: .88rem; width: 100%;
  transition: border-color .1s ease, box-shadow .1s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212,175,82,.15);
}
label { display: block; font-size: .78rem; color: var(--muted); margin-bottom: 4px; margin-top: 10px; }

.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow-sm); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .grid-2 { grid-template-columns: 1fr; } }

.modal-backdrop {
  position: fixed; inset: 0; background: rgba(6,6,8,.68); backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center; z-index: 50;
}
.modal { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; width: 420px; max-width: 92vw; max-height: 86vh; overflow-y: auto; box-shadow: var(--shadow-lg); }
.modal h2 { margin-top: 0; font-size: 1.05rem; }
.modal .close { float: right; cursor: pointer; color: var(--muted); }
[hidden] { display: none !important; }

.status-pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .72rem; font-weight: 700; letter-spacing: .01em; }
.status-reserved, .status-vacant { background: #223650; color: #8fb8ff; }
.status-checked_in, .status-occupied { background: #1b3d29; color: #7fd99a; }
.status-checked_out { background: #303236; color: #aeb2ba; }
.status-cancelled { background: #402020; color: #ff9a9a; }
.status-no_show, .status-maintenance { background: #40331a; color: #ffcf7f; }

.toast {
  position: fixed; bottom: 22px; right: 22px; background: var(--panel-2);
  border: 1px solid var(--gold); color: var(--text); padding: 11px 18px; border-radius: var(--radius-sm);
  font-size: .85rem; z-index: 100; box-shadow: var(--shadow-lg);
}
.toast.error { border-color: #c0392b; }

/* Task / guest-service blocks — colored, click-to-advance status */
.task-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.task-card {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 13px;
  cursor: pointer;
  transition: transform .1s ease, opacity .15s ease, box-shadow .1s ease;
  border-left: 4px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.task-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.task-card .task-title { font-weight: 700; font-size: .92rem; text-transform: capitalize; }
.task-card .task-sub { color: var(--muted); font-size: .78rem; margin: 3px 0 8px; }
.task-card .task-desc { font-size: .82rem; margin-bottom: 8px; }
.task-card .status-tag {
  display: inline-block; font-size: .66rem; text-transform: uppercase; letter-spacing: .04em;
  padding: 2px 8px; border-radius: 5px; background: rgba(255,255,255,.08);
}
.task-card.status-in_progress { box-shadow: inset 0 0 0 2px var(--gold); }
.task-card.status-done { opacity: .45; }
.task-card .hint { font-size: .68rem; color: var(--muted); margin-top: 8px; }
.task-card select.hk-assign-select {
  font-size: .76rem; padding: 5px 7px; margin-bottom: 8px; cursor: pointer;
  background: var(--panel); border-color: var(--border);
}
.task-card select.hk-assign-select:hover { border-color: var(--gold); }

.hk-photos { display: flex; gap: 5px; margin-bottom: 8px; flex-wrap: wrap; }
.hk-photo-thumb {
  width: 40px; height: 40px; object-fit: cover; border-radius: 5px;
  border: 1px solid var(--border); display: block;
}
.hk-photo-row { margin-bottom: 8px; }
.hk-photo-row .btn.small { font-size: .72rem; padding: 4px 8px; }

/* Guest-service categories */
.task-card.cat-luggage { border-left-color: #7c5fd6; }
.task-card.cat-laundry { border-left-color: #23918f; }
.task-card.cat-car_wash { border-left-color: #a17f24; }
.task-card.cat-room_service { border-left-color: var(--gold); }
.task-card.cat-orientation { border-left-color: var(--vacant-clean); }
.task-card.cat-maintenance { border-left-color: #c14a37; }
.task-card.cat-other { border-left-color: #7a7a7a; }

/* Housekeeping — colored by status instead of category */
.task-card.hk-pending { border-left-color: var(--vacant-dirty); }
.task-card.hk-in_progress { border-left-color: var(--occupied-clean); }
.task-card.hk-done { border-left-color: var(--vacant-clean); }

/* Tape chart */
.tape-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.tape-grid { display: grid; }
.tape-row-label {
  position: sticky; left: 0; background: var(--panel); z-index: 2;
  padding: 8px 10px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border);
  font-size: .8rem; white-space: nowrap;
}
.tape-header-cell {
  padding: 8px 4px; text-align: center; font-size: .72rem; color: var(--muted);
  border-bottom: 1px solid var(--border); border-right: 1px solid rgba(255,255,255,.03);
}
.tape-day-cell { border-bottom: 1px solid var(--border); border-right: 1px solid rgba(255,255,255,.03); min-height: 40px; }
.tape-bar {
  background: var(--gold-soft); border: 1px solid var(--gold); color: var(--text);
  border-radius: var(--radius-sm); font-size: .72rem; padding: 3px 6px; margin: 3px 2px;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis; cursor: pointer;
}
.tape-bar.status-checked_in { background: #1b3d29; border-color: #4a9a6a; }
.tape-bar.status-checked_out { background: #2a2a2a; border-color: #555; }

/* ---- Auth / nav additions ---- */
.tiny-btn {
  background: var(--panel-2); color: var(--text); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 6px 12px; font-size: .8rem; cursor: pointer;
}
.tiny-btn:hover { border-color: var(--gold); }
.staff-chip { color: var(--muted); font-size: .78rem; white-space: nowrap; }
.property-switcher { margin: 0 0 10px; max-width: 100%; padding: 7px 9px; font-size: .8rem; }

/* ---- Login page ---- */
.login-wrap {
  min-height: 100vh; width: 100%; display: flex; align-items: stretch; justify-content: center;
}
.login-side {
  flex: 1 1 46%; display: flex; flex-direction: column; justify-content: center;
  padding: 60px; position: relative; overflow: hidden;
  background:
    radial-gradient(700px 500px at 15% 15%, rgba(212,175,82,.14), transparent 60%),
    radial-gradient(900px 700px at 85% 85%, rgba(91,157,217,.10), transparent 60%),
    linear-gradient(160deg, #14151a 0%, #0b0c0f 70%);
  border-right: 1px solid var(--border-soft);
}
.login-side .brand-row { gap: 12px; margin-bottom: 6px; }
.login-side .brand-icon { width: 34px; height: 34px; }
.login-side .brand-word { font-size: 1.7rem; }
.login-side .brand-tagline { font-size: .82rem; margin-bottom: 34px; }
.login-side-heading { font-size: 1.55rem; font-weight: 700; max-width: 420px; line-height: 1.35; margin-bottom: 14px; }
.login-side-sub { color: var(--muted); font-size: .92rem; max-width: 400px; line-height: 1.6; }
.login-side-points { list-style: none; padding: 0; margin: 30px 0 0; max-width: 420px; }
.login-side-points li { display: flex; align-items: flex-start; gap: 12px; font-size: .86rem; color: var(--muted); margin-bottom: 14px; line-height: 1.5; }
/* Drawn with plain CSS borders (a rotated corner), not a font glyph or SVG —
   this is deliberately the most bulletproof way to render a checkmark: no
   icon font to fail to load, no SVG parsing quirk in an unusual renderer,
   nothing that can come out as a placeholder box. Just a styled div. */
.login-check {
  flex-shrink: 0; width: 16px; height: 16px; margin-top: 2px; position: relative; display: inline-block;
}
.login-check::after {
  content: ""; position: absolute; left: 5px; top: 1px; width: 5px; height: 9px;
  border-right: 2px solid var(--gold); border-bottom: 2px solid var(--gold);
  transform: rotate(41deg);
}
body.rtl .login-check::after { left: auto; right: 5px; }
@media (max-width: 860px) { .login-side { display: none; } }

.login-form-side { flex: 1 1 54%; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 34px; width: 380px; max-width: 100%; text-align: center; box-shadow: var(--shadow-lg);
}
.login-card .subtitle { margin-bottom: 22px; }
.login-card .btn { width: 100%; margin-top: 14px; }
.login-hint { font-size: .74rem; color: var(--muted); margin-top: 18px; line-height: 1.5; }
.login-error { color: #ff9a9a; font-size: .82rem; margin-top: 10px; min-height: 1.2em; }

.login-divider { display: flex; align-items: center; gap: 10px; margin: 16px 0 12px; color: var(--muted); font-size: .78rem; }
.login-divider::before, .login-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.biometric-btn { display: flex; align-items: center; justify-content: center; margin-top: 8px; }
.login-lang-toggle { position: absolute; top: 18px; right: 18px; }

/* ---- Forms / misc ---- */
.form-row { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.form-row label { margin: 0; }
.badge-vip {
  display: inline-block; background: var(--gold-soft); color: var(--gold); border: 1px solid var(--gold);
  border-radius: 4px; padding: 1px 7px; font-size: .7rem; font-weight: 700; letter-spacing: .03em;
}
.charge-voided { text-decoration: line-through; opacity: .5; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border-soft); border-radius: var(--radius); }
.table-wrap table { font-size: .86rem; }
.table-wrap th:first-child, .table-wrap td:first-child { padding-left: 14px; }
.qr-box { background: #fff; padding: 10px; border-radius: 8px; display: inline-block; }
.report-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat-card {
  background: linear-gradient(165deg, var(--panel) 0%, var(--panel-2) 100%);
  border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px;
  box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
}
.stat-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--accent-blue));
  opacity: .8;
}
.stat-card .stat-label { color: var(--muted); font-size: .76rem; margin-bottom: 8px; text-transform: uppercase; letter-spacing: .04em; }
.stat-card .stat-value { font-size: 1.5rem; font-weight: 800; color: var(--text); letter-spacing: -.01em; }

/* ---- Back office: inventory / purchasing / petty cash / accounting ---- */
.tab-row { display: flex; gap: 6px; margin-bottom: 20px; flex-wrap: wrap; background: var(--panel); border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 5px; }
.tab-btn {
  background: transparent; color: var(--muted); border: none;
  border-radius: var(--radius-sm); padding: 8px 16px; font-size: .85rem; cursor: pointer;
  transition: background .1s ease, color .1s ease;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: #201a08; background: var(--gold); font-weight: 700; }
.status-pending_approval, .status-pending, .status-draft, .status-open, .status-unpaid, .status-new { background: #223650; color: #8fb8ff; }
.status-approved, .status-received, .status-inspected, .status-active, .status-completed, .status-done, .status-paid, .status-closed, .status-won, .status-accepted { background: #1b3d29; color: #7fd99a; }
.status-rejected, .status-cancelled, .status-terminated, .status-expired, .status-overdue, .status-void, .status-voided, .status-lost, .status-declined { background: #402020; color: #ff9a9a; }
.status-sent, .status-partially_received, .status-assigned, .status-in_progress, .status-partially_paid, .status-contacted, .status-viewing_scheduled, .status-quoted { background: #40331a; color: #ffcf7f; }
.status-converted_to_po { background: #303236; color: #aeb2ba; }
.low-stock-tag { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .72rem; font-weight: 600; background: #402020; color: #ff9a9a; margin-left: 6px; }
.line-row { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 8px; align-items: center; margin-bottom: 8px; }
.line-row input, .line-row select { margin: 0; }
.balance-ok { color: #7fd99a; }
.balance-bad { color: #ff9a9a; }

/* ---- RTL ---- */
body.rtl { direction: rtl; }
body.rtl .sidebar { border-right: none; border-left: 1px solid var(--border); }
body.rtl .sidebar-header { flex-direction: row-reverse; }
body.rtl .nav-link, body.rtl .nav-group-header { flex-direction: row-reverse; }
body.rtl th, body.rtl td { text-align: right; }
body.rtl .room-card, body.rtl .task-card { border-left: none; border-right: 4px solid var(--border); }
body.rtl .room-card.status-vacant_clean, body.rtl .task-card.hk-pending { border-right-color: var(--vacant-clean); }
body.rtl .legend .swatch { margin-right: 0; margin-left: 6px; }
body.rtl .tape-row-label { left: auto; right: 0; border-right: none; border-left: 1px solid var(--border); }
body.rtl .stat-card::before { background: linear-gradient(270deg, var(--gold), var(--accent-blue)); }
body.rtl .login-side { border-right: none; border-left: 1px solid var(--border-soft); }
body.rtl .login-lang-toggle { right: auto; left: 18px; }
body.rtl .mobile-topbar { padding: 0 58px 0 16px; }
body.rtl .mobile-menu-btn { left: auto; right: 14px; }
@media (max-width: 900px) {
  body.rtl .sidebar { left: auto; right: 0; transform: translateX(100%); }
  body.rtl .sidebar.open { transform: translateX(0); }
}
body.rtl[dir="rtl"] * { font-family: "Tajawal", "Segoe UI", system-ui, sans-serif; }

/* ---- POS ---- */
.pos-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 900px) { .pos-layout { grid-template-columns: 1fr; } }
.pos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
}
.pos-tile {
  background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 10px; cursor: pointer; text-align: left; transition: transform .1s ease, border-color .1s ease;
}
.pos-tile:hover { transform: translateY(-2px); border-color: var(--gold); }
.pos-tile .pos-tile-name { font-size: .88rem; font-weight: 600; }
.pos-tile .pos-tile-price { color: var(--muted); font-size: .8rem; margin-top: 4px; }
.pos-cart-line { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: .86rem; }
.pos-cart-line .pos-cart-line-desc { flex: 1; }
.pos-cart-line .pos-cart-line-remove { color: #ff9a9a; cursor: pointer; font-weight: 700; }
.pos-cart-totals { margin-top: 10px; font-size: .88rem; }
.pos-cart-totals div { display: flex; justify-content: space-between; padding: 3px 0; }
.pos-cart-totals .pos-cart-grand-total { font-weight: 700; font-size: 1rem; border-top: 1px solid var(--border); margin-top: 6px; padding-top: 8px; }
.pos-open-order-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: .86rem; }

/* ---- AI ---- */
.ai-chat-log { max-height: 360px; overflow-y: auto; margin-bottom: 12px; }
.ai-chat-msg { padding: 8px 12px; border-radius: var(--radius-sm); margin-bottom: 8px; font-size: .88rem; max-width: 80%; }
.ai-chat-msg.user { background: var(--gold); color: #1a1608; margin-left: auto; }
.ai-chat-msg.assistant { background: var(--panel-2); border: 1px solid var(--border); }
.ai-chat-input-row { display: flex; gap: 8px; }
.ai-chat-input-row input { flex: 1; }
.loyalty-pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .74rem; font-weight: 600; text-transform: capitalize; }
.loyalty-bronze { background: #4a3a2a; color: #d9a066; }
.loyalty-silver { background: #3a3f4a; color: #c8d0dc; }
.loyalty-gold { background: #4a3f1a; color: #ffd76a; }
.loyalty-platinum { background: #2a3a4a; color: #a6e3ff; }

.ai-summary-box {
  background: var(--panel-2); border: 1px solid var(--gold); border-radius: var(--radius);
  padding: 13px 16px; margin-bottom: 16px; font-size: .88rem; line-height: 1.5;
}
.severity-pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .74rem; font-weight: 600; }
.severity-low { background: #223650; color: #8fb8ff; }
.severity-medium { background: #40331a; color: #ffcf7f; }
.severity-high { background: #402020; color: #ff9a9a; }
body.rtl .ai-chat-msg.user { margin-left: 0; margin-right: auto; }

/* ================================================================
   Coral hotel command center
   ================================================================ */
.dashboard-main { max-width: 1500px; }
.dashboard-hero { display:flex; align-items:flex-start; justify-content:space-between; gap:24px; margin-bottom:24px; padding:4px 0 2px; }
.dashboard-hero h1 { font-size:clamp(1.8rem, 4vw, 2.9rem); letter-spacing:-.035em; margin-top:2px; }
.eyebrow { color:var(--gold); font-size:.66rem; letter-spacing:.14em; font-weight:800; margin-bottom:7px; }
.automation-badge { display:inline-flex; align-items:center; gap:8px; padding:8px 12px; border:1px solid var(--border); border-radius:999px; color:var(--muted); font-size:.74rem; background:var(--panel); }
.pulse-dot { width:7px; height:7px; border-radius:50%; background:#a98028; box-shadow:0 0 0 0 rgba(169,128,40,.3); }
.automation-badge.running .pulse-dot { background:#55ba77; animation:coralPulse 1.8s infinite; }
@keyframes coralPulse { 70%{box-shadow:0 0 0 8px rgba(85,186,119,0)} 100%{box-shadow:0 0 0 0 rgba(85,186,119,0)} }
.kpi-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:12px; margin-bottom:12px; }
.kpi-card { min-height:150px; padding:18px; border-radius:18px; background:linear-gradient(155deg,var(--panel),var(--panel-2)); border:1px solid var(--border); box-shadow:var(--shadow-sm); }
.kpi-card.kpi-primary { background:linear-gradient(145deg, rgba(212,175,82,.13), var(--panel)); border-color:rgba(212,175,82,.28); }
.kpi-label { color:var(--muted); font-size:.72rem; font-weight:650; }
.kpi-value { margin-top:18px; font-size:2.25rem; font-weight:800; letter-spacing:-.04em; line-height:1; }.kpi-value small{font-size:.72rem;color:var(--muted);font-weight:700;margin-left:4px}.kpi-value.money{font-size:1.75rem}
.kpi-meta { margin-top:8px; color:var(--muted-2); font-size:.68rem; }
.mini-progress { height:4px; background:rgba(255,255,255,.06); border-radius:99px; margin-top:15px; overflow:hidden; }.mini-progress span{display:block;height:100%;width:0;background:linear-gradient(90deg,var(--gold),#e5ca78);border-radius:99px;transition:width .5s ease}
.dashboard-grid { display:grid; grid-template-columns:1.5fr .8fr; gap:12px; margin-bottom:12px; }
.command-card { padding:20px; border-radius:18px; background:var(--panel); border:1px solid var(--border); box-shadow:var(--shadow-sm); }
.card-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; margin-bottom:18px; }.card-heading h2{margin:0;font-size:1.05rem}.text-link{color:var(--gold);font-size:.72rem;text-decoration:none}
.ops-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:8px; }.ops-tile{padding:14px;border:1px solid var(--border-soft);border-radius:13px;text-decoration:none;color:var(--text);background:var(--panel-2);transition:.15s ease}.ops-tile:hover{transform:translateY(-2px);border-color:var(--border)}.ops-number{display:block;font-size:1.45rem;font-weight:800}.ops-tile>span:last-child{display:block;color:var(--muted);font-size:.65rem;margin-top:3px}
.quick-actions{display:flex;flex-wrap:wrap;gap:7px;margin-top:15px}.quick-action{font-size:.68rem;color:var(--text);text-decoration:none;border:1px solid var(--border);border-radius:999px;padding:7px 10px;background:var(--panel-2)}.quick-action:hover{border-color:var(--gold)}
.alert-stack { display:grid; gap:8px; }.command-alert{display:grid;grid-template-columns:auto 1fr;gap:10px;padding:12px;border:1px solid var(--border-soft);border-radius:12px;background:var(--panel-2)}.alert-dot{width:7px;height:7px;border-radius:50%;background:#d3aa4b;margin-top:5px}.command-alert.critical .alert-dot{background:#e16d65}.command-alert.good .alert-dot{background:#65bf80}.command-alert strong{font-size:.76rem}.command-alert div div{color:var(--muted);font-size:.66rem;margin-top:3px;line-height:1.4}
.dashboard-skeleton{height:52px;border-radius:10px;background:linear-gradient(90deg,var(--panel-2),var(--panel-3),var(--panel-2));background-size:220% 100%;animation:skeleton 1.4s infinite}.dashboard-skeleton.short{width:75%}@keyframes skeleton{to{background-position:-220% 0}}
.automation-card { margin-bottom:20px; }.automation-state{font-size:.68rem;color:#7fd99a;background:rgba(127,217,154,.08);border:1px solid rgba(127,217,154,.15);padding:5px 9px;border-radius:999px}.automation-jobs{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:8px}.automation-job{display:flex;align-items:center;gap:10px;padding:12px;border-radius:12px;background:var(--panel-2);border:1px solid var(--border-soft)}.job-icon{width:27px;height:27px;border-radius:9px;display:flex;align-items:center;justify-content:center;background:rgba(212,175,82,.1);color:var(--gold);font-weight:800}.automation-job strong,.automation-job span{display:block}.automation-job strong{font-size:.73rem}.automation-job span{font-size:.63rem;color:var(--muted);margin-top:3px}.automation-note{margin-top:11px;color:var(--muted);font-size:.64rem}
@media(max-width:1100px){.kpi-grid{grid-template-columns:1fr 1fr}.dashboard-grid{grid-template-columns:1fr}.ops-grid{grid-template-columns:1fr 1fr}}
@media(max-width:600px){.dashboard-hero{display:block}.automation-badge{margin-top:10px}.kpi-grid{grid-template-columns:1fr 1fr}.kpi-card{min-height:130px;padding:15px}.kpi-value{font-size:1.8rem}.kpi-value.money{font-size:1.25rem}.ops-grid{grid-template-columns:1fr 1fr}}

/* ---- Command-center analytics ---- */
.analytics-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-bottom:12px}
.analytics-wide-grid{display:grid;grid-template-columns:1.25fr .75fr;gap:12px;margin-bottom:12px}
.chart-card{min-height:285px}.chart-kicker{font-size:.68rem;color:var(--muted);border:1px solid var(--border);border-radius:999px;padding:5px 9px}
.chart-surface{min-height:190px;display:flex;align-items:stretch;justify-content:stretch}.chart-empty{width:100%;display:flex;align-items:center;justify-content:center;color:var(--muted);font-size:.78rem;border:1px dashed var(--border-soft);border-radius:12px}
.coral-line-chart{width:100%;height:190px;overflow:visible}.chart-grid-line{stroke:var(--border-soft);stroke-width:1}.chart-line{fill:none;stroke:var(--gold);stroke-width:3;stroke-linecap:round;stroke-linejoin:round}.chart-point{fill:var(--panel);stroke:var(--gold);stroke-width:2}
.chart-axis-label{fill:var(--muted-2);font-size:10px}.chart-value-label{fill:var(--muted);font-size:10px;font-weight:700}.bar-chart{width:100%;display:flex;align-items:flex-end;gap:8px;padding-top:16px}.bar-item{flex:1;min-width:0;display:flex;flex-direction:column;align-items:center;gap:6px}.bar-track{width:100%;height:135px;display:flex;align-items:flex-end;justify-content:center;border-bottom:1px solid var(--border-soft)}
.bar-fill{width:min(32px,72%);min-height:3px;border-radius:7px 7px 2px 2px;background:linear-gradient(180deg,var(--gold),rgba(212,175,82,.45));transition:height .35s ease}.bar-value{font-size:.62rem;color:var(--muted)}.bar-label{font-size:.62rem;color:var(--muted-2);white-space:nowrap}
.forecast-chart{width:100%;display:grid;grid-template-columns:repeat(7,1fr);gap:7px;align-items:end}.forecast-day{min-width:0;text-align:center}.forecast-bars{height:130px;display:flex;align-items:flex-end;justify-content:center;gap:4px;border-bottom:1px solid var(--border-soft)}.forecast-bar{width:13px;min-height:3px;border-radius:5px 5px 2px 2px}.forecast-bar.arrivals{background:var(--gold)}.forecast-bar.departures{background:var(--muted-2)}
.forecast-counts{font-size:.58rem;color:var(--muted);margin-top:5px;white-space:nowrap}.forecast-label{font-size:.59rem;color:var(--muted-2);margin-top:4px}.request-bars{width:100%;display:grid;gap:10px;align-content:center}.request-row-chart{display:grid;grid-template-columns:105px 1fr 28px;gap:8px;align-items:center;font-size:.67rem}.request-name{text-transform:capitalize;color:var(--muted)}.request-track{height:9px;border-radius:999px;background:var(--panel-2);overflow:hidden}.request-fill{height:100%;background:linear-gradient(90deg,var(--gold),#e5ca78);border-radius:999px}.request-count{text-align:right;font-weight:800}
.property-comparison{display:grid;gap:9px}.property-row{display:grid;grid-template-columns:minmax(150px,1.25fr) 2fr auto;gap:12px;align-items:center;padding:11px 12px;border:1px solid var(--border-soft);border-radius:12px;background:var(--panel-2)}.property-name strong,.property-name span{display:block}.property-name strong{font-size:.75rem}.property-name span{font-size:.61rem;color:var(--muted);margin-top:2px}.property-meter{height:8px;border-radius:999px;background:rgba(255,255,255,.06);overflow:hidden}.property-meter span{display:block;height:100%;background:linear-gradient(90deg,var(--gold),#e5ca78);border-radius:999px}.property-stats{text-align:right;font-size:.64rem;color:var(--muted)}.property-stats strong{display:block;color:var(--text);font-size:.78rem}
.suggestion-stack{display:grid;gap:8px}.suggestion-item{display:grid;grid-template-columns:8px 1fr auto;gap:10px;align-items:start;padding:12px;border:1px solid var(--border-soft);border-radius:12px;background:var(--panel-2)}.suggestion-level{width:8px;height:8px;border-radius:50%;margin-top:5px;background:var(--gold)}.suggestion-item.high .suggestion-level{background:#e16d65}.suggestion-item.good .suggestion-level{background:#65bf80}.suggestion-item strong{display:block;font-size:.73rem}.suggestion-item p{margin:4px 0 0;color:var(--muted);font-size:.64rem;line-height:1.45}.suggestion-action{font-size:.62rem;color:var(--gold);text-decoration:none;white-space:nowrap}
@media(max-width:1100px){.analytics-wide-grid{grid-template-columns:1fr}}
@media(max-width:760px){.analytics-grid{grid-template-columns:1fr}.chart-card{min-height:250px}.property-row{grid-template-columns:1fr}.property-stats{text-align:left}.request-row-chart{grid-template-columns:90px 1fr 24px}}
