/* ==================================================================
   Hotel Yashoda — front desk
   Same ink-and-brass identity as the website, but this is a tool: it is
   scanned and operated, so density and state legibility beat flourish.
   ================================================================== */

:root {
  /* Dark chrome stays brand ink; the working surface is a clean warm grey.
     The old all-beige scheme washed everything out — nothing could stand
     forward because every surface was the same tone. */
  --ink:      #16150F;
  --ink-2:    #201E17;
  --ink-3:    #2C2A20;
  --bone:     #F6F6F3;   /* page ground        */
  --bone-2:   #EFEFEA;   /* subtle fills       */
  --bone-3:   #E3E3DC;   /* borders, wells     */
  --white:    #FFFFFF;   /* cards              */
  --gold:     #C8A25E;
  --gold-deep:#96723A;
  --text:     #17171A;
  --text-2:   #55544F;
  --text-3:   #86857D;
  --on-ink:   #E7E5DC;
  --on-ink-2: #9A968A;
  --line:     rgba(23,23,26,.13);
  --line-2:   rgba(23,23,26,.07);
  --line-ink: rgba(231,229,220,.12);

  /* Ink for the bars that are dark in BOTH modes (sidebar, login). Never
     redefined below — using --bone here would flip dark in night mode and
     the text would disappear. */
  --on-dark:  #FBFBF8;

  /* Status colours are semantic and deliberately separate from the brass. */
  --new:      #B4762F;
  --new-bg:   #FBF0E1;
  --conf:     #2F6B57;
  --conf-bg:  #E6F2ED;
  --in:       #2B5C93;
  --in-bg:    #E4EEF8;
  --out:      #5C544A;
  --out-bg:   #EFEBE4;
  --cxl:      #A33B2A;
  --cxl-bg:   #FBEBE7;

  --serif: "Cormorant Garamond", Georgia, serif;
  --sans:  "Jost", "Segoe UI", system-ui, -apple-system, sans-serif;
  --r: 10px;
  --r-sm: 7px;
  --shadow: 0 1px 2px rgba(20,20,24,.05), 0 1px 3px rgba(20,20,24,.04);
  --shadow-lift: 0 2px 6px rgba(20,20,24,.07), 0 14px 34px rgba(20,20,24,.10);
  --ease: cubic-bezier(.22,.61,.36,1);
  --side: 236px;
}

:root[data-mode="night"] {
  color-scheme: dark;
  --bone: #131316; --bone-2: #191920; --bone-3: #26262E; --white: #1C1C22;
  --text: #EDEDF0; --text-2: #A6A5AE; --text-3: #78777F;
  --line: rgba(237,237,240,.14); --line-2: rgba(237,237,240,.07);
  --new-bg: #33260F; --conf-bg: #14301F; --in-bg: #13263B; --out-bg: #26262E; --cxl-bg: #3A1C16;
  --new: #E0A458; --conf: #6FC49C; --in: #7FB2E8; --out: #A6A5AE; --cxl: #E8836B;
  --shadow: 0 1px 2px rgba(0,0,0,.5);
  --shadow-lift: 0 2px 6px rgba(0,0,0,.5), 0 14px 34px rgba(0,0,0,.5);
}

* , *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bone-2);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 300;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 600; margin: 0; line-height: 1.15; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
a { color: var(--gold-deep); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 3px; }
table { border-collapse: collapse; width: 100%; }

.hide { display: none !important; }
.tnum { font-variant-numeric: tabular-nums; }

/* ----------------------------- login ------------------------------ */

/* Shown while the panel finds out whether a session exists. Same dark ground
   as the login screen, so the two do not flash different colours at each
   other while one replaces the other. */
.waking {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center; align-content: center; gap: .5rem;
  padding: 1.5rem; text-align: center;
  background: var(--ink);
  color: rgba(246,246,243,.78);
  font-size: .95rem;
}
.waking[hidden] { display: none; }
.waking__mark {
  width: 54px; height: 54px; margin-bottom: .4rem;
  display: grid; place-items: center;
  border: 1px solid rgba(200,162,94,.45); border-radius: 50%;
  font-family: var(--serif, Georgia, serif); font-size: 1.5rem;
  color: var(--gold);
  animation: waking-pulse 1.6s ease-in-out infinite;
}
.waking__sub { font-size: .82rem; color: rgba(246,246,243,.5); }
.waking .btn { margin-top: .9rem; }
@keyframes waking-pulse {
  0%, 100% { opacity: .45; transform: scale(.97); }
  50%      { opacity: 1;   transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .waking__mark { animation: none; opacity: .9; }
}

.login {
  position: relative;
  min-height: 100dvh;
  display: grid; place-items: center;
  padding: 1.5rem;
  background: #F7F4EE;            /* warm off-white */
  color: var(--text);
  overflow: hidden;
}
/* The property, washed almost to white, so signing in feels like the hotel
   rather than a generic form. Without the photo it is a soft cream ground. */
.login__art { position: absolute; inset: 0; }
.login__art img {
  width: 100%; height: 100%; object-fit: cover;
  opacity: .22; transform: scale(1.04); filter: saturate(.7);
}
.login__art::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(60% 60% at 50% 42%, rgba(247,244,238,.55), rgba(247,244,238,.92)),
    linear-gradient(180deg, rgba(200,162,94,.06), transparent 45%, rgba(200,162,94,.08));
}
.login__art.is-plain { background: radial-gradient(70% 70% at 50% 40%, #FBF9F5, #F1ECE2); }

.login__card {
  position: relative; z-index: 1;
  width: min(100%, 384px);
  padding: 2.4rem 2.2rem 2.2rem;
  background: rgba(255,255,255,.88);
  border: 1px solid rgba(150,114,58,.18);
  border-radius: 16px;
  backdrop-filter: blur(18px) saturate(1.1);
  -webkit-backdrop-filter: blur(18px) saturate(1.1);
  box-shadow: 0 1px 2px rgba(60,45,20,.05), 0 24px 60px rgba(60,45,20,.12);
  text-align: center;
}
.login__card::before {             /* thin gold rule across the top */
  content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 64px; height: 2px; border-radius: 2px; background: var(--gold);
}
.login__logo { width: 46px; height: auto; margin: 0 auto .9rem; display: block; }
.login__mark {
  font-family: var(--serif); font-size: 1.75rem; font-weight: 600;
  color: var(--ink); margin: 0 0 .15rem;
}
.login__sub {
  font-size: .62rem; letter-spacing: .3em; text-transform: uppercase;
  color: var(--gold-deep); margin: 0 0 1.9rem;
}
.login__card .field { text-align: left; }
.login__card .field label { color: var(--text-2); }
.login__card .field input {
  background: #FBFAF7;
  border-color: rgba(23,23,26,.16);
  color: var(--text);
}
.login__card .field input:focus { border-color: var(--gold); background: #fff; box-shadow: 0 0 0 3px rgba(200,162,94,.18); }
.login__err {
  margin: 0; font-size: .82rem; color: var(--cxl); text-align: left;
}

/* ---------------------------- shell ------------------------------- */
/* Sidebar on a desk machine, tab strip on anything narrower. */

.shell { min-height: 100dvh; display: grid; grid-template-columns: var(--side) 1fr; }

.side {
  display: flex; flex-direction: column;
  background: var(--ink);
  border-right: 1px solid var(--line-ink);
  position: sticky; top: 0; height: 100dvh;
}
.side__brand {
  display: flex; align-items: center; gap: .7rem;
  padding: 1.15rem 1.2rem 1.05rem;
  border-bottom: 1px solid var(--line-ink);
}
.side__brand img { width: 30px; height: auto; flex: none; }
.side__brand span {
  font-family: var(--serif); font-size: 1.12rem; line-height: 1.1;
  color: var(--on-dark);
}
.side__brand small {
  display: block; font-family: var(--sans);
  font-size: .56rem; letter-spacing: .24em; text-transform: uppercase;
  color: var(--gold); margin-top: .15rem;
}

.tabs { display: flex; flex-direction: column; gap: 2px; padding: .7rem .6rem; flex: 1; }
.tabs button {
  display: flex; align-items: center; gap: .65rem;
  padding: .62rem .7rem;
  border-radius: var(--r-sm);
  font-size: .84rem; letter-spacing: .01em;
  /* Brighter than --on-ink-2: this is a primary scan target, not secondary
     text, and the retheme had dimmed it to a borderline 6.2:1. */
  color: #ADAAA0; text-align: left; white-space: nowrap;
  transition: background-color .18s var(--ease), color .18s var(--ease);
}
.tabs button svg {
  width: 17px; height: 17px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
}
.tabs button span { flex: 1; }
.tabs button:hover { background: rgba(231,229,220,.07); color: var(--on-dark); }
.tabs button[aria-selected="true"] {
  background: rgba(200,162,94,.15); color: var(--gold);
  box-shadow: inset 2px 0 0 var(--gold);
}
.tabs .badge {
  display: inline-grid; place-items: center; min-width: 19px; height: 19px;
  padding: 0 5px; font-style: normal;
  background: var(--gold); color: var(--ink);
  border-radius: 10px; font-size: .68rem; font-weight: 500;
}

.side__foot { padding: .8rem; border-top: 1px solid var(--line-ink); }
.side__who { display: flex; align-items: center; gap: .6rem; margin-bottom: .6rem; }
.side__who i {
  display: grid; place-items: center; flex: none;
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(200,162,94,.18); color: var(--gold);
  font-style: normal; font-family: var(--serif); font-size: .95rem; font-weight: 600;
}
.side__who span {
  font-size: .64rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--on-ink-2); line-height: 1.3; min-width: 0;
}
.side__who b {
  display: block; font-family: var(--sans); font-size: .84rem; font-weight: 500;
  letter-spacing: 0; text-transform: none; color: var(--on-dark);
  overflow: hidden; text-overflow: ellipsis;
}
.side__acts { display: flex; gap: .35rem; }
.side__acts button {
  flex: 1; padding: .42rem .5rem;
  border: 1px solid var(--line-ink); border-radius: var(--r-sm);
  font-size: .72rem; color: var(--on-ink-2);
  transition: border-color .2s var(--ease), color .2s var(--ease);
}
.side__acts button:hover { border-color: var(--gold); color: var(--gold); }
.side__install {
  width: 100%; margin-bottom: .45rem; padding: .48rem .5rem;
  border: 1px solid var(--gold); border-radius: var(--r-sm);
  font-size: .74rem; color: var(--gold);
  transition: background .2s var(--ease), color .2s var(--ease);
}
.side__install:hover { background: var(--gold); color: var(--ink); }
.side__install[hidden] { display: none; }

main { padding: clamp(1rem, 2.2vw, 2rem) clamp(1rem, 2.4vw, 2.2rem); min-width: 0; }
.panel { max-width: 1360px; }
.panel[hidden] { display: none; }

@media (max-width: 1000px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side {
    position: static; height: auto;
    border-right: 0; border-bottom: 1px solid var(--line-ink);
    /* A grid item defaults to min-width:auto, so the scrolling tab strip
       would push this column wider than the screen instead of clipping. */
    min-width: 0;
  }
  .tabs { min-width: 0; }
  .side__who { min-width: 0; }
  .side__brand { padding: .8rem 1rem; }
  .tabs {
    flex-direction: row; gap: .2rem; padding: 0 .6rem;
    overflow-x: auto; border-top: 1px solid var(--line-ink);
  }
  .tabs button { border-radius: 0; padding: .7rem .8rem; }
  .tabs button svg { display: none; }
  .tabs button[aria-selected="true"] {
    background: none; box-shadow: inset 0 -2px 0 var(--gold);
  }
  .side__foot {
    display: flex; align-items: center; gap: .8rem;
    padding: .55rem 1rem; border-top: 1px solid var(--line-ink);
  }
  .side__who { margin: 0; flex: 1; }
  .side__acts { flex: none; }
  .side__acts button { padding: .38rem .7rem; }
}

.head {
  display: flex; align-items: center; flex-wrap: wrap; gap: .8rem;
  margin-bottom: 1.1rem;
}
.head h2 { font-size: 1.5rem; }
.head__spacer { flex: 1; }

/* ----------------------------- bits ------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .5rem .9rem;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--white); color: var(--text);
  font-size: .78rem; letter-spacing: .04em;
  white-space: nowrap;          /* "Check out" was wrapping onto two lines */
  transition: border-color .2s var(--ease), background-color .2s var(--ease);
}
.btn--block { width: 100%; }
.btn:hover { border-color: var(--gold); }
.btn--gold { background: var(--gold); border-color: var(--gold); color: var(--ink); font-weight: 500; }
.btn--gold:hover { background: #DFC28C; border-color: #DFC28C; }
.btn--ghost { background: none; }
.btn--sm { padding: .35rem .7rem; font-size: .72rem; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

.field { display: flex; flex-direction: column; gap: .3rem; }
.field label {
  font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; color: var(--text-3);
}
.field input, .field select, .field textarea {
  padding: .55rem .7rem;
  background: var(--white);
  border: 1px solid var(--line); border-radius: var(--r);
  font-size: .9rem;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--gold);
}
.field textarea { resize: vertical; min-height: 70px; }

/* DD/MM/YYYY face over the native date control, which would otherwise render
   in the browser's own locale. The real input stays behind it and still opens
   the OS picker. */
.datefield { position: relative; display: block; }
.datefield input[type="date"] {
  position: absolute; left: 0; bottom: 0;
  width: 1px; height: 1px; padding: 0; margin: 0;
  opacity: 0; border: 0;
}
.datefield__face {
  display: block; width: 100%;
  padding: .55rem .7rem;
  text-align: left;
  background: var(--white);
  border: 1px solid var(--line); border-radius: var(--r);
  font-size: .9rem; font-variant-numeric: tabular-nums;
  color: var(--text);
}
.datefield__face.is-empty { color: var(--text-3); }
.datefield__face:hover { border-color: var(--gold); }
/* start, not stretch: a short list shouldn't inherit the height of the
   tallest card beside it and sit in a pool of empty white. */
.grid { display: grid; gap: .8rem; align-items: start; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }

.card {
  background: var(--white);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  box-shadow: var(--shadow);
}
.card__pad { padding: clamp(.9rem, 2vw, 1.3rem); }

.note {
  padding: .7rem .9rem; margin-bottom: 1rem;
  background: var(--new-bg); border-left: 3px solid var(--new);
  border-radius: 0 var(--r) var(--r) 0;
  font-size: .85rem; color: var(--text-2);
}

/* --------------------------- stat tiles --------------------------- */

.tiles {
  display: grid; gap: .7rem; margin-bottom: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
}
.tile {
  position: relative;
  padding: .95rem 1.05rem 1rem;
  background: var(--white);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  overflow: hidden;
}
/* A hairline of brass rather than a heavy top border: the number should be
   the loudest thing in the tile. */
.tile::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--gold); opacity: .8;
}
.tile__n {
  font-family: var(--serif); font-size: 1.95rem; font-weight: 600; line-height: 1;
  font-variant-numeric: tabular-nums; letter-spacing: -.01em;
}
.tile__l {
  margin-top: .35rem;
  font-size: .64rem; letter-spacing: .15em; text-transform: uppercase; color: var(--text-3);
}
.tile--alert::before { background: var(--new); opacity: 1; }
.tile--alert .tile__n { color: var(--new); }

/* ----------------------------- table ------------------------------ */

.tablewrap { overflow-x: auto; border-radius: var(--r); }
thead th {
  position: sticky; top: 0; z-index: 1;
  padding: .68rem .8rem;
  background: var(--bone-2);
  border-bottom: 1px solid var(--line);
  font-size: .62rem; letter-spacing: .15em; text-transform: uppercase;
  color: var(--text-3); text-align: left; white-space: nowrap; font-weight: 500;
}
tbody td {
  padding: .7rem .8rem;
  border-top: 1px solid var(--line-2);
  font-size: .87rem; vertical-align: middle;
}
tbody tr { background: var(--white); transition: background-color .12s var(--ease); }
tbody tr:first-child td { border-top: 0; }
tbody tr:hover { background: var(--bone-2); }
tbody tr.is-open { background: var(--bone-2); }
.t-ref { font-family: ui-monospace, monospace; font-size: .78rem; color: var(--text-2); }
.t-name { font-weight: 400; }
.t-name small { display: block; color: var(--text-3); font-size: .76rem; }
.t-right { text-align: right; }
.empty { padding: 2.5rem 1rem; text-align: center; color: var(--text-3); }

/* State reads as shape as well as colour, so it survives a mono print. */
.pill {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .2rem .6rem;
  border-radius: 100px;
  font-size: .7rem; letter-spacing: .06em; white-space: nowrap;
  border: 1px solid transparent;
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill--new        { color: var(--new);  background: var(--new-bg);  border-color: color-mix(in srgb, var(--new) 30%, transparent); }
.pill--confirmed  { color: var(--conf); background: var(--conf-bg); border-color: color-mix(in srgb, var(--conf) 30%, transparent); }
.pill--checked_in { color: var(--in);   background: var(--in-bg);   border-color: color-mix(in srgb, var(--in) 30%, transparent); }
.pill--checked_out{ color: var(--out);  background: var(--out-bg);  border-color: color-mix(in srgb, var(--out) 30%, transparent); }
.pill--cancelled,
.pill--no_show    { color: var(--cxl);  background: var(--cxl-bg);  border-color: color-mix(in srgb, var(--cxl) 30%, transparent); }

.rowacts { display: flex; gap: .35rem; justify-content: flex-end; }

/* Let the name column absorb the spare width so "Mahesh Jadhav" doesn't
   wrap while the status and buttons sit in fixed-size cells. */
#arrivals td:first-child,
#departures td:first-child,
#inhouse td:first-child { width: 99%; }
#arrivals td:not(:first-child),
#departures td:not(:first-child),
#inhouse td:not(:first-child) { white-space: nowrap; }

/* ---------------------------- filters ----------------------------- */

.filters {
  display: flex; flex-wrap: wrap; gap: .5rem; align-items: center;
  margin-bottom: 1rem;
}
.filters input[type="search"], .filters select, .filters input[type="date"] {
  padding: .5rem .7rem;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r);
  font-size: .85rem;
}
.filters input[type="search"] { min-width: 220px; }
.chips { display: flex; gap: .3rem; flex-wrap: wrap; }
.chips button {
  padding: .4rem .8rem;
  border: 1px solid var(--line); border-radius: 100px;
  font-size: .74rem; color: var(--text-2);
}
.chips button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--gold); }
:root[data-mode="night"] .chips button[aria-pressed="true"] { background: #2E2820; border-color: #2E2820; }

/* ---------------------------- reports ----------------------------- */

/* One series per chart, so one colour. Checked against the card surface in
   both modes: >= 3:1 contrast, enough chroma not to read as grey. */
:root { --bar: #A3741F; --bar-track: var(--bone-2); }
:root[data-mode="night"] { --bar: #BC8B25; --bar-track: var(--bone-3); }

.rp-filters { align-items: center; }
.rp-dates { display: inline-flex; align-items: center; gap: .35rem; color: var(--text-3); }
.tile__n small { font-size: .55em; color: var(--text-3); font-family: var(--sans); }
.rp-grid { display: grid; gap: 1rem; margin-top: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.rp-title { font-size: 1.1rem; margin: 0; }
.rp-sub { margin: .2rem 0 .9rem; font-size: .8rem; color: var(--text-3); }

.rp-chart { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr); grid-template-rows: 200px auto; column-gap: .4rem; }
.rp-axis { grid-row: 1; display: flex; flex-direction: column; justify-content: space-between;
  font-size: .68rem; color: var(--text-3); text-align: right; margin: -.45em 0; }
.rp-plot { grid-row: 1; position: relative; border-bottom: 1px solid var(--line); }
.rp-plot::before { content: ""; position: absolute; left: 0; right: 0; top: 0; border-top: 1px solid var(--line-2); }
.rp-grid50 { position: absolute; left: 0; right: 0; top: 50%; border-top: 1px solid var(--line-2); }
.rp-avg { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--text-3); pointer-events: none; z-index: 2; }
.rp-avg span { position: absolute; right: 0; bottom: 2px; font-size: .66rem; color: var(--text-2);
  background: var(--white); padding: 0 .25rem; }
.rp-bars { position: absolute; inset: 0; display: flex; align-items: flex-end; gap: 2px; }
.rp-col { flex: 1 1 0; height: 100%; display: flex; align-items: flex-end; cursor: default; min-width: 0; }
.rp-bar { width: 100%; background: var(--bar); border-radius: 4px 4px 0 0; transition: opacity .15s var(--ease); }
.rp-chart.is-focusing .rp-col:not(.is-hot) .rp-bar { opacity: .55; }
.rp-chart:focus { outline: none; }
.rp-chart:focus-visible { outline: 2px solid var(--gold); outline-offset: 6px; border-radius: 4px; }
.rp-xlabels { grid-column: 2; display: flex; gap: 2px; margin-top: .3rem; }
.rp-xlabels span { flex: 1 1 0; min-width: 0; font-size: .64rem; color: var(--text-3); white-space: nowrap; overflow: visible; }
.rp-tip { position: absolute; z-index: 5; pointer-events: none; display: grid; gap: .1rem;
  transform: translateX(-50%); white-space: nowrap;
  padding: .5rem .65rem; border-radius: var(--r-sm); background: var(--ink); color: var(--on-ink);
  font-size: .78rem; box-shadow: var(--shadow-lift); }
.rp-tip strong { color: var(--gold); font-weight: 500; }
.rp-tip::after { content: ""; position: absolute; top: 100%; left: calc(50% + var(--arrow, 0px));
  transform: translateX(-50%); border: 6px solid transparent; border-top-color: var(--ink); }
.rp-table { margin-top: .9rem; font-size: .85rem; }
.rp-table summary { cursor: pointer; color: var(--text-2); font-size: .8rem; }
.rp-table .tablewrap { max-height: 260px; overflow: auto; margin-top: .5rem; }

.rp-hrow { display: grid; grid-template-columns: minmax(110px, 34%) minmax(0, 1fr) auto; gap: .7rem; align-items: center; padding: .45rem 0; }
.rp-hlabel { font-size: .88rem; color: var(--text); }
.rp-hlabel small { display: block; font-size: .72rem; color: var(--text-3); }
.rp-htrack { height: 14px; background: var(--bar-track); border-radius: 4px; overflow: hidden; }
.rp-hbar { height: 100%; background: var(--bar); border-radius: 0 4px 4px 0; }
.rp-hval { font-size: .86rem; color: var(--text); min-width: 76px; text-align: right; }

.rp-total td { border-top: 1px solid var(--line); font-weight: 500; }
.rp-flag { font-size: .78rem; white-space: nowrap; }
.rp-flag--owe { color: var(--new); }
.rp-flag--refund { color: var(--cxl); }

/* --------------------------- calendar ----------------------------- */

.calwrap { overflow-x: auto; }
.calgrid { min-width: 760px; border-collapse: separate; border-spacing: 2px; }
.calgrid th {
  position: static; background: none; padding: .3rem;
  font-size: .6rem; text-align: center; color: var(--text-3);
}
.calgrid th.calgrid__type {
  text-align: left; min-width: 150px; font-size: .68rem; color: var(--text-2);
}
.calgrid td { padding: 0; border: 0; }
/* A heat scale, so a full house is obvious at a glance. The washed-out pastel
   version read as one undifferentiated block of pale green. */
.calcell {
  display: grid; place-items: center;
  height: 36px; border-radius: 5px;
  font-size: .84rem; font-weight: 500;
  font-variant-numeric: tabular-nums;
  background: #D8EBE0; color: #1C5340;
  border: 1px solid #B4D8C4;
}
.calcell--tight { background: #FAE3BC; color: #7A4D0B; border-color: #EDC98D; }
button.calcell { width: 100%; font-family: inherit; cursor: pointer; transition: transform .12s var(--ease), box-shadow .12s var(--ease); }
button.calcell:hover { box-shadow: 0 0 0 2px var(--gold); }
button.calcell:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* One night of one room type */
.night__sum { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: .9rem; }
.night__sum span { padding: .45rem .75rem; border: 1px solid var(--line); border-radius: var(--r); font-size: .82rem; color: var(--text-2); background: var(--white); }
.night__sum b { font-size: 1.05rem; color: var(--text); margin-right: .2rem; }
.night td { vertical-align: middle; padding-top: .55rem; padding-bottom: .55rem; }
.night__no { width: 54px; font-family: var(--serif); font-size: 1.25rem; font-weight: 600; color: var(--text); }
.night__guest { font-weight: 500; font-size: .9rem; }
.night__sub { display: block; font-size: .74rem; color: var(--text-3); margin-top: .15rem; }
.night__h { margin: 1.3rem 0 .2rem; font-size: 1rem; }
.pill--free { background: var(--conf-bg); color: var(--conf); }
.calcell--full  { background: #F3C9C0; color: #8C2A18; border-color: #E3A597; }

:root[data-mode="night"] .calcell { background: #16342A; color: #86D6B0; border-color: #22503F; }
:root[data-mode="night"] .calcell--tight { background: #3B2C11; color: #E8B970; border-color: #5A4319; }
:root[data-mode="night"] .calcell--full  { background: #40190F; color: #F09A83; border-color: #61281A; }
.calgrid td:first-child { font-size: .8rem; padding-right: .5rem; }
.caltype { display: block; padding: .4rem 0; font-size: .84rem; }
.caltype small { display: block; color: var(--text-3); font-size: .72rem; }
.calweekend { opacity: .75; }
.callegend { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: .9rem; font-size: .76rem; color: var(--text-2); }
.callegend span { display: inline-flex; align-items: center; gap: .35rem; }
.callegend i { width: 14px; height: 14px; border-radius: 3px; display: inline-block; }

/* ---------------------------- drawer ------------------------------ */

.drawer {
  position: fixed; inset: 0; z-index: 60;
  display: grid; grid-template-columns: 1fr min(100%, 480px);
}
.drawer[hidden] { display: none; }
.drawer__scrim { background: rgba(10,9,8,.5); }
.drawer__panel {
  background: var(--bone);
  border-left: 1px solid var(--line);
  box-shadow: -20px 0 60px rgba(0,0,0,.25);
  overflow-y: auto;
  padding: 1.4rem;
  animation: slideIn .28s var(--ease);
}
@keyframes slideIn { from { transform: translateX(24px); opacity: 0; } }
.drawer__head { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 1.2rem; }
.drawer__head h3 { font-size: 1.35rem; }
.drawer__x {
  margin-left: auto; width: 32px; height: 32px;
  border: 1px solid var(--line); border-radius: 50%; color: var(--text-2);
  display: grid; place-items: center;
}
.kv { display: grid; grid-template-columns: auto 1fr; gap: .45rem 1rem; font-size: .87rem; margin: 0 0 1.2rem; }
.kv dt { color: var(--text-3); font-size: .78rem; }
.kv dd { margin: 0; }
.steps { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1.2rem; }

/* ------------------------ desk operations ------------------------- */

.ops {
  margin-top: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--white);
}
.ops > summary {
  padding: .7rem .9rem;
  cursor: pointer;
  font-size: .74rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-2);
  list-style: none;
}
.ops > summary::-webkit-details-marker { display: none; }
.ops > summary::before { content: "▸ "; color: var(--gold-deep); }
.ops[open] > summary::before { content: "▾ "; }
.ops[open] > summary { border-bottom: 1px solid var(--line-2); }
.ops__in { padding: .9rem; display: grid; gap: .8rem; }
.ops__row { display: flex; gap: .5rem; align-items: flex-end; }
.ops__row--wrap { flex-wrap: wrap; align-items: center; gap: .8rem; }
.ops__row input, .ops__row select {
  padding: .5rem .6rem; background: var(--white);
  border: 1px solid var(--line); border-radius: var(--r); font-size: .87rem;
}
.ops__row .btn { flex: none; }
/* On a phone the inline widths pushed "Record" and "Add" off the screen. */
@media (max-width: 720px) {
  .ops__row { flex-wrap: wrap; }
  .ops__row input, .ops__row select { flex: 1 1 90px; width: auto !important; min-width: 0; }
}
/* Check-in form */
.ci__lead { margin: 0 0 .4rem; font-size: .86rem; color: var(--text-3); }
.ci__list { list-style: none; margin: 0 0 1.1rem; padding: .7rem .9rem; display: grid; gap: .35rem;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--white); }
.ci__list li { display: flex; align-items: center; gap: .55rem; font-size: .9rem; }
.ci__list li span { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%;
  font-size: .72rem; font-weight: 600; flex: none; }
.ci__list .is-done span { background: #3F7A4A; color: #fff; }
.ci__list .is-need { color: #B4462F; }
.ci__list .is-need span { background: #B4462F; color: #fff; }
.ci__list .is-opt { color: var(--text-3); }
.ci__list .is-opt span { border: 1px solid currentColor; }
.ci__add { align-self: flex-start; cursor: pointer; margin-top: .4rem; }
.ci__acts { display: flex; gap: .6rem; flex-wrap: wrap; }
.ci__acts .btn { flex: 1 1 160px; justify-content: center; }
.ci__acts .btn:disabled { opacity: .5; cursor: not-allowed; }
/* Guests & IDs editor */
.pg { border: 1px solid var(--line); border-radius: var(--r); padding: .75rem .8rem .8rem; margin-bottom: .6rem;
  background: var(--white); display: grid; gap: .55rem; }
.pg__head { display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap; }
.pg__head strong { font-size: .9rem; }
.pg__head small { font-size: .72rem; color: var(--text-3); text-transform: uppercase; letter-spacing: .12em; }
.pg__tag { font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; padding: .1rem .45rem;
  border-radius: 99px; background: rgba(200,162,94,.18); color: var(--gold-deep); }
.pg__x { margin-left: auto; border: 0; background: none; color: #B4462F; font-size: .8rem; cursor: pointer; padding: 0; }
.pg__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .5rem; }
.pg__grid .pg__age { max-width: 110px; }
.pg__grid:first-of-type { grid-template-columns: minmax(0, 1fr) 110px; }
.pg__photos { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.pg__photos .ci__add { margin-top: 0; }
.pg__add { margin-bottom: .6rem; }
@media (max-width: 520px) { .pg__grid { grid-template-columns: minmax(0, 1fr); } .pg__grid .pg__age { max-width: none; } }

.idph { display: flex; gap: .5rem; flex-wrap: wrap; }
.idph__item { position: relative; margin: 0; }
.idph__item img { display: block; width: 96px; height: 68px; object-fit: cover;
  border: 1px solid var(--line); border-radius: var(--r); }
.idph__x { position: absolute; top: -7px; right: -7px; width: 22px; height: 22px; border-radius: 50%;
  border: 0; background: #B4462F; color: #fff; font-size: .9rem; line-height: 1; cursor: pointer; }

.ops__hint { margin: -.3rem 0 0; font-size: .78rem; color: var(--text-3); line-height: 1.5; }
.ops__h {
  margin: .6rem 0 -.3rem; font-size: .72rem;
  letter-spacing: .14em; text-transform: uppercase; color: var(--text-3);
}
.chk { display: inline-flex; align-items: center; gap: .4rem; font-size: .86rem; }

.folio { font-size: .87rem; }
.folio td { padding: .4rem .3rem; border-bottom: 1px solid var(--line-2); }
.folio small { color: var(--text-3); }
.folio tfoot td { border: 0; padding: .25rem .3rem; color: var(--text-2); }
.folio__grand td { border-top: 1px solid var(--line); padding-top: .5rem !important; font-weight: 500; color: var(--text); }
.folio__due td { font-weight: 500; color: var(--gold-deep); font-size: .95rem; }
:root[data-mode="night"] .folio__due td { color: var(--gold); }
.linkx {
  color: var(--text-3); font-size: 1.05rem; line-height: 1; padding: 0 .2rem;
}
.linkx:hover { color: var(--cxl); }

.toast {
  position: fixed; left: 50%; bottom: 1.4rem; transform: translateX(-50%) translateY(20px);
  z-index: 90;
  padding: .7rem 1.2rem;
  background: var(--ink); color: var(--on-ink);
  border-radius: var(--r); box-shadow: 0 12px 40px rgba(0,0,0,.35);
  font-size: .86rem;
  opacity: 0; pointer-events: none;
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.toast.is-on { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast--bad { background: var(--cxl); color: #fff; }

.callegend i {
  width: 16px; height: 16px; border-radius: 4px; display: inline-block;
  border: 1px solid currentColor;
}

/* Small chips for the activity log's key/value details. */
.kvchip {
  display: inline-flex; align-items: baseline; gap: .3rem;
  padding: .1rem .45rem; margin: .1rem .15rem .1rem 0;
  background: var(--bone-2); border: 1px solid var(--line-2);
  border-radius: 100px; font-size: .74rem;
}
.kvchip i { font-style: normal; color: var(--text-3); }

/* ------------------------- responsive ----------------------------- */

@media (max-width: 900px) {
  .top { flex-wrap: wrap; gap: .5rem .8rem; }
  .top__who { order: 3; width: 100%; font-size: .76rem; }
  .tiles { grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: .55rem; }
  .tile { padding: .75rem .8rem; }
  .tile__n { font-size: 1.5rem; }
  .tile__l { font-size: .6rem; letter-spacing: .12em; }
}

@media (max-width: 720px) {
  .drawer { grid-template-columns: 0 1fr; }
  .head h2 { font-size: 1.25rem; }
  main { padding: .8rem; }
  .filters { gap: .4rem; }
  .filters input[type="search"] { min-width: 0; width: 100%; }

  /* Tables become stacked cards: a front desk is often worked from a phone,
     and a horizontally scrolling table is unusable there. */
  .card table, .card thead, .card tbody, .card th, .card td, .card tr { display: block; }
  .card thead { position: absolute; left: -9999px; }
  .card tbody tr {
    margin-bottom: .6rem; padding: .7rem .8rem;
    border: 1px solid var(--line-2); border-radius: var(--r);
    background: var(--white);
  }
  .card tbody td { border: 0; padding: .18rem 0; }
  .card tbody td:empty { display: none; }
  .card tbody td[data-l]::before {
    content: attr(data-l) " ";
    display: inline-block; min-width: 84px;
    font-size: .66rem; letter-spacing: .12em; text-transform: uppercase;
    color: var(--text-3);
  }
  .rowacts { justify-content: flex-start; margin-top: .5rem; flex-wrap: wrap; }
  .t-right { text-align: left; }
  .empty { padding: 1.4rem .5rem; }

  /* The availability grid stays a grid — stacking it would destroy it — but
     it scrolls inside its own card rather than the page. */
  .calwrap { margin-inline: -.2rem; }
  .calgrid { min-width: 620px; }
  .calgrid th.calgrid__type { min-width: 120px; }
}

@media (max-width: 420px) {
  .tabs button { padding: .7rem .65rem; font-size: .68rem; letter-spacing: .1em; }
  .top__brand { font-size: 1.05rem; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ------------------------ Marathi (data-lang="mr") ------------------ */

/* Uppercase-with-wide-tracking is a Latin device. Devanagari has no case, so
   text-transform does nothing at all, while the tracking pulls conjuncts and
   the letters hanging off the headline stroke apart — turning a label into
   loose fragments. Keep a hair of spacing so labels still read as labels. */
[data-lang="mr"] .login__sub,
[data-lang="mr"] .side__brand small,
[data-lang="mr"] .side__who span,
[data-lang="mr"] .field label,
[data-lang="mr"] .tile__l,
[data-lang="mr"] thead th,
[data-lang="mr"] .ops > summary,
[data-lang="mr"] .ops__h,
[data-lang="mr"] .card tbody td[data-l]::before,
[data-lang="mr"] .tabs button { letter-spacing: .03em; }

/* Devanagari sits on a headline stroke and needs more room than the Latin
   setting was spaced for, especially in the dense table rows. */
[data-lang="mr"] body { line-height: 1.55; }
[data-lang="mr"] h1,
[data-lang="mr"] h2,
[data-lang="mr"] h3 { line-height: 1.32; }

/* Devanagari has no italic form; a browser asked for one slants the upright
   glyphs, which reads as a fault rather than as emphasis. */
[data-lang="mr"] em,
[data-lang="mr"] i { font-style: normal; }

/* The language button carries its own script and must not be restyled by the
   rules above — it always shows the language you would switch TO. */
#lang-toggle { letter-spacing: normal; }

/* Marathi words are longer than "Sign out" and were wrapping to two lines in
   the sidebar footer, which pushed the row out of line with the buttons
   beside it. */
.side__acts button { white-space: nowrap; }
[data-lang="mr"] .side__acts { gap: .3rem; }
[data-lang="mr"] .side__acts button { padding-inline: .5rem; font-size: .78rem; }

.nb-hint--bad { color: var(--cxl); }

/* Waiting list */
.wl { border-left: 3px solid var(--new); }
.wl__sub { margin: .2rem 0 0; font-size: .8rem; color: var(--text-3); }
.wl__types { display: block; font-size: .72rem; color: var(--text-3); margin-top: .15rem; }
.wl__state { font-size: .72rem; color: var(--text-3); }
.wl[hidden] { display: none; }
.nb-opt { text-transform: none; letter-spacing: 0; font-size: .74rem; color: var(--text-3); margin-left: .35rem; }
#nb-guests .pg input:disabled { opacity: .75; }
a.btn { text-decoration: none; }

/* Demo bookings card */
.demo { border-left: 3px solid var(--gold); margin-bottom: 1rem; }
.demo[hidden] { display: none; }
.demo__sub { margin: .3rem 0 .8rem; font-size: .84rem; color: var(--text-2); line-height: 1.6; max-width: 70ch; }
.demo__acts { display: flex; gap: .6rem; flex-wrap: wrap; }
.demo__out { margin: .8rem 0 0; font-size: .85rem; color: var(--text-2); line-height: 1.6; }
.demo__out a { color: var(--gold-deep); }

/* ------------------------- small screens ------------------------- */

@media (max-width: 1000px) {
  /* The top bar takes only the height it needs. With two auto rows and a
     full-height shell, a short page shared its spare height with the bar,
     which grew a tall empty band (very visible on Availability). */
  .shell { grid-template-rows: auto 1fr; align-content: start; }
  .tabs { flex: none; }

  /* Footer: who is signed in and the buttons on one line; "Install app",
     when offered, on its own line below rather than squeezing them. */
  .side__foot { flex-wrap: wrap; row-gap: .5rem; }
  .side__who span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .side__install { order: 3; flex: 1 1 100%; width: auto; margin: 0; }

  /* Lists: keep a guest's name on one line beside its buttons. */
  .card td.t-name { min-width: 9.5rem; }
}

@media (max-width: 720px) {
  /* Availability on a phone: the wide grid is swapped for the turned
     table (nights down, room types across), which fits without swiping. */
  .calwrap .calgrid { display: none !important; }
  .card table.calday { display: table; }
  .card .calday thead { display: table-header-group; position: static; left: auto; }
  .card .calday tbody { display: table-row-group; }
  .card .calday tr, .card .calday tbody tr {
    display: table-row; margin: 0; padding: 0; border: 0; background: none; border-radius: 0;
  }
  .card .calday th, .card .calday td { display: table-cell; }
  .card .calday td[data-l]::before { content: none; }
  .card td.t-name { min-width: 0; }
  /* Room type names on the night view and the check-in list stay readable. */
  .side__who b { max-width: 9rem; }
}

/* The turned availability table: phones only. */
.calday { display: none; width: 100%; border-collapse: separate; border-spacing: 3px; table-layout: fixed; }
.calday th { font-size: .7rem; font-weight: 500; color: var(--text-2); text-align: center; padding: .2rem 0 .35rem;
  letter-spacing: .02em; line-height: 1.2; vertical-align: bottom; }
.calday th small { display: block; font-size: .62rem; color: var(--text-3); font-weight: 400; }
.calday .calday__date { width: 68px; text-align: left; padding-left: .2rem; }
.calday tbody th.calday__date b { display: block; font-size: .82rem; font-weight: 500; color: var(--text); }
.calday tbody th.calday__date small { font-size: .66rem; text-transform: uppercase; letter-spacing: .08em; }
.calday td { padding: 0; }
.calday .calcell { width: 100%; height: 38px; }

.calday tr.calday--today th.calday__date b { color: var(--gold-deep); }
@media (max-width: 720px) {
  .calday { display: table; }
}
.card .calday thead th { background: none; border: 0; text-transform: none; letter-spacing: 0;
  font-size: .74rem; padding: .2rem 0 .4rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .calday thead th.calday__date { text-align: left; }
.calday tr.calday--we th.calday__date small { color: var(--gold-deep); }

/* The chart's hover box sets display:grid, which beat the [hidden]
   attribute: an empty box and its arrow showed as a black blob in the
   corner of Reports (very visible on iPhone). Hidden means hidden. */
.rp-tip[hidden] { display: none !important; }

/* "hidden" always wins. A component's own display (buttons are
   inline-flex, boxes are grid) otherwise overrides the [hidden] attribute,
   and a thing meant to be hidden shows up anyway — an empty chart tooltip
   on Reports, a stray Cancel button under Rooms & Rates. */
[hidden] { display: none !important; }

/* -------------------------- room status board -------------------------- */
/* Tile colours carry a label as well, so meaning never rests on colour alone. */
:root {
  --rt-clean-bg: #D9EFDF; --rt-clean-fg: #1C5A39; --rt-clean-bd: #9FD1B0;
  --rt-dirty-bg: #FFF1B8; --rt-dirty-fg: #6A5200; --rt-dirty-bd: #E8CF6A;
  --rt-occ-bg: #F6D3CC;  --rt-occ-fg: #8C2A18;  --rt-occ-bd: #E2A497;
  --rt-arr-bg: #DCE8F7;  --rt-arr-fg: #22507F;  --rt-arr-bd: #A9C4E6;
  --rt-ooo-bg: #E4E3DE;  --rt-ooo-fg: #5F5E58;  --rt-ooo-bd: #C9C7BF;
  --rt-late: #B4231A;
}
:root[data-mode="night"] {
  --rt-clean-bg: #133A26; --rt-clean-fg: #8FDCB0; --rt-clean-bd: #23573A;
  --rt-dirty-bg: #3E3410; --rt-dirty-fg: #F0D36B; --rt-dirty-bd: #5E4F17;
  --rt-occ-bg: #44201A;  --rt-occ-fg: #F4A493;  --rt-occ-bd: #6A3026;
  --rt-arr-bg: #172D47;  --rt-arr-fg: #9CC3F0;  --rt-arr-bd: #284A70;
  --rt-ooo-bg: #2A2A30;  --rt-ooo-fg: #9A99A2;  --rt-ooo-bd: #3C3C44;
  --rt-late: #E0473B;
}
.board__live { display: inline-flex; align-items: center; gap: .35rem; font-size: .76rem; color: var(--text-3); }
.board__live i { width: 8px; height: 8px; border-radius: 50%; background: #2F9E5B; box-shadow: 0 0 0 3px rgba(47,158,91,.2); }
.board__alert { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .6rem; margin-bottom: .6rem;
  padding: .65rem .9rem; border-radius: var(--r); border: 1px solid; font-size: .86rem; }
.board__alert strong { font-size: .95rem; margin-right: .3rem; }
.board__alert button { padding: .3rem .6rem; border-radius: 99px; border: 1px solid currentColor; background: var(--white); color: inherit; font-size: .8rem; cursor: pointer; }
.board__alert small { opacity: .8; }
.board__alert--late { background: var(--rt-occ-bg); color: var(--rt-late); border-color: var(--rt-occ-bd); }
.board__alert--due { background: var(--rt-dirty-bg); color: var(--rt-dirty-fg); border-color: var(--rt-dirty-bd); }
.board__counts { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.bc { display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .65rem; border: 1px solid var(--line);
  border-radius: 99px; background: var(--white); font-size: .78rem; color: var(--text-2); }
.bc b { color: var(--text); font-size: .9rem; }
.bc--total { background: var(--bone-2); }
.bc__sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; border: 1px solid; flex: none; }
.bc__sw--free_clean { background: var(--rt-clean-bg); border-color: var(--rt-clean-fg); }
.bc__sw--free_dirty { background: var(--rt-dirty-bg); border-color: var(--rt-dirty-fg); }
.bc__sw--occupied { background: var(--rt-occ-bg); border-color: var(--rt-occ-fg); }
.bc__sw--occupied_dirty { background: linear-gradient(135deg, var(--rt-occ-bg) 50%, var(--rt-dirty-bg) 50%); border-color: var(--rt-occ-fg); }
.bc__sw--arriving { background: var(--rt-arr-bg); border-color: var(--rt-arr-fg); }
.bc__sw--leaving { background: #F7C58A; border-color: #9A5A12; }
.bc__sw--out_of_order { background: var(--rt-ooo-bg); border-color: var(--rt-ooo-fg); }
.bc__sw--late { background: var(--rt-late); border-color: var(--rt-late); }

.board__layout { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 1rem; align-items: start; }
.board__type { margin-bottom: 1rem; }
.board__type h3 { font-size: 1.1rem; margin: 0 0 .7rem; }
.board__type h3 small { font-family: var(--sans); font-size: .76rem; font-weight: 400; color: var(--text-3); margin-left: .3rem; }
.board__tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: .5rem; }
.rt { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: .15rem; min-height: 74px;
  padding: .5rem .55rem; border-radius: 8px; border: 1px solid; text-align: left; cursor: pointer; font: inherit;
  transition: transform .12s var(--ease), box-shadow .12s var(--ease); }
.rt:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,.08); }
.rt:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
/* Plain lining figures: the serif's old-style numerals made 101 read "IOI". */
.rt b { font-family: var(--sans); font-size: 1.15rem; line-height: 1; font-weight: 600; font-variant-numeric: tabular-nums lining-nums; letter-spacing: .01em; }
.rt__who { font-size: .74rem; line-height: 1.2; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rt__ms { display: flex; flex-wrap: wrap; gap: .2rem; margin-top: auto; }
.rt__m { font-style: normal; font-size: .62rem; padding: .05rem .3rem; border-radius: 4px; background: rgba(0,0,0,.08); white-space: nowrap; }
.rt__m--late { background: var(--rt-late); color: #fff; }
.rt__m--due { background: #F7C58A; color: #5A3405; }
.rt--free_clean { background: var(--rt-clean-bg); color: var(--rt-clean-fg); border-color: var(--rt-clean-bd); }
.rt--free_dirty { background: var(--rt-dirty-bg); color: var(--rt-dirty-fg); border-color: var(--rt-dirty-bd); }
.rt--occupied { background: var(--rt-occ-bg); color: var(--rt-occ-fg); border-color: var(--rt-occ-bd); }
.rt--arriving { background: var(--rt-arr-bg); color: var(--rt-arr-fg); border-color: var(--rt-arr-bd); }
.rt--out_of_order { background: repeating-linear-gradient(135deg, var(--rt-ooo-bg) 0 8px, transparent 8px 14px), var(--rt-ooo-bg);
  color: var(--rt-ooo-fg); border-color: var(--rt-ooo-bd); }
.rt--late { box-shadow: inset 0 0 0 2px var(--rt-late); }
.board__side h4 { margin: 0 0 .25rem; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); font-weight: 500; }
.board__side p { margin: 0 0 1rem; font-size: .9rem; }
.board__side small { color: var(--text-3); }
.board__link { display: block; border: 0; background: none; padding: .15rem 0; color: var(--gold-deep); cursor: pointer; font: inherit; font-size: .88rem; text-align: left; }
.board__legend { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; font-size: .8rem; color: var(--text-2); }
.board__legend li { display: flex; align-items: center; gap: .45rem; }
.room1 { display: flex; align-items: baseline; gap: .8rem; padding: .9rem 1rem; border-radius: var(--r); border: 1px solid; margin-bottom: 1rem; }
.room1 b { font-family: var(--sans); font-size: 1.7rem; line-height: 1; font-weight: 600; font-variant-numeric: lining-nums; }
.room1__acts { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .8rem; }
.room1__acts .btn { flex: 1 1 140px; justify-content: center; }
.room1__h { margin: .4rem 0 .4rem; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); font-weight: 500; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1rem; margin: 0 0 1rem; font-size: .9rem; }
.kv dt { color: var(--text-3); font-size: .8rem; }
.kv dd { margin: 0; }
@media (max-width: 1000px) {
  .board__layout { grid-template-columns: minmax(0, 1fr); }
  .board__side { order: -1; display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
  .board__side .board__legend, .board__side h4:last-of-type { display: none; }
}
@media (max-width: 520px) {
  .board__tiles { grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: .4rem; }
  .rt { min-height: 66px; padding: .4rem .45rem; }
  .rt b { font-size: 1.05rem; }
  .board__counts .bc { font-size: .72rem; padding: .3rem .55rem; }
}

/* ------------------------------ accounts ------------------------------ */
.ac-views { margin-bottom: .8rem; }
.ac-period { align-items: center; }
.ac-period input[type="date"] { padding: .45rem .6rem; border: 1px solid var(--line); border-radius: var(--r); background: var(--white); }
.ac-h { font-size: 1.05rem; margin: 1.2rem 0 .5rem; }
.tile--key { box-shadow: inset 0 0 0 2px var(--gold); }
.ac-add { margin-bottom: 1rem; }
.ac-add__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .7rem; margin: .6rem 0 .9rem; align-items: end; }
.ac-open { margin-bottom: 1rem; }
.ac-open summary { cursor: pointer; font-size: .9rem; color: var(--text-2); }

/* The spreadsheet: grid lines, a frozen header, numbers right-aligned in
   lining figures, scrolling inside its own box both ways like a sheet. */
.sheet__bar { display: flex; align-items: center; gap: .7rem; margin-bottom: .5rem; }
.sheet__bar input { flex: 1; max-width: 340px; padding: .5rem .7rem; border: 1px solid var(--line); border-radius: var(--r); background: var(--white); font-size: .86rem; }
.sheet__count { font-size: .78rem; color: var(--text-3); }
.sheet { overflow: auto; max-height: 70vh; border: 1px solid var(--line); border-radius: var(--r); background: var(--white); }
.sheet table { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 760px; font-size: .82rem; }
.card .sheet table, .sheet table { display: table; }
.sheet thead { display: table-header-group; position: static; left: auto; }
.sheet tbody { display: table-row-group; }
.sheet tfoot { display: table-footer-group; }
.sheet tr { display: table-row; margin: 0; padding: 0; border: 0; background: none; border-radius: 0; }
.sheet th, .sheet td { display: table-cell; padding: .4rem .6rem; border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); white-space: nowrap; text-align: left; }
.sheet td[data-l]::before { content: none; }
.sheet thead th { position: sticky; top: 0; z-index: 2; background: var(--bone-2); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-2); font-weight: 500; cursor: pointer; user-select: none; }
.sheet thead th:hover { color: var(--text); }
.sheet tfoot td { position: sticky; bottom: 0; background: var(--bone-2); font-weight: 600; border-top: 2px solid var(--line); }
.sheet .num { text-align: right; font-variant-numeric: tabular-nums lining-nums; }
.sheet tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--bone-2) 45%, transparent); }
.sheet tbody tr:hover td { background: color-mix(in srgb, var(--gold) 12%, transparent); }
.sheet__wide { white-space: normal !important; min-width: 220px; }
.sheet__link { cursor: pointer; }
.sheet__exp td:nth-child(3) { color: var(--cxl); }
.sheet__ref td:nth-child(3) { color: var(--new); }
.sheet__due td:last-child { color: var(--cxl); font-weight: 600; }
.sheet .empty { text-align: center; color: var(--text-3); padding: 1.4rem; white-space: normal; }

/* Profit & loss statement */
.pnl table { width: 100%; border-collapse: collapse; display: table; }
.pnl tr { display: table-row; margin: 0; padding: 0; border: 0; background: none; }
.pnl td { display: table-cell; padding: .5rem 1.1rem; border-bottom: 1px solid var(--line-2); }
.pnl td small { color: var(--text-3); }
.pnl .num { text-align: right; font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; }
.pnl__h td { background: var(--bone-2); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-2); font-weight: 500; }
.pnl__t td { font-weight: 600; }
.pnl__p td { font-weight: 700; font-size: 1.05rem; border-top: 2px solid var(--text); }
@media (max-width: 720px) {
  .ac-period { flex-wrap: wrap; }
  .sheet { max-height: 65vh; }
}

.rp-mbar { display: inline-block; width: 60px; height: 8px; margin-right: .5rem; vertical-align: middle; border-radius: 4px;
  background: linear-gradient(90deg, var(--bar) var(--w), var(--bar-track) var(--w)); }

/* Corporate bookings */
.corp { border: 1px dashed var(--line, #d9d2c3); border-radius: 10px; padding: .7rem .8rem .2rem; }
.corp__hint:empty { display: none; }
.co-link { font: inherit; color: var(--gold-deep); text-decoration: underline; text-underline-offset: 2px; text-align: left; padding: 0; }
.co-head .ops__hint { margin: .3rem 0 0; }
.folio__co td { font-size: .86em; color: var(--muted, #6b6457); }
#co-back { margin-right: .5rem; }

/* Vouchers and OTAs */
.vch-link { font-size: .8em; color: var(--gold-deep); text-decoration: underline; text-underline-offset: 2px; padding: 0; }
.sheet__con td { color: var(--gold-deep); }
.ac-vtypes { margin-bottom: .8rem; }
.ota-card .ops__hint { margin: .3rem 0 .6rem; }
.ota-on { color: #2F6B57; }

/* ---------------------------- inventory ---------------------------- */
.inv-stores { margin: .2rem 0 .8rem; }
.inv-help { color: var(--text-3); font-size: .85rem; margin: .3rem 0 .4rem; }
.inv-qty { width: 6.5rem; text-align: right; padding: .35rem .5rem; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--white); color: var(--text); font: inherit; }
.inv-low td { background: var(--new-bg); }
.inv-on td { background: var(--conf-bg); }
.inv-neg { color: var(--cxl); } .inv-pos { color: var(--conf); }
.inv-total { font-weight: 600; margin: 0 0 .7rem; min-height: 1.2em; }
.inv-check { display: flex !important; align-items: center; gap: .4rem; text-transform: none !important; letter-spacing: 0 !important; }
#panel-inventory .sheet table { min-width: 620px; }
