:root {
    --color-primary: #c9a227;
    --color-text: #222;
    --color-muted: #6b7280;
    --color-border: #e5e7eb;
    --color-bg: #f8f7f4;
    --color-ok: #15803d;
    --color-warn: #b45309;
    --radius: 8px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    font-size: 15px;
    line-height: 1.55;
    color: var(--color-text);
    background: var(--color-bg);
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 16px;
}

.app-header {
    background: #fff;
    border-bottom: 2px solid var(--color-primary);
}

.app-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 56px;
    gap: 16px;
    flex-wrap: wrap;
}

.brand {
    font-weight: 700;
    color: var(--color-primary);
    letter-spacing: 0.4px;
}

.app-header nav a {
    margin-left: 16px;
    color: var(--color-muted);
    text-decoration: none;
}

.app-header nav a:hover { color: var(--color-primary); }

main.container { padding-top: 24px; padding-bottom: 40px; }

h1 { font-size: 24px; margin: 0 0 8px; }
h2 { font-size: 17px; margin: 0 0 12px; }

.lead { color: var(--color-muted); margin-top: 0; }

.card {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
}

table.kv { width: 100%; border-collapse: collapse; }
table.kv th,
table.kv td {
    text-align: left;
    padding: 8px 0;
    border-bottom: 1px solid var(--color-border);
    vertical-align: top;
}
table.kv th { width: 180px; font-weight: 600; color: var(--color-muted); }
table.kv tr:last-child th,
table.kv tr:last-child td { border-bottom: 0; }

.badge {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}
.badge-ok   { background: #dcfce7; color: var(--color-ok); }
.badge-warn { background: #fef3c7; color: var(--color-warn); }

code {
    background: #f3f4f6;
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 13px;
}

ol, ul { padding-left: 20px; }
ol li, ul li { margin-bottom: 6px; }

.app-footer {
    border-top: 1px solid var(--color-border);
    padding: 16px 0;
    color: var(--color-muted);
    font-size: 13px;
}

.error-card { text-align: center; margin-top: 60px; }
.error-card h1 { font-size: 48px; color: var(--color-primary); }

/* Bang du lieu dung chung cho cac man hinh danh sach */
table.data {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}
table.data th {
    background: #faf7ee;
    border-bottom: 2px solid var(--color-primary);
    padding: 10px;
    text-align: left;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
table.data td {
    border-bottom: 1px solid var(--color-border);
    padding: 10px;
}
table.data td.num { text-align: right; white-space: nowrap; }
table.data tr.combo-parent td { font-weight: 600; }
table.data tr.combo-child td:first-child { padding-left: 28px; color: var(--color-muted); }

@media (max-width: 640px) {
    table.kv th { width: 120px; }
}

a { color: #8a6c10; }
.muted { color: var(--color-muted); font-size: 13px; }

label {
    display: block;
    margin: 0 0 6px;
    font-weight: 600;
}

input,
select {
    width: 100%;
    min-height: 40px;
    margin: 0 0 16px;
    padding: 8px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    font: inherit;
}

.button {
    display: inline-block;
    min-height: 38px;
    padding: 8px 14px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    background: #fff;
    color: var(--color-text);
    font: inherit;
    text-decoration: none;
    cursor: pointer;
}
.button-primary { border-color: var(--color-primary); background: var(--color-primary); color: #fff; }
.button-danger { border-color: #b91c1c; background: #b91c1c; color: #fff; }
.button:disabled { cursor: not-allowed; opacity: 0.6; }
.button-block { width: 100%; }
.link-button {
    padding: 0;
    border: 0;
    background: transparent;
    color: #8a6c10;
    font: inherit;
    text-decoration: underline;
    cursor: pointer;
}

.alert { margin-bottom: 16px; padding: 10px 12px; border-radius: 6px; }
.alert-error { border: 1px solid #fecaca; background: #fef2f2; color: #991b1b; }
.alert-success { border: 1px solid #bbf7d0; background: #f0fdf4; color: #166534; }
.danger-zone { border-color: #fecaca; background: #fff7f7; }
.danger-zone textarea { width: 100%; margin: 0 0 16px; padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: 6px; font: inherit; }

.auth-page {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 20px;
}
.auth-card {
    width: min(100%, 420px);
    padding: 32px;
    border: 1px solid var(--color-border);
    border-top: 4px solid var(--color-primary);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 12px 30px rgb(0 0 0 / 8%);
}
.auth-brand { margin-bottom: 20px; color: var(--color-primary); font-size: 20px; font-weight: 800; }

.admin-shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
.sidebar { padding: 22px 16px; background: #222; color: #fff; }
.sidebar-brand { display: block; margin-bottom: 24px; color: var(--color-primary); font-size: 20px; font-weight: 800; text-decoration: none; }
.sidebar-nav { display: grid; gap: 4px; }
.sidebar-nav a,
.nav-disabled { padding: 9px 10px; border-radius: 6px; color: #f3f4f6; text-decoration: none; }
.sidebar-nav a:hover { background: #343434; }
.nav-disabled { color: #9ca3af; font-size: 13px; }
.admin-main { min-width: 0; }
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
    padding: 10px 24px;
    border-bottom: 1px solid var(--color-border);
    background: #fff;
}
.topbar-actions { display: flex; align-items: center; gap: 16px; }
.topbar-actions form,
.actions form { display: inline; }
.admin-content { padding: 24px; }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.form-card { max-width: 680px; }
.field-help { margin-top: -10px; color: var(--color-muted); font-size: 13px; }
.filter-bar { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 10px; margin-bottom: 16px; }
.filter-bar input,
.filter-bar select { margin: 0; }
.table-wrap { overflow-x: auto; border: 1px solid var(--color-border); border-radius: var(--radius); }
.actions { min-width: 180px; }
.actions > * { margin-right: 8px; }
.inline-reset { display: inline-flex !important; align-items: center; gap: 6px; margin-top: 6px; }
.inline-reset input { width: 125px; min-height: 30px; margin: 0; padding: 4px 7px; }
.pagination { display: flex; gap: 6px; margin-top: 16px; }
.pagination a { min-width: 32px; padding: 5px; border: 1px solid var(--color-border); border-radius: 4px; text-align: center; text-decoration: none; }
.pagination a.active { border-color: var(--color-primary); background: var(--color-primary); color: #fff; }
.filter-grid { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 12px; align-items: end; }
.filter-grid input, .filter-grid select { margin-bottom: 0; }
.filter-actions { padding-bottom: 1px; }
.report-export-actions { margin-top: 16px; }

@media (max-width: 900px) {
    .filter-grid { grid-template-columns: repeat(2, minmax(140px, 1fr)); }
}

@media (max-width: 560px) {
    .filter-grid { grid-template-columns: 1fr; }
}
.permission-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.permission-group { margin: 0; }
.permission-group legend { padding: 0 5px; font-weight: 700; }
.checkbox-row { display: flex; gap: 9px; margin-bottom: 10px; font-weight: 400; }
.checkbox-row input { width: auto; min-height: auto; margin: 4px 0 0; }
.checkbox-row small { display: block; color: var(--color-muted); }
.sticky-actions { position: sticky; bottom: 0; margin-top: 16px; padding: 12px 0; background: var(--color-bg); }

@media (max-width: 800px) {
    .admin-shell { grid-template-columns: 1fr; }
    .sidebar { padding: 14px; }
    .sidebar-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .filter-bar,
    .permission-grid { grid-template-columns: 1fr; }
}

/* Form tao booking nhap M5-C3. */
.booking-form { max-width: 1180px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.form-grid > .full { grid-column: 1 / -1; }
.form-grid textarea { width: 100%; margin-bottom: 16px; padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: 6px; font: inherit; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.booking-toolbar { display: flex; align-items: flex-start; gap: 8px; }
.booking-toolbar select { min-width: 300px; margin: 0; }
.booking-lines { display: grid; gap: 12px; }
.booking-line { padding: 14px; border: 1px solid var(--color-border); border-radius: 6px; background: #fff; }
.combo-summary, .combo-child-line { border-left: 4px solid var(--color-primary); background: #fffdf5; }
.booking-line-title { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.booking-line-title strong { margin-right: auto; }
.booking-line-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; align-items: end; }
.booking-line-grid input, .booking-line-grid select { margin-bottom: 0; }
.button-small { min-height: 30px; padding: 3px 9px; }
.booking-customer-picker { position: relative; }
.lookup-results { position: absolute; z-index: 20; width: 100%; max-height: 260px; overflow-y: auto; margin: -14px 0 0; padding: 0; border: 1px solid var(--color-border); border-radius: 6px; background: #fff; box-shadow: 0 8px 20px rgb(0 0 0 / 12%); }
.lookup-results li { margin: 0; padding: 9px 12px; list-style: none; cursor: pointer; }
.lookup-results li:hover, .lookup-results li:focus { background: #faf7ee; outline: none; }
.booking-totals { display: grid; gap: 8px; max-width: 520px; margin-left: auto; }
.booking-totals div { display: flex; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--color-border); }
.booking-totals dd { margin: 0; font-weight: 700; }
.booking-actions { display: flex; align-items: center; gap: 10px; z-index: 5; }
.alert-warning { border: 1px solid #fde68a; background: #fffbeb; color: #92400e; }
.combo-balance-error { margin: 8px 0 0; color: #991b1b; font-weight: 600; }
.combo-balance-ok { margin: 8px 0 0; color: var(--color-ok); }

@media (max-width: 900px) {
    .section-heading, .booking-toolbar { display: grid; grid-template-columns: 1fr; }
    .booking-toolbar select { min-width: 0; }
    .booking-line-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    .form-grid, .booking-line-grid { grid-template-columns: 1fr; }
    .form-grid .span-2 { grid-column: auto; }
}

/* ---------------------------------------------------------------
   O chon dia ban hanh chinh 2 cap (resources/views/partials/area-picker.php)
   --------------------------------------------------------------- */
.area-picker { position: relative; }
.area-picker .area-picker-input { width: 100%; padding-right: 2rem; }
.area-picker .area-picker-clear {
    position: absolute; top: 0.35rem; right: 0.4rem;
    border: 0; background: transparent; cursor: pointer;
    font-size: 1.1rem; line-height: 1; color: #6b7280;
}
.area-picker .area-picker-clear:hover { color: #111827; }
.area-picker-results {
    position: absolute; z-index: 40; left: 0; right: 0; top: 100%;
    margin: 0.15rem 0 0; padding: 0; list-style: none;
    max-height: 18rem; overflow-y: auto;
    background: #fff; border: 1px solid #d1d5db; border-radius: 6px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}
.area-picker-results li {
    display: flex; flex-direction: column; gap: 0.15rem;
    padding: 0.5rem 0.7rem; cursor: pointer; border-bottom: 1px solid #f1f5f9;
}
.area-picker-results li:last-child { border-bottom: 0; }
.area-picker-results li:hover,
.area-picker-results li:focus { background: #eff6ff; outline: none; }
.area-picker-results .area-picker-name { font-weight: 600; }
.area-picker-results .badge { align-self: flex-start; }
.area-picker-results .area-picker-note { color: #b45309; }
.area-picker-results .area-picker-empty { color: #6b7280; cursor: default; }
.area-picker-results .area-picker-empty:hover { background: transparent; }
.area-picker-results .area-picker-guidance { cursor: not-allowed; background: #fff7ed; }
.area-picker-results .area-picker-guidance:hover { background: #fff7ed; }
.area-picker-results .area-picker-candidate { padding-left: 1.35rem; border-left: 3px solid #0f766e; }
.area-picker-hint { margin: 0.3rem 0 0; font-size: 0.82rem; }

/* Form sua nhanh tung khoang gia ngay trong bang */
.inline-form { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: flex-end; }
.inline-form label { display: flex; flex-direction: column; font-size: 0.82rem; gap: 0.2rem; }
.inline-form input { min-width: 8rem; }
.card-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); gap:1rem; margin:1rem 0; }
.calendar-event { border-left:6px solid #64748b; margin:.65rem 0; }
.calendar-event summary { cursor:pointer; }
/* Prototype integration approved for the production PHP views.
   ========================================================================== */
/* ========================================================================== 
   FE refresh 2026 — mobile-first application design system
   Source of truth for visual language: FE/style.css (prototype remains intact).
   ========================================================================== */
:root {
    --color-primary: #176b5b;
    --color-primary-hover: #105447;
    --color-primary-soft: #e4f3ed;
    --color-text: #1f2933;
    --color-muted: #74808a;
    --color-border: #e3e9e5;
    --color-bg: #f5f7f5;
    --color-surface: #fff;
    --color-ok: #187054;
    --color-warn: #b86525;
    --color-danger: #b43c38;
    --color-blue: #3e75bd;
    --radius: 14px;
    --radius-small: 10px;
    --shadow: 0 12px 30px rgb(28 52 46 / 8%);
    --sidebar-width: 252px;
}

html { min-width: 320px; background: var(--color-bg); }
body { color: var(--color-text); background: var(--color-bg); font-size: 15px; overflow-x: hidden; }
a { color: var(--color-primary); }
svg { width: 19px; height: 19px; stroke: currentColor; stroke-width: 1.9; fill: none; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid rgb(23 107 91 / 28%); outline-offset: 2px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.eyebrow { margin: 0 0 5px; color: var(--color-muted); font-size: 11px; font-weight: 800; letter-spacing: 1px; }
h1 { font-size: clamp(25px, 3vw, 34px); letter-spacing: -.8px; line-height: 1.16; }
h2 { font-size: 18px; letter-spacing: -.25px; }
.lead { margin: 6px 0 0; }

/* Shell */
.admin-shell { display: block; min-height: 100vh; }
.sidebar {
    position: fixed; z-index: 30; inset: 0 auto 0 0; width: var(--sidebar-width);
    display: flex; flex-direction: column; padding: 24px 15px 16px;
    color: var(--color-text); background: #fff; border-right: 1px solid var(--color-border);
}
.sidebar-brand { display: flex; align-items: center; gap: 10px; margin: 0 8px 22px; color: var(--color-text); font-size: 23px; letter-spacing: -.8px; }
.brand-mark { display: inline-grid; place-items: center; flex: 0 0 auto; width: 32px; height: 32px; border-radius: 10px; color: #fff; background: var(--color-primary); font-weight: 850; font-size: 17px; }
.sidebar-nav { display: grid; gap: 3px; min-height: 0; padding-right: 3px; overflow-y: auto; scrollbar-width: thin; }
.sidebar-nav a { display: flex; align-items: center; gap: 11px; min-height: 43px; padding: 9px 11px; border-radius: 11px; color: #5f6a73; font-weight: 650; }
.sidebar-nav a:hover, .sidebar-nav a.is-active { color: var(--color-primary); background: var(--color-primary-soft); }
.nav-icon { display: grid; flex: 0 0 21px; place-items: center; width: 21px; }
.sidebar-profile { display: flex; align-items: center; gap: 10px; margin-top: auto; padding: 16px 8px 0; border-top: 1px solid var(--color-border); }
.sidebar-profile > span:last-child { min-width: 0; }
.sidebar-profile strong, .sidebar-profile small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-profile strong { font-size: 13px; }.sidebar-profile small { margin-top: 2px; color: var(--color-muted); font-size: 11px; }
.avatar { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: #673d22; background: #f4c698; font-weight: 800; text-decoration: none; }
.admin-main { min-width: 0; margin-left: var(--sidebar-width); }
.topbar { position: sticky; z-index: 20; top: 0; min-height: 76px; padding: 10px clamp(18px, 3vw, 40px); background: rgb(245 247 245 / 92%); border: 0; backdrop-filter: blur(12px); }
.topbar-title { display: flex; align-items: center; gap: 10px; }.topbar-title > div > strong { font-size: 17px; }.mobile-brand { display: none; }
.topbar-actions { gap: 10px; }.topbar-actions form { margin: 0; }.topbar-actions input { margin: 0; }
.icon-button { display: inline-grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 1px solid var(--color-border); border-radius: 11px; color: #617079; background: #fff; text-decoration: none; }
.icon-button:hover { color: var(--color-primary); border-color: #b9c9c3; }
.logout-button { min-height: 40px; padding: 0 4px; color: var(--color-muted); text-decoration: none; }
.admin-content { width: min(100%, 1480px); margin: 0 auto; padding: 12px clamp(18px, 3vw, 40px) 64px; }
.bottom-nav { display: none; }

/* Components */
.card { padding: clamp(16px, 2.2vw, 23px); border: 1px solid var(--color-border); border-radius: 16px; background: #fff; box-shadow: 0 4px 12px rgb(38 62 55 / 3%); }
.page-heading { align-items: center; margin: 7px 0 22px; }.page-heading h1 { margin-bottom: 0; }
.button { min-height: 42px; padding: 9px 15px; border-radius: 10px; font-weight: 700; }
.button-primary { border-color: var(--color-primary); background: var(--color-primary); box-shadow: 0 5px 12px rgb(23 107 91 / 18%); }
.button-primary:hover { border-color: var(--color-primary-hover); background: var(--color-primary-hover); }
.button-danger { border-color: var(--color-danger); background: var(--color-danger); }
input, select, textarea { min-height: 43px; border-color: #d5ded9; border-radius: 9px; background: #fff; }
textarea { width: 100%; margin: 0 0 16px; padding: 10px 12px; font: inherit; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: #70a99d; box-shadow: 0 0 0 3px rgb(23 107 91 / 10%); outline: 0; }
.filter-bar, .filter-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); align-items: end; gap: 10px; padding: 13px; margin-bottom: 18px; border: 1px solid var(--color-border); border-radius: 14px; background: #fff; }
.filter-bar input, .filter-bar select, .filter-grid input, .filter-grid select { margin-bottom: 0; }
.filter-bar > input:first-child, .booking-filter .search-field { grid-column: span 2; }
.filter-fixed-value { min-height: 46px; display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 8px 12px; border: 1px solid var(--color-border); border-radius: 10px; background: #f8faf9; }
.filter-fixed-value span { color: var(--color-muted); font-size: 12px; }
.filter-fixed-value strong { font-size: 14px; }
.payout-self-summary { grid-template-columns: minmax(240px, 420px); }
.payout-self-summary .metric-card { align-items: flex-start; flex-direction: column; gap: 5px; }
.search-field { position: relative; margin: 0; }.search-field input { padding-left: 37px; }.search-field::before { content: '⌕'; position: absolute; z-index: 1; left: 13px; top: 9px; color: var(--color-muted); font-size: 20px; }
.table-wrap { max-width: 100%; border-radius: 13px; border-color: var(--color-border); background: #fff; }
table.data th { padding: 12px; color: #68747a; background: #f7f9f7; border-bottom: 1px solid var(--color-border); font-size: 11px; }
table.data td { padding: 12px; }.actions { min-width: 0; }.actions > * { margin-bottom: 6px; }
.badge { padding: 4px 9px; font-size: 11px; line-height: 1.3; }
.alert { border-radius: 11px; }.pagination { flex-wrap: wrap; }.pagination a { min-width: 38px; min-height: 38px; display: grid; place-items: center; border-radius: 9px; }
.empty-state { padding: 42px 18px; text-align: center; color: var(--color-muted); }.empty-state.compact { padding: 22px 8px; }
.sticky-actions, .booking-actions { border-top: 1px solid var(--color-border); background: rgb(245 247 245 / 94%); backdrop-filter: blur(8px); }

/* Dashboard */
.dashboard-hero { align-items: end; }.compact-filter { display: flex; align-items: end; gap: 9px; }.compact-filter label { margin: 0; }.compact-filter input { min-width: 170px; margin: 0; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 14px; margin-bottom: 18px; }
.metric-card { display: flex; gap: 13px; min-height: 132px; padding: 19px; border: 1px solid transparent; border-radius: 16px; background: #dff2e9; }
.metric-card.metric-tone-1 { background: #fff0e1; }.metric-card.metric-tone-2 { background: #e5effb; }
.metric-dot { flex: 0 0 auto; width: 37px; height: 37px; border-radius: 12px; background: rgb(255 255 255 / 84%); }
.metric-card h3 { margin: 1px 0 5px; color: #68747a; font-size: 12px; }.metric-card strong { display: block; font-size: 27px; letter-spacing: -1px; }.metric-card p { margin: 3px 0 0; color: #748087; font-size: 10px; }
.dashboard-panels { display: grid; grid-template-columns: 1.35fr .8fr; gap: 16px; }.dashboard-panel { margin-bottom: 18px; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 13px; }.panel-heading h2 { margin: 0; }.panel-accent { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; font-weight: 800; }.accent-orange { color: #b86525; background: #fff0e3; }.accent-green { color: var(--color-primary); background: var(--color-primary-soft); }
.dashboard-list-row { display: flex; justify-content: space-between; gap: 15px; margin: 0; padding: 11px 0; border-bottom: 1px solid var(--color-border); }.dashboard-list-row:last-child { border-bottom: 0; }.dashboard-list-row span { color: var(--color-muted); text-align: right; }
.calendar-panel { margin-top: 0; }.calendar-filter { padding: 0 0 15px; border: 0; border-bottom: 1px solid var(--color-border); border-radius: 0; }.calendar-semantics { color: var(--color-primary); font-weight: 700; }
.calendar-day-group { padding: 4px 0 10px; }.calendar-day-group > h3 { margin: 15px 0 8px; font-size: 14px; color: #536067; }.calendar-day-events { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; }
.calendar-event { margin: 0; padding: 13px 15px; border-radius: 12px; box-shadow: none; }.calendar-event summary { min-height: 24px; }.calendar-event p { margin: 8px 0 0; color: var(--color-muted); font-size: 13px; }

/* Booking list and forms */
.booking-card-list { display: grid; gap: 11px; }.booking-table { display: none; }
.booking-card { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 16px; min-width: 0; padding: 16px 18px; border: 1px solid var(--color-border); border-radius: 15px; background: #fff; box-shadow: 0 3px 9px rgb(28 52 46 / 3%); }
.booking-card:hover { border-color: #afd0c4; box-shadow: var(--shadow); }
.booking-date { display: grid; place-items: center; align-content: center; width: 58px; height: 58px; border-radius: 13px; color: var(--color-primary); background: #eef5f1; text-decoration: none; }.booking-date strong { font-size: 21px; line-height: 1; }.booking-date span { margin-top: 5px; font-size: 9px; font-weight: 800; }
.booking-card-main { min-width: 0; }.booking-card-title { display: flex; align-items: center; gap: 8px; }.booking-card-title > a { overflow: hidden; color: var(--color-text); font-size: 15px; font-weight: 750; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }.booking-card-main > p { margin: 7px 0; overflow: hidden; color: #68757d; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.booking-card-meta { display: flex; gap: 14px; color: var(--color-muted); font-size: 11px; }.booking-card-meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.booking-card-price { display: flex; align-items: center; gap: 12px; text-align: right; }.booking-card-price > strong { white-space: nowrap; font-size: 13px; }
.booking-form { max-width: 1200px; margin: 0 auto; }.booking-line { border-radius: 12px; }.combo-summary, .combo-child-line { border-left-color: var(--color-primary); background: #f7fbf9; }
.lookup-results { border-radius: 10px; }.lookup-results li:hover, .lookup-results li:focus { background: var(--color-primary-soft); }
.booking-actions { padding: 13px; border-radius: 12px 12px 0 0; }

/* Sheets/dialogs and long modules */
.modal, .dialog, [role="dialog"] { max-width: calc(100vw - 24px); }
.permission-group { border-color: var(--color-border); border-radius: 12px; background: #fff; }
.form-card { max-width: 760px; }.card-grid { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }

@media (max-width: 1100px) {
    .metric-grid { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
    .dashboard-panels { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
    .admin-shell { display: block; }.sidebar { display: none; }.admin-main { margin-left: 0; }
    .topbar { min-height: 68px; padding: 8px 16px; background: rgb(255 255 255 / 94%); border-bottom: 1px solid var(--color-border); }.mobile-brand { display: inline-flex; }.topbar-title .eyebrow { display: none; }.topbar-title > div > strong { font-size: 15px; }.logout-button { display: none; }
    .admin-content { padding: 18px 16px 104px; }.topbar-avatar { display: none; }
    .bottom-nav { position: fixed; z-index: 50; inset: auto 0 0; display: flex; align-items: center; justify-content: space-around; min-height: 72px; padding: 6px max(7px, env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) max(7px, env(safe-area-inset-left)); border-top: 1px solid var(--color-border); background: rgb(255 255 255 / 97%); box-shadow: 0 -8px 25px rgb(28 52 46 / 7%); }
    .bottom-nav a { display: grid; place-items: center; gap: 3px; min-width: 52px; min-height: 45px; color: #849097; font-size: 10px; text-decoration: none; }.bottom-nav a.is-active { color: var(--color-primary); }.bottom-nav a svg { width: 21px; height: 21px; }
    .bottom-nav .quick-create { min-width: 56px; width: 56px; height: 56px; min-height: 56px; margin-top: -31px; border: 5px solid var(--color-bg); border-radius: 50%; color: #fff; background: var(--color-primary); box-shadow: 0 6px 15px rgb(23 107 91 / 28%); }
    .page-heading { align-items: flex-end; }.page-primary-action { min-width: 44px; }
    .filter-bar, .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }.filter-bar > input:first-child, .booking-filter .search-field { grid-column: 1 / -1; }
    .form-grid { grid-template-columns: 1fr; }.form-grid .span-2 { grid-column: auto; }
    .booking-line-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sticky-actions { bottom: 72px; }
}

@media (max-width: 600px) {
    body { font-size: 14px; }.admin-content { padding-inline: 13px; }.topbar { padding-inline: 13px; }
    .page-heading { gap: 10px; }.page-heading h1 { font-size: 24px; }.page-heading .lead { font-size: 12px; }.page-primary-action { padding-inline: 11px; }.page-primary-action span + * { display: none; }
    .compact-filter { width: 100%; margin-top: 13px; }.dashboard-hero { display: block; }.compact-filter label { flex: 1; }.compact-filter input { min-width: 0; }
    .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }.metric-card { display: block; min-height: 126px; padding: 14px 12px; }.metric-dot { width: 30px; height: 30px; margin-bottom: 8px; }.metric-card strong { font-size: 22px; }.metric-card p { line-height: 1.25; }
    .filter-bar, .filter-grid { grid-template-columns: 1fr; }.filter-bar > input:first-child, .booking-filter .search-field { grid-column: auto; }.filter-grid label, .filter-bar label { min-width: 0; }
    .booking-filter select[multiple] { min-height: 92px; }
    .booking-card { grid-template-columns: 51px minmax(0, 1fr) 34px; gap: 10px; padding: 12px; }.booking-date { width: 49px; height: 49px; }.booking-date strong { font-size: 18px; }.booking-card-title { align-items: flex-start; flex-direction: column; gap: 4px; }.booking-card-title > a { max-width: 100%; font-size: 13px; }.booking-card-main > p { font-size: 11px; }.booking-card-meta { flex-wrap: wrap; gap: 5px 10px; font-size: 10px; }.booking-card-price > strong { display: none; }.booking-card-price { gap: 0; }
    .calendar-day-events { grid-template-columns: 1fr; }.calendar-event { padding: 12px; }
    .dashboard-list-row { display: grid; gap: 3px; }.dashboard-list-row span { text-align: left; }
    .card { padding: 15px; margin-bottom: 14px; }.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }.table-wrap table { min-width: 680px; }
    .booking-line-grid { grid-template-columns: 1fr; }.booking-toolbar { width: 100%; }.booking-actions { bottom: 72px; display: grid; grid-template-columns: 1fr; }.booking-actions .button { width: 100%; text-align: center; }
    .permission-grid { grid-template-columns: 1fr; }.actions { display: flex; flex-wrap: wrap; gap: 6px; }.actions > * { margin: 0; }
    [role="dialog"] { max-height: calc(100dvh - 16px); overflow-y: auto; border-radius: 18px 18px 0 0; }
}

/* ========================================================================== 
   Studio Operations UI — unified application layer
   ========================================================================== */
.sidebar-heading { display: flex; align-items: flex-start; justify-content: space-between; }
.sidebar-heading .sidebar-brand { min-width: 0; }
.sidebar-brand > span:last-child { line-height: 1; text-transform: lowercase; }
.sidebar-brand small { display: block; margin-top: 5px; color: #93a09b; font-size: 8px; font-weight: 800; letter-spacing: 1.25px; text-transform: uppercase; }
.sidebar-close, .mobile-menu-toggle, .sidebar-scrim { display: none; }

/* Dashboard: editorial hero with operational data immediately below. */
.studio-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 18px 4px 30px; }
.studio-hero h1 { max-width: 720px; margin: 7px 0 0; font-size: clamp(38px, 5vw, 62px); line-height: .98; letter-spacing: -2.6px; }
.studio-hero h1 em { color: var(--color-primary); font-style: normal; font-weight: 500; }
.studio-hero > div:first-child > p:last-child { max-width: 460px; margin: 18px 0 0; color: var(--color-muted); }
.date-bubble { display: grid; place-items: center; align-content: center; flex: 0 0 auto; width: 108px; height: 108px; border-radius: 34px 34px 12px 34px; color: #fff; background: var(--color-primary); box-shadow: 0 14px 28px rgb(23 107 91 / 22%); transform: rotate(3deg); }
.date-bubble > * { transform: rotate(-3deg); }
.date-bubble b { font-size: 38px; line-height: 1; letter-spacing: -1px; }
.date-bubble small { font-size: 8px; font-weight: 850; letter-spacing: 1px; }
.dashboard-date-filter { justify-content: flex-end; margin: -73px 132px 31px 0; }
.section-title { display: flex; align-items: flex-end; justify-content: space-between; margin: 0 0 12px; }
.section-title h2 { margin: 0; font-size: 22px; }
.link { border: 0; color: var(--color-primary); background: transparent; font-weight: 750; text-decoration: none; }
.metric-card { position: relative; overflow: hidden; }
.metric-card::after { content: ''; position: absolute; width: 76px; height: 76px; right: -24px; bottom: -31px; border: 14px solid rgb(255 255 255 / 37%); border-radius: 50%; }
.metric-dot { display: grid; place-items: center; color: var(--color-primary); font-weight: 900; }
.metric-card:nth-child(1) .metric-dot::before { content: '◷'; }.metric-card:nth-child(2) .metric-dot::before { content: '↗'; }
.metric-card:nth-child(3) .metric-dot::before { content: '✓'; }.metric-card:nth-child(4) .metric-dot::before { content: '7'; }
.metric-card:nth-child(5) .metric-dot::before { content: '₫'; }.metric-card:nth-child(6) .metric-dot::before { content: '↗'; }
.metric-card:nth-child(7) .metric-dot::before { content: '＋'; }.metric-card:nth-child(8) .metric-dot::before { content: '≋'; }
.studio-appointment { display: grid; grid-template-columns: 78px 48px minmax(0, 1fr) 28px; align-items: center; gap: 13px; min-height: 78px; padding: 12px 14px; border: 1px solid var(--color-border); border-left: 3px solid #74b8aa; border-radius: 14px; color: var(--color-text); background: #fff; text-decoration: none; transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.studio-appointment:hover { border-color: #acd0c6; box-shadow: var(--shadow); transform: translateY(-1px); }
.studio-appointment + .studio-appointment { margin-top: 9px; }
.studio-appointment time { display: grid; gap: 2px; }
.studio-appointment time b { font-size: 15px; }.studio-appointment time small { color: var(--color-muted); font-size: 9px; }
.service-art { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; color: var(--color-primary); background: var(--color-primary-soft); font-size: 20px; }
.appointment-copy { display: grid; min-width: 0; gap: 3px; }.appointment-copy strong, .appointment-copy > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.appointment-copy strong { font-size: 14px; }.appointment-copy > span { color: var(--color-muted); font-size: 11px; }.appointment-copy .tag { justify-self: start; }
.appointment-arrow { color: var(--color-muted); font-size: 20px; }

/* Customer and collaborator cards: primary representation on small screens. */
.entity-card-list { display: none; }
.entity-card { display: grid; grid-template-columns: 50px minmax(0, 1fr) 36px; align-items: center; gap: 12px; padding: 13px; border: 1px solid var(--color-border); border-radius: 15px; background: #fff; box-shadow: 0 3px 10px rgb(28 52 46 / 3%); }
.entity-avatar { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 15px 15px 5px 15px; color: #176b5b; background: #dff2e9; font-size: 18px; font-weight: 850; text-decoration: none; }
.collaborator-avatar { color: #6b508e; background: #eee8fa; }
.entity-main { min-width: 0; }.entity-title { display: flex; align-items: center; gap: 7px; }.entity-title > a { overflow: hidden; color: var(--color-text); font-weight: 800; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.entity-title .badge { flex: 0 0 auto; }.entity-main p { margin: 5px 0 2px; color: #5f6c72; font-size: 12px; }.entity-main p span, .entity-main small { color: var(--color-muted); }
.entity-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }.entity-chips .chip { padding: 2px 7px; border-radius: 999px; color: var(--chip-color); background: color-mix(in srgb, var(--chip-color) 12%, white); font-size: 9px; }
.entity-next { display: grid; place-items: center; width: 34px; height: 38px; border: 1px solid var(--color-border); border-radius: 11px; color: var(--color-primary); font-size: 21px; text-decoration: none; }

/* Finance, reminders and other data-heavy screens. */
#payout-app { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 15px; }
#payout-app > .card { grid-column: 1 / -1; margin: 0; }
#payout-app > .card:first-of-type { grid-column: span 5; }
#payout-app > .card:nth-of-type(2) { grid-column: span 7; }
#payout-app textarea { min-height: 43px; }
#notifications-app > .card { margin-bottom: 16px; }
.notification-table { table-layout: fixed; width: 100%; }
.notification-table th:nth-child(1) { width: 15%; }
.notification-table th:nth-child(2) { width: 13%; }
.notification-table th:nth-child(3) { width: 14%; }
.notification-table th:nth-child(4) { width: 16%; }
.notification-table th:nth-child(5) { width: 20%; }
.notification-table th:nth-child(6) { width: 12%; }
.notification-table th:nth-child(7) { width: 10%; }
.notification-table td { vertical-align: middle; }
.notification-table tbody tr { transition: background-color .15s ease; }
.notification-table tbody tr:hover { background: #fafcfb; }
.notification-booking-link { color: var(--color-text); font-weight: 800; text-decoration: none; }
.notification-booking-link:hover { color: var(--color-primary); text-decoration: underline; }
.notification-recipient, .notification-schedule { white-space: nowrap; }
#notification-templates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.notification-template { padding: 15px; border: 1px solid var(--color-border); border-radius: 13px; background: #fbfcfb; }
.notification-template label { color: #59656b; font-size: 11px; }
.notification-template input, .notification-template textarea, .notification-template select { margin-bottom: 10px; }
.notification-template textarea { min-height: 98px; }
.template-heading, .template-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.template-heading { margin-bottom: 13px; }.template-heading strong { overflow-wrap: anywhere; font-size: 12px; }
.template-footer select { flex: 1; margin: 0; }.template-footer .button { flex: 0 0 auto; }

/* Login is part of the product, not a detached utility page. */
.auth-page { position: relative; isolation: isolate; background: radial-gradient(circle at 18% 18%, #d7eee6 0, transparent 33%), linear-gradient(135deg, #f7faf8 0%, #edf4f0 100%); }
.auth-page::before { content: 'SANAZU'; position: fixed; z-index: -1; right: -20px; bottom: -52px; color: rgb(23 107 91 / 4%); font-size: min(21vw, 280px); font-weight: 900; letter-spacing: -12px; }
.auth-card { border: 1px solid rgb(255 255 255 / 75%); border-top: 0; border-radius: 22px; box-shadow: 0 24px 65px rgb(36 69 59 / 13%); }
.auth-brand { display: flex; align-items: center; gap: 9px; color: var(--color-text); font-size: 19px; }
.auth-brand::before { content: 'S'; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: #fff; background: var(--color-primary); font-size: 16px; }

@media (max-width: 1100px) {
    .dashboard-date-filter { margin: 0 0 20px; justify-content: flex-start; }
    #payout-app > .card:first-of-type, #payout-app > .card:nth-of-type(2) { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
    body.menu-open { overflow: hidden; }
    .sidebar { display: flex; width: min(316px, 86vw); visibility: hidden; pointer-events: none; transform: translateX(-104%); transition: transform .22s ease, visibility 0s linear .22s; box-shadow: 18px 0 42px rgb(21 45 38 / 18%); }
    .sidebar.is-open { visibility: visible; pointer-events: auto; transform: translateX(0); transition-delay: 0s; }
    .sidebar-close { display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 1px solid var(--color-border); border-radius: 11px; color: var(--color-muted); background: #fff; }
    .sidebar-scrim { position: fixed; z-index: 29; inset: 0; border: 0; background: rgb(17 39 33 / 45%); backdrop-filter: blur(2px); }
    .menu-open .sidebar-scrim { display: block; }
    .mobile-menu-toggle { display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 1px solid var(--color-border); border-radius: 11px; color: var(--color-primary); background: #fff; }
    .mobile-brand { display: none; }
    .studio-hero { padding-top: 8px; }
}

@media (max-width: 700px) {
    .entity-card-list { display: grid; gap: 9px; }
    .entity-table { display: none; }
    .studio-hero { align-items: center; padding-bottom: 23px; }
    .studio-hero h1 { font-size: 40px; letter-spacing: -1.8px; }
    .studio-hero > div:first-child > p:last-child { max-width: 270px; margin-top: 13px; font-size: 12px; }
    .date-bubble { width: 77px; height: 77px; border-radius: 24px 24px 9px 24px; }.date-bubble b { font-size: 27px; }.date-bubble small { font-size: 6px; }
    #payout-app { display: block; } #payout-app > .card { margin-bottom: 14px; }
    #notification-templates { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    .topbar-title > div > strong { max-width: 178px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .studio-hero h1 { font-size: clamp(34px, 10.5vw, 42px); }
    .studio-hero .eyebrow { font-size: 9px; }
    .date-bubble { width: 68px; height: 68px; }
    .dashboard-date-filter { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 8px; }.dashboard-date-filter label { min-width: 0; }.dashboard-date-filter input { width: 100%; min-width: 0; }
    .section-title h2 { font-size: 20px; }
    .studio-appointment { grid-template-columns: 58px 38px minmax(0, 1fr) 18px; gap: 8px; padding: 10px; }.service-art { width: 38px; height: 38px; border-radius: 11px; }.studio-appointment time b { font-size: 13px; }
    .entity-title { align-items: flex-start; flex-direction: column; gap: 3px; }
    .page-heading > .actions { justify-content: flex-end; }.page-heading > .actions .button { padding-inline: 10px; }
    .page-heading h1 { white-space: nowrap; }
    #payout-app .table-wrap, #notifications-app .table-wrap { overflow: visible; border: 0; background: transparent; }
    #payout-app table.data, #notifications-app table.data { display: block; min-width: 0; background: transparent; }
    #payout-app table.data thead, #notifications-app table.data thead { display: none; }
    #payout-app table.data tbody, #notifications-app table.data tbody { display: grid; gap: 9px; }
    #payout-app table.data tr, #notifications-app table.data tr { display: grid; gap: 0; padding: 10px 12px; border: 1px solid var(--color-border); border-radius: 12px; background: #fff; }
    #payout-app table.data td, #notifications-app table.data td { display: grid; grid-template-columns: 92px minmax(0, 1fr); align-items: center; gap: 10px; min-height: 34px; padding: 6px 0; border-bottom: 1px solid #edf1ef; overflow-wrap: anywhere; }
    #payout-app table.data td:last-child, #notifications-app table.data td:last-child { border-bottom: 0; }
    #payout-app table.data td::before, #notifications-app table.data td::before { content: attr(data-label); color: var(--color-muted); font-size: 9px; font-weight: 850; letter-spacing: .5px; text-transform: uppercase; }
    #payout-app table.data td[colspan], #notifications-app table.data td[colspan] { display: block; min-height: 0; border: 0; color: var(--color-muted); text-align: center; }
    #payout-app table.data td[colspan]::before, #notifications-app table.data td[colspan]::before { content: none; }
    #payout-app table.data td input { width: 100%; margin: 4px 0; }
    #payout-app table.data td[data-label="Thao tác"] { grid-template-columns: 1fr; }
    #payout-app table.data td[data-label="Thao tác"]::before { margin-bottom: 2px; }
}

/* ========================================================================== 
   Prototype parity pass — navigation, entity cards and mobile data layouts
   ========================================================================== */
.sidebar-brand-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.menu-button, .sidebar-close, .nav-scrim { display: none; }
.dashboard-heading-actions { display: flex; align-items: end; gap: 12px; }
.dashboard-heading-actions .compact-filter { margin: 0; }
.metric-card .metric-dot::before { content: none !important; }
.text-link { color: var(--color-primary); font-weight: 750; text-decoration: none; }
.entity-card-grid { display: none; }
.entity-card-main { min-width: 0; }
.entity-card-main .entity-title { display: block; overflow: hidden; color: var(--color-text); font-weight: 800; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.entity-card-main p { margin: 4px 0 7px; color: var(--color-muted); font-size: 11px; }
.entity-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.entity-meta { display: block; margin-top: 7px; color: var(--color-muted); font-size: 10px; }
.entity-actions { display: grid; justify-items: center; gap: 7px; font-size: 10px; }
.icon-link { display: grid; place-items: center; width: 35px; height: 40px; border: 1px solid var(--color-border); border-radius: 11px; color: var(--color-primary); font-size: 23px; text-decoration: none; }
.avatar-violet { color: #6d518e; background: #eee8fa; }
.payout-filter-grid { grid-template-columns: repeat(2, minmax(180px, 1fr)); gap: 14px; }
.payout-filter-grid .filter-actions { grid-column: 1 / -1; }
.payout-filter-grid .button { min-width: 110px; }
.reconciliation-table th, .reconciliation-table td { white-space: nowrap; }
.reconciliation-table td.num { font-weight: 750; }
.payable-table td[data-label="Thao tác"], .payout-history-table td[data-label="Thao tác"] { min-width: 250px; }
.payable-table td[data-label="Thao tác"] { display: grid; grid-template-columns: minmax(115px, .8fr) minmax(170px, 1.2fr) auto; gap: 8px; align-items: center; }
.payable-table td[data-label="Thao tác"] input, .payout-history-table td[data-label="Thao tác"] input { margin: 0; }
.finance-status { display: inline-flex; padding: 4px 8px; border-radius: 999px; font-size: 10px; font-weight: 800; white-space: nowrap; }
.finance-status.status-pending { color: #8a5d1c; background: #fff0d7; }
.finance-status.status-approved, .finance-status.status-success { color: #26745d; background: #ddf2e8; }
.finance-status.status-paid { color: #315f8a; background: #e1edf9; }
.finance-status.status-cancelled, .finance-status.status-voided { color: #667078; background: #edf0f1; }
.collaborator-filter { grid-template-columns: minmax(250px, 2fr) repeat(3, minmax(160px, 1fr)); }
.collaborator-filter .collaborator-area-filter { min-width: 0; }
.collaborator-filter .area-picker-hint { display: none; }
.collaborator-filter .filter-actions { display: flex; gap: 8px; }
.report-table-wrap { position: relative; }
.report-table { min-width: max-content; }
.report-table th, .report-table td { white-space: nowrap; }
.report-table td.num { min-width: 112px; }
.report-value { display: inline-flex; align-items: center; justify-content: flex-end; gap: 7px; width: 100%; }
.report-drill-button { display: inline-grid; place-items: center; width: 27px; height: 27px; min-height: 27px; padding: 0; border: 1px solid #d7e3df; border-radius: 8px; color: var(--color-primary); background: #f4faf7; font-size: 0; text-decoration: none; }
.report-drill-button::before { content: '↗'; font-size: 13px; font-weight: 900; }
.report-drill-button:hover { border-color: #a9cdc3; background: #e7f4ef; }
.report-semantics { margin: 14px 0 10px; padding: 9px 12px; border-radius: 10px; color: #596863; background: #f4f8f6; font-size: 11px; }
.payout-create-form label { display: grid; align-content: start; }
.payout-create-form button { align-self: end; min-height: 44px; }
.notification-page { display: grid; gap: 16px; }
.notification-page > * { margin: 0; }
.template-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.template-card { display: grid; gap: 10px; margin: 0; }
.template-card label { display: grid; gap: 5px; color: var(--color-muted); font-size: 11px; font-weight: 700; }
.template-card input, .template-card select, .template-card textarea { margin: 0; }
.template-card textarea { min-height: 118px; resize: vertical; }
.template-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.notification-status.status-pending { color: #916120; background: #fff0d7; }
.notification-status.status-sending { color: #3f6e98; background: #e1edf9; }
.notification-status.status-sent { color: #26745d; background: #ddf2e8; }
.notification-status.status-failed { color: #a6493e; background: #fee6e2; }
.notification-status.status-cancelled { color: #667078; background: #edf0f1; }

/* Booking payment summary. */
.payment-summary-note { display: flex; align-items: flex-start; gap: 11px; margin: 12px 0 18px; padding: 12px 14px; border: 1px solid #d9e9e3; border-radius: 13px; color: #52635e; background: #f4faf7; }
.payment-summary-note-icon { display: grid; flex: 0 0 auto; place-items: center; width: 24px; height: 24px; border-radius: 50%; color: #fff; background: var(--color-primary); font-size: 12px; font-weight: 900; font-family: Georgia, serif; }
.payment-summary-note p { margin: 0; font-size: 12px; line-height: 1.55; }
.payment-summary-note strong { display: block; margin-bottom: 1px; color: var(--color-text); font-size: 11px; letter-spacing: .25px; text-transform: uppercase; }
.payment-summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0 0 20px; }
.payment-summary-card { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: center; gap: 12px; min-height: 112px; padding: 16px; overflow: hidden; border: 1px solid var(--payment-border); border-radius: 15px; background: var(--payment-bg); }
.payment-summary-card::after { content: ''; position: absolute; right: -30px; bottom: -38px; width: 92px; height: 92px; border: 16px solid rgb(255 255 255 / 48%); border-radius: 50%; pointer-events: none; }
.payment-summary-card > div { min-width: 0; }
.payment-summary-label { display: block; margin: 0 0 4px; color: var(--payment-label); font-size: 11px; font-weight: 800; letter-spacing: .35px; text-transform: uppercase; }
.payment-summary-card strong[id^="payment-"] { display: block; color: var(--color-text); font-size: clamp(20px, 2.1vw, 28px); font-weight: 900; letter-spacing: -.8px; line-height: 1.15; white-space: nowrap; }
.payment-summary-card small { display: block; margin-top: 6px; color: var(--payment-label); font-size: 10px; line-height: 1.25; }
.payment-summary-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: var(--payment-accent); background: rgb(255 255 255 / 72%); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 80%); font-size: 19px; font-weight: 900; }
.payment-summary-payable { --payment-bg: #edf3fb; --payment-border: #dbe6f3; --payment-accent: #49759d; --payment-label: #60788d; }
.payment-summary-received { --payment-bg: #e5f5ed; --payment-border: #d0eadf; --payment-accent: #24795f; --payment-label: #52786b; }
.payment-summary-remaining { --payment-bg: #fff2df; --payment-border: #f3e0c5; --payment-accent: #a56b20; --payment-label: #876d4b; }

/* Reusable label/value details. */
.detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 14px 0 0; }
.detail-grid > div { min-width: 0; padding: 13px 14px; border: 1px solid #e6ece9; border-radius: 12px; background: #fafcfb; }
.detail-grid dt { margin: 0 0 5px; color: var(--color-muted); font-size: 10px; font-weight: 850; letter-spacing: .45px; text-transform: uppercase; }
.detail-grid dd { margin: 0; color: var(--color-text); font-size: 13px; font-weight: 750; line-height: 1.5; overflow-wrap: anywhere; }
.detail-grid dd small { display: block; margin-top: 2px; color: var(--color-muted); font-size: 11px; font-weight: 600; }
.detail-grid > div > .muted { display: block; margin: 0 0 5px; font-size: 10px; font-weight: 850; letter-spacing: .45px; text-transform: uppercase; }
.detail-grid > div > strong { display: block; margin-top: 4px; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.detail-grid .detail-span-2 { grid-column: span 2; }
.detail-grid .detail-span-full { grid-column: 1 / -1; }
.detail-grid .detail-note { border-color: #dce9e4; background: #f3f8f6; }

/* Booking financial breakdown. */
.financial-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 14px 0 0; }
.financial-summary > div { position: relative; min-width: 0; min-height: 98px; padding: 15px; overflow: hidden; border: 1px solid var(--financial-border, #e5ebe8); border-radius: 13px; background: var(--financial-bg, #fafcfb); }
.financial-summary > div::after { content: ''; position: absolute; right: -25px; bottom: -35px; width: 78px; height: 78px; border: 13px solid rgb(255 255 255 / 55%); border-radius: 50%; }
.financial-summary dt { position: relative; z-index: 1; margin: 0 0 9px; color: var(--financial-label, var(--color-muted)); font-size: 10px; font-weight: 850; letter-spacing: .4px; text-transform: uppercase; }
.financial-summary dd { position: relative; z-index: 1; margin: 0; color: var(--color-text); font-size: clamp(18px, 1.8vw, 24px); font-weight: 900; letter-spacing: -.55px; line-height: 1.2; white-space: nowrap; }
.financial-payable { --financial-bg: #edf3fb; --financial-border: #dbe6f3; --financial-label: #60788d; }
.financial-received { --financial-bg: #e5f5ed; --financial-border: #d0eadf; --financial-label: #52786b; }
.financial-remaining { --financial-bg: #fff2df; --financial-border: #f3e0c5; --financial-label: #876d4b; }
.financial-cost { --financial-bg: #f3eff9; --financial-border: #e6ddf2; --financial-label: #75658a; }
.financial-profit { --financial-bg: #e5f5ed; --financial-border: #d0eadf; --financial-label: #52786b; }

/* Collaborator performance and reconciliation metrics. */
.collaborator-metrics { overflow: hidden; }
.period-filter { display: grid; grid-template-columns: repeat(2, minmax(180px, 1fr)) auto; align-items: end; gap: 12px; margin: 14px 0 12px; padding: 15px; border: 1px solid #e0e8e4; border-radius: 14px; background: #fafcfb; }
.period-filter label { margin: 0; }
.period-filter input { margin: 7px 0 0; }
.period-filter .button { min-width: 116px; min-height: 43px; margin: 0; }
.metrics-help { display: flex; align-items: flex-start; gap: 9px; margin: 0 0 20px; color: var(--color-muted); font-size: 11px; line-height: 1.55; }
.metrics-help > span { display: grid; flex: 0 0 auto; place-items: center; width: 20px; height: 20px; border-radius: 50%; color: #fff; background: #7aa99f; font-family: Georgia, serif; font-size: 11px; font-weight: 900; }
.metrics-group-title { margin: 18px 0 10px; color: #53615d; font-size: 11px; font-weight: 850; letter-spacing: .6px; text-transform: uppercase; }
.stats-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.stats-grid > div { position: relative; min-width: 0; min-height: 104px; padding: 15px; overflow: hidden; border: 1px solid #e4ebe8; border-radius: 14px; background: #fafcfb; }
.stats-grid > div::after { content: ''; position: absolute; right: -27px; bottom: -38px; width: 82px; height: 82px; border: 14px solid rgb(255 255 255 / 55%); border-radius: 50%; }
.stats-grid strong, .stats-grid span { position: relative; z-index: 1; display: block; }
.stats-grid strong { color: var(--color-text); font-size: clamp(22px, 2.2vw, 29px); font-weight: 900; letter-spacing: -.75px; line-height: 1.15; white-space: nowrap; }
.stats-grid span { margin-top: 8px; color: var(--color-muted); font-size: 11px; font-weight: 700; line-height: 1.35; }
.stats-grid-activity > div:nth-child(1), .stats-grid-activity > div:nth-child(5) { border-color: #dbe6f3; background: #edf3fb; }
.stats-grid-activity > div:nth-child(2), .stats-grid-activity > div:nth-child(6) { border-color: #d0eadf; background: #e5f5ed; }
.stats-grid-activity > div:nth-child(3), .stats-grid-activity > div:nth-child(4) { border-color: #f3e0c5; background: #fff2df; }
.stats-grid-finance > div { border-color: #dce9e4; background: #f1f8f5; }
.stats-grid-finance > div:nth-child(2), .stats-grid-finance > div:nth-child(4) { border-color: #f3e0c5; background: #fff2df; }
.stats-grid-finance > div:nth-child(3), .stats-grid-finance > div:nth-child(6) { border-color: #d0eadf; background: #e5f5ed; }
.stats-grid-finance > div:nth-child(5) { border-color: #e6ddf2; background: #f3eff9; }

/* Collaborator service-area editor. */
.collaborator-area-card > .alert-info { margin: 12px 0 22px; padding: 12px 14px; border: 1px solid #d9e9e3; border-radius: 12px; color: #52635e; background: #f4faf7; }
.service-area-form { gap: 16px 20px; margin: 0 0 22px; }
.service-area-form > label, .service-area-picker > label { margin: 0; }
.service-area-form input, .service-area-form select { margin-bottom: 0; }
.service-area-form .area-picker-hint { margin-top: 9px; }
.service-area-actions { grid-column: 1 / -1; padding-top: 2px; }
.service-area-table th:first-child { width: 42%; }
.service-area-table th:nth-child(2) { width: 38%; }
.service-area-table td form { display: flex; align-items: center; gap: 11px; }
.service-area-table td form select { min-width: 170px; margin: 0; }
.service-area-table td form .link-button { flex: 0 0 auto; }

/* Collaborator cooperation status. */
.collaborator-title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.collaborator-title-row h1 { margin: 0; }
.status-section-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px; }
.status-section-heading h2 { margin: 0; }
.current-status-badge { padding: 5px 10px; font-size: 10px; letter-spacing: .15px; }
.collaborator-status-form { gap: 14px 16px; margin: 0; }
.collaborator-status-form input, .collaborator-status-form select { margin-bottom: 0; }
.collaborator-status-actions { grid-column: 1 / -1; padding-top: 2px; }
.status-history-table { margin-top: 22px; }

/* Collaborator create/edit form. */
.collaborator-editor-form { align-items: start; gap: 18px 22px; }
.collaborator-editor-form > .full { grid-column: 1 / -1; }
.collaborator-editor-form > label { margin: 0; }
.collaborator-editor-form > label > input,
.collaborator-editor-form > label > select,
.collaborator-editor-form > label > textarea { margin: 7px 0 0; }
.collaborator-editor-form label > small { display: block; margin-top: 8px; line-height: 1.45; }
.collaborator-bank-fields { margin: 2px 0 0; padding: 18px; border: 1px solid #dfe7e3; border-radius: 14px; background: #fafcfb; }
.collaborator-bank-fields legend { padding: 0 8px; font-weight: 800; }
.collaborator-bank-fields .form-grid { gap: 16px 20px; }
.collaborator-bank-fields .form-grid > .full { grid-column: 1 / -1; }
.collaborator-bank-fields label { margin: 0; }
.collaborator-bank-fields input { margin: 7px 0 0; }
.collaborator-note { margin-top: 2px; }
.collaborator-note textarea { min-height: 120px; }
.collaborator-form-actions { display: flex; flex-wrap: wrap; gap: 9px; padding-top: 2px; }

/* Booking transition forms are separate actions, not one continuous form. */
#booking-transition-panel > form { display: grid; gap: 13px; margin: 14px 0 0; padding: 16px; border: 1px solid #e3eae7; border-radius: 14px; background: #fafcfb; }
#booking-transition-panel > form > p { margin: 0; color: var(--color-muted); font-size: 12px; line-height: 1.55; }
#booking-transition-panel > form > label { margin: 0; }
#booking-transition-panel > form > label > input,
#booking-transition-panel > form > label > select,
#booking-transition-panel > form > label > textarea { margin: 7px 0 0; }
#booking-transition-panel > form > label.checkbox-control { display: flex; align-items: center; gap: 9px; }
#booking-transition-panel > form > label.checkbox-control > input[type="checkbox"] { margin: 0; }
#booking-transition-panel > form > button { justify-self: start; margin-top: 2px; }
#booking-transition-panel > form[data-transition-action="cancel"] { border-color: #f1d8d5; background: #fffafa; }
#booking-transition-panel > form[data-transition-action="reschedule"] { border-color: #dbe7e2; background: #f7fbf9; }
#booking-transition-loading { margin-top: 12px; }

/* Native choice controls must not inherit full-width text input sizing. */
input[type="checkbox"], input[type="radio"] { flex: 0 0 auto; width: 18px; height: 18px; min-height: 18px; margin: 0; padding: 0; accent-color: var(--color-primary); cursor: pointer; }
label.checkbox, label.checkbox-control { display: flex; align-items: center; gap: 9px; font-weight: 650; cursor: pointer; }

@media (max-width: 900px) {
    .menu-button { display: grid; }
    .mobile-brand { display: none; }
    .sidebar { display: flex; width: min(316px, 88vw); visibility: hidden; pointer-events: none; transform: translateX(-104%); transition: transform .22s ease, visibility 0s linear .22s; }
    .sidebar.is-open { visibility: visible; pointer-events: auto; transform: translateX(0); transition-delay: 0s; }
    .sidebar-close { display: grid; }
    .nav-scrim { position: fixed; z-index: 29; inset: 0; width: 100%; height: 100%; border: 0; background: rgb(17 39 33 / 48%); backdrop-filter: blur(2px); }
    .nav-scrim:not([hidden]) { display: block; }
    .dashboard-hero { align-items: flex-start; }
    .dashboard-heading-actions { align-items: stretch; flex-direction: column; }
    .dashboard-heading-actions > .button { align-self: flex-end; }
    .payout-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .collaborator-filter { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .collaborator-filter > :first-child { grid-column: 1 / -1; }
    .detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .financial-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
    .entity-card-grid { display: grid; gap: 10px; }
    .entity-table-wrap { display: none; }
    .template-card-grid { grid-template-columns: 1fr; }
    .mobile-card-table { display: block; min-width: 0 !important; background: transparent; }
    .mobile-card-table thead { display: none; }
    .mobile-card-table tbody { display: grid; gap: 10px; }
    .mobile-card-table tr { display: grid; gap: 0; padding: 11px 13px; border: 1px solid var(--color-border); border-radius: 14px; background: #fff; box-shadow: 0 3px 10px rgb(28 52 46 / 3%); }
    .mobile-card-table td { display: grid; grid-template-columns: minmax(88px, 34%) minmax(0, 1fr); align-items: center; gap: 9px; min-height: 34px; padding: 6px 0 !important; border: 0 !important; border-bottom: 1px solid #edf1ef !important; text-align: left !important; overflow-wrap: anywhere; }
    .mobile-card-table td:last-child { border-bottom: 0 !important; }
    .mobile-card-table td::before { content: attr(data-label); color: var(--color-muted); font-size: 9px; font-weight: 850; letter-spacing: .45px; text-transform: uppercase; }
    .mobile-card-table td[colspan] { display: block; border: 0 !important; color: var(--color-muted); text-align: center !important; }
    .mobile-card-table td[colspan]::before { content: none; }
    .mobile-card-table .card-actions { display: flex; justify-content: flex-end; }
    .mobile-card-table td input { width: 100%; margin: 3px 0; }
    #reports-app { padding: 16px; }
    #reports-app .table-wrap, #payout-app .table-wrap, #notifications-app .table-wrap { overflow: visible; border: 0; background: transparent; }
    .report-drill-button { display: inline-grid; min-height: 32px; width: 32px; height: 32px; margin: 3px 0 0; }
}

@media (max-width: 600px) {
    .page-heading { align-items: stretch; flex-direction: column; }
    .page-heading > div:first-child { min-width: 0; }
    .page-heading h1 { white-space: normal; }
    .page-heading > .actions { width: 100%; justify-content: flex-start; }
    .dashboard-heading-actions { width: 100%; }
    .dashboard-heading-actions > .button { align-self: stretch; text-align: center; }
    .dashboard-heading-actions .compact-filter { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
    .dashboard-heading-actions .compact-filter input { width: 100%; min-width: 0; }
    .payout-filter-grid { grid-template-columns: 1fr; }
    .payout-filter-grid .filter-actions { grid-column: auto; }
    .payout-filter-grid .button { width: 100%; }
    .collaborator-filter { grid-template-columns: 1fr; }
    .collaborator-filter > :first-child { grid-column: auto; }
    .payable-table td[data-label="Thao tác"] { display: grid; grid-template-columns: 1fr; }
    .entity-card { grid-template-columns: 48px minmax(0, 1fr) 38px; padding: 12px; }
    .entity-avatar { width: 48px; height: 48px; }
    .filter-card h2 { margin-top: 0; }
    .sticky-actions, .booking-actions { bottom: calc(72px + env(safe-area-inset-bottom)); }
    .detail-grid { grid-template-columns: 1fr; }
    .detail-grid .detail-span-2, .detail-grid .detail-span-full { grid-column: auto; }
    .financial-summary { grid-template-columns: 1fr; gap: 8px; }
    .financial-summary > div { min-height: 84px; }
    .period-filter { grid-template-columns: 1fr; padding: 13px; }
    .period-filter .button { width: 100%; }
    .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .stats-grid > div { min-height: 98px; padding: 13px; }
    .stats-grid strong { font-size: 20px; }
    .service-area-form { grid-template-columns: 1fr; }
    .service-area-actions { grid-column: auto; }
    .collaborator-status-form { grid-template-columns: 1fr; }
    .collaborator-status-actions { grid-column: auto; }
    .collaborator-editor-form { grid-template-columns: 1fr; gap: 15px; }
    .collaborator-editor-form > .full,
    .collaborator-bank-fields .form-grid > .full { grid-column: auto; }
    .collaborator-bank-fields .form-grid { grid-template-columns: 1fr; }
}

@media (max-width: 380px) {
    .admin-content { padding-inline: 11px; }
    .topbar { padding-inline: 10px; }
    .topbar-actions { gap: 5px; }
    .logout-button { display: none; }
    .bottom-nav a { min-width: 48px; font-size: 9px; }
    .bottom-nav .quick-create { min-width: 52px; width: 52px; height: 52px; min-height: 52px; }
    .page-heading h1 { font-size: 26px; }
    .page-heading { gap: 10px; }
    .page-heading .button { padding-inline: 10px; }
    .mobile-card-table td { grid-template-columns: 82px minmax(0, 1fr); }
}

@media (max-width: 700px) {
    .payment-summary-grid { grid-template-columns: 1fr; gap: 9px; }
    .payment-summary-card { min-height: 92px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
.notification-bell{position:relative}.notification-unread-badge{position:absolute;top:-.3rem;right:-.35rem;min-width:1.15rem;height:1.15rem;padding:0 .22rem;border-radius:999px;background:#bd3e3e;color:#fff;font-size:.68rem;line-height:1.15rem;text-align:center}.notification-inbox{display:grid;gap:.75rem}.inbox-item{display:flex;justify-content:space-between;gap:1rem;padding:1rem;border:1px solid var(--border-color,#dfe6e2);border-radius:.8rem}.inbox-item.is-unread{border-left:4px solid #176b5b;background:#f2faf7}.inbox-item p{margin:.35rem 0;white-space:pre-wrap}.inbox-item small{color:#65736e}@media(max-width:640px){.inbox-item{align-items:flex-start;flex-direction:column}.inbox-item .card-actions{width:100%}}

/* Logout remains reachable in the mobile drawer regardless of role or menu length. */
.sidebar-logout { flex-shrink: 0; padding: 12px 8px; }
.sidebar-logout .button { width: 100%; min-height: 44px; }

#payment-overview dd, .financial-cancellation-plan dd { white-space: normal; overflow-wrap: anywhere; font-size: 18px; }

.collaborator-area-row { display:grid; grid-template-columns:minmax(0,1fr) 180px auto; gap:12px; align-items:start; margin-bottom:16px; }
.collaborator-area-row .remove-area { margin-top:28px; }
.collaborator-area-fields { min-width:0; padding:18px; border:1px solid #dfe7e3; border-radius:14px; background:#fafcfb; }
.collaborator-area-fields legend { padding:0 8px; font-weight:800; }
@media(max-width:600px) { .collaborator-area-row { grid-template-columns:minmax(0,1fr); } .collaborator-area-row .remove-area { margin-top:0; justify-self:start; } }

.booking-customer-name, .booking-customer-name a { color:#991b1b; font-weight:800; overflow-wrap:anywhere; }
.booking-collaborator-name, .booking-collaborator-name a { color:#166534; font-weight:800; overflow-wrap:anywhere; }
.calendar-event-people { display:grid; gap:4px; margin-top:8px; font-size:14px; white-space:normal; }

/* Booking UI-02/03/04/07 */
.combo-summary > .combo-child-line { margin: 16px 0 0; border-left: 3px solid var(--color-primary); }
.accessory-price-help { font-size: 1rem; line-height: 1.5; }
.catalog-service-form > .form-actions { margin-top: 24px; }
.combo-component-row { margin-bottom: 16px; }
label:has(> input[type="checkbox"]) { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 9px; align-items: start; cursor: pointer; }
label:has(> input[type="checkbox"]) > input[type="checkbox"] { grid-column: 1; grid-row: 1; margin-top: 3px; }
label:has(> input[type="checkbox"]) > span { grid-column: 2; }

.combo-component-row { grid-template-columns: minmax(0, 1fr) minmax(90px, .22fr) minmax(110px, .25fr) auto; align-items: start; }
.combo-component-price { grid-column: 1 / -1; text-align: left; font-size: 1rem; line-height: 1.6; overflow-wrap: anywhere; }
.combo-component-skills { display: block; grid-column: 1 / -1; text-align: left; overflow-wrap: anywhere; }
.combo-component-skills:empty { display: none; }
.single-service-skills { display: grid; gap: 22px; }
.single-service-cost { display: grid; gap: 16px; }
.combo-component-cost { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: end; gap: 12px 24px; }
.combo-component-cost > label:first-child { width: 260px; max-width: 100%; margin: 0; }
.combo-component-cost .component-cost-option { display: flex; align-items: center; gap: 8px; min-height: 44px; margin: 0; }
.combo-component-cost .component-cost-option input { flex: 0 0 18px; width: 18px; height: 18px; margin: 0; }
.combo-component-row > label { min-width: 0; margin-bottom: 0; }
.combo-component-row .remove-component { margin-top: 26px; }
@media (max-width: 800px) { .combo-component-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } .combo-component-service { grid-column: 1 / -1; } .combo-component-row .remove-component { grid-column: 1 / -1; margin-top: 0; } }

.booking-photo-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:16px}.booking-photo-grid figure{margin:0;min-width:0}.booking-photo-open{width:100%;padding:0;overflow:hidden}.booking-photo-open img{width:100%;height:160px;object-fit:cover}.booking-photo-grid figcaption{overflow-wrap:anywhere;padding:8px}.booking-photo-dialog{max-width:94vw;max-height:94vh;width:900px;border:0;border-radius:16px;padding:16px}.booking-photo-dialog::backdrop{background:#000b}.booking-photo-dialog img{display:block;max-width:100%;max-height:70vh;margin:auto;object-fit:contain}.photo-toolbar{display:flex;flex-wrap:wrap;gap:8px}.booking-review-results article{padding:12px;border-bottom:1px solid #dbe5e1}#review-link-result{overflow-wrap:anywhere}.booking-review-results .preserve-lines{white-space:pre-wrap}

.booking-review-results article,.booking-photo-dialog [data-title]{overflow-wrap:anywhere}

/* Booking detail navigation */
.booking-detail-tabs{display:flex;gap:.5rem;overflow-x:auto;background:#e8f2ee;border:1px solid #c8dfd5;border-radius:14px;margin:0 0 1.25rem;padding:.6rem;max-width:100%;box-shadow:0 3px 10px rgba(23,110,91,.06)}
.booking-detail-tabs [role=tab]{flex:none;white-space:nowrap;border:1px solid transparent;border-radius:10px;background:transparent;color:#35584c;padding:.85rem 1.1rem;font-size:1rem;font-weight:650;transition:background .15s,color .15s,box-shadow .15s}
.booking-detail-tabs [role=tab]:hover{background:#fff;border-color:#c8dfd5;color:#176e5b}
.booking-detail-tabs [aria-selected=true],.booking-detail-tabs [aria-selected=true]:hover{background:#176e5b;color:#fff;border-color:#176e5b;font-weight:750;box-shadow:0 3px 8px rgba(23,110,91,.22)}
.booking-detail-tabs [role=tab]:focus-visible{outline:3px solid #123f34;outline-offset:2px}
.booking-tab-panel[hidden]{display:none!important}
@media print{.booking-detail-tabs{display:none}.booking-tab-panel[hidden]{display:block!important}}

.booking-service-heading{align-items:center;flex-wrap:wrap}
.booking-service-heading .booking-toolbar{margin-left:auto;display:flex;align-items:center;justify-content:flex-end;gap:8px;min-width:0;max-width:100%}
.booking-service-heading .booking-toolbar select{flex:1 1 300px;min-width:180px;width:auto}
.booking-service-heading .booking-toolbar .button{flex:0 0 auto;white-space:nowrap;font-size:.95rem;padding:.8rem 1rem}
@media(max-width:700px){.booking-service-heading .booking-toolbar{width:100%;display:flex;flex-wrap:wrap}.booking-service-heading .booking-toolbar select{flex-basis:100%;width:100%;min-width:0}.booking-service-heading .booking-toolbar .button{font-size:.9rem}}

@media(min-width:701px){
.booking-service-heading{display:flex;flex-wrap:nowrap;gap:16px}
.booking-service-heading>div:first-child{flex:0 0 auto}
.booking-service-heading .booking-toolbar{flex:0 1 760px;width:auto}
.booking-service-heading .booking-toolbar select{flex:1 1 260px;min-width:0;max-width:380px}
}

.combo-summary>strong{display:block;line-height:1.45;margin-bottom:8px;overflow-wrap:anywhere}.combo-summary>strong+.field-help{margin-top:0;margin-bottom:16px;line-height:1.5}

.booking-accessory-heading{display:flex;align-items:center;gap:16px;flex-wrap:nowrap}
.booking-accessory-heading>div:first-child{flex:0 0 auto}
.booking-accessory-heading .booking-toolbar{display:flex;align-items:center;justify-content:flex-end;gap:8px;margin-left:auto;flex:0 1 600px;min-width:0;max-width:100%;width:auto}
.booking-accessory-heading .booking-toolbar select{flex:1 1 280px;min-width:0;max-width:400px;width:auto;margin:0}
.booking-accessory-heading .booking-toolbar .button{flex:0 0 auto;white-space:nowrap;font-size:.95rem;padding:.8rem 1rem}
@media(max-width:700px){.booking-accessory-heading{flex-wrap:wrap}.booking-accessory-heading .booking-toolbar{flex-basis:100%;width:100%}.booking-accessory-heading .booking-toolbar .button{font-size:.9rem;padding:.8rem}}

@media(min-width:1001px){#booking-accessories .booking-line-grid{grid-template-columns:minmax(0,1fr) minmax(80px,.4fr) minmax(0,1.6fr) minmax(0,1fr)}}
@media(min-width:701px) and (max-width:1000px){#booking-accessories .booking-line-grid label:has(select[data-property='itemUid']){grid-column:1/-1}}

#booking-accessories .booking-line>.accessory-price-help{margin:0 0 12px;line-height:1.5;overflow-wrap:anywhere}

@media(min-width:701px){#booking-accessories .booking-line-grid label:has(select[data-property='preparedBy']){grid-column:1}#booking-accessories .booking-line-grid label:has(input[data-property='reimburse']){grid-column:2/-1;align-self:center}}
#booking-accessories .booking-line-grid label:has(input[data-property='reimburse']){line-height:1.5;min-width:0}

.booking-line>.service-price-help{margin:0 0 12px;line-height:1.5}.booking-line-title:has(+.service-price-help){margin-bottom:6px}

#booking-accessories .booking-line-grid>label:has(input[data-property="accessoryExplicitPrice"]){grid-column:1/-1;margin-top:8px}
.accessory-override-prices{grid-column:1/-1;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;align-items:end}
@media(max-width:700px){.accessory-override-prices{grid-template-columns:1fr}}

.accessory-add-setup{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:0 0 16px}@media(max-width:700px){.accessory-add-setup{grid-template-columns:1fr}}

#booking-accessories .booking-line>.accessory-price-help{color:#234c40;font-size:1rem;font-weight:650;background:#e8f2ee;border:1px solid #c8dfd5;border-radius:8px;padding:10px 12px;margin:0 0 16px;line-height:1.6}

.booking-summary-panels{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-top:16px}.booking-summary-panels .booking-totals{max-width:none;margin:0}.booking-summary-panels .card{min-width:0;margin:0}.booking-summary-panels h3{margin:0 0 16px}.booking-summary-panels dd{white-space:nowrap}@media(max-width:700px){.booking-summary-panels{grid-template-columns:1fr}}

@media(min-width:1001px){.booking-ctv-plan-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,1fr) 85px 43px}}

.detail-grid.booking-people-grid{grid-template-columns:repeat(2,minmax(0,1fr))}@media(max-width:700px){.detail-grid.booking-people-grid{grid-template-columns:1fr}}

.settlement-details{margin-top:20px;padding-top:16px;border-top:1px solid var(--color-border)}.settlement-details h3{margin:0 0 12px}.settlement-actions{display:flex;gap:14px;flex-wrap:wrap;margin-top:18px}.settlement-actions .button{margin:0}

#booking-settlement-existing .settlement-details{margin-top:8px;padding-top:4px;border-top:0}.settlement-context{margin:4px 0 12px}.settlement-details h4{margin:16px 0 10px}

.button.payment-transfer-button { background: #facc15; border-color: #eab308; color: #422006; }
.button.payment-transfer-button:hover { background: #eab308; }

.payment-actions .button { margin: 4px 12px 4px 0; }
.payment-actions .button:last-child { margin-right: 0; }

.catalog-service-form { padding: 24px; border: 1px solid var(--color-border, #dce5e2); border-radius: 18px; background: #fff; align-items: start; gap: 22px 24px; }
.catalog-service-form > label:not(.checkbox) { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.catalog-service-form > label:not(.checkbox) > input, .catalog-service-form > label > select { min-height: 48px; margin: 0; }
.catalog-service-form .service-cost-option { display: flex; align-items: center; gap: 10px; margin: 0; }
.catalog-service-form .service-cost-option input { width: 18px; height: 18px; min-height: 18px; flex: 0 0 18px; margin: 0; }
.catalog-service-form .service-skills-fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.catalog-service-form .skill-grid { display: flex; flex-wrap: wrap; align-items: start; gap: 20px 32px; }
.catalog-service-form .skill-item { display: flex; flex-direction: column; gap: 8px; }
.skill-score-input { width: 90px; max-width: 100%; }
.catalog-service-form .skill-item .skill-score-input { width: 90px; }
.service-skills-heading { flex-wrap: wrap; }
.service-skills-heading small { font-size: 13px; font-weight: 400; }
@media (max-width: 640px) { .catalog-service-form { padding: 16px; } }

.sidebar-toggle { font-size: 26px; margin-right: 10px; }
@media (min-width: 901px) {
  .sidebar-collapsed { --sidebar-width: 76px; }
  .sidebar-collapsed .sidebar { padding-left: 10px; padding-right: 10px; }
  .sidebar-collapsed .sidebar-link-label, .sidebar-collapsed .sidebar-brand > span:not(.brand-mark), .sidebar-collapsed .sidebar-profile > span:not(.avatar), .sidebar-collapsed .sidebar-logout { display: none; }
  .sidebar-collapsed .sidebar-brand { margin-left: 10px; margin-right: 0; }
  .sidebar-collapsed .sidebar-nav a { justify-content: center; padding-left: 0; padding-right: 0; gap: 0; }
  .sidebar-collapsed .sidebar-profile { justify-content: center; }
}
@media (max-width: 900px) { .sidebar-toggle { display: none; } }

/* Keep accessory controls clear of their heading and neighboring fields. */
.booking-accessory-heading{margin-bottom:20px}
#booking-accessories .booking-line-grid{column-gap:24px;row-gap:24px;align-items:end}
#booking-accessories .booking-line-grid>label{min-width:0;margin-bottom:0}
#booking-accessories .booking-line-grid>label.checkbox-row{display:flex;align-items:center;gap:10px;min-height:44px;margin:0;line-height:1.5}
#booking-accessories .booking-line-grid>label.checkbox-row>input[type="checkbox"]{margin:0;flex:0 0 18px}
#booking-accessories .booking-line-grid>label:has(input[data-property="reimburse"]){grid-column:1/-1;justify-self:start}




.booking-completion-item{min-width:0;margin:16px 0;padding:18px 20px;border:1px solid var(--color-border);border-radius:12px}.booking-completion-item legend{padding:0 8px;font-weight:700}.booking-completion-people{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 14px}.booking-completion-people>span{padding:5px 10px;border-radius:8px;background:var(--color-primary-soft);color:var(--color-primary);font-weight:650}.booking-completion-fields{display:grid;grid-template-columns:minmax(0,2fr) minmax(100px,1fr);gap:16px}.booking-completion-fields label{min-width:0;margin:0}.booking-completion-fields input,.booking-completion-fields select{margin-bottom:0}@media(max-width:600px){.booking-completion-fields{grid-template-columns:1fr}.booking-completion-item{padding:14px}}


/* Booking detail – khối Tổng tiền (thiết kế lại) */
.bt-card{padding:24px}
.bt-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:0 0 18px}
.bt-head h2{margin:0}
.bt-badge{display:inline-flex;align-items:center;gap:6px;padding:5px 12px;border-radius:999px;font-size:12px;font-weight:700;line-height:1.3;white-space:nowrap}
.bt-badge::before{content:'';width:7px;height:7px;border-radius:50%;background:currentColor}
.bt-badge-ok{color:#1d6b52;background:#e3f4ec}
.bt-badge-partial{color:#8a5a12;background:#fff1da}
.bt-badge-pending{color:#9a3d1b;background:#fde9e1}
.bt-badge-warn{color:#8a5a12;background:#fff1da}
.bt-badge-neutral{color:#5d6b75;background:#eef1f3}
.bt-badge-cancelled{color:#8b2e3a;background:#fbe8ea}
.bt-layout{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);gap:20px}
.bt-breakdown,.bt-payment{min-width:0;padding:18px 20px;border:1px solid var(--color-border);border-radius:14px;background:#fbfcfb}
.bt-payment{background:#fff}
.bt-subtitle{margin:0 0 10px;color:var(--color-muted);font-size:12px;font-weight:800;letter-spacing:.4px;text-transform:uppercase}
.bt-lines{margin:0}
.bt-line{display:flex;align-items:baseline;justify-content:space-between;gap:16px;padding:9px 0;border-bottom:1px dashed var(--color-border)}
.bt-line:last-child{border-bottom:0}
.bt-line dt{margin:0;color:#4b5963;font-size:14px}
.bt-line dd{margin:0;color:var(--color-text);font-size:15px;font-weight:650;font-variant-numeric:tabular-nums;white-space:nowrap}
.bt-line-empty dd{color:#a3adb4;font-weight:500}
.bt-line-discount dd{color:#1d6b52}
.bt-line-received dd{color:#1d6b52}
.bt-line-warn dt,.bt-line-warn dd{color:#a5620f}
.bt-line-total{margin-top:6px;padding-top:14px;border-top:2px solid var(--color-text);border-bottom:0}
.bt-line-total dt{color:var(--color-text);font-size:15px;font-weight:750}
.bt-line-total dd{font-size:22px;font-weight:850;letter-spacing:-.4px}
.bt-lines-compact .bt-line{padding:7px 0}
.bt-hero{display:flex;align-items:baseline;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:14px 16px;border-radius:12px}
.bt-hero-due{background:#fff4e3}
.bt-hero-done{background:#e8f6ef}
.bt-hero-label{color:#5d6b75;font-size:13px;font-weight:700}
.bt-hero-value{font-size:clamp(22px,2.4vw,28px);font-weight:900;letter-spacing:-.6px;font-variant-numeric:tabular-nums;white-space:nowrap}
.bt-hero-due .bt-hero-value{color:#a5620f}
.bt-hero-done .bt-hero-value{color:#1d6b52}
.bt-progress{height:8px;margin:14px 0 6px;overflow:hidden;border-radius:999px;background:#edf1ef}
.bt-progress span{display:block;height:100%;border-radius:inherit;background:var(--color-primary,#176b5b)}
.bt-progress-text{margin:0 0 8px;color:var(--color-muted);font-size:13px}
.bt-progress-text strong{color:var(--color-text)}
.bt-cancel-note{margin:0 0 8px;padding:10px 12px;border-radius:10px;color:#6e2a33;background:#fbeef0;font-size:13px;line-height:1.5}
.bt-plan{margin-top:12px;padding:12px 14px;border:1px solid var(--color-border);border-left:4px solid #5d6b75;border-radius:10px;background:#f7f9f8}
.bt-plan-negative{border-left-color:#b4423a}
.bt-plan-label{display:block;color:#4b5963;font-size:13px;line-height:1.4}
.bt-plan-value{display:block;margin-top:4px;font-size:20px;font-weight:850;font-variant-numeric:tabular-nums}
.bt-plan-negative .bt-plan-value{color:#b4423a}
.bt-plan-empty .bt-plan-value{font-size:15px;font-weight:600;color:var(--color-muted)}
.bt-plan small{display:block;margin-top:2px;color:var(--color-muted);font-size:12px}
@media(max-width:900px){.bt-layout{grid-template-columns:1fr;gap:14px}}
@media(max-width:600px){.bt-card{padding:16px}.bt-breakdown,.bt-payment{padding:14px}.bt-line-total dd{font-size:19px}}

.settlement-detail-table .settlement-negative td{color:var(--color-danger,#b42318);font-weight:700}

[hidden]{display:none!important}
.localized-date{display:block;position:relative;min-width:0}.localized-date input{width:100%;color:transparent!important}.localized-date input::-webkit-datetime-edit{opacity:0}.localized-date-value{position:absolute;left:12px;right:36px;top:50%;transform:translateY(-50%);pointer-events:none;white-space:nowrap;overflow:hidden;font-variant-numeric:tabular-nums;color:var(--color-text,#15352f)}
.settlement-details{display:grid;gap:16px;margin:20px 0;padding:20px;border:1px solid var(--color-border);border-radius:14px}.settlement-details h3,.settlement-details h4,.settlement-details p{margin:0}.payable-table input[type=checkbox]{width:40px;height:40px;min-width:40px;cursor:pointer}.payout-neutral{color:var(--color-text)!important}.field-error{color:var(--color-danger,#b42318);display:block;margin:6px 0}

.bt-advance-explanation{display:block;margin-top:4px;font-size:.82rem;font-weight:400;color:var(--color-muted,#657871)}
.assignment-confirm-form{margin-top:16px;padding:20px;border:1px solid var(--color-border);border-radius:12px;display:grid;gap:12px}.assignment-confirm-form textarea{width:100%;min-height:90px}

/* Tổng tiền – bố cục thẻ số liệu */
.bt2 .bt-head{margin-bottom:16px}
.bt2-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.bt2-stat{display:flex;flex-direction:column;gap:6px;min-width:0;padding:14px 16px;border:1px solid var(--color-border);border-radius:12px;background:#fbfcfb}
.bt2-label{color:#5d6b75;font-size:12px;font-weight:700;letter-spacing:.3px;text-transform:uppercase}
.bt2-value{font-size:20px;font-weight:800;letter-spacing:-.3px;color:var(--color-text);font-variant-numeric:tabular-nums;white-space:nowrap}
.bt2-value-ok{color:#1d6b52}
.bt2-value-warn{color:#a5620f}
.bt2-stat-main{border-width:0}
.bt2-stat-main .bt2-value{font-size:24px;font-weight:900}
.bt2-due{background:#fff4e3}.bt2-due .bt2-value{color:#a5620f}
.bt2-done{background:#e8f6ef}.bt2-done .bt2-value{color:#1d6b52}
.bt2 .bt-progress{margin:14px 0 6px}
.bt2 .bt-progress-text{margin:0}
.bt2-rows{margin-top:12px;padding:0 2px}
.bt2-section{margin-top:18px;padding-top:16px;border-top:1px solid var(--color-border)}
.bt2-section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px}
.bt2-section-head h3{margin:0;font-size:14px;font-weight:800;color:var(--color-text)}
.bt2-link{font-size:13px;font-weight:700;color:var(--color-primary,#176b5b);text-decoration:none;white-space:nowrap}
.bt2-link:hover{text-decoration:underline}
.bt2>.bt2-link{display:inline-block;margin-top:14px}
.bt2-ctv{margin:0;padding:0;list-style:none}
.bt2-ctv-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:1px dashed var(--color-border)}
.bt2-ctv-row:last-child{border-bottom:0}
.bt2-ctv-who{display:flex;align-items:center;gap:10px;min-width:0}
.bt2-ctv-who strong{display:block;font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bt2-ctv-sub{display:block;margin-top:2px;color:var(--color-muted,#657871);font-size:12px}
.bt2-avatar{flex:none;display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:50%;background:#e3f0ec;color:#1d6b52;font-size:13px;font-weight:800}
.bt2-ctv-amount{display:flex;align-items:center;gap:8px;flex:none}
.bt2-ctv-amount strong{font-size:15px;font-weight:800;font-variant-numeric:tabular-nums;white-space:nowrap}
.bt2 .bt-plan{margin-top:16px}
@media(max-width:600px){.bt2-stats{grid-template-columns:1fr 1fr}.bt2-stat-main{grid-column:1/-1}.bt2-value{font-size:17px}.bt2-stat-main .bt2-value{font-size:22px}.bt2-ctv-row{align-items:flex-start}.bt2-ctv-amount{flex-direction:column;align-items:flex-end;gap:4px}}
.bt2 .bt-plan{margin-top:14px;padding:4px 16px 8px;border-left-width:4px}
.bt2 .bt-plan summary{padding:10px 0 6px;font-size:14px;font-weight:800;cursor:pointer}
.bt2 .bt-plan .bt-line{padding:7px 0}
.bt2 .bt-plan .bt-line dt{font-size:13px}
.bt2 .bt-plan .bt-line dd{font-size:14px}
.bt2 .bt-plan .bt-line-total{margin-top:4px;padding-top:10px;border-top-width:1px}
.bt2 .bt-plan .bt-line-total dd{font-size:18px}

/* Booking – tab Chi trả CTV */
.booking-payout-panel{padding:24px}
.bp-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-bottom:16px}
.bp-head h2{margin:0 0 4px}
.bp-head p{margin:0;font-size:13px}
.bp-people{display:grid;gap:12px;margin-bottom:22px}
.bp-person{display:grid;grid-template-columns:minmax(180px,1fr) minmax(0,2.4fr) auto;align-items:center;gap:16px;padding:14px 16px;border:1px solid var(--color-border);border-radius:12px;background:#fbfcfb}
.bp-who{display:flex;align-items:center;gap:10px;min-width:0}
.bp-who strong{display:block;font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bp-state{margin-top:4px;padding:2px 9px;font-size:11px}
.bp-figures{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:0}
.bp-figure{min-width:0;padding:8px 10px;border-radius:10px;background:#fff;border:1px solid var(--color-border)}
.bp-figure dt{margin:0 0 3px;color:#5d6b75;font-size:11px;font-weight:700;letter-spacing:.2px;text-transform:uppercase}
.bp-figure dd{margin:0;font-size:15px;font-weight:750;font-variant-numeric:tabular-nums;white-space:nowrap}
.bp-figure-main{border-width:0}
.bp-due{background:#fff4e3}.bp-due dd{color:#a5620f}
.bp-over{background:#fbe8ea}.bp-over dd{color:#8b2e3a}
.bp-done{background:#e8f6ef}.bp-done dd{color:#1d6b52}
.bp-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.bp-actions .button{white-space:nowrap}
.bp-form{margin:-4px 0 4px;padding:16px 18px;border:1px solid var(--color-primary,#176b5b);border-radius:12px;background:#fff;box-shadow:0 6px 18px rgba(20,60,50,.08)}
.bp-form-title{margin:0 0 6px;font-size:15px}
.bp-form-summary{margin:0 0 12px;color:#4b5963;font-size:13px}
.bp-calc{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.bp-calc-item{padding:8px 10px;border-radius:10px;background:#f4f7f6}
.bp-calc-item span{display:block;color:#5d6b75;font-size:11px;font-weight:700;text-transform:uppercase}
.bp-calc-item strong{font-size:15px;font-variant-numeric:tabular-nums}
.bp-calc-total{background:#e8f6ef}.bp-calc-total strong{color:#1d6b52;font-size:17px}
.bp-form-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.bp-field{display:flex;flex-direction:column;gap:5px;min-width:0}
.bp-field-wide{grid-column:1/-1}
.bp-label{font-size:13px;font-weight:700;color:#3d4a53}
.bp-hint{color:var(--color-muted,#657871);font-size:12px}
.bp-field input,.bp-field select,.bp-field textarea{width:100%}
.bp-form-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:12px}
.bp-subtitle{margin:0 0 8px;font-size:14px;font-weight:800}
.bp-history td.num{white-space:nowrap}
.bp-multi{display:block;color:var(--color-muted,#657871);font-size:11px;white-space:normal}
.bp-void-form{display:flex;gap:6px;flex-wrap:wrap;align-items:center}
.bp-void-form input{min-width:160px;flex:1}
@media(max-width:1100px){.bp-person{grid-template-columns:1fr;gap:12px}.bp-actions{justify-content:flex-start}}
@media(max-width:600px){.booking-payout-panel{padding:16px}.bp-figures,.bp-calc{grid-template-columns:1fr 1fr}.bp-form-grid{grid-template-columns:1fr}.bp-form{padding:14px}.bp-actions .button{flex:1}}

/* Chi trả CTV – bố cục: bộ lọc + đối soát cùng hàng, các bảng còn lại full chiều ngang */
#payout-app > .card:first-of-type,#payout-app > .card:nth-of-type(2){grid-column:1/-1}
#payout-app > .payout-filter-panel{grid-column:span 4}
#payout-app > .payout-reconciliation-card{grid-column:span 8}
#payout-app > .payout-filter-panel > summary{font-size:16px;font-weight:800;cursor:pointer;margin-bottom:10px}
#payout-app .payout-filter-grid{grid-template-columns:1fr 1fr}
#payout-app .payable-table td,#payout-app .payout-history-table td{vertical-align:middle}
@media(max-width:1180px){#payout-app > .payout-filter-panel,#payout-app > .payout-reconciliation-card{grid-column:1/-1}#payout-app .payout-filter-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:700px){#payout-app .payout-filter-grid{grid-template-columns:1fr}.mobile-card-table td[data-label="Chọn"]:empty{display:none}}

/* Danh sách booking – mã booking + trạng thái tiền */
.booking-card-title > a.booking-card-code{flex:none;padding:2px 8px;border-radius:6px;background:#eef3f1;color:#1d6b52;font:700 12px/1.5 ui-monospace,SFMono-Regular,Consolas,monospace;letter-spacing:.2px}
.booking-card-price{display:grid;grid-template-columns:auto auto;grid-template-rows:auto auto;column-gap:12px;row-gap:4px;align-items:center;justify-items:end}
.booking-card-price > strong{grid-column:1;grid-row:1}
.booking-card-price > .booking-pay-badge{grid-column:1;grid-row:2;padding:2px 9px;font-size:11px}
.booking-card-price > .icon-button{grid-column:2;grid-row:1/3}
.booking-card-price > .muted{grid-column:1;grid-row:2}
@media(max-width:640px){.booking-card-title > a.booking-card-code{font-size:11px}.booking-card-price > .booking-pay-badge{display:none}.booking-card-price{display:flex}}

/* Nhắc lịch – không để người nhận dài tràn sang cột khác */
.notification-table td{overflow:hidden}
.notification-table td.notification-recipient{white-space:normal;overflow-wrap:anywhere;word-break:break-word}
.notification-table td.notification-schedule{white-space:nowrap;text-overflow:ellipsis}
@media(max-width:700px){.notification-table td{overflow:visible}}
.metric-dot{font-size:17px;line-height:1}
@media(min-width:901px){.sidebar-logout{display:none}}
.report-zero{color:#a3adb4}
.report-total-row td{border-top:2px solid var(--color-text);background:#f4f7f6}

/* Tạo booking – chọn kiểu khách dạng nút gạt */
.booking-customer-mode{display:inline-flex;flex-wrap:wrap;align-items:center;gap:0;margin:0 0 12px;padding:4px;border:1px solid var(--color-border);border-radius:12px;background:#f4f7f6;min-width:0}
.booking-customer-mode legend{float:left;width:100%;margin:0 0 6px;padding:0;color:#3d4a53;font-size:13px;font-weight:700}
.booking-customer-mode label{position:relative;display:inline-flex;align-items:center;margin:0;padding:8px 16px;border-radius:9px;color:#4b5963;font-size:14px;font-weight:700;cursor:pointer}
.booking-customer-mode input[type=radio]{position:absolute;opacity:0;pointer-events:none}
.booking-customer-mode label:has(input:checked){background:#fff;color:var(--color-primary,#176b5b);box-shadow:0 1px 4px rgba(20,60,50,.12)}
.booking-customer-mode label:has(input:focus-visible){outline:2px solid var(--color-primary,#176b5b);outline-offset:1px}
.field-optional{color:var(--color-muted,#657871);font-weight:400;font-size:12px}

/* CR16: preserve legacy data-label values while localizing their visible mobile caption. */
@media (max-width: 900px) {
  .mobile-card-table tbody td[data-label="CTV"]::before { content: "Chuyên viên"; }
}
