/* MBMS layout - responsive: side menu on desktop, slide-in menu on phones */
:root {
  --app-side: 250px;
  --app-ink: #1d2b36;
  --app-muted: #66788a;
  --app-brand: #0f5c7a;
  --app-brand-soft: #e6f1f5;
  --app-bg: #f4f6f8;
  --app-line: #dfe5ea;
  --cal-free: #e9f7ef; --cal-part: #d6eef7; --cal-prov: #fff3cd; --cal-pending: #cfe2ff; --cal-confirmed: #f8d7da; --cal-locked: #dee2e6;
}
body { background: var(--app-bg); color: var(--app-ink); font-size: .94rem; }
.app-shell { display: flex; min-height: 100vh; }
.app-side { width: var(--app-side); flex: 0 0 var(--app-side); background: #fff; border-right: 1px solid var(--app-line); padding: 0 0 2rem; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.app-brand { display: flex; gap: .6rem; align-items: center; padding: 1rem; border-bottom: 1px solid var(--app-line); }
.app-brand-mark { width: 38px; height: 38px; border-radius: 10px; background: var(--app-brand); color: #fff; display: grid; place-items: center; font-size: 1.1rem; }
.app-brand-name { font-weight: 600; line-height: 1.15; }
.app-brand-name small { display: block; font-weight: 400; color: var(--app-muted); font-size: .75rem; }
.app-menu-group { text-transform: uppercase; letter-spacing: .04em; font-size: .7rem; color: var(--app-muted); padding: 1rem 1rem .3rem; }
.app-menu { list-style: none; margin: 0; padding: 0 .5rem; }
.app-menu a { display: flex; align-items: center; gap: .6rem; padding: .45rem .6rem; border-radius: 8px; color: var(--app-ink); text-decoration: none; }
.app-menu a i { width: 1.1rem; text-align: center; color: var(--app-muted); }
.app-menu a:hover { background: var(--app-bg); }
.app-menu a.active { background: var(--app-brand-soft); color: var(--app-brand); font-weight: 600; }
.app-menu a.active i { color: var(--app-brand); }
.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.app-top { display: flex; align-items: center; gap: .5rem; background: #fff; border-bottom: 1px solid var(--app-line); padding: .55rem 1rem; position: sticky; top: 0; z-index: 10; }
.app-title { font-size: 1.15rem; margin: 0; font-weight: 600; }
.app-burger { display: none; color: var(--app-ink); }
.app-content { padding: 1.25rem; }
.app-card { background: #fff; border: 1px solid var(--app-line); border-radius: 12px; padding: 1rem; margin-bottom: 1rem; }
.app-intro { color: var(--app-muted); max-width: 70ch; }
.app-toolbar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: .75rem; }
.app-stat { background: #fff; border: 1px solid var(--app-line); border-radius: 12px; padding: .9rem 1rem; height: 100%; }
.app-stat .v { font-size: 1.6rem; font-weight: 700; }
.app-stat .l { color: var(--app-muted); font-size: .8rem; }
table.dataTable td, table.dataTable th { vertical-align: middle; }
.app-actions { white-space: nowrap; }
.app-repeater td { min-width: 110px; }
.select2-container .select2-selection--multiple { min-height: 38px; border-color: #dee2e6; }
.plain-page { display: grid; place-items: center; min-height: 100vh; }
.plain-wrap { width: 100%; max-width: 420px; padding: 16px; }
.plain-brand { text-align: center; font-weight: 600; font-size: 1.1rem; margin-bottom: 1rem; color: var(--app-brand); }
.plain-card { border-radius: 14px; }
.flag-confirm { color: #a15c00; }

/* calendar */
.cal-wrap { overflow-x: auto; }
.cal { border-collapse: separate; border-spacing: 2px; font-size: .78rem; }
.cal th { position: sticky; top: 0; background: #fff; text-align: center; font-weight: 600; padding: 2px 4px; }
.cal th.cal-res { left: 0; z-index: 2; text-align: left; min-width: 170px; }
.cal td.cal-res { position: sticky; left: 0; background: #fff; z-index: 1; white-space: nowrap; padding-right: 8px; }
.cal td.cell { width: 30px; min-width: 30px; height: 30px; border-radius: 5px; text-align: center; cursor: default; }
.cell.FREE { background: var(--cal-free); } .cell.PART { background: var(--cal-part); } .cell.PROVISIONAL { background: var(--cal-prov); }
.cell.PENDING_PAYMENT { background: var(--cal-pending); } .cell.CONFIRMED { background: var(--cal-confirmed); } .cell.LOCKED { background: var(--cal-locked); }
.cal-legend span { display: inline-flex; align-items: center; gap: .3rem; margin-right: .9rem; font-size: .8rem; }
.cal-legend i { width: 14px; height: 14px; border-radius: 3px; display: inline-block; }
.cal-weekend { color: #b02a37; }

/* quotation */
.quote-lines .line-card { border: 1px solid var(--app-line); border-radius: 10px; padding: .75rem; margin-bottom: .75rem; background: #fff; }
.quote-total td { font-weight: 700; }
.avail-ok { color: #146c43; } .avail-no { color: #b02a37; }

@media (max-width: 991.98px) {
  .app-side { position: fixed; left: 0; top: 0; z-index: 1040; transform: translateX(-100%); transition: transform .2s ease; box-shadow: 0 0 24px rgba(0,0,0,.15); }
  body.menu-open .app-side { transform: none; }
  .app-burger { display: inline-block; }
  .app-content { padding: 1rem 16px; }
}
@media print {
  .app-side, .app-top, .no-print { display: none !important; }
  .app-content { padding: 0; }
  body { background: #fff; }
}

/* ---- phase 6-9 screens ---- */
.dash-bar { background: #eef2f6; border-radius: 3px; height: 10px; overflow: hidden; }
.dash-bar > span { display: block; height: 100%; background: #2f6f9f; }
a.app-stat { color: inherit; }
a.app-stat:hover { box-shadow: 0 0 0 2px rgba(47,111,159,.25); }
.report-tile:hover { box-shadow: 0 0 0 2px rgba(47,111,159,.25); }
.report-table td, .report-table th { white-space: nowrap; }
#custResults .list-group-item { cursor: pointer; }
.app-stat .v[data-money], .app-stat .v[data-sum] { font-size: clamp(1rem, 1.6vw, 1.35rem); white-space: nowrap; }
.report-table { font-size: .82rem; }
.report-table td, .report-table th { padding: .3rem .4rem; }

/* ---- customer panel ---- */
.portal-page { background: #f3f6f9; }
.portal-bar { background: #fff; border-bottom: 1px solid #dde4ec; }
.portal-bar .navbar-brand { font-weight: 600; color: #1f4f78; }
.portal-sub { display: block; font-size: .72rem; font-weight: 400; color: #6b7a89; }
.portal-bar .nav-link.active { color: #1f4f78; font-weight: 600; }
.portal-main { padding-top: 1.25rem; max-width: 1140px; }
.portal-booking-card { color: inherit; }
.portal-booking-card:hover { box-shadow: 0 0 0 2px rgba(47,111,159,.3); }
.plain-wrap:has(.verify-card) { max-width: 640px; }
