/* =====================================================================
   HotelMS - Jira Software inspired theme (Atlassian design language)
   ===================================================================== */
:root {
  --blue: #0052CC; --blue-hover: #0065FF; --blue-press: #0747A6; --blue-light: #DEEBFF; --blue-50: #E9F2FF;
  --n0: #FFFFFF; --n10: #FAFBFC; --n20: #F4F5F7; --n30: #EBECF0; --n40: #DFE1E6; --n60: #B3BAC5;
  --n80: #97A0AF; --n100: #7A869A; --n200: #6B778C; --n300: #5E6C84; --n500: #42526E; --n800: #172B4D;
  --green: #00875A; --green-light: #E3FCEF; --green-dark: #006644;
  --yellow: #FFAB00; --yellow-light: #FFFAE6; --yellow-dark: #974F0C;
  --red: #DE350B; --red-light: #FFEBE6; --red-dark: #BF2600;
  --purple: #5243AA; --purple-light: #EAE6FF; --teal: #00A3BF; --teal-light: #E6FCFF;
  --sidebar-w: 240px; --topbar-h: 56px;
  --radius: 3px; --shadow: 0 1px 1px rgba(9,30,66,.25), 0 0 1px rgba(9,30,66,.31);
  --shadow-lg: 0 8px 16px -4px rgba(9,30,66,.25), 0 0 1px rgba(9,30,66,.31);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", Ubuntu, "Helvetica Neue", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body { font-family: var(--font); font-size: 14px; line-height: 1.43; color: var(--n800); background: var(--n0); -webkit-font-smoothing: antialiased; }
a { color: var(--blue); text-decoration: none; cursor: pointer; }
a:hover { color: var(--blue-hover); text-decoration: underline; }
h1, h2, h3, h4 { color: var(--n800); margin: 0 0 8px; font-weight: 500; }
h1 { font-size: 24px; letter-spacing: -.01em; }
h2 { font-size: 20px; } h3 { font-size: 16px; font-weight: 600; } h4 { font-size: 14px; font-weight: 600; }
hr { border: 0; border-top: 1px solid var(--n40); margin: 16px 0; }
.muted { color: var(--n200); } .small { font-size: 12px; } .tiny { font-size: 11px; }
.text-right { text-align: right; } .text-center { text-align: center; } .nowrap { white-space: nowrap; }
.mono { font-family: SFMono-Medium, "SF Mono", "Segoe UI Mono", Consolas, monospace; font-size: 12.5px; }
.bold { font-weight: 600; } .hidden { display: none !important; }
.text-green { color: var(--green); } .text-red { color: var(--red); } .text-yellow { color: var(--yellow-dark); }

/* ------------------------------ Layout ------------------------------ */
.topbar { position: fixed; top: 0; left: 0; right: 0; height: var(--topbar-h); background: var(--n0); border-bottom: 1px solid var(--n40);
  display: flex; align-items: center; padding: 0 12px; z-index: 50; gap: 8px; }
.topbar .brand { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--n800); font-size: 15px; padding: 0 8px; min-width: 216px; }
.brand-logo { width: 28px; height: 28px; border-radius: 4px; background: linear-gradient(135deg, #2684FF, #0052CC); display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 14px; }
.topbar .top-nav { display: flex; gap: 2px; flex: 1; }
.topbar .top-nav a { color: var(--n500); padding: 6px 10px; border-radius: var(--radius); font-weight: 500; }
.topbar .top-nav a:hover { background: var(--n30); text-decoration: none; }
.topbar .create-btn { margin-left: 6px; }
.topbar .search { position: relative; width: 240px; }
.topbar .search input { width: 100%; padding: 6px 10px 6px 30px; border: 2px solid var(--n40); border-radius: var(--radius); background: var(--n10); font: inherit; }
.topbar .search input:focus { border-color: var(--blue-hover); background: #fff; outline: none; }
.topbar .search::before { content: "⌕"; position: absolute; left: 10px; top: 5px; color: var(--n200); font-size: 16px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--purple); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 13px; cursor: pointer; flex-shrink: 0; }
.avatar.sm { width: 24px; height: 24px; font-size: 10px; }
.user-menu { position: relative; }

.sidebar { position: fixed; top: var(--topbar-h); bottom: 0; left: 0; width: var(--sidebar-w); background: var(--n10); border-right: 1px solid var(--n40); overflow-y: auto; padding: 16px 8px 24px; z-index: 40; }
.sidebar .project { display: flex; gap: 8px; align-items: center; padding: 4px 8px 16px; }
.sidebar .project .p-icon { width: 32px; height: 32px; border-radius: 4px; background: #FF5630; color: #fff; display: grid; place-items: center; font-size: 16px; }
.sidebar .project .p-name { font-weight: 600; font-size: 14px; line-height: 1.2; }
.sidebar .project .p-sub { font-size: 12px; color: var(--n200); }
.nav-group { margin-bottom: 8px; }
.nav-group-title { font-size: 11px; font-weight: 700; color: var(--n200); text-transform: uppercase; letter-spacing: .04em; padding: 12px 10px 4px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: var(--radius); color: var(--n500); font-weight: 500; cursor: pointer; position: relative; }
.nav-item:hover { background: var(--n30); color: var(--n800); text-decoration: none; }
.nav-item.active { background: var(--blue-light); color: var(--blue); }
.nav-item.active::before { content: ""; position: absolute; left: -8px; top: 6px; bottom: 6px; width: 3px; border-radius: 0 3px 3px 0; background: var(--blue); }
.nav-item .ico { width: 18px; text-align: center; font-size: 15px; opacity: .9; }
.nav-item .badge { margin-left: auto; }

.main { margin-left: var(--sidebar-w); padding: calc(var(--topbar-h) + 24px) 32px 48px; min-height: 100vh; }
.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.breadcrumbs { font-size: 13px; color: var(--n200); margin-bottom: 6px; }
.breadcrumbs a { color: var(--n200); } .breadcrumbs .sep { margin: 0 6px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ------------------------------ Buttons ------------------------------ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 12px; border: 0; border-radius: var(--radius);
  font: inherit; font-weight: 500; cursor: pointer; background: rgba(9,30,66,.04); color: var(--n500); white-space: nowrap; transition: background .1s; text-decoration: none !important; }
.btn:hover { background: rgba(9,30,66,.08); color: var(--n800); }
.btn:active { background: var(--blue-light); color: var(--blue); }
.btn:disabled, .btn.disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }
.btn-primary { background: var(--blue); color: #fff; } .btn-primary:hover { background: var(--blue-hover); color: #fff; } .btn-primary:active { background: var(--blue-press); color: #fff; }
.btn-success { background: var(--green); color: #fff; } .btn-success:hover { background: #36B37E; color: #fff; }
.btn-danger { background: var(--red); color: #fff; } .btn-danger:hover { background: #FF5630; color: #fff; }
.btn-warning { background: var(--yellow); color: var(--n800); } .btn-warning:hover { background: #FFC400; }
.btn-subtle { background: transparent; } .btn-subtle:hover { background: rgba(9,30,66,.08); }
.btn-link { background: transparent; color: var(--blue); padding: 0 4px; } .btn-link:hover { background: transparent; text-decoration: underline; color: var(--blue-hover); }
.btn-sm { height: 24px; padding: 0 8px; font-size: 12.5px; }
.btn-icon { width: 32px; padding: 0; }
.btn-group { display: inline-flex; gap: 0; } .btn-group .btn { border-radius: 0; } .btn-group .btn:first-child { border-radius: 3px 0 0 3px; } .btn-group .btn:last-child { border-radius: 0 3px 3px 0; }
.btn-group .btn.active { background: var(--n800); color: #fff; }

/* Dropdown */
.dropdown { position: relative; display: inline-block; }
.dropdown-menu { position: absolute; right: 0; top: calc(100% + 4px); min-width: 200px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 4px 0; z-index: 200; display: none; }
.dropdown.open .dropdown-menu { display: block; }
.dropdown-menu a, .dropdown-menu .dd-item { display: block; padding: 8px 16px; color: var(--n800); cursor: pointer; }
.dropdown-menu a:hover, .dropdown-menu .dd-item:hover { background: var(--n20); text-decoration: none; }
.dropdown-menu .dd-sep { border-top: 1px solid var(--n40); margin: 4px 0; }
.dropdown-menu .dd-head { padding: 8px 16px; font-size: 11px; font-weight: 700; color: var(--n200); text-transform: uppercase; }

/* ------------------------------ Lozenges / badges ------------------------------ */
.lozenge { display: inline-block; padding: 0 4px; border-radius: 3px; font-size: 11px; font-weight: 700; text-transform: uppercase; line-height: 16px; white-space: nowrap; letter-spacing: .01em; }
.lz-default { background: var(--n40); color: var(--n500); }
.lz-blue { background: var(--blue-light); color: var(--blue-press); }
.lz-green { background: var(--green-light); color: var(--green-dark); }
.lz-yellow { background: var(--yellow-light); color: var(--yellow-dark); }
.lz-red { background: var(--red-light); color: var(--red-dark); }
.lz-purple { background: var(--purple-light); color: var(--purple); }
.lz-teal { background: var(--teal-light); color: #006D80; }
.lz-bold.lz-blue { background: var(--blue); color: #fff; } .lz-bold.lz-green { background: var(--green); color: #fff; }
.lz-bold.lz-red { background: var(--red); color: #fff; } .lz-bold.lz-yellow { background: var(--yellow); color: var(--n800); }
.badge { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--n40); color: var(--n800); font-size: 11.5px; font-weight: 600; text-align: center; line-height: 18px; }
.badge.blue { background: var(--blue); color: #fff; } .badge.red { background: var(--red); color: #fff; }

/* ------------------------------ Cards / panels ------------------------------ */
.card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.card + .card { margin-top: 16px; }
.grid > .card + .card, .grid > .card { margin-top: 0; }
.card-title { font-size: 14px; font-weight: 600; margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .grid-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; } .span-3 { grid-column: span 3; } .span-all { grid-column: 1 / -1; }
.stat { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; position: relative; overflow: hidden; }
.stat .stat-label { font-size: 12px; color: var(--n200); font-weight: 600; text-transform: uppercase; letter-spacing: .02em; }
.stat .stat-value { font-size: 26px; font-weight: 500; margin-top: 4px; color: var(--n800); }
.stat .stat-sub { font-size: 12px; color: var(--n200); }
.stat::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--blue); }
.stat.green::after { background: var(--green); } .stat.yellow::after { background: var(--yellow); } .stat.red::after { background: var(--red); } .stat.purple::after { background: var(--purple); } .stat.teal::after { background: var(--teal); }
.panel-split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; align-items: start; }
.side-panel { border: 1px solid var(--n40); border-radius: var(--radius); }
.side-panel .sp-head { padding: 12px 16px; border-bottom: 1px solid var(--n40); font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
.side-panel .sp-body { padding: 8px 16px 16px; }
.kv { display: grid; grid-template-columns: 120px 1fr; gap: 8px 12px; font-size: 13.5px; padding: 6px 0; }
.kv dt { color: var(--n200); font-weight: 600; font-size: 12.5px; } .kv dd { margin: 0; word-break: break-word; }
.totals-box { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; font-size: 13.5px; }
.totals-box .grand { font-weight: 700; font-size: 15px; border-top: 1px solid var(--n40); padding-top: 6px; }
.empty-state { text-align: center; padding: 40px 16px; color: var(--n200); }
.empty-state .es-icon { font-size: 40px; margin-bottom: 8px; opacity: .6; }
.alert { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 16px; display: flex; gap: 10px; align-items: flex-start; }
.alert-info { background: var(--blue-50); } .alert-warning { background: var(--yellow-light); } .alert-error { background: var(--red-light); } .alert-success { background: var(--green-light); }
.section-title { font-size: 12px; font-weight: 700; color: var(--n200); text-transform: uppercase; letter-spacing: .04em; margin: 24px 0 8px; }

/* ------------------------------ Tabs ------------------------------ */
.tabs { display: flex; gap: 0; border-bottom: 2px solid var(--n40); margin-bottom: 16px; flex-wrap: wrap; }
.tab { padding: 8px 12px; color: var(--n300); font-weight: 500; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; }
.tab:hover { color: var(--n800); }
.tab.active { color: var(--blue); border-bottom-color: var(--blue); }
.tab .badge { margin-left: 4px; }

/* ------------------------------ Forms ------------------------------ */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.form-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .form-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label, .lbl { font-size: 12px; font-weight: 600; color: var(--n200); }
.field label .req { color: var(--red); margin-left: 2px; }
.input, select.input, textarea.input { width: 100%; padding: 6px 8px; min-height: 36px; border: 2px solid var(--n40); border-radius: var(--radius); background: var(--n10);
  font: inherit; color: var(--n800); transition: background .1s, border-color .1s; }
.input:hover { background: var(--n30); }
.input:focus { outline: none; border-color: var(--blue-hover); background: #fff; }
textarea.input { min-height: 72px; resize: vertical; }
.input.is-invalid { border-color: var(--red); background: var(--red-light); }
.field .error { color: var(--red); font-size: 12px; }
.field .help { color: var(--n200); font-size: 12px; }
.checkbox { display: inline-flex; gap: 8px; align-items: center; cursor: pointer; user-select: none; }
.checkbox input { width: 16px; height: 16px; accent-color: var(--blue); }
.input-group { display: flex; } .input-group .input { border-radius: 3px 0 0 3px; } .input-group .btn { border-radius: 0 3px 3px 0; height: auto; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 16px; }
.filters .input { min-height: 32px; padding: 4px 8px; width: auto; }
.filters .field { min-width: 140px; }
.chip-select { display: flex; gap: 4px; flex-wrap: wrap; }
.chip { padding: 3px 10px; border-radius: 3px; background: var(--n20); color: var(--n500); font-size: 12.5px; font-weight: 500; cursor: pointer; border: 1px solid transparent; user-select: none; }
.chip:hover { background: var(--n30); }
.chip.active { background: var(--blue-light); color: var(--blue); border-color: #4C9AFF; }

/* ------------------------------ Tables ------------------------------ */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--n200); padding: 8px 8px; border-bottom: 2px solid var(--n40); white-space: nowrap; user-select: none; }
.table th.sortable { cursor: pointer; } .table th.sortable:hover { color: var(--n800); }
.table th .sort-ind { font-size: 10px; margin-left: 4px; }
.table td { padding: 8px 8px; border-bottom: 1px solid var(--n30); vertical-align: middle; }
.table tbody tr:hover { background: var(--n20); }
.table tr.clickable { cursor: pointer; }
.table tfoot td { font-weight: 700; border-top: 2px solid var(--n40); border-bottom: 0; background: var(--n10); }
.table td.num, .table th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table .row-muted td { color: var(--n100); text-decoration: line-through; }
.table-compact td, .table-compact th { padding: 5px 6px; }
.table-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.table-toolbar .count { color: var(--n200); font-size: 12.5px; }

/* ------------------------------ Modal ------------------------------ */
.modal-backdrop { position: fixed; inset: 0; background: rgba(9,30,66,.54); z-index: 500; display: flex; align-items: flex-start; justify-content: center; padding: 60px 16px; overflow-y: auto; animation: fadeIn .15s; }
.modal { background: #fff; border-radius: 3px; box-shadow: 0 0 0 1px rgba(9,30,66,.08), 0 2px 1px rgba(9,30,66,.08), 0 0 20px -6px rgba(9,30,66,.31); width: 600px; max-width: 100%; display: flex; flex-direction: column; animation: slideIn .18s; }
.modal.lg { width: 860px; } .modal.xl { width: 1100px; } .modal.sm { width: 420px; }
.modal-header { padding: 20px 24px 8px; display: flex; justify-content: space-between; align-items: center; }
.modal-header h3 { font-size: 20px; font-weight: 500; margin: 0; }
.modal-body { padding: 8px 24px 16px; }
.modal-footer { padding: 16px 24px 20px; display: flex; justify-content: flex-end; gap: 8px; }
.modal-close { background: none; border: 0; font-size: 20px; cursor: pointer; color: var(--n300); width: 32px; height: 32px; border-radius: 3px; }
.modal-close:hover { background: var(--n30); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideIn { from { transform: translateY(-12px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ------------------------------ Toasts ------------------------------ */
#toasts { position: fixed; left: 24px; bottom: 24px; z-index: 900; display: flex; flex-direction: column; gap: 8px; }
.toast { min-width: 300px; max-width: 460px; background: #fff; border-radius: 3px; box-shadow: var(--shadow-lg); padding: 14px 16px; display: flex; gap: 12px; align-items: flex-start; animation: slideIn .2s; }
.toast .t-icon { font-size: 16px; line-height: 20px; }
.toast.success .t-icon { color: var(--green); } .toast.error .t-icon { color: var(--red); } .toast.warning .t-icon { color: var(--yellow); } .toast.info .t-icon { color: var(--blue); }
.toast .t-msg { flex: 1; } .toast .t-close { cursor: pointer; color: var(--n200); }

/* ------------------------------ Board (Kanban) ------------------------------ */
.board { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; align-items: flex-start; }
.board-col { background: var(--n20); border-radius: 3px; min-width: 220px; width: 220px; flex-shrink: 0; display: flex; flex-direction: column; max-height: calc(100vh - 220px); }
.board-col-head { padding: 10px 10px 6px; font-size: 12px; font-weight: 600; color: var(--n300); text-transform: uppercase; display: flex; justify-content: space-between; align-items: center; }
.board-col-body { padding: 4px 6px 8px; overflow-y: auto; min-height: 80px; flex: 1; }
.board-col.drag-over { background: var(--blue-light); }
.board-card { background: #fff; border-radius: 3px; box-shadow: var(--shadow); padding: 10px; margin-bottom: 6px; cursor: grab; transition: background .1s; }
.board-card:hover { background: var(--n10); }
.board-card.dragging { opacity: .4; }
.board-card .bc-title { font-weight: 500; margin-bottom: 6px; display: flex; justify-content: space-between; gap: 6px; }
.board-card .bc-meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 12px; color: var(--n200); }
.board-card .bc-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.type-icon { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 3px; color: #fff; font-size: 10px; font-weight: 700; }

/* ------------------------------ Calendar timeline ------------------------------ */
.timeline-wrap { overflow: auto; border: 1px solid var(--n40); border-radius: 3px; max-height: calc(100vh - 240px); position: relative; }
.timeline { border-collapse: separate; border-spacing: 0; font-size: 12px; table-layout: fixed; }
.timeline th, .timeline td { border-right: 1px solid var(--n30); border-bottom: 1px solid var(--n30); height: 34px; padding: 0; }
.timeline thead th { position: sticky; top: 0; background: var(--n10); z-index: 3; font-weight: 600; color: var(--n300); text-align: center; height: 44px; }
.timeline thead th.today { background: var(--blue-light); color: var(--blue); }
.timeline thead th.weekend { background: var(--n20); }
.timeline .room-cell { position: sticky; left: 0; background: #fff; z-index: 2; width: 130px; min-width: 130px; padding: 0 8px; text-align: left; font-weight: 500; white-space: nowrap; }
.timeline thead .room-cell { z-index: 4; background: var(--n10); }
.timeline .day-cell { width: 56px; min-width: 56px; position: relative; cursor: pointer; }
.timeline .day-cell:hover { background: var(--blue-50); }
.timeline .day-cell.weekend { background: var(--n10); }
.timeline .day-cell.today { background: rgba(222,235,255,.45); }
.timeline .type-row td { background: var(--n20); font-weight: 600; color: var(--n300); height: 28px; }
.timeline .type-row .avail { text-align: center; font-size: 11px; }
.timeline .avail.zero { color: var(--red); font-weight: 700; }
.tl-bar { position: absolute; top: 4px; height: 26px; border-radius: 3px; padding: 0 6px; font-size: 11.5px; line-height: 26px; color: #fff; overflow: hidden;
  white-space: nowrap; text-overflow: ellipsis; z-index: 1; cursor: pointer; box-shadow: 0 1px 1px rgba(9,30,66,.25); }
.tl-bar:hover { filter: brightness(1.08); }
.tl-confirmed { background: var(--blue); } .tl-checked_in { background: var(--green); } .tl-checked_out { background: var(--n100); }
.tl-pending_payment { background: var(--yellow); color: var(--n800); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--n300); }
.legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; background: var(--c); }

/* ------------------------------ Room-type picker ------------------------------ */
.rt-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.rt-option { border: 2px solid var(--n40); border-radius: 3px; padding: 10px; cursor: pointer; }
.rt-option:hover { border-color: var(--n60); }
.rt-option.selected { border-color: var(--blue); background: var(--blue-50); }
.rt-option.disabled { opacity: .5; cursor: not-allowed; }
.rt-option .rt-name { font-weight: 600; } .rt-option .rt-price { font-size: 16px; font-weight: 600; margin-top: 4px; }
.quote-box { background: var(--n20); border-radius: 3px; padding: 12px; }
.quote-box table { width: 100%; font-size: 12.5px; } .quote-box td { padding: 2px 0; }

/* Guest autocomplete */
.ac-wrap { position: relative; }
.ac-list { position: absolute; left: 0; right: 0; top: 100%; background: #fff; box-shadow: var(--shadow-lg); border-radius: 3px; z-index: 600; max-height: 260px; overflow-y: auto; }
.ac-item { padding: 8px 12px; cursor: pointer; border-bottom: 1px solid var(--n20); }
.ac-item:hover, .ac-item.active { background: var(--blue-50); }

/* ------------------------------ Charts ------------------------------ */
.chart { width: 100%; height: 220px; }
.chart svg { width: 100%; height: 100%; overflow: visible; }
.chart .axis text { font-size: 10px; fill: var(--n200); }
.chart .grid-line { stroke: var(--n30); }
.chart .bar { fill: #4C9AFF; } .chart .bar.neg { fill: #FF8F73; } .chart .bar:hover { fill: var(--blue); }
.chart .line { fill: none; stroke: var(--blue); stroke-width: 2; } .chart .area { fill: rgba(76,154,255,.15); } .chart .dot { fill: var(--blue); }
.hbar { height: 8px; border-radius: 4px; background: var(--n30); overflow: hidden; display: flex; }
.hbar > span { height: 100%; }

/* ------------------------------ Login ------------------------------ */
.login-page { min-height: 100vh; background: var(--n10) linear-gradient(180deg, #fff 0%, var(--n20) 100%); display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-box { width: 400px; background: #fff; border-radius: 3px; box-shadow: rgba(0,0,0,.1) 0 0 10px; padding: 32px 40px; }
.login-box .brand { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-bottom: 24px; }
.login-box .brand-logo { width: 48px; height: 48px; font-size: 22px; }
.login-box h1 { font-size: 16px; text-align: center; color: var(--n300); font-weight: 600; }

/* ------------------------------ Misc ------------------------------ */
.spinner { width: 24px; height: 24px; border: 3px solid var(--n40); border-top-color: var(--blue); border-radius: 50%; animation: spin .7s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-bar { position: fixed; top: 0; left: 0; height: 3px; background: var(--blue); z-index: 1000; width: 0; transition: width .3s; }
.activity { border-left: 2px solid var(--n40); margin-left: 12px; padding-left: 16px; }
.activity-item { position: relative; padding: 4px 0 12px; }
.activity-item::before { content: ""; position: absolute; left: -22px; top: 8px; width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2px solid var(--n60); }
.activity-item .ai-meta { font-size: 12px; color: var(--n200); }
.perm-matrix th { font-size: 11px; text-transform: capitalize; text-align: center; }
.perm-matrix td { text-align: center; }
.perm-matrix td:first-child { text-align: left; font-weight: 500; }
.photo-grid { display: flex; gap: 8px; flex-wrap: wrap; }
.photo-grid .ph { width: 140px; border-radius: 3px; overflow: hidden; box-shadow: var(--shadow); position: relative; }
.photo-grid img { width: 140px; height: 96px; object-fit: cover; display: block; }
.photo-grid .ph .ph-del { position: absolute; top: 4px; right: 4px; }
.report-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.report-card { background: #fff; box-shadow: var(--shadow); border-radius: 3px; padding: 14px 16px; cursor: pointer; transition: box-shadow .15s; }
.report-card:hover { box-shadow: var(--shadow-lg); text-decoration: none; }
.report-card .rc-title { font-weight: 600; color: var(--n800); } .report-card .rc-desc { font-size: 12.5px; color: var(--n200); margin-top: 4px; }

/* ------------------------------ Print (invoice / receipt) ------------------------------ */
.doc { max-width: 820px; margin: 0 auto; background: #fff; padding: 32px; box-shadow: var(--shadow); font-size: 13px; }
.doc-head { display: flex; justify-content: space-between; border-bottom: 2px solid var(--n800); padding-bottom: 12px; margin-bottom: 16px; }
.doc-head .h-name { font-size: 20px; font-weight: 700; }
.doc-title { font-size: 18px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; text-align: right; }
.doc table.table th { color: var(--n800); background: var(--n20); }
.doc .doc-foot { margin-top: 24px; border-top: 1px solid var(--n40); padding-top: 12px; font-size: 12px; color: var(--n300); }
.watermark { position: relative; } .watermark::after { content: attr(data-mark); position: absolute; top: 40%; left: 10%; font-size: 72px; color: rgba(222,53,11,.15); transform: rotate(-20deg); font-weight: 800; pointer-events: none; }
@media print {
  .topbar, .sidebar, .page-header, .no-print, #toasts { display: none !important; }
  .main { margin: 0; padding: 0; }
  .doc { box-shadow: none; padding: 0; max-width: none; }
  body { background: #fff; }
}

@media (max-width: 1100px) {
  .grid-4, .grid-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .panel-split { grid-template-columns: 1fr; }
  .topbar .top-nav, .topbar .search { display: none; }
}
@media (max-width: 760px) {
  :root { --sidebar-w: 0px; }
  .sidebar { transform: translateX(-100%); width: 240px; transition: transform .2s; }
  body.nav-open .sidebar { transform: none; box-shadow: var(--shadow-lg); }
  .main { padding: calc(var(--topbar-h) + 16px) 12px 32px; }
  .grid-2, .grid-3, .form-grid, .form-grid.cols-3, .form-grid.cols-4 { grid-template-columns: 1fr; }
  .topbar .brand { min-width: 0; }
}
.menu-toggle { display: none; }
@media (max-width: 760px) { .menu-toggle { display: inline-flex; } }
