/* CM Studio & Boutique POS — ERAS Dev · Ronald F. Erasmus / All Rights Reserved */
:root {
  --plum: #13302F;
  --plum-2: #1E4644;
  --pearl: #F6F1EA;
  --panel: #FFFDFA;
  --rose: #C2566F;
  --rose-ink: #9C3B54;
  --rose-wash: #F8E7E6;
  --champagne: #C9A66B;
  --ink: #1C2524;
  --muted: #6E706A;
  --line: #E8DFD4;
  --sage: #3F8A68;
  --sage-wash: #E6F2EC;
  --garnet: #A8322D;
  --garnet-wash: #F8E6E4;
  --amber: #9A6414;
  --amber-wash: #FBF1DF;
  --display: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --ui: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
  --r-sm: 4px;
  --r-md: 10px;
  --shadow: 0 1px 0 rgba(19,48,47,.04), 0 12px 28px -22px rgba(19,48,47,.45);
  --lagoon: #1F6F6B;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--ui); font-size: 14px; line-height: 1.5; color: var(--ink); background: var(--pearl);
       font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
a { color: var(--rose-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--rose); outline-offset: 2px; }
h1, h2, h3 { margin: 0; font-weight: 600; }
h1 { font-family: var(--display); font-weight: 500; font-size: 32px; line-height: 1.15; letter-spacing: -0.01em; }
h2 { font-size: 15px; margin-bottom: 12px; }
h3 { font-size: 13px; color: var(--muted); font-weight: 600; margin-bottom: 8px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.mt { margin-top: 20px; }
.mb { margin-bottom: 16px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.grow { flex: 1; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.grid-side { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }

/* ---------- Shell ---------- */
.shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.rail { background: var(--plum); color: #E3EEEA; padding: 22px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { font-family: var(--display); font-size: 23px; line-height: 1.1; color: #fff; padding: 0 10px 18px; display: block; }
.brand small { display: block; font-family: var(--ui); font-size: 11px; color: var(--champagne); margin-top: 6px; letter-spacing: .02em; }
.brand:hover { text-decoration: none; }
.nav-group { margin-top: 14px; }
.nav-group > span { display: block; padding: 0 10px 4px; font-size: 11px; color: #8FB2AB; }
.rail a.nav { display: block; color: #E3EEEA; padding: 6px 10px; border-radius: var(--r-sm); font-size: 13.5px; }
.rail a.nav:hover { background: var(--plum-2); text-decoration: none; }
.rail a.nav.on { background: var(--plum-2); color: #fff; box-shadow: inset 2px 0 0 var(--champagne); }
.rail .who { margin-top: 24px; padding: 12px 10px 0; border-top: 1px solid var(--plum-2); font-size: 12px; color: #A9C4BE; }
.rail .who a { color: #E3EEEA; }
.main { padding: 26px 32px 48px; min-width: 0; }
.topbar { display: none; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap;
             padding-bottom: 16px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.status-strip { font-size: 12px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--garnet); display: inline-block; }
.dot.on { background: var(--sage); }
.credit { margin-top: 40px; font-size: 11px; color: var(--muted); }

/* ---------- Panels & tables ---------- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px 20px; }
.panel + .panel { margin-top: 20px; }
.panel.flush { padding: 0; overflow: hidden; }
.panel.flush > h2 { padding: 16px 20px 0; }
.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #FBF6EF; }
tfoot td { font-weight: 700; border-top: 2px solid var(--ink); border-bottom: 0; }
td.num, th.num { text-align: right; white-space: nowrap; }
.empty { padding: 28px 20px; text-align: center; color: var(--muted); }

/* KPI strip: figures divided by rules, not boxed */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); background: var(--panel);
        border: 1px solid var(--line); border-radius: var(--r-md); margin-bottom: 20px; }
.kpi { padding: 14px 18px; border-right: 1px solid var(--line); }
.kpi:last-child { border-right: 0; }
.kpi b { display: block; font-size: 21px; font-weight: 700; letter-spacing: -0.01em; }
.kpi span { font-size: 12px; color: var(--muted); }
.kpi.money b { color: var(--plum); }

/* ---------- Tags ---------- */
.tag { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: 11.5px; font-weight: 600; background: var(--line); color: var(--ink); white-space: nowrap; }
.tag.ok { background: var(--sage-wash); color: var(--sage); }
.tag.warn { background: var(--amber-wash); color: var(--amber); }
.tag.bad { background: var(--garnet-wash); color: var(--garnet); }
.tag.rose { background: var(--rose-wash); color: var(--rose-ink); }

/* ---------- Forms ---------- */
label { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 4px; }
.field { margin-bottom: 14px; }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 3px; }
input, select, textarea { font: inherit; color: inherit; width: 100%; padding: 8px 10px; border: 1px solid #D8CCBE;
  border-radius: var(--r-sm); background: #fff; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--rose-wash); border-color: var(--rose); }
input[type=checkbox], input[type=radio] { width: auto; }
textarea { min-height: 72px; resize: vertical; }
.inline-check { display: flex; gap: 8px; align-items: center; font-weight: 500; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0 16px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 16px; }
.filters .field { margin: 0; min-width: 130px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips label { font-weight: 500; font-size: 12.5px; margin: 0; display: inline-flex; gap: 5px; align-items: center;
               border: 1px solid var(--line); border-radius: 99px; padding: 3px 10px; background: #fff; cursor: pointer; }
.chips input:checked + span { color: var(--rose-ink); font-weight: 700; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-weight: 600;
       padding: 8px 14px; border-radius: var(--r-sm); border: 1px solid #D8CCBE; background: #fff; color: var(--ink);
       cursor: pointer; white-space: nowrap; }
.btn:hover { text-decoration: none; border-color: var(--muted); }
.btn-primary { background: var(--rose); border-color: var(--rose); color: #fff; }
.btn-primary:hover { background: var(--rose-ink); border-color: var(--rose-ink); }
.btn-dark { background: var(--plum); border-color: var(--plum); color: #fff; }
.btn-danger { color: var(--garnet); border-color: #E3B9B6; }
.btn-sm { padding: 4px 10px; font-size: 12.5px; }
.btn-lg { padding: 13px 18px; font-size: 16px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.link-btn { background: none; border: 0; color: var(--rose-ink); font: inherit; cursor: pointer; padding: 0; }

.flash { padding: 10px 14px; border-radius: var(--r-sm); margin-bottom: 14px; border-left: 3px solid var(--muted); background: #fff; }
.flash.success { border-color: var(--sage); background: var(--sage-wash); }
.flash.error { border-color: var(--garnet); background: var(--garnet-wash); }
.flash.info { border-color: var(--amber); background: var(--amber-wash); }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; flex-wrap: wrap; }
.tabs a { padding: 8px 14px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 600; }
.tabs a.on { color: var(--ink); border-color: var(--rose); }
.tabs a:hover { text-decoration: none; color: var(--ink); }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; font-weight: 600; }

/* ---------- POS ---------- */
.pos { display: grid; grid-template-columns: minmax(0, 1fr) 430px; gap: 20px; align-items: start; }
.pos-search { display: flex; gap: 8px; margin-bottom: 12px; }
.pos-search input { font-size: 16px; padding: 11px 14px; }
.dept-tabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.dept-tabs button { border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 5px 14px; font: inherit; font-weight: 600; cursor: pointer; color: var(--muted); }
.dept-tabs button.on { background: var(--plum); color: #fff; border-color: var(--plum); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 10px; }
.tile { text-align: left; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: 11px 12px;
        cursor: pointer; font: inherit; color: inherit; display: flex; flex-direction: column; gap: 3px; min-height: 104px; }
.tile:hover { border-color: var(--rose); }
.tile .t-name { font-weight: 700; line-height: 1.25; }
.tile .t-var { font-size: 12px; color: var(--muted); }
.tile .t-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: baseline; font-size: 12.5px; }
.tile .t-price { font-weight: 700; }
.tile.rental { border-left: 3px solid var(--champagne); }
.tile.service { border-left: 3px solid var(--plum-2); }
.tile.none { opacity: .55; }

.ticket { background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: 0 10px 30px -18px rgba(19,48,47,.5);
          position: sticky; top: 20px; display: flex; flex-direction: column; max-height: calc(100vh - 40px); }
.ticket-head { padding: 14px 18px; border-bottom: 1px solid var(--line); }
.ticket-lines { overflow-y: auto; flex: 1; min-height: 120px; }
.tline { padding: 10px 18px; border-bottom: 1px dashed var(--line); }
.tline .top { display: flex; justify-content: space-between; gap: 8px; }
.tline .name { font-weight: 600; }
.tline .ctrl { display: flex; gap: 6px; align-items: center; margin-top: 6px; flex-wrap: wrap; font-size: 12.5px; }
.tline .ctrl input { padding: 4px 6px; font-size: 12.5px; }
.qty-btn { width: 26px; height: 26px; border: 1px solid var(--line); background: #fff; border-radius: var(--r-sm); cursor: pointer; font-weight: 700; }
.ticket-total { padding: 14px 18px; border-top: 1px solid var(--line); }
.ticket-total .sum { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.grand { display: flex; justify-content: space-between; align-items: baseline; margin-top: 6px; padding-top: 8px; border-top: 2px solid var(--champagne); }
.grand .amt { font-family: var(--display); font-size: 40px; line-height: 1; color: var(--plum); font-weight: 600; letter-spacing: -0.02em; }
.pay-row { display: grid; grid-template-columns: 1fr 110px 28px; gap: 6px; margin-top: 6px; }
.pay-row input, .pay-row select { padding: 6px 8px; }
.change-due { margin-top: 8px; padding: 10px 12px; background: var(--sage-wash); color: var(--sage); border-radius: var(--r-sm); font-weight: 700; display: flex; justify-content: space-between; }
.balance-due { background: var(--amber-wash); color: var(--amber); }
.picker { position: relative; }
.picker ul { position: absolute; z-index: 20; left: 0; right: 0; top: 100%; background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm);
             margin: 2px 0 0; padding: 4px 0; list-style: none; box-shadow: 0 8px 20px -10px rgba(0,0,0,.25); max-height: 260px; overflow-y: auto; }
.picker li { padding: 7px 12px; cursor: pointer; }
.picker li:hover, .picker li.hi { background: var(--rose-wash); }
.modal-back { position: fixed; inset: 0; background: rgba(19,48,47,.5); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 20px; }
.modal { background: #fff; border-radius: var(--r-md); padding: 22px; width: 100%; max-width: 420px; }
.success-panel { text-align: center; padding: 30px 18px; }
.success-panel .amt { font-family: var(--display); font-size: 44px; color: var(--sage); }

/* ---------- Denomination counter ---------- */
.denoms { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px 14px; }
.denom { display: grid; grid-template-columns: 62px 1fr; align-items: center; gap: 8px; }
.denom span { font-weight: 700; text-align: right; }
.denom input { padding: 6px 8px; }
.count-total { font-family: var(--display); font-size: 30px; color: var(--plum); }

/* ---------- Rental calendar ---------- */
.cal { border-collapse: separate; border-spacing: 0; font-size: 11px; }
.cal th, .cal td { padding: 0; border: 0; }
.cal th.day { writing-mode: vertical-rl; transform: rotate(180deg); height: 58px; padding: 4px 0; color: var(--muted); font-weight: 500; }
.cal th.day.we { color: var(--rose-ink); }
.cal td.name { padding: 4px 12px 4px 0; white-space: nowrap; font-size: 12.5px; position: sticky; left: 0; background: #fff; }
.cal td.c { width: 18px; height: 26px; border-right: 1px solid #fff; }
.cal td.free { background: #EFE7DC; }
.cal td.booked { background: var(--rose); }
.cal td.buffer { background: var(--champagne); opacity: .55; }
.cal td.booked a { display: block; width: 100%; height: 100%; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 2px; vertical-align: -2px; margin-right: 4px; }

/* ---------- Login ---------- */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-art { background: var(--plum); color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: space-between;
             background-image: radial-gradient(circle at 80% 20%, rgba(196,164,106,.18), transparent 45%); }
.login-art .mark { font-family: var(--display); font-size: clamp(44px, 6vw, 84px); line-height: .95; letter-spacing: -0.02em; }
.login-art .mark em { font-style: italic; color: var(--champagne); font-weight: 400; display: block; font-size: .5em; letter-spacing: 0; margin-top: 14px; }
.login-form { display: flex; align-items: center; justify-content: center; padding: 40px; }
.login-form form { width: 100%; max-width: 340px; }


/* ===== Lagoon & hibiscus refinement layer ===== */
body::before { content:""; position:fixed; inset:0; pointer-events:none; z-index:0; opacity:.35;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 .4 0 0 0 0 .3 0 0 0 0 .2 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.shell, .login-wrap { position:relative; z-index:1; }
.rail { background: linear-gradient(180deg, #13302F 0%, #0F2726 100%); border-right:1px solid rgba(201,166,107,.18); }
.brand { display:flex; gap:10px; align-items:center; font-size:19px; }
.monogram { flex:none; width:38px; height:38px; border:1px solid var(--champagne); border-radius:50%; display:grid; place-items:center;
  font-family:var(--display); font-style:italic; font-size:15px; color:var(--champagne); letter-spacing:.02em; }
.brand small { text-transform:uppercase; letter-spacing:.14em; font-size:9.5px; }
.nav-group > span { text-transform:uppercase; letter-spacing:.14em; font-size:10px; font-weight:700; }
.rail a.nav { transition: background .15s, transform .15s; }
.rail a.nav:hover { transform: translateX(2px); }
.rail a.nav.on { background: rgba(201,166,107,.14); box-shadow: inset 2px 0 0 var(--champagne); color:#FFF8EC; }
.who-id { display:flex; gap:10px; align-items:center; margin-bottom:8px; color:#E3EEEA; }
.who-id i { font-style:normal; width:30px; height:30px; border-radius:50%; background:var(--rose); color:#FFF8F4; display:grid; place-items:center; font-weight:700; }
.who-id span { color:var(--champagne); font-size:11px; }
.page-head { border-bottom:0; position:relative; }
.page-head::after { content:""; position:absolute; left:0; bottom:0; width:100%; height:1px; background:linear-gradient(90deg, var(--champagne), var(--line) 30%); }
.panel, .kpis, .ticket { box-shadow: var(--shadow); }
.panel h2, .ticket-head h2 { font-size:11.5px; text-transform:uppercase; letter-spacing:.12em; color:var(--plum-2); }
.kpi b { font-family:var(--display); font-weight:600; font-size:25px; }
.kpi.money b { color: var(--lagoon); }
.kpi span { text-transform:uppercase; letter-spacing:.06em; font-size:10.5px; font-weight:600; }
th { text-transform:uppercase; letter-spacing:.08em; font-size:10.5px; background:#FAF5EE; }
.btn { transition: background .15s, border-color .15s, transform .1s; border-radius:6px; }
.btn:active { transform: translateY(1px); }
.btn-primary { box-shadow: 0 6px 16px -10px rgba(194,86,111,.8); }
.btn-dark, .dept-tabs button.on { background: var(--lagoon); border-color: var(--lagoon); }
input, select, textarea { background:#FFFDFA; border-radius:6px; }
.tile { transition: border-color .15s, transform .15s, box-shadow .15s; }
.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.tile .t-price { color: var(--lagoon); }
.grand .amt { color: var(--lagoon); }
.ticket-head { background: linear-gradient(180deg,#FBF4EA,transparent); border-radius: var(--r-md) var(--r-md) 0 0; }
.tabs a.on { border-color: var(--champagne); }
.cal td.booked { background: var(--lagoon); }
.cal td.buffer { background: var(--rose); opacity:.45; }
.ico-yes { color: var(--sage); vertical-align:-2px; }
.main > * { animation: rise .35s ease both; }
@keyframes rise { from { opacity:0; transform: translateY(6px); } to { opacity:1; transform:none; } }
/* Login */
.login-art { position:relative; overflow:hidden; background:#13302F;
  background-image: radial-gradient(ellipse at 85% 10%, rgba(201,166,107,.28), transparent 50%), radial-gradient(ellipse at 0% 100%, rgba(194,86,111,.35), transparent 55%); }
.login-art::after { content:""; position:absolute; right:-120px; bottom:-120px; width:420px; height:420px; border-radius:50%; border:1px solid rgba(201,166,107,.35); box-shadow: 0 0 0 40px rgba(201,166,107,.05), 0 0 0 90px rgba(201,166,107,.04); }
.login-kicker { text-transform:uppercase; letter-spacing:.2em; font-size:11px; color:var(--champagne); }
.login-trio { list-style:none; padding:0; margin:28px 0 0; display:flex; gap:18px; flex-wrap:wrap; font-size:12px; letter-spacing:.1em; text-transform:uppercase; color:#E3EEEA; }
.login-trio li::before { content:""; display:inline-block; width:6px; height:6px; background:var(--rose); transform:rotate(45deg); margin-right:8px; vertical-align:2px; }
.login-art .mark { animation: rise .6s ease both; }
.login-eyebrow { font-family:var(--display); font-style:italic; color:var(--rose); font-size:20px; margin:0 0 4px; }
.login-sub { margin:-8px 0 22px; }
.login-form form { animation: rise .5s .1s ease both; }
@media (max-width: 1100px) {
  .pos { grid-template-columns: 1fr; }
  .ticket { position: static; max-height: none; }
  .grid-side { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .rail { position: fixed; z-index: 40; width: 250px; transform: translateX(-100%); transition: transform .2s; }
  .rail.open { transform: none; }
  .topbar { display: flex; align-items: center; justify-content: space-between; background: var(--plum); color: #fff; padding: 10px 16px; }
  .topbar button { background: none; border: 1px solid #3F6B67; color: #fff; border-radius: var(--r-sm); padding: 5px 10px; font: inherit; }
  .main { padding: 18px 16px 40px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .kpi { border-right: 0; border-bottom: 1px solid var(--line); }
  .login-wrap { grid-template-columns: 1fr; }
  .login-art { padding: 32px; min-height: 200px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media print {
  .rail, .topbar, .no-print, .page-head .btn { display: none !important; }
  .shell { display: block; }
  .main { padding: 0; }
  body::before { display:none; }
  .panel, .kpis, .ticket { box-shadow:none; }
  .main > * { animation:none; }
  th { background:none; }
  body { background: #fff; }
  .panel { border: 0; padding: 0; }
}
