/* Hotel Management System: shared design tokens and components */
:root {
  --ink-900: #0B2F33; --ink-800: #103F44; --ink-700: #165258; --ink-600: #1F6A70;
  --brass: #C4923A; --brass-d: #9C7020; --brass-l: #D9AE5B;
  --bg: #F1F5F5; --surface: #fff; --line: #DCE6E6; --line-strong: #C3D3D3;
  --text: #1B2B2D; --muted: #5B7073;
  --ring: 0 0 0 3px rgba(196, 146, 58, .28);
  --font-ui: 'Manrope', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; }
svg { flex: none; }
body { font-family: var(--font-ui); font-size: 14.5px; line-height: 1.5; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
.font-display { font-family: var(--font-display); letter-spacing: -.01em; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }

/* Surfaces */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 1px 2px rgba(11, 47, 51, .04), 0 4px 14px -8px rgba(11, 47, 51, .10); }

/* Forms */
.lbl { display: block; font-size: .8rem; font-weight: 600; color: var(--muted); margin-bottom: .3rem; }
.inp { width: 100%; min-height: 2.5rem; border: 1px solid var(--line-strong); border-radius: 10px; padding: .5rem .8rem; font-size: .9rem; color: var(--text); background: #fff; transition: border-color .15s, box-shadow .15s; }
.inp::placeholder { color: #8DA1A3; }
.inp:hover { border-color: #A9BEBE; }
.inp:focus { outline: none; border-color: var(--brass); box-shadow: var(--ring); }
select.inp { padding-right: 2rem; }
textarea.inp { min-height: 4.5rem; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 2.5rem; padding: .45rem 1rem; border-radius: 10px; font-weight: 600; font-size: .875rem; line-height: 1.2; cursor: pointer; border: 1px solid transparent; transition: background-color .15s, border-color .15s, box-shadow .15s, transform .05s; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--ink-800); color: #fff; }
.btn-primary:hover { background: var(--ink-700); }
.btn-gold { background: var(--brass); color: var(--ink-900); }
.btn-gold:hover { background: var(--brass-l); }
.btn-ghost { background: #fff; border-color: var(--line-strong); color: var(--ink-800); }
.btn-ghost:hover { background: #F4F8F8; border-color: #A9BEBE; }
.btn-danger { background: #B42318; color: #fff; }
.btn-danger:hover { background: #912018; }
.btn.\!py-1 { min-height: 2rem; font-size: .8rem; padding-left: .7rem; padding-right: .7rem; }

/* Tables */
table.tbl { width: 100%; font-size: .875rem; border-collapse: collapse; }
table.tbl th { text-align: left; font-weight: 600; font-size: .78rem; color: var(--muted); background: #F6F9F9; padding: .7rem .9rem; white-space: nowrap; border-bottom: 1px solid var(--line); }
table.tbl td { padding: .7rem .9rem; border-top: 1px solid #EBF1F1; vertical-align: middle; }
table.tbl tbody tr:first-child td { border-top: 0; }
table.tbl tbody tr:hover { background: #F8FBFB; }

/* Status badges (markup from status_badge()) */
span.rounded-full.text-xs { display: inline-flex; align-items: center; gap: .35rem; padding: .15rem .6rem; font-weight: 600; }
span.rounded-full.text-xs::before { content: ""; width: .4rem; height: .4rem; border-radius: 50%; background: currentColor; opacity: .75; }

/* App shell */
.sidebar { background: linear-gradient(180deg, var(--ink-900), #082428); color: #C9DEDF; }
.brand-mark { width: 2.5rem; height: 2.5rem; border-radius: 12px; display: grid; place-items: center; background: var(--brass); color: var(--ink-900); font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; flex: none; }
.nav-link { position: relative; display: flex; align-items: center; gap: .75rem; padding: .6rem .85rem; border-radius: 10px; font-size: .9rem; font-weight: 500; color: #B7CFD0; transition: background-color .15s, color .15s; }
.nav-link:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav-link.is-active { background: rgba(255, 255, 255, .1); color: #fff; font-weight: 600; }
.nav-link.is-active::before { content: ""; position: absolute; left: -.75rem; top: .45rem; bottom: .45rem; width: 3px; border-radius: 0 3px 3px 0; background: var(--brass); }
.nav-link.is-active svg { color: var(--brass-l); }
.topbar { background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.avatar { width: 2.25rem; height: 2.25rem; border-radius: 50%; display: grid; place-items: center; background: var(--ink-800); color: #fff; font-weight: 700; font-size: .8rem; flex: none; }
.page-title { font-family: var(--font-display); font-size: 1.35rem; font-weight: 600; color: var(--ink-900); letter-spacing: -.01em; }

/* Stat tiles */
.stat { display: flex; gap: .9rem; align-items: center; padding: 1rem 1.1rem; }
.stat .chip { width: 2.6rem; height: 2.6rem; border-radius: 12px; display: grid; place-items: center; flex: none; }
.stat .k { font-size: .78rem; font-weight: 600; color: var(--muted); }
.stat .v { font-size: 1.4rem; font-weight: 700; color: var(--ink-900); line-height: 1.2; word-break: break-word; }
.tone-ink { background: #E3EEEE; color: var(--ink-700); }
.tone-green { background: #DDF3E7; color: #17794A; }
.tone-rose { background: #FDE4E4; color: #B42318; }
.tone-amber { background: #FBEFD3; color: #9C7020; }
.tone-sky { background: #DFEEFB; color: #1F6FB2; }
.tone-slate { background: #E8EDEE; color: #40575A; }

/* Flash + toasts */
.flash { display: flex; gap: .6rem; align-items: flex-start; }

/* Login (this page does not load Tailwind, so sizes are set here) */
.login svg { width: 1.25rem; height: 1.25rem; }
.login-brand li svg { width: 1.1rem; height: 1.1rem; }
.login-brand h1, .login-card h2 { margin: 0; }
.login-card p, .login-brand p { margin-bottom: 0; }
.login form { margin: 0; }
html.login-page { font-size: 15px; }
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr); }
.login-brand { display: none; position: relative; overflow: hidden; color: #fff; padding: 3rem 3.25rem; background:
  radial-gradient(circle at 15% 10%, rgba(217, 174, 91, .22), transparent 42%),
  radial-gradient(circle at 90% 95%, rgba(31, 106, 112, .55), transparent 45%),
  linear-gradient(160deg, var(--ink-800), var(--ink-900)); }
.login-brand::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .035) 0 1px, transparent 1px 26px); pointer-events: none; }
.login-brand > * { position: relative; z-index: 1; }
.login-main { display: grid; place-items: center; padding: 2rem 1.25rem; background: var(--bg); }
.login-card { width: 100%; max-width: 24.5rem; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 2rem 1.9rem 1.75rem; box-shadow: 0 18px 40px -22px rgba(11, 47, 51, .45); }
.login-card h2 { font-family: var(--font-display); font-size: 1.55rem; font-weight: 600; color: var(--ink-900); line-height: 1.2; }
.field { margin-top: 1.1rem; }
.field > label { display: block; font-size: .875rem; font-weight: 600; color: var(--ink-800); margin-bottom: .4rem; }
.ctl { position: relative; }
.ctl > svg.lead { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); width: 1.15rem; height: 1.15rem; color: #6F8A8C; pointer-events: none; }
.ctl input { width: 100%; height: 2.9rem; padding: 0 2.9rem 0 2.6rem; font-size: 1rem; color: var(--text); background: #fff; border: 1px solid var(--line-strong); border-radius: 12px; transition: border-color .15s, box-shadow .15s; }
.ctl input:focus { outline: none; border-color: var(--brass); box-shadow: var(--ring); }
.ctl .toggle { position: absolute; right: .35rem; top: 50%; transform: translateY(-50%); width: 2.2rem; height: 2.2rem; display: grid; place-items: center; border: 0; background: transparent; color: #6F8A8C; border-radius: 8px; cursor: pointer; }
.ctl .toggle:hover { background: #EEF4F4; color: var(--ink-800); }
.login-submit { width: 100%; height: 2.95rem; margin-top: 1.4rem; border: 0; border-radius: 12px; background: var(--ink-800); color: #fff; font-size: 1rem; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: .5rem; transition: background-color .15s; }
.login-submit:hover { background: var(--ink-700); }
.login-alert { display: flex; gap: .6rem; padding: .7rem .85rem; border-radius: 10px; font-size: .9rem; margin-top: 1.1rem; }
.login-alert.err { background: #FEF0EF; color: #912018; border: 1px solid #F8CFCB; }
.login-alert.ok { background: #E8F6EE; color: #17623F; border: 1px solid #BFE6D0; }
@media (min-width: 960px) {
  .login { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
  .login-brand { display: flex; flex-direction: column; justify-content: space-between; }
}

@media print { .no-print { display: none !important; } body { background: #fff; } .card { box-shadow: none; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
