/* Easy Hotel Manager - design system v2
   Ink (app bar) + lobby blue (primary) + marigold (the one action colour).
   Type: Lexend (bundled) - chosen for easy reading by front-desk staff. */
@font-face { font-family: "Lexend"; src: url("fonts/lexend-latin.woff2") format("woff2"); font-weight: 100 900; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Lexend"; src: url("fonts/lexend-latin-ext.woff2") format("woff2"); font-weight: 100 900; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --ehm-ink: #16233f;
  --ehm-primary: #2447a8;
  --ehm-primary-dark: #1a347d;
  --ehm-accent: #f2a20c;          /* marigold */
  --ehm-accent-dark: #d98e00;
  --ehm-paper: #f3f5fa;
  --ehm-line: #e1e5ee;
  --ehm-muted: #67708a;
  --ehm-tab-h: 62px;
  --bs-primary: #2447a8;
  --bs-primary-rgb: 36, 71, 168;
  --bs-link-color: #2447a8;
  --bs-link-color-rgb: 36, 71, 168;
  --bs-link-hover-color: #1a347d;
  --bs-body-font-family: "Lexend", "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif;
  --bs-body-color: #1d2740;
  --bs-border-color: #e1e5ee;
  --bs-border-radius: 10px;
}
html { -webkit-text-size-adjust: 100%; }
body { background: var(--ehm-paper); font-weight: 350; -webkit-tap-highlight-color: transparent; overscroll-behavior-y: contain; }
.fw-semibold, .fw-bold, strong, th { font-weight: 600 !important; }
h1, h2, h3, .h5, .h6 { font-weight: 600; letter-spacing: -.01em; }
:focus-visible { outline: 3px solid rgba(242, 162, 12, .7); outline-offset: 2px; }

/* ---------- buttons and inputs (touch friendly, 16px text stops iOS zoom) ---------- */
.btn { min-height: 44px; border-radius: 10px; font-weight: 500; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.btn-sm { min-height: 36px; border-radius: 8px; }
.btn-lg { min-height: 52px; border-radius: 12px; }
.btn-primary { --bs-btn-bg: var(--ehm-primary); --bs-btn-border-color: var(--ehm-primary); --bs-btn-hover-bg: var(--ehm-primary-dark); --bs-btn-hover-border-color: var(--ehm-primary-dark); --bs-btn-active-bg: var(--ehm-primary-dark); --bs-btn-active-border-color: var(--ehm-primary-dark); --bs-btn-disabled-bg: #8a9bd0; --bs-btn-disabled-border-color: #8a9bd0; }
.btn-outline-primary { --bs-btn-color: var(--ehm-primary); --bs-btn-border-color: #b9c5ea; --bs-btn-hover-bg: var(--ehm-primary); --bs-btn-hover-border-color: var(--ehm-primary); --bs-btn-active-bg: var(--ehm-primary); --bs-btn-active-border-color: var(--ehm-primary); }
.btn-accent { background: var(--ehm-accent); border-color: var(--ehm-accent); color: var(--ehm-ink); font-weight: 600; }
.btn-accent:hover, .btn-accent:focus, .btn-accent:active { background: var(--ehm-accent-dark) !important; border-color: var(--ehm-accent-dark) !important; color: var(--ehm-ink) !important; }
.form-control, .form-select { min-height: 46px; border-radius: 10px; border-color: #cfd6e6; font-size: 1rem; }
textarea.form-control { min-height: 92px; }
.form-control:focus, .form-select:focus { border-color: var(--ehm-primary); box-shadow: 0 0 0 3px rgba(36, 71, 168, .15); }
.form-label { font-size: .86rem; color: #3b4662; margin-bottom: 4px; font-weight: 500; }
input[type=checkbox] { width: 1.3em; height: 1.3em; vertical-align: -3px; accent-color: var(--ehm-primary); }

/* ---------- shell ---------- */
.ehm-topbar { background: var(--ehm-ink); min-height: 56px; padding-top: env(safe-area-inset-top); z-index: 1030; }
.ehm-topbar .navbar-brand { font-size: 1.05rem; font-weight: 600; letter-spacing: -.01em; }
.ehm-keytag { width: 30px; height: 34px; border-radius: 7px; background: var(--ehm-accent); position: relative; flex: 0 0 auto; margin-right: 10px; }
.ehm-keytag::before { content: ""; position: absolute; left: 50%; top: 5px; width: 7px; height: 7px; margin-left: -3.5px; border-radius: 50%; background: var(--ehm-ink); }
.ehm-sidebar { background: #fff; border-right: 1px solid var(--ehm-line); }
@media (min-width: 992px) {
  .ehm-sidebar.offcanvas-lg { background-color: #fff !important; width: 248px; min-width: 248px; height: calc(100vh - 56px); position: sticky; top: 56px; align-self: flex-start; overflow-y: auto; }
}
.ehm-sidebar .nav-link { color: #2b3550; border-radius: 10px; padding: 9px 12px; font-size: .95rem; margin-bottom: 2px; font-weight: 450; display: flex; align-items: center; gap: 10px; position: relative; }
.ehm-sidebar .nav-link i { font-size: 1.1rem; color: var(--ehm-muted); width: 22px; text-align: center; }
.ehm-sidebar .nav-link:hover { background: var(--ehm-paper); color: var(--ehm-ink); }
.ehm-sidebar .nav-link.active { background: #e9eefb; color: var(--ehm-primary-dark); font-weight: 600; }
.ehm-sidebar .nav-link.active i { color: var(--ehm-primary); }
.ehm-sidebar .nav-link.active::before { content: ""; position: absolute; left: -8px; top: 9px; bottom: 9px; width: 4px; border-radius: 0 4px 4px 0; background: var(--ehm-accent); }
.ehm-nav-group { font-size: .74rem; color: var(--ehm-muted); padding: 14px 12px 4px; font-weight: 500; }
.ehm-main { min-width: 0; }
.ehm-install { display: none; }
.ehm-install.show { display: flex; }

/* bottom tab bar: the mobile / tablet "app" navigation */
.ehm-tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1035; background: #fff; border-top: 1px solid var(--ehm-line); display: flex;
  padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -6px 18px rgba(22, 35, 63, .06); }
.ehm-tabbar .tab { flex: 1 1 0; min-width: 0; height: var(--ehm-tab-h); border: 0; background: none; color: var(--ehm-muted); text-decoration: none; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px; font-size: .7rem; font-weight: 500; position: relative; padding: 0 2px; }
.ehm-tabbar .tab i { font-size: 1.35rem; line-height: 1; }
.ehm-tabbar .tab span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ehm-tabbar .tab.active { color: var(--ehm-primary); font-weight: 600; }
.ehm-tabbar .tab.active::before { content: ""; position: absolute; top: 0; left: 28%; right: 28%; height: 3px; border-radius: 0 0 4px 4px; background: var(--ehm-accent); }
@media (max-width: 991.98px) {
  body.has-tabbar { padding-bottom: calc(var(--ehm-tab-h) + env(safe-area-inset-bottom)); }
  .ehm-main { padding: 14px 12px 20px !important; }
  .ehm-sidebar.offcanvas-lg { width: min(86vw, 330px); }
  .ehm-sidebar .offcanvas-header { background: var(--ehm-ink); color: #fff; padding-top: calc(14px + env(safe-area-inset-top)); }
  .ehm-sidebar .offcanvas-header .btn-close { filter: invert(1); opacity: .9; }
}
@media (min-width: 992px) { .ehm-tabbar { display: none; } }

/* busy bar shown while a form posts */
.ehm-busy { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--ehm-accent); z-index: 2000; opacity: 0; }
.ehm-busy.on { opacity: 1; width: 85%; transition: width 8s cubic-bezier(.1, .7, .2, 1); }

/* ---------- content ---------- */
.card { border: 1px solid var(--ehm-line); border-radius: 14px; box-shadow: none; }
.card > .table-responsive:first-child, .card > .table-responsive:last-child { border-radius: 14px; }
.page-title { font-size: 1.4rem; font-weight: 600; color: var(--ehm-ink); letter-spacing: -.02em; }
.stat-card .card-body { padding: 14px 16px; }
.stat-card .stat-label { font-size: .8rem; color: var(--ehm-muted); }
.stat-card .stat-value { font-size: 1.55rem; font-weight: 600; color: var(--ehm-ink); line-height: 1.15; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat-card .stat-icon { width: 42px; height: 42px; min-width: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.25rem; background: #e9eefb; color: var(--ehm-primary); }
.stat-card .stat-icon.accent { background: #fdf0d3; color: #9a6400; }
.table { --bs-table-hover-bg: #f6f8fd; }
.table > :not(caption) > * > * { vertical-align: middle; padding: .7rem .8rem; }
.table thead th { font-size: .8rem; color: var(--ehm-muted); white-space: nowrap; background: #f8f9fc; border-bottom-color: var(--ehm-line); }
.badge { font-weight: 500; border-radius: 999px; padding: .4em .7em; }
.alert { border-radius: 12px; border: 0; }
.list-group-item { border-color: var(--ehm-line); padding: 12px 16px; }
.thumb { width: 96px; height: 72px; object-fit: cover; border-radius: 10px; border: 1px solid var(--ehm-line); }
.status-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; }

/* room tiles are drawn as key tags: the product's signature element */
.room-tile { display: block; border-radius: 14px; padding: 20px 6px 10px; color: #fff; text-align: center; text-decoration: none; min-height: 92px; border: 3px solid transparent; position: relative; }
.room-tile::before { content: ""; position: absolute; top: 7px; left: 50%; width: 9px; height: 9px; margin-left: -4.5px; border-radius: 50%; background: rgba(255, 255, 255, .85); }
.room-tile:hover, .room-tile:focus { color: #fff; filter: brightness(1.07); }
.room-tile .room-no, .room-tile .room-meta { text-shadow: 0 1px 2px rgba(0, 0, 0, .35); }   /* keeps white text readable on light status colours */
.room-tile.selected { border-color: var(--ehm-ink); box-shadow: 0 0 0 2px #fff inset; }
.room-tile .room-no { font-size: 1.3rem; font-weight: 600; line-height: 1.15; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.room-tile .room-meta { font-size: .72rem; opacity: .95; }

.wizard-step { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--ehm-line); }
.wizard-step:last-child { border-bottom: 0; }
.wizard-num { width: 38px; height: 38px; min-width: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 600; background: #e9eefb; color: var(--ehm-primary); }
.wizard-num.done { background: #1e8e5a; color: #fff; }

.cal-table { border-collapse: separate; border-spacing: 0; font-size: .8rem; }
.cal-table th, .cal-table td { border: 1px solid var(--ehm-line); padding: 0; text-align: center; min-width: 46px; height: 38px; }
.cal-table th { background: #f8f9fc; font-weight: 600; padding: 4px; }
.cal-table .cal-room { position: sticky; left: 0; background: #fff; min-width: 92px; text-align: left; padding: 4px 8px; font-weight: 600; z-index: 1; }
.cal-table td a { display: block; height: 38px; line-height: 38px; color: #fff; text-decoration: none; overflow: hidden; font-size: .7rem; }
.cal-Pending { background: #f2a20c; } .cal-Pending a { color: #16233f !important; }
.cal-Confirmed { background: #2447a8; }
.cal-CheckedIn { background: #1e8e5a; }
.cal-CheckedOut { background: #8a93a6; }
.cal-today { background: #fdf6e3 !important; }
.bill-table td { padding: 4px 0; font-variant-numeric: tabular-nums; }
.bill-table .bill-total td { border-top: 2px solid var(--ehm-ink); font-weight: 600; font-size: 1.15rem; padding-top: 8px; }
.report-table td, .report-table th { white-space: nowrap; font-variant-numeric: tabular-nums; }
.report-table tfoot td { font-weight: 600; border-top: 2px solid var(--ehm-ink); }

/* ---------- phone: tables become cards, forms and titles tighten ---------- */
@media (max-width: 575.98px) {
  .page-title { font-size: 1.2rem; }
  .card-body { padding: 14px; }
  .stat-card .card-body { flex-direction: column; align-items: flex-start !important; gap: 8px !important; }
  .stat-card .stat-value { font-size: 1.25rem; white-space: nowrap; }
  .stat-card .stat-icon { width: 34px; height: 34px; min-width: 34px; font-size: 1rem; border-radius: 10px; }
  table.ehm-stack thead { display: none; }
  table.ehm-stack, table.ehm-stack tbody, table.ehm-stack tr { display: block; width: 100%; }
  table.ehm-stack tr { padding: 12px 14px; border-bottom: 8px solid var(--ehm-paper); }
  table.ehm-stack tr:last-child { border-bottom: 0; }
  table.ehm-stack td { display: grid; grid-template-columns: 38% 1fr; column-gap: 12px; border: 0 !important; padding: 3px 0 !important; text-align: right; white-space: normal !important; }
  table.ehm-stack td::before { content: attr(data-label); grid-column: 1; grid-row: 1 / span 6; text-align: left; color: var(--ehm-muted); font-size: .8rem; font-weight: 400; }
  table.ehm-stack td > * { grid-column: 2; }
  table.ehm-stack td:first-child { display: block; text-align: left; font-size: 1.05rem; padding-bottom: 6px !important; }
  table.ehm-stack td:first-child::before { display: none; }
  table.ehm-stack td.cell-action { display: block; text-align: left; padding-top: 8px !important; }
  table.ehm-stack td.cell-action::before { display: none; }
  table.ehm-stack td.cell-action .btn { width: 100%; }
  table.ehm-stack td.cell-empty { display: none; }
  .ehm-topbar .btn-outline-light span { display: none; }
}

/* ---------- sign-in screens ---------- */
.auth-wrap { min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 16px; padding-top: calc(16px + env(safe-area-inset-top)); background: var(--ehm-ink); }
.auth-card { width: 100%; max-width: 440px; border: 0; border-radius: 18px; }
.auth-card.wide { max-width: 780px; }
.brand-mark { color: var(--ehm-ink); font-weight: 600; font-size: 1.35rem; letter-spacing: -.02em; display: flex; align-items: center; }
.brand-mark span:not(.ehm-keytag) { color: var(--ehm-primary); margin-left: .28em; }
.auth-split { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: 1fr; grid-template-rows: auto 1fr; background: var(--ehm-ink); }
.auth-side { color: #fff; padding: calc(28px + env(safe-area-inset-top)) 24px 20px; }
.auth-side h1 { font-size: 1.6rem; line-height: 1.2; margin: 14px 0 6px; }
.auth-side p { color: #b9c3dc; margin: 0; }
.auth-points { display: none; }
.auth-form { background: #fff; border-radius: 22px 22px 0 0; padding: 26px 22px calc(26px + env(safe-area-inset-bottom)); }
@media (min-width: 992px) {
  .auth-split { grid-template-columns: 1.1fr 1fr; grid-template-rows: 1fr; }
  .auth-side { padding: 64px 56px; display: flex; flex-direction: column; justify-content: center; }
  .auth-side h1 { font-size: 2.4rem; max-width: 12em; }
  .auth-points { display: grid; grid-template-columns: repeat(3, 76px); gap: 12px; margin-top: 36px; }
  .auth-points .room-tile { min-height: 84px; cursor: default; }
  .auth-form { border-radius: 0; display: flex; flex-direction: column; justify-content: center; padding: 56px; }
  .auth-form > div { max-width: 400px; width: 100%; }
}

@media print {
  .ehm-topbar, .ehm-sidebar, .ehm-tabbar, .ehm-busy, .no-print, .alert { display: none !important; }
  .ehm-main { padding: 0 !important; }
  body { background: #fff !important; padding: 0 !important; }
  .card { border: 0 !important; }
  .table-responsive { overflow: visible !important; }
}
@media (prefers-reduced-motion: reduce) { .ehm-busy.on { transition: none; } }

/* stacked-card cells: value on the right, heading on the left */
@media (max-width: 575.98px) {
  table.ehm-stack td { justify-items: end; }
  table.ehm-stack td::before { justify-self: start; }
}

/* dashboard quick actions */
.ehm-quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.ehm-quick-item { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px; border-radius: 14px; background: #fff; border: 1px solid var(--ehm-line);
  color: var(--ehm-ink); text-decoration: none; font-size: .78rem; font-weight: 500; text-align: center; line-height: 1.2; }
.ehm-quick-item:hover { border-color: #b9c5ea; color: var(--ehm-primary-dark); }
.ehm-quick-icon { width: 46px; height: 46px; border-radius: 50%; background: var(--ehm-ink); color: var(--ehm-accent); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; }
@media (min-width: 768px) { .ehm-quick { grid-template-columns: repeat(8, 1fr); } }

/* booking: room picker with an editable rate per room */
.ehm-roompick { border: 1px solid var(--ehm-line); border-radius: 12px; overflow: hidden; background: #fff; }
.ehm-roompick-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--ehm-line); }
.ehm-roompick-row:last-child { border-bottom: 0; }
.ehm-roompick-room { display: flex; align-items: center; gap: 12px; margin: 0; flex: 1 1 auto; min-width: 0; cursor: pointer; }
.ehm-roompick-room strong { font-size: 1.1rem; margin-right: 4px; }
.ehm-roompick-rate { flex: 0 0 132px; text-align: right; }
.ehm-roompick-rate .form-control { text-align: right; font-variant-numeric: tabular-nums; font-weight: 500; }

/* UPI payment QR on the bill */
.ehm-upi { display: flex; align-items: center; gap: 14px; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--ehm-line); }
.ehm-upi svg { flex: 0 0 auto; border: 1px solid var(--ehm-line); border-radius: 10px; }
/* printable room QR cards */
.qr-sheet { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.qr-card { border: 2px solid var(--ehm-ink); border-radius: 16px; padding: 14px; text-align: center; background: #fff; break-inside: avoid; }
.qr-card .qr-room { font-size: 1.6rem; font-weight: 600; letter-spacing: -.02em; }
.qr-card .qr-hotel { font-size: .8rem; color: var(--ehm-muted); }
.qr-card .qr-text { font-size: .85rem; margin-top: 6px; font-weight: 500; }
@media print { .qr-sheet { grid-template-columns: repeat(3, 1fr); } .page-title { display: none; } }
