/* PROACTIVE Reports portal — mobile first. Colours follow the PROACTIVE.RMS UI standard. */
:root {
    --navy: #1A2B5F;
    --blue: #0D6EFD;
    --guest: #0B5ED7;
    --ready: #198754;
    --dirty: #B02A37;
    --blocked: #FFC107;
    --maint: #6C757D;
    --bg: #EEF2F7;
    --card: #FFFFFF;
    --line: #DDE3EA;
    --line2: #C6CED8;
    --text: #1F2937;
    --muted: #5C6670;
    --tint: #EAF2FF;
    --tint-line: #B6D4FE;
    --radius: 12px;
    --font: 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; -webkit-text-size-adjust: 100%; }
a { color: var(--blue); }
button, input, select { font: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
h1 { font-size: 17px; margin: 0; }
h2 { margin: 0; }
.muted { color: var(--muted); font-size: 13px; }
.small { font-size: 12px; }

/* ---------- signed-in shell ---------- */
.shell { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; max-width: 560px; margin: 0 auto; background: var(--bg); }
.top {
    background: var(--navy); color: #fff; display: flex; align-items: center; gap: 10px;
    padding: calc(12px + env(safe-area-inset-top)) 10px 12px 16px; position: sticky; top: 0; z-index: 5;
}
.brand { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.brand .kicker { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; opacity: .85; }
.brand .hotel { font-size: 17px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.userchip { font-size: 12px; color: #fff; text-decoration: none; background: rgba(255,255,255,.14); border-radius: 999px; padding: 6px 10px; max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.signout { margin: 0; }
.iconbtn { width: 44px; height: 44px; border: 0; border-radius: 10px; background: transparent; color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.content { flex: 1; padding: 12px 14px 20px; display: flex; flex-direction: column; gap: 12px; }

.tabs {
    position: sticky; bottom: 0; display: grid; background: #fff; border-top: 1px solid var(--line);
    padding: 6px 8px calc(8px + env(safe-area-inset-bottom));
}
.tab { height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--muted); text-decoration: none; font-size: 12px; }
.tab.active { color: var(--navy); font-weight: 700; }

/* ---------- page parts ---------- */
.page-head { display: flex; align-items: center; gap: 8px; }
.page-head .titles { flex: 1; display: flex; flex-direction: column; }
.page-head .sub { font-size: 12px; color: var(--muted); }
.toolbtn { width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--tint-line); background: var(--tint); color: var(--blue); display: flex; align-items: center; justify-content: center; cursor: pointer; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 1px 3px rgba(26,43,95,.06); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.row-between { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.section { font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.section.pad { margin: 6px 2px 0; color: var(--muted); font-size: 12px; }

.alert { background: #FDECEE; border: 1px solid #F1AEB5; color: #58151C; border-radius: 10px; padding: 10px 12px; font-size: 14px; line-height: 1.4; }
.alert.warn { background: #FFF6DB; border-color: #F5D77A; color: #4D3B00; }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); display: flex; flex-direction: column; gap: 10px; align-items: center; }
.empty h1 { color: var(--text); }
.loading { padding: 40px; text-align: center; color: var(--muted); }

/* occupancy */
.occ .big { font-size: 40px; font-weight: 800; color: var(--navy); line-height: 1; }
.bar { height: 10px; border-radius: 999px; background: #E3E8EF; overflow: hidden; }
.bar > div { height: 10px; border-radius: 999px; background: var(--guest); }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 8px; display: flex; flex-direction: column; gap: 4px; }
.kpi i { width: 10px; height: 10px; border-radius: 3px; display: block; }
.kpi b { font-size: 22px; font-variant-numeric: tabular-nums; }
.kpi span { font-size: 12px; color: var(--muted); }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line2); background: #fff; color: var(--text); font-size: 13px; cursor: pointer; display: inline-flex; align-items: center; }
.chip.on { background: var(--navy); border-color: var(--navy); color: #fff; font-weight: 700; }
.chips.small .chip { height: 28px; padding: 0 10px; font-size: 12px; }

.floor { display: flex; flex-direction: column; gap: 6px; }
.floor h2 { font-size: 12px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); }
.rooms { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.room { height: 52px; border-radius: 8px; border: 0; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; cursor: pointer; padding: 0; }
.room b { font-size: 15px; font-variant-numeric: tabular-nums; }
.room span { font-size: 11px; }
.room.sel { outline: 3px solid var(--navy); outline-offset: 1px; }
.room.small { width: 52px; height: 44px; flex: none; cursor: default; }
.s-g { background: var(--guest); color: #fff; }
.s-r { background: var(--ready); color: #fff; }
.s-d { background: var(--dirty); color: #fff; }
.s-b { background: var(--blocked); color: #1F2937; }
.s-m { background: var(--maint); color: #fff; }
.detail { flex-direction: row; align-items: center; gap: 12px; }
.detail-text { display: flex; flex-direction: column; gap: 2px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--muted); }
.legend span { display: flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }

/* check-in / out */
.datebar { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 4px; }
.datebar span { flex: 1; text-align: center; font-size: 14px; font-weight: 700; }
.navbtn { width: 44px; height: 40px; border: 0; background: transparent; color: var(--navy); display: flex; align-items: center; justify-content: center; cursor: pointer; border-radius: 8px; }
.navbtn:disabled { color: #B8C0CA; cursor: default; }
.seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; background: var(--line); border-radius: 10px; padding: 4px; }
.seg button { height: 56px; border-radius: 8px; border: 0; background: transparent; color: #374151; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.seg button b { font-size: 20px; font-variant-numeric: tabular-nums; }
.seg button span { font-size: 12px; }
.seg button.on { background: #fff; color: var(--navy); box-shadow: 0 1px 3px rgba(26,43,95,.15); }
.sumrow { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); padding: 0 2px; }
.sumrow b { color: var(--text); }
.item { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; align-items: center; gap: 12px; }
.tile { width: 52px; height: 44px; flex: none; border-radius: 8px; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; }
.tile.arr { background: var(--navy); }
.tile.dep { background: var(--ready); }
.tile.inh { background: var(--guest); }
.item .mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.item .mid b { font-size: 15px; }
.item .mid span, .item .end span { font-size: 12px; color: var(--muted); }
.item .end { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; }
.item .end b { font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.none { text-align: center; color: var(--muted); font-size: 14px; margin: 16px 0; }
.privacy { font-size: 12px; color: var(--muted); text-align: center; margin: 4px 0 0; }

/* forms / buttons */
.form { display: flex; flex-direction: column; gap: 14px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.form input[type=text], .form input[type=password], .form input[type=email], .form input:not([type]) {
    height: 48px; border: 1px solid var(--line2); border-radius: 10px; padding: 0 14px; font-size: 16px; color: var(--text); background: #fff; width: 100%;
}
.form input.code { letter-spacing: .4em; font-size: 22px; text-align: center; font-variant-numeric: tabular-nums; }
.form fieldset.pages { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px 12px; display: flex; flex-direction: column; gap: 8px; }
.form fieldset legend { font-size: 13px; color: var(--muted); padding: 0 4px; }
.form label.check { flex-direction: row; align-items: center; gap: 10px; color: var(--text); font-size: 15px; min-height: 36px; }
.form label.check input { width: 20px; height: 20px; }
.btn { min-height: 44px; border-radius: 10px; border: 1px solid var(--line2); background: #fff; color: var(--text); font-weight: 600; padding: 0 14px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.btn.primary { height: 50px; background: var(--ready); border-color: var(--ready); color: #fff; font-size: 16px; font-weight: 700; }
.btn.danger { color: #A1202D; border-color: #E8A3AB; }
.btnrow { display: flex; flex-wrap: wrap; gap: 8px; }
.link { font-size: 14px; text-align: center; }

/* admin */
.user.off { opacity: .7; }
.who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.badges { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.badge { font-size: 11px; font-weight: 700; border-radius: 999px; padding: 3px 8px; white-space: nowrap; }
.badge.navy { background: var(--navy); color: #fff; }
.badge.red { background: #FDECEE; color: #A1202D; }
.badge.amber { background: #FFF6DB; color: #4D3B00; }
.badge.grey { background: #EEF0F3; color: #374151; }
.notice { border-color: var(--tint-line); background: var(--tint); }
.copy { white-space: pre-wrap; background: #fff; border: 1px dashed var(--tint-line); border-radius: 8px; padding: 10px; font-size: 14px; margin: 0; user-select: all; font-family: ui-monospace, Consolas, monospace; }
.log { display: flex; flex-direction: column; }
.logrow { display: grid; grid-template-columns: 110px 1fr auto; gap: 4px 10px; font-size: 13px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.logrow .muted { grid-column: 2 / 4; font-size: 12px; }
.logrow .ok { color: var(--ready); font-weight: 600; }
.logrow .bad { color: #A1202D; font-weight: 600; }

/* ---------- sign-in pages ---------- */
.auth { min-height: 100vh; min-height: 100dvh; max-width: 480px; margin: 0 auto; display: flex; flex-direction: column; }
.auth-hero { background: var(--navy); color: #fff; padding: calc(40px + env(safe-area-inset-top)) 24px 40px; display: flex; flex-direction: column; gap: 10px; }
.logo-row { display: flex; align-items: center; gap: 10px; }
.logo { width: 40px; height: 40px; border-radius: 10px; background: #fff; color: var(--navy); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 17px; }
.logo-text { display: flex; flex-direction: column; }
.logo-text .kicker { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; opacity: .85; }
.logo-text .big { font-size: 20px; font-weight: 700; }
.hotel-name { margin-top: 14px; font-size: 22px; font-weight: 700; }
.auth-card { margin: -18px 16px 0; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 4px 14px rgba(26,43,95,.10); padding: 22px 18px; display: flex; flex-direction: column; gap: 16px; }
.auth-card .muted { margin: 0; font-size: 14px; line-height: 1.45; }
.hint { display: flex; gap: 10px; align-items: flex-start; background: var(--tint); border: 1px solid var(--tint-line); border-radius: 10px; padding: 10px 12px; font-size: 13px; line-height: 1.4; }
.hint svg { flex: none; margin-top: 1px; }
.auth-foot { margin-top: auto; padding: 24px; display: flex; flex-direction: column; gap: 8px; align-items: center; text-align: center; font-size: 13px; color: var(--muted); }

/* Blazor reconnect box: keep it small and calm */
#components-reconnect-modal { font-family: var(--font); }

@media (min-width: 600px) {
    .shell { border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
}
