/* =====================================================================
   THS panel theme. Colours come only from the logo: THS navy, white and
   greys (plus quiet green / red / amber for status). The logo's circle is
   the recurring motif: round icon badges, the orbit rings in the sidebar
   and on the login page, the dot on the active menu item.
   Mobile first; the sidebar becomes a slide-in drawer below 992px.
   ===================================================================== */

:root {
    --navy: #1C2E5B;
    --navy-900: #121F42;
    --navy-800: #182850;
    --navy-600: #2B4178;
    --navy-400: #6F7FA8;
    --navy-200: #C9D1E6;
    --navy-100: #E6EAF4;
    --navy-50: #F2F4FA;
    --ink: #141B2E;
    --text: #2B3246;
    --muted: #667089;
    --line: #E1E5EF;
    --bg: #F4F6FB;
    --card: #FFFFFF;
    --ok: #1B8A56;
    --ok-bg: #E6F5EC;
    --err: #C0392B;
    --err-bg: #FCEBE9;
    --warn: #A86A12;
    --warn-bg: #FFF4E0;
    --radius: 14px;
    --radius-sm: 10px;
    --shadow: 0 1px 2px rgba(18, 31, 66, .06), 0 6px 20px rgba(18, 31, 66, .06);
    --shadow-lg: 0 12px 40px rgba(18, 31, 66, .16);
    --font-head: "Montserrat", system-ui, sans-serif;
    --font-body: "Poppins", system-ui, sans-serif;
    --sidebar: 268px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.55;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--ink); margin: 0; line-height: 1.25; }
h1 { font-size: 22px; font-weight: 700; }
h2 { font-size: 17px; font-weight: 700; }
h3 { font-size: 15px; font-weight: 600; }
p { margin: 0 0 10px; text-align: justify; }
a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--navy-600); }
img { max-width: 100%; display: block; }
code, .mono { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 12.5px; }
:focus-visible { outline: 3px solid var(--navy-200); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------------------------------------------------------------- layout */
.app { min-height: 100vh; }

.sidebar {
    position: fixed; inset: 0 auto 0 0; z-index: 40;
    width: var(--sidebar);
    display: flex; flex-direction: column;
    background: var(--navy);
    color: #fff;
    overflow: hidden;
    transform: translateX(-100%);
    transition: transform .25s ease;
}
/* The logo's circle, as two faint orbit rings behind the menu. */
.sidebar::before, .sidebar::after {
    content: ""; position: absolute; border-radius: 50%; pointer-events: none;
    border: 1.5px solid rgba(255, 255, 255, .07);
}
.sidebar::before { width: 420px; height: 420px; left: -210px; bottom: -170px; }
.sidebar::after { width: 260px; height: 260px; left: -60px; bottom: -120px; border-color: rgba(255, 255, 255, .05); }
.app.nav-open .sidebar { transform: none; box-shadow: var(--shadow-lg); }

.brand {
    display: flex; align-items: center; gap: 12px;
    padding: 18px 20px 16px;
    color: #fff;
}
.brand img { width: 44px; height: 44px; border-radius: 50%; }
.brand-name { font-family: var(--font-head); font-weight: 800; font-size: 18px; letter-spacing: .5px; line-height: 1.1; }
.brand-sub { display: block; font-size: 10.5px; font-weight: 500; letter-spacing: 1.4px; text-transform: uppercase; color: var(--navy-200); }
.brand:hover { color: #fff; }

.side-context {
    margin: 0 14px 10px; padding: 10px 12px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, .07);
    font-size: 12px; color: var(--navy-200);
}
.side-context strong { display: block; color: #fff; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-context a { color: #fff; text-decoration: underline; text-underline-offset: 2px; }

.nav { flex: 1; overflow-y: auto; padding: 4px 12px 24px; position: relative; z-index: 1; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.2) transparent; }
.nav-label { margin: 16px 10px 6px; font-size: 10.5px; font-weight: 600; letter-spacing: 1.3px; text-transform: uppercase; color: var(--navy-400); }
.nav a, .nav summary {
    display: flex; align-items: center; gap: 12px;
    padding: 9px 12px; margin: 2px 0;
    border-radius: 10px;
    color: #DCE2F2; font-weight: 500; font-size: 13.5px;
    cursor: pointer; list-style: none;
    transition: background .15s, color .15s;
}
.nav summary::-webkit-details-marker { display: none; }
.nav a:hover, .nav summary:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.nav .bi { font-size: 17px; width: 20px; text-align: center; opacity: .9; }
.nav a.active { background: #fff; color: var(--navy); font-weight: 600; }
.nav a.active::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--navy); margin-left: auto; }
.nav details > summary::after { content: "\F282"; font-family: "bootstrap-icons"; margin-left: auto; font-size: 12px; transition: transform .2s; }
.nav details[open] > summary::after { transform: rotate(180deg); }
.nav .sub { margin: 2px 0 6px 22px; padding-left: 12px; border-left: 1.5px solid rgba(255, 255, 255, .12); }
.nav .sub a { padding: 7px 10px; font-size: 13px; }

.backdrop { position: fixed; inset: 0; z-index: 35; background: rgba(18, 31, 66, .45); opacity: 0; pointer-events: none; transition: opacity .25s; }
.app.nav-open .backdrop { opacity: 1; pointer-events: auto; }

.main { min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.topbar {
    position: sticky; top: 0; z-index: 30;
    display: flex; align-items: center; gap: 12px;
    height: 62px; padding: 0 16px;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: saturate(160%) blur(10px);
    border-bottom: 1px solid var(--line);
}
.icon-btn {
    display: inline-grid; place-items: center;
    width: 40px; height: 40px; border-radius: 50%;
    border: 1px solid var(--line); background: #fff; color: var(--navy);
    font-size: 19px; cursor: pointer;
}
.icon-btn:hover { background: var(--navy-50); }
.topbar-title { font-family: var(--font-head); font-weight: 700; font-size: 16px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.user-menu { position: relative; }
.user-btn {
    display: flex; align-items: center; gap: 10px;
    padding: 4px 6px 4px 4px; border-radius: 999px;
    border: 1px solid var(--line); background: #fff; cursor: pointer; font: inherit; color: var(--ink);
}
.avatar {
    display: inline-grid; place-items: center;
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--navy); color: #fff;
    font-family: var(--font-head); font-weight: 700; font-size: 13px;
}
.user-btn .who { display: none; text-align: left; line-height: 1.2; }
.user-btn .who small { display: block; color: var(--muted); font-size: 11px; }
.dropdown {
    position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px;
    padding: 6px; border-radius: 12px; background: #fff;
    border: 1px solid var(--line); box-shadow: var(--shadow-lg);
    display: none;
}
.user-menu.open .dropdown { display: block; }
.dropdown a, .dropdown button {
    display: flex; align-items: center; gap: 10px; width: 100%;
    padding: 9px 12px; border: 0; border-radius: 8px; background: none;
    font: inherit; color: var(--text); text-align: left; cursor: pointer;
}
.dropdown a:hover, .dropdown button:hover { background: var(--navy-50); color: var(--navy); }
.dropdown hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }

.content { width: 100%; max-width: 1320px; margin: 0 auto; padding: 18px 14px 40px; flex: 1; }
.footer { padding: 14px 16px 22px; text-align: center; font-size: 12px; color: var(--muted); }

@media (min-width: 640px) {
    .content { padding: 24px 22px 48px; }
    .user-btn .who { display: block; }
}
@media (min-width: 992px) {
    .sidebar { transform: none; }
    .main { margin-left: var(--sidebar); }
    .menu-toggle, .backdrop { display: none; }
    .topbar { padding: 0 26px; }
    .content { padding: 28px 30px 56px; }
}

/* ------------------------------------------------------------- page head */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.page-head p { margin: 4px 0 0; color: var(--muted); text-align: left; }
.page-head .actions { display: flex; flex-wrap: wrap; gap: 8px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--navy); }

/* ------------------------------------------------------------------ cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card + .card, .card + .grid, .grid + .card, .grid + .grid { margin-top: 18px; }
.card-h { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.card-h .step {
    display: inline-grid; place-items: center; width: 28px; height: 28px; margin-right: 10px;
    border-radius: 50%; background: var(--navy); color: #fff; font-family: var(--font-head); font-weight: 700; font-size: 13px;
}
.card-h h2 { display: flex; align-items: center; }
.card-h small { color: var(--muted); font-weight: 400; }
.card-b { padding: 18px; }
.card-f { padding: 14px 18px; border-top: 1px solid var(--line); background: var(--navy-50); border-radius: 0 0 var(--radius) var(--radius); }

.grid { display: grid; gap: 16px; }
/* Grid children may shrink below their content, so wide tables / tab rows scroll inside the card instead of widening the page. */
.grid > * { min-width: 0; }
/* Cards laid out by a grid are spaced by the grid gap, not by the stacked-card margin. */
.grid > .card + .card, .kpis > .card + .card { margin-top: 0; }
@media (min-width: 768px) {
    .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .grid-side { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
}
@media (min-width: 1100px) {
    .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (min-width: 560px) and (max-width: 1099px) {
    .grid-4, .grid-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Stat tile: number, label, round icon badge. */
.stat { position: relative; overflow: hidden; padding: 18px; }
.stat .num { font-family: var(--font-head); font-size: 28px; font-weight: 800; color: var(--ink); line-height: 1.1; }
.stat .lbl { color: var(--muted); font-size: 13px; }
.stat .badge-ico { position: absolute; right: 16px; top: 16px; }
.stat.dark { background: var(--navy); border-color: var(--navy); color: var(--navy-200); }
.stat.dark .num { color: #fff; }
.stat.dark .lbl { color: var(--navy-200); }
.stat.dark::after { content: ""; position: absolute; width: 180px; height: 180px; right: -60px; bottom: -90px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.12); }

.pkg-stat {
    display: flex; align-items: center; gap: 12px; padding: 14px;
    border: 1px solid var(--line); border-radius: var(--radius); background: #fff; color: var(--ink);
    transition: border-color .15s, box-shadow .15s;
}
.pkg-stat:hover { border-color: var(--navy-200); box-shadow: var(--shadow); color: var(--ink); }
.pkg-stat strong { display: block; font-family: var(--font-head); font-size: 18px; }
.pkg-stat small { color: var(--muted); font-size: 12.5px; }

.badge-ico {
    display: inline-grid; place-items: center; flex: none;
    width: 42px; height: 42px; border-radius: 50%;
    background: var(--navy-100); color: var(--navy); font-size: 19px;
}
.stat.dark .badge-ico { background: rgba(255,255,255,.12); color: #fff; }

/* --------------------------------------------------------------- buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 40px; padding: 8px 16px;
    border: 1px solid transparent; border-radius: 10px;
    font: 600 13.5px/1.2 var(--font-body); cursor: pointer; white-space: nowrap;
    transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
}
.btn .bi { font-size: 16px; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-800); color: #fff; box-shadow: 0 6px 16px rgba(28, 46, 91, .25); }
.btn-ghost { background: #fff; color: var(--navy); border-color: var(--line); }
.btn-ghost:hover { background: var(--navy-50); border-color: var(--navy-200); color: var(--navy); }
.btn-danger { background: #fff; color: var(--err); border-color: #F1C6C1; }
.btn-danger:hover { background: var(--err-bg); color: var(--err); }
.btn-ok { background: #fff; color: var(--ok); border-color: #BfE3CF; }
.btn-ok:hover { background: var(--ok-bg); color: var(--ok); }
.btn-sm { min-height: 32px; padding: 5px 11px; font-size: 12.5px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: not-allowed; }
.inline-form { display: inline; }

/* ----------------------------------------------------------------- forms */
.form-grid { display: grid; gap: 14px 16px; }
@media (min-width: 640px) {
    .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .form-grid .span-2 { grid-column: span 2; }
}
@media (min-width: 1100px) {
    .form-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .form-grid.cols-3 .span-2 { grid-column: span 2; }
    .form-grid.cols-3 .span-3 { grid-column: span 3; }
}
.field label, .field .label { display: block; margin-bottom: 6px; font-weight: 500; font-size: 13px; color: var(--ink); }
.field .req { color: var(--err); margin-left: 2px; }
.field .hint { display: block; margin-top: 5px; font-size: 12px; color: var(--muted); }
.input, .select, textarea.input {
    width: 100%; min-height: 42px; padding: 9px 12px;
    border: 1px solid #D5DBE8; border-radius: 10px; background: #fff;
    font: 400 14px/1.4 var(--font-body); color: var(--ink);
    transition: border-color .15s, box-shadow .15s;
}
.input::placeholder { color: #9AA3B8; }
.input:focus, .select:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(28, 46, 91, .12); }
.input.input-validation-error, .select.input-validation-error { border-color: var(--err); }
.select { appearance: none; padding-right: 36px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 16 16'%3E%3Cpath fill='%231C2E5B' d='M1.6 5.1 8 11.4l6.4-6.3-.9-.9L8 9.6 2.5 4.2z'/%3E%3C/svg%3E") no-repeat right 12px center; }
.field-validation-error, .text-err { display: block; margin-top: 5px; font-size: 12px; color: var(--err); }
.input-group { display: flex; }
.input-group .input { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group .btn { border-radius: 0; border-left: 0; min-height: 42px; }
.input-group .btn:last-child { border-radius: 0 10px 10px 0; }
.check { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-weight: 500; user-select: none; }
.check input { width: 18px; height: 18px; accent-color: var(--navy); }
.avail { font-size: 12px; margin-top: 5px; display: block; }
.avail.ok { color: var(--ok); }
.avail.no { color: var(--err); }

/* Package picker: big round-badge tiles. */
.pkg-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.pkg-tile { position: relative; display: block; cursor: pointer; }
.pkg-tile input { position: absolute; opacity: 0; }
.pkg-tile .body {
    display: flex; flex-direction: column; gap: 10px; height: 100%;
    padding: 16px; border: 1.5px solid var(--line); border-radius: var(--radius);
    background: #fff; transition: border-color .15s, background .15s, box-shadow .15s;
}
.pkg-tile .name { font-family: var(--font-head); font-weight: 700; color: var(--ink); font-size: 14px; }
.pkg-tile .desc { font-size: 12px; color: var(--muted); line-height: 1.45; }
.pkg-tile .tick {
    position: absolute; right: 12px; top: 12px; width: 22px; height: 22px; border-radius: 50%;
    border: 1.5px solid var(--navy-200); display: grid; place-items: center; color: transparent; font-size: 13px;
}
.pkg-tile:hover .body { border-color: var(--navy-200); }
.pkg-tile input:focus-visible + .body { box-shadow: 0 0 0 3px rgba(28, 46, 91, .18); }
.pkg-tile input:checked + .body { border-color: var(--navy); background: var(--navy-50); box-shadow: inset 0 0 0 1px var(--navy); }
.pkg-tile input:checked + .body .tick { background: var(--navy); border-color: var(--navy); color: #fff; }
.pkg-tile input:checked + .body .badge-ico { background: var(--navy); color: #fff; }

/* Icon picker */
.icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; max-height: 190px; overflow-y: auto; padding: 8px; border: 1px solid var(--line); border-radius: 10px; }
.icon-grid label { display: grid; place-items: center; height: 42px; border-radius: 50%; cursor: pointer; font-size: 18px; color: var(--navy); border: 1.5px solid transparent; }
.icon-grid input { position: absolute; opacity: 0; }
.icon-grid label:hover { background: var(--navy-50); }
.icon-grid input:checked + label { background: var(--navy); color: #fff; }
.icon-grid input:focus-visible + label { border-color: var(--navy); }

/* ----------------------------------------------------------- chips/badges */
.chip {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 10px; border-radius: 999px;
    background: var(--navy-100); color: var(--navy);
    font-size: 11.5px; font-weight: 600; white-space: nowrap;
}
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status.on { background: var(--ok-bg); color: var(--ok); }
.status.off { background: var(--err-bg); color: var(--err); }
.status.warn { background: var(--warn-bg); color: var(--warn); }

/* ----------------------------------------------------------------- alerts */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; margin-bottom: 16px; font-size: 13.5px; border: 1px solid transparent; }
.alert .bi { font-size: 18px; line-height: 1.2; }
.alert-ok { background: var(--ok-bg); color: #145F3C; border-color: #C3E6D2; }
.alert-err { background: var(--err-bg); color: #8E2A20; border-color: #F3C9C3; }
.alert-info { background: var(--navy-50); color: var(--navy); border-color: var(--navy-100); }
.alert ul { margin: 0; padding-left: 18px; }
.validation-summary-valid { display: none; }

/* ------------------------------------------------------------------ table */
.table-wrap { overflow-x: auto; container-type: inline-size; }
.table { width: 100%; border-collapse: collapse; }
.table th {
    padding: 11px 14px; text-align: left; white-space: nowrap;
    font-size: 11.5px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase;
    color: var(--muted); background: var(--navy-50); border-bottom: 1px solid var(--line);
}
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: #FAFBFE; }
.table .title { font-weight: 600; color: var(--ink); }
.table .sub { font-size: 12px; color: var(--muted); }
.table .right { text-align: right; }
.table .indent { padding-left: 38px; position: relative; }
.table .indent::before { content: ""; position: absolute; left: 20px; top: 0; bottom: 50%; width: 10px; border-left: 1.5px solid var(--navy-200); border-bottom: 1.5px solid var(--navy-200); border-bottom-left-radius: 6px; }

/* When the table area is under 700px wide, every row becomes a small card; cells show their column name. */
@container (max-width: 700px) {
    .table.stack thead { display: none; }
    .table.stack, .table.stack tbody, .table.stack tr, .table.stack td { display: block; width: 100%; }
    .table.stack tr { padding: 12px 14px; border-bottom: 1px solid var(--line); }
    .table.stack td { padding: 4px 0; border: 0; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
    .table.stack td::before { content: attr(data-label); font-size: 12px; color: var(--muted); text-align: left; flex: none; }
    .table.stack td.lead { display: block; text-align: left; padding-bottom: 6px; }
    .table.stack td.lead::before { display: none; }
    .table.stack td.multi { display: block; text-align: left; }
    .table.stack td.multi::before { display: block; margin-bottom: 3px; }
    .table.stack td.indent { padding-left: 16px; }
    .table.stack td.indent::before { display: none; }
}

/* ------------------------------------------------------------- toolbar */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.toolbar .search { flex: 1 1 240px; position: relative; }
.toolbar .search .bi { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.toolbar .search .input { padding-left: 36px; }
.toolbar .select { flex: 0 1 170px; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.pager .btns { display: flex; gap: 8px; }

.tabs { display: flex; gap: 4px; padding: 5px; background: #fff; border: 1px solid var(--line); border-radius: 999px; overflow-x: auto; margin-bottom: 16px; width: fit-content; max-width: 100%; }
.tabs a { padding: 7px 16px; border-radius: 999px; font-weight: 600; font-size: 13px; color: var(--muted); white-space: nowrap; }
.tabs a:hover { color: var(--navy); background: var(--navy-50); }
.tabs a.active { background: var(--navy); color: #fff; }

.empty { padding: 44px 18px; text-align: center; color: var(--muted); }
.empty .badge-ico { width: 64px; height: 64px; font-size: 28px; margin: 0 auto 12px; }
.empty h3 { margin-bottom: 4px; }
.empty p { text-align: center; }

/* ---------------------------------------------------------- definition */
.dl { display: grid; grid-template-columns: 1fr; gap: 12px 18px; margin: 0; }
@media (min-width: 560px) { .dl { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.dl dt { font-size: 12px; color: var(--muted); }
.dl dd { margin: 2px 0 0; font-weight: 500; color: var(--ink); word-break: break-word; }

.list-plain { list-style: none; margin: 0; padding: 0; }
.list-plain li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.list-plain li:last-child { border-bottom: 0; }
.list-plain .meta { font-size: 12px; color: var(--muted); }

.credential {
    position: relative; overflow: hidden; padding: 18px; border-radius: var(--radius);
    background: var(--navy); color: #fff; margin-bottom: 18px;
}
.credential::after { content: ""; position: absolute; width: 220px; height: 220px; right: -70px; top: -110px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.14); }
.credential h2 { color: #fff; margin-bottom: 4px; }
.credential p { color: var(--navy-200); text-align: left; }
.credential .row { display: grid; gap: 10px; margin: 12px 0; }
@media (min-width: 700px) { .credential .row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.credential .box { padding: 10px 12px; border-radius: 10px; background: rgba(255,255,255,.1); }
.credential .box small { display: block; margin-bottom: 2px; color: var(--navy-200); font-size: 12px; }
.credential .box span, .credential .box a {
    display: block; color: #fff; font-family: var(--font-body); font-size: 15px; font-weight: 600;
    letter-spacing: .3px; word-break: break-all; text-decoration: none;
}
.credential .box a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.credential .btn-ghost { position: relative; z-index: 1; }

details.log-json summary { cursor: pointer; color: var(--navy); font-size: 12px; font-weight: 600; }
details.log-json pre { margin: 8px 0 0; padding: 10px; max-width: 520px; max-height: 260px; overflow: auto; background: var(--navy-50); border-radius: 8px; font-size: 11.5px; white-space: pre-wrap; word-break: break-word; }

.modal { border: 0; padding: 0; border-radius: var(--radius); box-shadow: var(--shadow-lg); width: min(440px, calc(100vw - 32px)); }
.modal::backdrop { background: rgba(18, 31, 66, .5); }

/* --------------------------------------------------------- panel module */
.module-hero {
    position: relative; overflow: hidden; padding: 34px 22px; text-align: center;
}
.module-hero .ring { width: 96px; height: 96px; margin: 0 auto 16px; border-radius: 50%; display: grid; place-items: center; background: var(--navy); color: #fff; font-size: 38px; box-shadow: 0 0 0 10px var(--navy-100), 0 0 0 22px var(--navy-50); }
.module-hero p { text-align: center; max-width: 460px; margin: 8px auto 0; color: var(--muted); }

.welcome {
    position: relative; overflow: hidden; padding: 22px; border-radius: var(--radius);
    background: var(--navy); color: var(--navy-200); margin-bottom: 18px;
}
.welcome h1 { color: #fff; }
.welcome p { text-align: left; margin: 6px 0 0; }
.welcome::before, .welcome::after { content: ""; position: absolute; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.12); }
.welcome::before { width: 300px; height: 300px; right: -80px; top: -150px; }
.welcome::after { width: 170px; height: 170px; right: 40px; bottom: -120px; }
.welcome .chips { margin-top: 14px; position: relative; z-index: 1; }
.welcome .chip { background: rgba(255,255,255,.12); color: #fff; }

.quick { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.quick a {
    display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
    padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
    color: var(--ink); font-weight: 600; transition: border-color .15s, transform .15s, box-shadow .15s;
}
.quick a:hover { border-color: var(--navy-200); transform: translateY(-2px); box-shadow: var(--shadow); }

/* ------------------------------------------------------------ login page */
.auth { min-height: 100vh; display: grid; background: #fff; }
.auth-art {
    position: relative; overflow: hidden;
    display: flex; flex-direction: column; justify-content: center;
    padding: 28px 22px; background: var(--navy); color: var(--navy-200);
}
.auth-art .ring { position: absolute; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.1); pointer-events: none; }
.auth-art .r1 { width: 520px; height: 520px; right: -260px; top: -200px; }
.auth-art .r2 { width: 340px; height: 340px; right: -120px; top: -90px; }
.auth-art .r3 { width: 440px; height: 440px; left: -220px; bottom: -260px; }
.auth-logo { display: flex; align-items: center; gap: 14px; position: relative; z-index: 1; }
.auth-logo img { width: 58px; height: 58px; border-radius: 50%; }
.auth-logo b { font-family: var(--font-head); font-size: 22px; color: #fff; letter-spacing: .5px; display: block; line-height: 1.1; }
.auth-logo small { font-size: 10.5px; letter-spacing: 1.6px; text-transform: uppercase; }
.auth-copy { display: none; position: relative; z-index: 1; }
.auth-copy h1 { color: #fff; font-size: 34px; font-weight: 800; line-height: 1.15; margin: 34px 0 12px; }
.auth-copy p { max-width: 440px; font-size: 15px; text-align: left; }
.auth-copy .chips { margin-top: 22px; }
.auth-copy .chip { background: rgba(255,255,255,.1); color: #fff; padding: 7px 13px; font-size: 12.5px; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 30px 20px 40px; }
.auth-box { width: 100%; max-width: 400px; }
.auth-box h2 { font-size: 24px; font-weight: 800; }
.auth-box > p { color: var(--muted); margin: 6px 0 24px; text-align: left; }
.auth-box .field { margin-bottom: 16px; }
.auth-foot { margin-top: 26px; font-size: 12px; color: var(--muted); text-align: center; }
@media (min-width: 900px) {
    .auth { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
    .auth-art { padding: 48px 56px; justify-content: space-between; }
    .auth-copy { display: block; }
}

.pick-list { display: grid; gap: 10px; }
.pick-list button {
    display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px;
    border: 1.5px solid var(--line); border-radius: var(--radius); background: #fff;
    font: inherit; text-align: left; cursor: pointer; color: var(--ink);
}
.pick-list button:hover { border-color: var(--navy); background: var(--navy-50); }
.pick-list .sub { font-size: 12px; color: var(--muted); }

.text-muted { color: var(--muted); }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.gap-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* =====================================================================
   Property dashboard
   ===================================================================== */
.dash-hero { display: grid; gap: 16px; }
.dash-hero .when { font-size: 12.5px; color: var(--navy-200); letter-spacing: .3px; }
.dash-hero .hero-actions { display: flex; flex-wrap: wrap; gap: 8px; position: relative; z-index: 1; }
.dash-hero .hero-actions .btn { background: #fff; color: var(--navy); }
.dash-hero .hero-actions .btn:hover { background: var(--navy-50); color: var(--navy); }
.dash-hero .hero-actions .btn.ghost { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.25); }
.dash-hero .hero-actions .btn.ghost:hover { background: rgba(255,255,255,.2); }
@media (min-width: 900px) { .dash-hero { grid-template-columns: 1fr auto; align-items: end; } }

.menu-pop { position: relative; }
.menu-pop > summary { list-style: none; }
.menu-pop > summary::-webkit-details-marker { display: none; }
.menu-pop .pop {
    position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 230px; padding: 6px;
    background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg);
}
.menu-pop .pop a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; color: var(--text); font-weight: 500; }
.menu-pop .pop a:hover { background: var(--navy-50); color: var(--navy); }

/* Insights: short, actionable tips */
.insights { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); margin-bottom: 18px; }
.insight {
    display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px;
    background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--navy-400); border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.insight .ico { width: 36px; height: 36px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 17px; background: var(--navy-100); color: var(--navy); }
.insight p { margin: 0; text-align: left; font-size: 13px; color: var(--ink); }
.insight a { display: inline-block; margin-top: 6px; font-size: 12.5px; font-weight: 600; }
.insight.alert { border-left-color: var(--err); } .insight.alert .ico { background: var(--err-bg); color: var(--err); }
.insight.warn { border-left-color: var(--warn); } .insight.warn .ico { background: var(--warn-bg); color: var(--warn); }
.insight.ok { border-left-color: var(--ok); } .insight.ok .ico { background: var(--ok-bg); color: var(--ok); }

/* KPI tiles */
.kpis { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); margin-bottom: 18px; }
.kpi { position: relative; padding: 16px; overflow: hidden; }
.kpi .lbl { font-size: 12.5px; color: var(--muted); font-weight: 500; padding-right: 44px; }
.kpi .val { font-family: var(--font-head); font-weight: 800; font-size: 26px; color: var(--ink); line-height: 1.15; margin-top: 6px; }
.kpi .sub { font-size: 12px; color: var(--muted); margin-top: 4px; }
.kpi .badge-ico { position: absolute; right: 14px; top: 14px; width: 36px; height: 36px; font-size: 16px; }
.kpi.navy { background: var(--navy); border-color: var(--navy); }
.kpi.navy .lbl, .kpi.navy .sub { color: var(--navy-200); }
.kpi.navy .val { color: #fff; }
.kpi.navy .badge-ico { background: rgba(255,255,255,.14); color: #fff; }
.kpi.navy::after { content: ""; position: absolute; width: 160px; height: 160px; right: -60px; bottom: -80px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.12); }
.delta { display: inline-flex; align-items: center; gap: 3px; padding: 1px 7px; border-radius: 999px; font-size: 11.5px; font-weight: 600; }
.delta.up { background: var(--ok-bg); color: var(--ok); }
.delta.down { background: var(--err-bg); color: var(--err); }
.kpi.navy .delta.up { background: rgba(255,255,255,.15); color: #B9F1D2; }
.kpi.navy .delta.down { background: rgba(255,255,255,.15); color: #FFC9C2; }
.kpi .ring { position: absolute; right: 12px; top: 12px; }

/* Charts (inline SVG) */
.chart { width: 100%; height: auto; display: block; }
.chart .grid-line { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 10px; font-family: var(--font-body); }
.chart .bar { fill: var(--navy); }
.chart .bar.soft { fill: var(--navy-200); }
.chart .bar:hover { fill: var(--navy-600); }
.chart .line { fill: none; stroke: #E0A33A; stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.chart .dot { fill: #fff; stroke: #E0A33A; stroke-width: 2; }
.chart .val-label { fill: var(--ink); font-size: 10.5px; font-weight: 600; font-family: var(--font-body); }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* Tabs that live inside a card header */
.card-tabs { display: flex; gap: 4px; overflow-x: auto; padding: 10px 12px 0; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.card-tabs button {
    flex: none; padding: 9px 14px; border: 0; border-bottom: 2.5px solid transparent; background: none;
    font: 600 13px var(--font-body); color: var(--muted); cursor: pointer; white-space: nowrap;
}
.card-tabs button:hover { color: var(--navy); }
.card-tabs button.active { color: var(--navy); border-bottom-color: var(--navy); }
.card-tabs .count { display: inline-block; min-width: 18px; margin-left: 6px; padding: 0 6px; border-radius: 999px; background: var(--navy-100); color: var(--navy); font-size: 11px; line-height: 18px; text-align: center; }
[data-panel][hidden] { display: none !important; }

/* Booking engine funnel */
.funnel { display: grid; gap: 10px; }
.funnel .step { display: grid; grid-template-columns: 120px 1fr 64px; gap: 10px; align-items: center; font-size: 13px; }
.funnel .track { height: 12px; border-radius: 999px; background: var(--navy-50); overflow: hidden; }
.funnel .fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--navy), var(--navy-600)); }
.funnel .num { text-align: right; font-weight: 600; color: var(--ink); }
.mini-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.mini-stats > div { padding: 12px; border-radius: 12px; background: var(--navy-50); }
.mini-stats b { display: block; font-family: var(--font-head); font-size: 20px; color: var(--ink); }
.mini-stats span { font-size: 12px; color: var(--muted); }

/* Payment status stacked bar */
.stack-bar { display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: var(--navy-50); margin: 4px 0 14px; }
.stack-bar span { display: block; height: 100%; }
.c-awaited { background: #3F6FD8; } .c-settled { background: var(--ok); } .c-expired { background: var(--err); } .c-refunded { background: #E0A33A; }
.c-navy { background: var(--navy); } .c-navy2 { background: var(--navy-600); } .c-navy3 { background: var(--navy-400); } .c-navy4 { background: var(--navy-200); }
.status-list { list-style: none; margin: 0; padding: 0; }
.status-list li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.status-list li:last-child { border-bottom: 0; }
.status-list .sw { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.status-list .amt { margin-left: auto; font-weight: 600; color: var(--ink); }
.status-list .n { color: var(--muted); font-size: 12px; min-width: 42px; text-align: right; }

/* Inventory heatmap: room type x next 7 nights */
.heat { width: 100%; border-collapse: separate; border-spacing: 4px; font-size: 12.5px; }
.heat th { font-weight: 600; color: var(--muted); font-size: 11.5px; text-align: center; white-space: nowrap; }
.heat th:first-child { text-align: left; }
.heat td { text-align: center; border-radius: 8px; padding: 8px 4px; min-width: 56px; }
.heat td.room { text-align: left; font-weight: 600; color: var(--ink); padding-left: 0; white-space: nowrap; }
.heat td small { display: block; font-size: 10.5px; opacity: .8; }
.h0 { background: var(--navy-50); color: var(--navy); }
.h1 { background: var(--navy-100); color: var(--navy); }
.h2 { background: var(--navy-200); color: var(--navy-900); }
.h3 { background: var(--navy-600); color: #fff; }
.h4 { background: var(--navy); color: #fff; }
.hb { background: repeating-linear-gradient(45deg, var(--err-bg), var(--err-bg) 6px, #fff 6px, #fff 12px); color: var(--err); }

.table.compact td, .table.compact th { padding: 10px 14px; }

/* Arrivals / departures: one compact line per guest */
.guest-list { list-style: none; margin: 0; padding: 4px 18px 10px; }
.guest-list li { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); }
.guest-list li:last-child { border-bottom: 0; }
.guest-list .avatar { width: 38px; height: 38px; font-size: 12.5px; background: var(--navy-100); color: var(--navy); }
.guest-list .who { min-width: 0; }
.guest-list .who b { display: block; color: var(--ink); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.guest-list small { display: block; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.guest-list .when { display: none; font-weight: 600; color: var(--ink); font-size: 13px; text-align: right; white-space: nowrap; }
.guest-list .amt { text-align: right; font-weight: 700; color: var(--ink); white-space: nowrap; }
.guest-list .amt .status { display: flex; width: fit-content; margin: 3px 0 0 auto; font-size: 11px; padding: 1px 8px; }
@container (min-width: 520px) {
    .guest-list li { grid-template-columns: 38px minmax(0, 1fr) auto auto; }
    .guest-list .when { display: block; }
}
[data-tabs] { container-type: inline-size; }

/* =====================================================================
   Toggle switch: <label class="switch"><input type="checkbox"><span class="track"></span><span class="txt">..</span></label>
   ===================================================================== */
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; font-weight: 600; font-size: 13px; color: var(--muted); }
.field label.switch { display: inline-flex; margin-bottom: 0; color: var(--muted); font-size: 13px; }
.switch { position: relative; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { position: relative; width: 44px; height: 24px; flex: none; border-radius: 999px; background: #CBD2E1; transition: background .2s; }
.switch .track::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.switch input:checked + .track { background: var(--navy); }
.switch input:checked + .track::after { transform: translateX(20px); }
.switch input:checked ~ .txt { color: var(--navy); }
.switch input:focus-visible + .track { box-shadow: 0 0 0 3px rgba(28, 46, 91, .2); }

/* Settings rows: label on the left, control on the right */
.setting { display: grid; gap: 8px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.setting:last-child { border-bottom: 0; padding-bottom: 0; }
.setting:first-child { padding-top: 0; }
.setting .s-label { font-weight: 600; color: var(--ink); }
.setting .s-help { font-size: 12px; color: var(--muted); }
@media (min-width: 760px) { .setting { grid-template-columns: minmax(220px, 1fr) minmax(0, 1.4fr); align-items: center; } }

/* Tax policies */
.tax-block { position: relative; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.tax-block + .tax-block { margin-top: 14px; }
.tax-block.inactive { background: var(--navy-50); }
.tax-block.inactive .slabs { opacity: .55; }
.tax-head { display: grid; gap: 12px; grid-template-columns: 1fr; align-items: end; }
.tax-block { container-type: inline-size; }
@container (min-width: 420px) { .tax-head { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
@container (min-width: 760px) { .tax-head { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.3fr) 150px; } }
.tax-status .switch .txt { min-width: 52px; }
.tax-head .field label { font-size: 12px; color: var(--muted); }
.tax-no { position: absolute; left: -10px; top: -10px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--navy); color: #fff; font: 700 12px var(--font-head); }
.slabs { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.slab-row { display: grid; grid-template-columns: 90px 1fr 1fr 36px; gap: 8px; align-items: center; margin-bottom: 8px; }
.slab-row.head { font-size: 11.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; margin-bottom: 6px; }
.slab-row .input { min-height: 38px; padding: 7px 10px; }
.affix { position: relative; }
.affix .input { padding-left: 24px; }
.affix::before { content: attr(data-affix); position: absolute; left: 9px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 13px; pointer-events: none; }
.affix.pct .input { padding-left: 10px; padding-right: 26px; }
.affix.pct::before { left: auto; right: 10px; }
.icon-sq { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--line); background: #fff; color: var(--muted); cursor: pointer; }
.icon-sq:hover { color: var(--err); border-color: #F1C6C1; background: var(--err-bg); }
.no-range .slab-range, .no-range .slab-add, .no-range .slab-row .icon-sq { display: none; }
.no-range .slab-row { grid-template-columns: 140px; }
.no-range .slab-list .slab-row:not(:first-child) { display: none; }

.calc-out { list-style: none; margin: 12px 0 0; padding: 0; }
.calc-out li { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.calc-out li.total { border-bottom: 0; font-weight: 700; color: var(--ink); font-size: 15px; }
.calc-out small { display: block; color: var(--muted); font-size: 11.5px; }

.save-bar {
    position: sticky; bottom: 0; z-index: 20; margin-top: 18px; padding: 12px 16px;
    display: flex; justify-content: flex-end; gap: 10px; align-items: center;
    background: rgba(255,255,255,.95); backdrop-filter: blur(8px);
    border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 -4px 18px rgba(18,31,66,.06);
}
.save-bar .note { margin-right: auto; font-size: 12.5px; color: var(--muted); }
@media (max-width: 640px) { .save-bar .note { display: none; } }

/* Yes / No segmented radios */
.yn-grid { display: grid; gap: 0 28px; margin-top: 18px; padding-top: 6px; border-top: 1px solid var(--line); }
@media (min-width: 900px) { .yn-grid { grid-template-columns: 1fr 1fr; } }
.yn-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.yn-row > span { font-weight: 500; color: var(--ink); }
.yn-row small { display: block; font-size: 11.5px; color: var(--muted); font-weight: 400; }
.seg { display: inline-flex; flex: none; padding: 3px; border-radius: 999px; background: var(--navy-50); border: 1px solid var(--line); }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: block; padding: 5px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.seg input:checked + span { background: var(--navy); color: #fff; }
.seg input:focus-visible + span { box-shadow: 0 0 0 3px rgba(28,46,91,.2); }
.seg input:disabled + span { cursor: not-allowed; opacity: .6; }

.chip-check { padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: 13px; }
.chip-check:has(input:checked) { border-color: var(--navy); background: var(--navy-50); }
.chip-check small { color: var(--muted); margin-left: 4px; }

/* Rights matrix */
.rights-table th.c, .rights-table td.c { text-align: center; width: 120px; }
.rights-table td { padding: 8px 14px; }
.rights-table tbody tr:hover td { background: var(--navy-50); }
.rradio { display: inline-grid; place-items: center; cursor: pointer; }
.rradio input { position: absolute; opacity: 0; }
.rradio span { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--navy-200); display: block; transition: all .15s; }
.rradio input:checked + span { border-color: var(--navy); box-shadow: inset 0 0 0 4px #fff; background: var(--navy); }
.rradio input:focus-visible + span { box-shadow: 0 0 0 3px rgba(28,46,91,.2); }
.rradio input:disabled + span { opacity: .3; cursor: not-allowed; }
.master-note { display: none; margin-top: 18px; }
.is-master .master-note { display: flex; }
.is-master .rights-area { opacity: .4; pointer-events: none; }
@media (max-width: 760px) { .hide-sm { display: none; } .rights-table th.c, .rights-table td.c { width: 70px; } }
.num-cell { text-align: right; white-space: nowrap; font-weight: 600; color: var(--ink); }

/* GST Compliance Review */
.gst-none { display: none; }
.gst-off .gst-details { display: none; }
.gst-off .gst-none { display: block; }
.gst-check { min-height: 42px; display: flex; flex-direction: column; justify-content: center; gap: 4px; font-size: 13px; }
.gst-check .gst-meta { color: var(--muted); font-size: 12.5px; }
.gst-check .gst-meta b { color: var(--ink); }

/* Customization of Links */
.link-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr) 160px 70px auto; gap: 10px; align-items: center; margin-bottom: 10px; }
.link-row.head { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; margin-bottom: 8px; }
.link-row .check { justify-content: center; color: var(--muted); }
.link-tools { display: flex; gap: 6px; }
.link-tools .tool:hover { color: var(--navy); border-color: var(--navy-200); background: var(--navy-50); }
.link-tools button:disabled { opacity: .35; cursor: default; }
@media (max-width: 900px) {
    .link-row { grid-template-columns: 1fr 1fr; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
    .link-row.head { display: none; }
    .link-row [data-url] { grid-column: span 2; order: 2; }
}
.link-preview { display: flex; align-items: center; gap: 24px; padding: 14px 18px; border-radius: 12px; background: var(--navy); color: #fff; min-height: 56px; overflow-x: auto; }
.link-preview .lp-brand { font: 700 15px var(--font-head); white-space: nowrap; }
.link-preview nav { display: flex; gap: 20px; font-size: 13.5px; white-space: nowrap; }
.link-preview nav span { opacity: .92; border-bottom: 2px solid transparent; padding-bottom: 2px; }
.link-preview nav span:first-child { border-bottom-color: #fff; }
.link-preview[data-align="2"] nav { margin-left: auto; }
.link-preview[data-align="3"] nav { flex: 1; justify-content: center; }

/* Room Configuration - list */
.room-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); }
.room-card { display: grid; grid-template-columns: 180px minmax(0, 1fr); overflow: hidden; margin: 0 !important; }
.room-pic { position: relative; display: block; min-height: 170px; background: var(--navy-50); }
.room-pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.room-pic .ph { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 4px; color: var(--navy-400); font-size: 30px; }
.room-pic .ph small { font-size: 12px; }
.room-pic .pic-edit { position: absolute; left: 8px; bottom: 8px; padding: 4px 10px; border-radius: 8px; background: rgba(18,31,66,.85); color: #fff; font-size: 12px; font-weight: 600; }
.room-pic .pic-count { position: absolute; right: 8px; top: 8px; padding: 3px 8px; border-radius: 999px; background: rgba(255,255,255,.9); color: var(--navy); font-size: 11.5px; font-weight: 600; }
.room-body { padding: 16px; min-width: 0; }
.room-body h3 { font-size: 16.5px; margin-bottom: 2px; }
.pax { display: inline-block; margin-top: 10px; padding: 5px 12px; border-radius: 999px; background: var(--navy-50); border: 1px solid var(--line); font-size: 12.5px; color: var(--ink); }
@media (max-width: 520px) { .room-card { grid-template-columns: 1fr; } .room-pic { min-height: 180px; } }

/* Room Configuration - form */
.stepper { display: grid; grid-template-columns: 42px minmax(0, 1fr) 42px; border: 1px solid #D5DBE8; border-radius: 10px; overflow: hidden; background: #fff; }
.stepper button { border: 0; background: var(--navy-50); color: var(--navy); cursor: pointer; font-size: 15px; }
.stepper button:hover { background: var(--navy-100); }
.stepper input { border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); text-align: center; font: 600 15px var(--font-body); color: var(--ink); min-height: 40px; min-width: 0; -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button, .stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.stepper input:focus { outline: none; background: var(--navy-50); }
@media (min-width: 900px) { .occ-grid { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; } }
.occ-note { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: var(--navy-50); font-size: 12.5px; color: var(--muted); }
.occ-note b { color: var(--ink); }

.photo-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); border-radius: 12px; transition: box-shadow .15s; }
.photo-grid.drag { box-shadow: 0 0 0 3px var(--navy-200); }
.photo-grid.busy { opacity: .6; pointer-events: none; }
.photo { position: relative; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: var(--navy-50); }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo.cover { box-shadow: 0 0 0 3px var(--navy); }
.photo.empty { display: grid; place-content: center; justify-items: center; gap: 6px; border: 1.5px dashed var(--navy-200); color: var(--muted); font: 500 12px var(--font-body); cursor: pointer; text-align: center; }
.photo.empty i { font-size: 26px; color: var(--navy-400); }
.photo.empty:hover { background: var(--navy-100); border-color: var(--navy-400); }
.photo .p-btn { position: absolute; top: 8px; width: 30px; height: 30px; border: 0; border-radius: 8px; background: rgba(255,255,255,.92); color: var(--navy); cursor: pointer; }
.photo .p-btn.del { right: 8px; color: var(--err); }
.photo .p-btn.star { left: 8px; }
.photo .cover-tag { position: absolute; left: 8px; top: 8px; padding: 3px 9px; border-radius: 999px; background: var(--navy); color: #fff; font-size: 11px; font-weight: 600; }
.photo .p-move { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; padding: 6px; opacity: 0; transition: opacity .15s; background: linear-gradient(transparent, rgba(0,0,0,.35)); }
.photo:hover .p-move, .photo:focus-within .p-move { opacity: 1; }
.photo .p-move button { width: 28px; height: 28px; border: 0; border-radius: 8px; background: rgba(255,255,255,.92); color: var(--navy); cursor: pointer; }
.photo .p-move button:disabled { visibility: hidden; }

.amen-h { font-size: 14px; margin-bottom: 10px; }
.amen-grid { display: grid; gap: 10px 16px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.amen-grid.collapsed { max-height: 132px; overflow: hidden; -webkit-mask-image: linear-gradient(#000 60%, transparent); mask-image: linear-gradient(#000 60%, transparent); }
.amenity { font-weight: 400; font-size: 13.5px; }
.amenity i { color: var(--navy-400); margin-right: 4px; }
.amenity[hidden] { display: none; }

/* section heading above a row of dashboard cards + "View More" link in card headers */
.sec-head { margin: 22px 0 10px; }
.sec-head h2 { font: 800 13px/1.2 var(--font-head); letter-spacing: .08em; color: var(--muted); margin: 0; }
.card-h .link-more { margin-left: auto; font-size: 12.5px; font-weight: 600; color: var(--navy); text-decoration: none; white-space: nowrap; }
.card-h .link-more:hover { text-decoration: underline; }

/* ------------------------------------------------------------------
   Configuration screens: Rate Plan, Default Configuration, Properties,
   IBE Addons, Enrichment.
   ------------------------------------------------------------------ */
.alert-warn { background: var(--warn-bg); color: #7A4C0C; border-color: #F2D9AE; }
.tabs-row { display: flex; align-items: flex-start; gap: 12px; }
.tabs-row .tabs { margin-right: auto; }
.icon-sq.on { color: #fff; background: var(--navy); border-color: var(--navy); }
.icon-sq.plain:hover, a.icon-sq:hover { color: var(--navy); border-color: var(--navy-100); background: var(--navy-50); }
.filter-bar { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px 16px; padding: 14px 16px; margin-bottom: 16px; }
.row-actions { display: inline-flex; gap: 8px; justify-content: flex-end; }
.row-actions .inline-form { display: inline; }
.field em.opt, .field .opt { font-style: italic; font-weight: 400; color: var(--muted); font-size: 12px; }

/* dialog with header / body / footer */
.modal.modal-md { width: min(600px, calc(100vw - 32px)); }
.modal-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; background: var(--navy-50); border-bottom: 1px solid var(--line); }
.modal-h h2 { margin: 0; font: 700 18px var(--font-head); color: var(--ink); }
.modal-b { padding: 20px; }
.modal-f { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line); }
.modal-note { margin: 16px 0 0; font-size: 12.5px; color: var(--muted); }
.modal-note b { color: var(--ink); }

/* form sections: title + helper on the left, fields on the right */
.fsec { display: grid; gap: 14px 28px; padding: 22px; border-bottom: 1px solid var(--line); }
.fsec:last-child { border-bottom: 0; }
.fsec-t h2 { margin: 0 0 4px; font: 700 16px var(--font-head); color: var(--ink); }
.fsec-t p { margin: 0; font-size: 12.5px; color: var(--muted); }
.fsec-t .step { display: inline-grid; place-items: center; width: 26px; height: 26px; margin-right: 8px; border-radius: 50%; background: var(--navy); color: #fff; font-size: 13px; vertical-align: 2px; }
.fsec h3 { margin: 6px 0 0; font: 700 14px var(--font-head); color: var(--navy); }
.fsec .aside { font-size: 12px; color: var(--muted); align-self: center; }
@container (min-width: 820px) {
    .fsec { grid-template-columns: 260px minmax(0, 1fr); }
}
@media (min-width: 1100px) {
    .fsec { grid-template-columns: 260px minmax(0, 1fr); }
}
.form-grid.cols-2 { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) {
    .form-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .form-grid .span-all { grid-column: 1 / -1; }
}
.with-aside { display: grid; gap: 6px 18px; }
@media (min-width: 1200px) { .with-aside { grid-template-columns: minmax(0, 1fr) 240px; } }

/* Yes / No and other radio choices */
.choices { display: flex; flex-wrap: wrap; gap: 6px 18px; min-height: 38px; align-items: center; }
.choices label { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; font-weight: 500; font-size: 13.5px; color: var(--ink); margin: 0; }
.choices input { width: 17px; height: 17px; accent-color: var(--navy); margin: 0; }
.yn-list { display: grid; }
.yn-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.yn-row:last-child { border-bottom: 0; }
.yn-row .choices { min-height: 0; }
@media (min-width: 1000px) { .yn-list.two { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; } }

/* tag-style e-mail list */
.tag-input { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 42px; padding: 5px 8px; border: 1px solid var(--line-strong, #CBD2E1); border-radius: 10px; background: #fff; }
.tag-input:focus-within { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(28,46,91,.12); }
.tag-input input { flex: 1; min-width: 160px; border: 0; outline: 0; padding: 4px; font: inherit; background: transparent; }
.tag-input .tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 10px; border-radius: 999px; background: var(--navy-50); color: var(--navy); font-size: 12.5px; font-weight: 600; }
.tag-input .tag button { border: 0; background: none; color: inherit; cursor: pointer; padding: 0 4px; line-height: 1; }
.tag-input .tag.bad { background: var(--err-bg); color: var(--err); }

/* item cards (addons / enrichments list) */
.dot-menu { position: relative; display: inline-block; }
.dot-menu > summary { list-style: none; }
.dot-menu > summary::-webkit-details-marker { display: none; }
.dot-menu .menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 20; min-width: 190px; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); text-align: left; }
.dot-menu .menu a, .dot-menu .menu button { display: flex; width: 100%; gap: 8px; align-items: center; padding: 8px 10px; border: 0; background: none; border-radius: 8px; font: inherit; font-size: 13px; color: var(--ink); text-decoration: none; cursor: pointer; }
.dot-menu .menu a:hover, .dot-menu .menu button:hover { background: var(--navy-50); }
.stepper.sm input { width: 56px; }
.input-addon { display: flex; }
.input-addon .select, .input-addon .input { border-radius: 10px 0 0 10px; }
.input-addon .input + .unit, .input-addon .unit { display: grid; place-items: center; padding: 0 12px; border: 1px solid #CBD2E1; border-left: 0; border-radius: 0 10px 10px 0; background: var(--navy-50); color: var(--muted); font-weight: 600; }
.input-addon .select + .input { border-radius: 0; border-left: 0; }
