:root {
    --brand: #0f4c4a;
    --brand-2: #176663;
    --accent: #c99a2e;
    --sidebar-bg: #0b3433;
    --ground: #f4f6f7;
}
body { background: var(--ground); font-size: 0.95rem; }
.topbar { background: var(--brand); color: #fff; height: 56px; position: sticky; top: 0; z-index: 1030; }
.topbar .brand { color: #fff; font-weight: 600; font-size: 1.05rem; }
.brand-logo { height: 34px; width: auto; border-radius: 4px; background: #fff; }
.app-body { min-height: calc(100vh - 56px); }
.sidebar { background: var(--sidebar-bg) !important; width: 250px; min-width: 250px; }
@media (min-width: 992px) { .sidebar { position: sticky; top: 56px; height: calc(100vh - 56px); overflow-y: auto; } }
.sidebar.offcanvas-lg { --bs-offcanvas-bg: var(--sidebar-bg); --bs-offcanvas-color: #fff; }
.sidebar .nav-link { color: #c9d8db; padding: .55rem 1.1rem; border-left: 3px solid transparent; }
.sidebar .nav-link:hover { color: #fff; background: rgba(255,255,255,.06); }
.sidebar .nav-link.active { color: #fff; background: rgba(255,255,255,.1); border-left-color: var(--accent); }
.sidebar .nav-link .bi { width: 1.4rem; display: inline-block; }
.sidebar .sub .nav-link { padding-left: 2.9rem; font-size: .9rem; }
.sidebar .nav-link .chev { transition: transform .2s; }
.sidebar .nav-link.collapsed .chev { transform: rotate(-90deg); }
.content { min-width: 0; }
.page-title { font-size: 1.4rem; font-weight: 600; color: var(--brand); margin-bottom: 1rem; }
.card { border: 1px solid #e1e6e8; box-shadow: none; }
.card-header { background: #fff; font-weight: 600; }
.stat { border-radius: .5rem; background: #fff; border: 1px solid #e1e6e8; padding: 1rem 1.1rem; }
.stat .v { font-size: 1.6rem; font-weight: 700; color: var(--brand); line-height: 1.2; }
.stat .l { color: #5c6b70; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.btn-primary { --bs-btn-bg: var(--brand); --bs-btn-border-color: var(--brand); --bs-btn-hover-bg: var(--brand-2); --bs-btn-hover-border-color: var(--brand-2); --bs-btn-active-bg: var(--brand-2); }
.table thead th { background: #eef3f4; color: #23424a; font-weight: 600; white-space: nowrap; }
.table td, .table th { vertical-align: middle; }
.avatar { width: 40px; height: 40px; object-fit: cover; border-radius: 50%; background: #dfe7e9; }
.photo-lg { width: 120px; height: 140px; object-fit: cover; border-radius: .4rem; background: #dfe7e9; }
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(160deg, var(--brand) 0%, #062221 100%); }
.login-card { width: 100%; max-width: 400px; }
.sheet { background: #fff; border: 1px solid #e1e6e8; padding: 1.2rem; }
.sheet-head { text-align: center; border-bottom: 2px solid var(--brand); margin-bottom: 1rem; padding-bottom: .6rem; }
.sheet-head img { height: 64px; }
.sheet-head h2 { font-size: 1.3rem; margin: .2rem 0; color: var(--brand); }
.small-muted { font-size: .8rem; color: #6c757d; }
@media print {
    @page { margin: 10mm; }
    body { background: #fff; }
    .no-print, .topbar, .sidebar, .alert { display: none !important; }
    .content { padding: 0 !important; }
    .sheet { border: 0; padding: 0; }
    .card { border: 0; }
    .page-title { display: none; }
    .table thead th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .page-break { page-break-after: always; break-after: page; }
}

/* copyright */
.content { display: flex; flex-direction: column; }
.app-footer { margin-top: auto; padding-top: 1.5rem; text-align: center; font-size: .8rem; color: #6c757d; }
.login-wrap { position: relative; }
.login-copy { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; font-size: .8rem; color: rgba(255,255,255,.75); }
@media print { .app-footer { padding-top: .5rem; font-size: 7pt; } }

/* analytical dashboard */
.dash-h { font-size: 1.05rem; font-weight: 700; color: #23424a; margin: .25rem 0 .75rem; padding-bottom: .35rem; border-bottom: 1px solid #e1e6e8; }
.chart-title { font-size: .95rem; font-weight: 600; color: #23424a; margin: 0; }
.chart-sub { font-size: .78rem; color: #5c6b70; margin-bottom: .5rem; }
.chart-box { position: relative; width: 100%; }
.bar-track { height: 6px; background: #eef1f2; border-radius: 3px; overflow: hidden; margin-top: 4px; }
.bar-track > span { display: block; height: 100%; background: #2a78d6; border-radius: 0 3px 3px 0; }
@media print { details { display: none; } .chart-box { break-inside: avoid; } .card { break-inside: avoid; } }

/* profit & loss statement */
.pnl td, .pnl th { padding-top: .35rem; padding-bottom: .35rem; }
.pnl .pnl-sec th { background: #f4f7f8; color: #23424a; font-size: .8rem; letter-spacing: .04em; padding-top: .6rem; }
.pnl .pnl-tot th { border-top: 1.5px solid #23424a; }
.pnl .pnl-bal th { background: #eef3f4; }
.pnl .pnl-net th { font-size: 1.05rem; border-top: 2px solid #23424a; border-bottom: 3px double #23424a; }
.pnl .pnl-net.is-profit th { color: #0b7a0b; }
.pnl .pnl-net.is-loss th { color: #b42f2f; }
.bar-track.exp > span { background: #eb6834; }
.stat .v { overflow-wrap: anywhere; }
@media (max-width: 575.98px) { .stat .v { font-size: 1.2rem; } .stat { padding: .75rem .8rem; } }
.pnl-tiles .stat .v { font-size: 1.3rem; white-space: nowrap; }
@media (max-width: 575.98px) { .pnl-tiles .stat .v { font-size: 1.05rem; } }

/* print / export toolbar on every report and list */
.print-head { display: none; }
.page-tools .btn { white-space: nowrap; }
@media print {
    .print-head { display: block; text-align: center; border-bottom: 2px solid var(--brand); margin-bottom: 10px; padding-bottom: 6px; }
    .print-head .ph-school { font-size: 15pt; font-weight: 700; color: var(--brand); }
    .print-head .ph-title { font-size: 12pt; font-weight: 600; text-transform: uppercase; }
    .print-head .ph-meta { font-size: 8pt; color: #555; }
    body:has(.sheet-head) .print-head, body:has(.no-print-head) .print-head { display: none; }
    .page-tools, .title-row .btn { display: none !important; }
    main form[method="get"], main form[method="GET"], main .btn { display: none !important; }
    .print-head .ph-filters { font-size: 9pt; margin-top: 2px; }
    table .btn, table form, table .form-check, .card-header .btn, .card-body > form .btn { display: none !important; }
    table input.form-control, table select.form-select { border: 0; padding: 0; background: transparent; appearance: none; }
    a { color: inherit !important; text-decoration: none !important; }
    .table-responsive { overflow: visible !important; }
    .card { box-shadow: none; }
    .collapse:not(.show) { display: none !important; }
    tr.collapse { display: none !important; }
}

/* Mifugo */
.daily-table input { min-width: 85px; }
.daily-table td.unit { color: #6c757d; font-size: .8rem; white-space: nowrap; }
.kpi-good { color: #1e7b34; } .kpi-bad { color: #b02a37; }
.stock-low { background: #fff1f0 !important; }

/* ===================== phones & tablets ===================== */
.bottom-nav { display: none; }
@media (max-width: 991.98px) {
    .bottom-nav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1035; background: #fff; border-top: 1px solid #d9e0e5;
        box-shadow: 0 -2px 10px rgba(0,0,0,.06); padding-bottom: env(safe-area-inset-bottom); }
    .bottom-nav a, .bottom-nav button { flex: 1; text-align: center; color: #5c6b70; font-size: .7rem; padding: .45rem 0 .4rem; text-decoration: none; background: none; border: 0; line-height: 1.1; }
    .bottom-nav .bi { display: block; font-size: 1.35rem; margin-bottom: 2px; }
    .bottom-nav .active { color: var(--brand); font-weight: 600; }
    .bottom-nav .pos-link .bi { color: #fff; background: var(--brand); border-radius: 50%; width: 42px; height: 42px; line-height: 42px; margin: -14px auto 2px; font-size: 1.3rem; box-shadow: 0 2px 6px rgba(0,0,0,.2); }
    .content { padding-bottom: 84px !important; }
    .app-footer { padding-bottom: .5rem; }
}
@media (max-width: 575.98px) {
    body { font-size: .9rem; }
    .content { padding: .75rem !important; padding-bottom: 84px !important; }
    .page-title { font-size: 1.2rem; margin-bottom: .5rem; }
    .title-row { margin-bottom: .25rem; }
    .page-tools .btn { padding: .2rem .5rem; font-size: .8rem; }
    .topbar .brand span { max-width: 52vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; vertical-align: middle; }
    /* no zoom on iPhone when typing */
    .form-control, .form-select, .input-group-text { font-size: 16px; }
    .form-control-sm, .form-select-sm { font-size: 15px; }
    .card-header { padding: .5rem .75rem; }
    .card-body { padding: .75rem; }
    .stat { padding: .65rem .75rem; }
    .stat .l { font-size: .7rem; }
    .table { font-size: .85rem; }
    .table td, .table th { padding: .4rem .45rem; }
    .sheet { padding: .75rem; }
    .btn-lg { padding: .5rem 1rem; font-size: 1.05rem; }
    /* filter forms: two fields per row */
    form.row.g-2 > .col-auto { flex: 1 1 45%; }
    form.row.g-2 > .col-auto .form-control, form.row.g-2 > .col-auto .form-select { width: 100%; }
    form.row.g-2 > .col-auto.align-self-end { flex-basis: 100%; }
}
/* wide tables: keep the first column visible while scrolling sideways */
@media (max-width: 767.98px) {
    .table-responsive { position: relative; }
    .table-responsive > .table > thead > tr > th:first-child, .table-responsive > .table > tbody > tr > td:first-child, .table-responsive > .table > tfoot > tr > *:first-child {
        position: sticky; left: 0; z-index: 1; background: #fff; box-shadow: 1px 0 0 #e1e6e8; max-width: 44vw; }
    .table-responsive > .table > thead > tr > th:first-child { background: #eef3f4; }
    .table-responsive > .table > tbody > tr.stock-low > td:first-child { background: #fff1f0; }
    .table-responsive.scrolls::after { content: '\2194  swipe'; position: absolute; right: 6px; bottom: 4px; font-size: .65rem; color: #fff; background: rgba(31,78,121,.75); padding: 1px 6px; border-radius: 8px; pointer-events: none; }
    .table-responsive.scrolled::after { display: none; }
}
/* item lines in forms (production, sale, transfer): one card per line on phones */
@media (max-width: 575.98px) {
    table.lines thead { display: none; }
    table.lines tbody tr { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem .6rem; padding: .65rem 2.4rem .65rem .75rem; border-bottom: 1px solid #e1e6e8; position: relative; }
    table.lines tbody td { display: block; border: 0; padding: 0 !important; text-align: left !important; }
    table.lines tbody td:first-child { grid-column: 1 / -1; position: static; max-width: none; box-shadow: none; }
    table.lines tbody td[data-label]::before { content: attr(data-label); display: block; font-size: .7rem; color: #6c757d; text-transform: uppercase; letter-spacing: .03em; }
    table.lines tbody td:last-child { position: absolute; top: .6rem; right: .6rem; }
    table.lines tbody td:last-child .del { font-size: 1.4rem; }
    table.lines tbody td:empty { display: none; }
    table.lines tfoot tr { display: flex; justify-content: space-between; padding: .5rem .75rem; }
    table.lines tfoot th, table.lines tfoot td { border: 0; padding: 0; }
    table.lines tfoot th:empty, table.lines tfoot td:empty { display: none; }
}
@media (max-width: 767.98px) {
    .lines-wrap > .table > tbody > tr > td:first-child, .lines-wrap > .table > thead > tr > th:first-child, .lines-wrap > .table > tfoot > tr > *:first-child { position: static; box-shadow: none; max-width: none; }
    .lines-wrap.scrolls::after { display: none; }
}

/* ---- login page with Nesatech information ---- */
.login-wrap { flex-direction: column; gap: 1.25rem; padding-top: 2rem !important; padding-bottom: 1rem !important; }
.login-grid { display: flex; gap: 1.5rem; align-items: stretch; justify-content: center; width: 100%; max-width: 900px; }
.login-grid .login-card { flex: 0 0 400px; align-self: center; }
.login-copy { position: static !important; }
.nesa-card { flex: 1 1 0; min-width: 0; max-width: 470px; color: #fff; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); border-radius: .75rem; padding: 1.25rem 1.4rem; }
.nesa-brand { font-size: 1.35rem; font-weight: 700; letter-spacing: .02em; }
.nesa-brand .bi { margin-right: .25rem; }
.nesa-lead { font-size: .9rem; color: rgba(255,255,255,.82); margin: .35rem 0 .9rem; }
.nesa-products { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .55rem; }
.nesa-products li { display: flex; gap: .65rem; align-items: flex-start; padding: .5rem .6rem; border-radius: .5rem; }
.nesa-products li.is-current { background: rgba(255,255,255,.12); }
.nesa-products .bi { font-size: 1.25rem; line-height: 1.2; opacity: .9; }
.nesa-products b { font-size: .95rem; }
.nesa-products span:not(.nesa-tag) { display: block; font-size: .8rem; color: rgba(255,255,255,.75); line-height: 1.35; }
.nesa-tag { font-size: .68rem; background: #fff; color: #222; border-radius: 1rem; padding: 0 .45rem; margin-left: .25rem; vertical-align: 1px; }
.nesa-demo { border-top: 1px solid rgba(255,255,255,.2); padding-top: .9rem; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.nesa-demo-title { width: 100%; font-weight: 600; font-size: .95rem; }
.nesa-btn { display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .8rem; border-radius: .45rem; font-size: .88rem; font-weight: 600; text-decoration: none; }
.nesa-wa { background: #25d366; color: #0b2e17; }
.nesa-wa:hover { background: #1fbd5a; color: #0b2e17; }
.nesa-mail { background: #fff; color: #1d2b36; }
.nesa-mail:hover { background: #e9eef3; color: #1d2b36; }
@media (max-width: 860px) {
    .login-grid { flex-direction: column; align-items: center; }
    .login-grid .login-card { flex: none; width: 100%; max-width: 400px; }
    .nesa-card { width: 100%; max-width: 400px; padding: 1rem; }
}

/* ---- Hoteli: room board ---- */
.room-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; }
.room-tile { display: block; position: relative; border-radius: .5rem; border: 1px solid #d4dcdc; border-left-width: 6px; background: #fff; padding: .55rem .7rem .6rem; color: #1d2b2b; text-decoration: none; min-height: 104px; }
.room-tile:hover { box-shadow: 0 2px 8px color-mix(in srgb, var(--brand) 18%, transparent); color: #1d2b2b; }
.room-tile .no { font-size: 1.35rem; font-weight: 700; line-height: 1.1; }
.room-tile .ty { font-size: .75rem; color: #5c6b70; }
.room-tile .who { font-size: .82rem; font-weight: 600; margin-top: .3rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room-tile .when { font-size: .74rem; color: #5c6b70; }
.room-tile .hk { position: absolute; top: .5rem; right: .55rem; font-size: .7rem; }
.room-tile.st-vacant { border-left-color: #2e9d62; }
.room-tile.st-occupied { border-left-color: var(--brand); background: color-mix(in srgb, var(--brand) 9%, white); }
.room-tile.st-arriving { border-left-color: #2a78d6; background: #eef4fd; }
.room-tile.st-departing { border-left-color: #d98a00; background: #fff6e5; }
.room-tile.st-ooo { border-left-color: #7b8585; background: repeating-linear-gradient(135deg, #f3f4f4 0 8px, #e9ebeb 8px 16px); }
.room-legend { display: flex; flex-wrap: wrap; gap: .4rem 1rem; font-size: .82rem; }
.room-legend span::before { content: ""; display: inline-block; width: .8rem; height: .8rem; border-radius: 2px; margin-right: .3rem; vertical-align: -1px; }
.room-legend .st-vacant::before { background: #2e9d62; } .room-legend .st-occupied::before { background: var(--brand); } .room-legend .st-arriving::before { background: #2a78d6; }
.room-legend .st-departing::before { background: #d98a00; } .room-legend .st-ooo::before { background: #7b8585; }
.hk-dirty { color: #b02a37; } .hk-clean { color: #2e9d62; } .hk-inspected { color: #2a78d6; }
/* availability calendar */
.cal-wrap { overflow-x: auto; }
.cal { border-collapse: separate; border-spacing: 0; font-size: .78rem; }
.cal th, .cal td { border-right: 1px solid #e3e8e8; border-bottom: 1px solid #e3e8e8; padding: 0; height: 30px; min-width: 38px; text-align: center; }
.cal th.rm { position: sticky; left: 0; background: #fff; z-index: 2; min-width: 90px; text-align: left; padding: 0 .5rem; }
.cal thead th { background: #f4f7f7; font-weight: 600; padding: .2rem; position: sticky; top: 0; }
.cal thead th.we { background: #eaf0f0; }
.cal td.bk { color: #fff; font-weight: 600; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; max-width: 38px; padding: 0 .25rem; text-align: left; }
.cal td.bk a { color: #fff; text-decoration: none; }
.cal td.b-reserved { background: #2a78d6; } .cal td.b-checked_in { background: var(--brand); } .cal td.b-checked_out { background: #9aa6a6; }
.cal td.today { box-shadow: inset 2px 0 0 #d98a00; }
/* POS */
.pos-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: .5rem; }
.pos-item { border: 1px solid #d4dcdc; background: #fff; border-radius: .5rem; padding: .55rem .6rem; text-align: left; min-height: 74px; }
.pos-item:hover, .pos-item:focus-visible { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 7%, white); }
.pos-item b { display: block; font-size: .88rem; line-height: 1.2; }
.pos-item span { font-size: .8rem; color: #5c6b70; }
.pos-cart { position: sticky; top: 70px; }
.folio-total td { font-weight: 700; }
.btn-outline-primary { --bs-btn-color: var(--brand); --bs-btn-border-color: var(--brand); --bs-btn-hover-bg: var(--brand); --bs-btn-hover-border-color: var(--brand); --bs-btn-active-bg: var(--brand-2); --bs-btn-active-border-color: var(--brand-2); }
a { color: var(--brand-2); }
.nav-tabs .nav-link, .nav-pills .nav-link:not(.active) { color: var(--brand); }
.nav-pills { --bs-nav-pills-link-active-bg: var(--brand); }

/* ================= Hoteli look: fonts, surfaces ================= */
@font-face { font-family: 'Outfit'; font-weight: 600; font-display: swap; src: url(../fonts/outfit-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Outfit'; font-weight: 700; font-display: swap; src: url(../fonts/outfit-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: 'Outfit'; font-weight: 800; font-display: swap; src: url(../fonts/outfit-latin-800-normal.woff2) format('woff2'); }
@font-face { font-family: 'Jakarta'; font-weight: 400; font-display: swap; src: url(../fonts/plus-jakarta-sans-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Jakarta'; font-weight: 500; font-display: swap; src: url(../fonts/plus-jakarta-sans-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'Jakarta'; font-weight: 600; font-display: swap; src: url(../fonts/plus-jakarta-sans-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Jakarta'; font-weight: 700; font-display: swap; src: url(../fonts/plus-jakarta-sans-latin-700-normal.woff2) format('woff2'); }
:root { --ground: #f2f5f4; --line: #e0e7e6; --ink: #142423; --muted: #5a6b6a;  --display: 'Outfit', system-ui, sans-serif; }
body { font-family: 'Jakarta', system-ui, -apple-system, 'Segoe UI', sans-serif; color: var(--ink); }
.page-title, .topbar .brand, .stat .v, .h-display { font-family: var(--display); letter-spacing: -.01em; }
.page-title { font-weight: 700; font-size: 1.55rem; }
.topbar .brand { font-weight: 700; font-size: 1.15rem; }
.card { border-color: var(--line); border-radius: 14px; }
.card > .card-header:first-child { border-radius: 14px 14px 0 0; }
.card-header { border-bottom-color: var(--line); padding: .8rem 1rem; }
.stat { border-radius: 14px; border-color: var(--line); padding: 1rem 1.15rem; }
.stat .l { text-transform: none; letter-spacing: 0; font-size: .85rem; font-weight: 600; color: var(--muted); }
.stat .v { font-weight: 700; font-size: 1.75rem; color: var(--ink); }
.btn { border-radius: 10px; font-weight: 600; }
.form-control, .form-select { border-radius: 10px; }
.table > thead th { font-weight: 600; color: var(--muted); font-size: .85rem; }
.sidebar .nav-link { border-radius: 0 10px 10px 0; margin-right: .6rem; }

/* ================= Login ================= */
.lg { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); background: #fff; }
.lg-art { position: relative; background: var(--sidebar-bg); color: #fff; padding: 48px 56px; display: flex; flex-direction: column; overflow: hidden; }
.lg-art .brandrow { display: flex; align-items: center; gap: .8rem; position: relative; z-index: 2; }
.lg-art .brandrow img { height: 52px; border-radius: 10px; background: #fff; padding: 4px; }
.lg-art .mark { width: 52px; height: 52px; border-radius: 14px; background: var(--glow); color: var(--sidebar-bg); display: grid; place-items: center; font-size: 1.6rem; }
.lg-art .hname { font-family: var(--display); font-weight: 700; font-size: 1.5rem; line-height: 1.1; }
.lg-art .hmotto { color: rgba(255,255,255,.72); font-size: .95rem; }
.lg-art h1 { font-family: var(--display); font-weight: 800; font-size: clamp(2.2rem, 3.6vw, 3.4rem); line-height: 1.02; letter-spacing: -.02em; margin: clamp(2rem, 9vh, 6rem) 0 1rem; max-width: 13ch; position: relative; z-index: 2; }
.lg-art .sub { color: rgba(255,255,255,.78); max-width: 34ch; font-size: 1.05rem; position: relative; z-index: 2; margin-bottom: 0; }
.facade { position: absolute; right: 48px; bottom: 0; width: 42%; max-width: 300px; background: var(--panel); border-radius: 18px 18px 0 0; padding: 26px 22px 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
.facade i { aspect-ratio: 3 / 4; border-radius: 4px; background: var(--window); display: block; }
.facade i.on { background: var(--glow); box-shadow: 0 0 18px color-mix(in srgb, var(--glow) 55%, transparent); }
.facade .door { grid-column: 2 / span 2; aspect-ratio: auto; height: 74px; background: var(--window); border-radius: 10px 10px 0 0; margin-top: 6px; }
@media (prefers-reduced-motion: no-preference) {
  .facade i.on { animation: lightup .6s ease-out both; animation-delay: calc(var(--d) * 70ms); }
  @keyframes lightup { from { background: var(--window); box-shadow: none; } }
}
.lg-form { display: flex; flex-direction: column; justify-content: center; padding: 48px clamp(24px, 6vw, 88px); }
.lg-form .inner { width: 100%; max-width: 400px; margin: 0 auto; }
.lg-form .greet { font-family: var(--display); font-weight: 700; font-size: 2rem; letter-spacing: -.01em; margin: 0; }
.lg-form .lead2 { color: var(--muted); margin: .3rem 0 1.6rem; }
.lg-form .form-control { padding: .75rem .9rem; font-size: 1rem; }
.lg-form .btn-primary { padding: .8rem; font-size: 1.05rem; }
.lg-form .pw { position: relative; }
.lg-form .pw button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--muted); width: 40px; height: 40px; border-radius: 8px; }
.lg-form .pw button:hover { background: #eef2f1; }
.lg-form .pw .form-control { padding-right: 3rem; }
.lg-foot { margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid var(--line); font-size: .85rem; color: var(--muted); }
.lg-foot details summary { cursor: pointer; font-weight: 600; color: var(--brand); }
.lg-foot .nesa-card { margin-top: .8rem; max-width: none; background: var(--sidebar-bg); }
@media (max-width: 900px) {
  .lg { grid-template-columns: 1fr; }
  .lg-art { padding: 28px 22px 0; min-height: 300px; }
  .lg-art h1 { margin-top: 1.6rem; font-size: 2.1rem; }
  .lg-art .sub { margin-bottom: 1.4rem; font-size: .95rem; max-width: 22ch; }
  .facade { display: none; }
  .lg-art { min-height: 0; padding-bottom: 6px; }
  .lg-form { padding: 28px 20px 36px; }
}

/* ================= Dashboard welcome ================= */
.welcome { background: var(--sidebar-bg); color: #fff; border-radius: 20px; padding: 26px 28px; display: flex; gap: 28px; align-items: stretch; flex-wrap: wrap; margin-bottom: 1.25rem; position: relative; overflow: hidden; }
.welcome .w-main { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; }
.welcome .w-date { color: rgba(255,255,255,.7); font-size: .9rem; }
.welcome h2 { font-family: var(--display); font-weight: 800; font-size: clamp(1.7rem, 3vw, 2.3rem); letter-spacing: -.015em; margin: .15rem 0 .35rem; }
.welcome .w-line { color: rgba(255,255,255,.8); margin: 0; }
.welcome .w-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: auto; padding-top: 1.2rem; }
.welcome .w-actions a { display: inline-flex; align-items: center; gap: .5rem; background: rgba(255,255,255,.1); color: #fff; text-decoration: none; padding: .6rem .95rem; border-radius: 12px; font-weight: 600; font-size: .92rem; }
.welcome .w-actions a:hover { background: rgba(255,255,255,.18); }
.welcome .w-actions a.primary { background: var(--glow); color: #241a05; }
.welcome .w-actions a.primary:hover { background: color-mix(in srgb, var(--glow) 75%, white); }
.w-ring { flex: 0 0 auto; display: flex; align-items: center; gap: 22px; }
.ring { --p: 0; width: 132px; height: 132px; border-radius: 50%; background: conic-gradient(var(--glow) calc(var(--p) * 1%), rgba(255,255,255,.12) 0); display: grid; place-items: center; }
.ring > div { width: 104px; height: 104px; border-radius: 50%; background: var(--sidebar-bg); display: grid; place-items: center; text-align: center; }
.ring b { font-family: var(--display); font-size: 1.9rem; line-height: 1; }
.ring span { font-size: .75rem; color: rgba(255,255,255,.7); }
.w-facade { display: grid; grid-template-columns: repeat(var(--cols, 6), 16px); gap: 6px; align-content: end; background: var(--panel); padding: 14px 14px 0; border-radius: 12px 12px 0 0; align-self: flex-end; margin-bottom: -26px; }
.w-facade i { width: 16px; height: 21px; border-radius: 3px; background: var(--window); display: block; }
.w-facade i.on { background: var(--glow); box-shadow: 0 0 10px color-mix(in srgb, var(--glow) 50%, transparent); }
.w-facade i.ooo { background: #4b5b5b; }
.w-facade .door { grid-column: 1 / -1; height: 16px; background: transparent; }
.w-legend { font-size: .8rem; color: rgba(255,255,255,.72); display: grid; gap: .3rem; }
.w-legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: .4rem; vertical-align: -1px; background: var(--glow); }
.w-legend span.off::before { background: var(--window); outline: 1px solid rgba(255,255,255,.25); }
.kpi { display: flex; gap: .9rem; align-items: center; }
.kpi .ic { flex: none; width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-size: 1.35rem; background: color-mix(in srgb, var(--brand) 12%, white); color: var(--brand); }
.kpi .ic.warm { background: #fbf0d9; color: #8a5a00; }
.kpi .ic.blue { background: #e4eefb; color: #1f5fae; }
.kpi .ic.green { background: #e2f3e8; color: #1e7b34; }
@media (max-width: 575.98px) {
  .welcome { padding: 20px 18px; border-radius: 16px; }
  .w-ring { width: 100%; justify-content: space-between; }
  .w-facade { display: none; }
  .ring { width: 108px; height: 108px; } .ring > div { width: 84px; height: 84px; } .ring b { font-size: 1.5rem; }
}
.theme-opt { display: inline-flex; align-items: center; gap: .55rem; border: 2px solid var(--line); border-radius: 12px; padding: .45rem .8rem .45rem .5rem; cursor: pointer; background: #fff; font-weight: 600; font-size: .9rem; }
.theme-opt .sw { display: inline-flex; border-radius: 8px; overflow: hidden; }
.theme-opt .sw i { width: 18px; height: 28px; display: block; }
.theme-opt:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.theme-opt:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
/* Safari login scene */
.lg-art .scene { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 52%; }
@media (max-width: 900px) { .lg-art .scene { display: none; } }
/* Safari dashboard: fleet strip */
.w-fleet { display: grid; grid-template-columns: repeat(5, 46px); gap: 6px; align-self: center; }
.w-fleet span { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px 2px 4px; border-radius: 10px; background: var(--window); color: rgba(255,255,255,.4); font-size: 1.15rem; line-height: 1; }
.w-fleet span small { font-size: .62rem; letter-spacing: .02em; }
.w-fleet span.on { background: var(--glow); color: #241a05; box-shadow: 0 0 12px color-mix(in srgb, var(--glow) 45%, transparent); }
@media (max-width: 575.98px) { .w-fleet { grid-template-columns: repeat(6, 1fr); width: 100%; } }

/* bar dashboard: one glass per counter, filled by its share of today's sales */
.w-taps { display: flex; gap: 18px; align-items: flex-end; flex-wrap: wrap; }
.w-taps .tap { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 70px; color: rgba(255,255,255,.75); font-size: .8rem; text-align: center; }
.w-taps .tap b { color: #fff; font-weight: 600; font-size: .82rem; }
.w-taps .glass { width: 48px; height: 74px; border: 3px solid rgba(255,255,255,.55); border-top-width: 1px; border-radius: 4px 4px 12px 12px; position: relative; overflow: hidden; display: block; }
.w-taps .glass i { position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(var(--glow), var(--accent)); display: block; }
.w-taps .tap.on .glass i::before { content: ""; position: absolute; left: 0; right: 0; top: -8px; height: 10px; background: #fff8e8; border-radius: 6px; }
.w-taps .tap:not(.on) .glass { opacity: .45; }
@media (max-width: 575.98px) { .w-taps { display: none; } }

/* language switch (English / Kiswahili) */
.lang-btn span { font-size: .78rem; font-weight: 600; letter-spacing: .02em; }
.lang-links { display: inline-flex; gap: 2px; padding: 3px; margin-bottom: 1.4rem; border: 1px solid #dfe3e2; border-radius: 999px; font-size: .88rem; }
.lang-links a, .lang-links .on { padding: .3rem .85rem; border-radius: 999px; text-decoration: none; }
.lang-links a { color: var(--muted); }
.lang-links a:hover { color: inherit; background: #eef2f1; }
.lang-links .on { background: var(--brand); color: #fff; font-weight: 600; }

/* the bar switch (more than one bar) */
.bar-switch .dropdown-item.active, .bar-switch .dropdown-item:active { background: var(--brand); color: #fff; }
.bar-switch .bar-name { max-width: 14rem; display: inline-block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
@media (max-width: 575.98px) { .bar-switch .bar-name { max-width: 7rem; } }

/* ================= ARDHI MS: maps of the lands ================= */
.map-wrap { position: relative; }
.land-map { height: calc(100vh - 260px); min-height: 420px; border-radius: 12px; border: 1px solid var(--line, #dfe3e2); background: #e9ece6; z-index: 1; }
.land-map.is-plan { background: #f6f3ea; }
.land-map.drawing { cursor: crosshair; }
.land-map.drawing .leaflet-interactive { cursor: crosshair; }
.map-offline, .map-msg { position: absolute; left: 12px; right: 12px; z-index: 500; border-radius: 8px; padding: .5rem .8rem; font-size: .88rem; }
.map-offline { top: 12px; background: #fff7e0; border: 1px solid #f0d58a; }
.map-msg { bottom: 12px; background: rgba(13, 34, 26, .9); color: #fff; }
.map-search { max-width: 320px; }
.map-legend { display: flex; flex-wrap: wrap; gap: .35rem .9rem; margin: 0 0 .6rem; font-size: .88rem; }
.map-legend .lg-item { display: inline-flex; align-items: center; gap: .35rem; cursor: pointer; user-select: none; }
.map-legend input { accent-color: var(--brand); }
.map-legend .sw { width: 14px; height: 14px; border-radius: 3px; display: inline-block; border: 1px solid rgba(0,0,0,.15); }
.map-legend b { font-weight: 600; color: var(--muted, #667); }
.leaflet-tooltip.plot-no { background: transparent; border: 0; box-shadow: none; color: #fff; font-weight: 700; font-size: 11px; padding: 0; text-shadow: 0 0 3px rgba(0,0,0,.85), 0 0 1px #000; }
.leaflet-tooltip.plot-no::before { display: none; }
.hide-plot-no .plot-no { display: none; }
.proj-pin a { display: inline-block; transform: translate(-50%, -100%); background: var(--sidebar-bg); color: #fff; padding: .3rem .55rem; border-radius: 8px; white-space: nowrap; text-decoration: none; box-shadow: 0 2px 8px rgba(0,0,0,.3); }
.proj-pin span { display: block; font-weight: 700; font-size: .82rem; }
.proj-pin small { display: block; color: var(--glow); font-size: .72rem; }
.pp { font-size: .86rem; }
.pp-head { display: flex; align-items: center; gap: .4rem; font-size: .98rem; }
.pp-dot { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.pp-state { color: #667; font-size: .8rem; margin: .1rem 0 .4rem; }
.pp-tab { width: 100%; }
.pp-tab td { padding: .12rem 0; vertical-align: top; }
.pp-tab td:first-child { color: #667; width: 42%; padding-right: .4rem; }
.pp-btns { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .55rem; }
.leaflet-popup-content { margin: 12px 14px; }
.proj-card:hover { border-color: var(--brand); }
.plan-thumb { max-height: 160px; object-fit: cover; width: 100%; border-radius: 8px; }
@media (max-width: 767.98px) { .land-map { height: 62vh; min-height: 340px; } .map-search { max-width: none; width: 100%; } }
@media print { .land-map { height: 180mm; } .leaflet-control-container { display: none; } }
.map-mode { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .6rem; }
.mm-opt { display: flex; gap: .6rem; align-items: flex-start; border: 1px solid var(--line, #dfe3e2); border-radius: 10px; padding: .75rem .85rem; cursor: pointer; background: #fff; }
.mm-opt:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 20%, transparent); }
.mm-opt input { margin-top: .3rem; accent-color: var(--brand); }
.mm-opt small { display: block; color: var(--muted, #667); margin-top: .15rem; }
.plot-badge { color: #fff; }
.plan-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .6rem; }
.plan-line.paid td { color: var(--muted, #667); }
.plan-line.late td { background: #fdecea; }
.plan-line.due td { background: #fff7e0; }
.sale-head { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; align-items: center; }
.sale-head .who { font-size: 1.15rem; font-weight: 600; }
.wa-btn { background: #25d366; border-color: #25d366; color: #0b2e17; }
.wa-btn:hover { background: #1fbd5a; border-color: #1fbd5a; color: #0b2e17; }
/* dashboard: the plots as a little survey layout */
.w-plots { flex: 0 0 auto; display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.w-grid { display: grid; grid-template-columns: repeat(var(--cols, 10), 15px); gap: 4px; padding: 12px; background: var(--panel); border-radius: 12px; }
.w-grid i { width: 15px; height: 15px; border-radius: 2px; display: block; }
.w-plots .w-legend { grid-template-columns: 1fr 1fr; column-gap: 1rem; }
.w-plots .w-legend span::before { background: var(--c); }
@media (max-width: 575.98px) { .w-plots { display: none; } }

/* money tiles on the dashboard: one line, size follows the screen */
.money-tiles .stat .v { white-space: nowrap; font-size: clamp(1rem, 1.3vw, 1.45rem); }
@media (max-width: 1199.98px) { .money-tiles .stat .v { font-size: clamp(1rem, 3.4vw, 1.45rem); } }
.progress-bar { background-color: var(--brand); }
