:root {
    --ink: #17222e;
    --muted: #657180;
    --surface: #ffffff;
    --surface-soft: #f5f7f8;
    --surface-warm: #fbf8f4;
    --line: #e4e8eb;
    --line-strong: #d5dce1;
    --brand: #a91d2c;
    --brand-dark: #7e1420;
    --brand-soft: #fae9eb;
    --nav: #111b24;
    --nav-soft: #1a2732;
    --success: #15805d;
    --warning: #bd7411;
    --danger: #c73538;
    --info: #256a9c;
    --radius-sm: .55rem;
    --radius: .85rem;
    --radius-lg: 1.15rem;
    --shadow-sm: 0 1px 2px rgba(16, 24, 40, .04), 0 5px 18px rgba(16, 24, 40, .04);
    --shadow-lg: 0 20px 55px rgba(13, 23, 32, .14);
    --sidebar-width: 260px;
    --topbar-height: 72px;
    --bs-font-sans-serif: "DM Sans", system-ui, sans-serif;
    --bs-primary: var(--brand);
    --bs-primary-rgb: 169, 29, 44;
}

*, *::before, *::after { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body { color: var(--ink); font-family: "DM Sans", system-ui, sans-serif; background: var(--surface-soft); }
h1, h2, h3, h4, h5, h6 { font-family: "Manrope", system-ui, sans-serif; letter-spacing: -.025em; color: var(--ink); }
a { text-underline-offset: .18em; }
.min-w-0 { min-width: 0; }
.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 9999; padding: .65rem 1rem; background: var(--surface); color: var(--ink); border-radius: .5rem; box-shadow: var(--shadow-lg); }
.skip-link:focus { top: 1rem; }

.btn { --bs-btn-border-radius: .65rem; min-height: 2.6rem; font-weight: 650; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; }
.btn svg { width: 1rem; height: 1rem; }
.btn-primary { --bs-btn-bg: var(--brand); --bs-btn-border-color: var(--brand); --bs-btn-hover-bg: var(--brand-dark); --bs-btn-hover-border-color: var(--brand-dark); --bs-btn-active-bg: var(--brand-dark); --bs-btn-active-border-color: var(--brand-dark); }
.btn-outline-secondary { --bs-btn-color: #485563; --bs-btn-border-color: var(--line-strong); --bs-btn-hover-bg: #edf1f3; --bs-btn-hover-color: var(--ink); --bs-btn-hover-border-color: #c8d0d6; }
.form-control, .form-select { min-height: 2.75rem; border-color: var(--line-strong); border-radius: .65rem; color: var(--ink); }
.form-control:focus, .form-select:focus, .btn:focus-visible, .icon-button:focus-visible, .app-nav-link:focus-visible { border-color: rgba(169,29,44,.55); box-shadow: 0 0 0 .22rem rgba(169,29,44,.14); outline: 0; }
.form-label { margin-bottom: .42rem; color: #33404d; font-size: .86rem; font-weight: 650; }
.form-text { color: var(--muted); }
.required::after { content: " *"; color: var(--brand); }
.invalid-feedback { font-size: .8rem; }

/* Authentication */
.auth-body { min-height: 100vh; background: #eef1f2; }
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(390px, .95fr) minmax(460px, 1.05fr); }
.auth-brand-panel { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: clamp(2rem, 5vw, 5.5rem); color: white; background: radial-gradient(circle at 15% 12%, rgba(197,53,56,.26), transparent 30%), linear-gradient(145deg, #101b24, #192a36 65%, #17222c); }
.auth-brand-panel::after { content: ""; position: absolute; width: 36rem; height: 36rem; border: 1px solid rgba(255,255,255,.07); border-radius: 50%; right: -18rem; bottom: -18rem; box-shadow: 0 0 0 4rem rgba(255,255,255,.018), 0 0 0 9rem rgba(255,255,255,.012); }
.auth-logo { width: min(100%, 390px); height: auto; position: relative; z-index: 1; }
.auth-kicker { display: block; margin-bottom: 1rem; color: #eeb9bd; text-transform: uppercase; letter-spacing: .14em; font-size: .72rem; font-weight: 700; }
.auth-brand-panel h1 { color: white; font-size: clamp(2.1rem, 4vw, 4.25rem); line-height: 1.04; max-width: 650px; margin-bottom: 1.35rem; }
.auth-brand-panel p { max-width: 570px; color: #bcc8d0; font-size: clamp(1rem, 1.3vw, 1.22rem); line-height: 1.65; }
.auth-trust { position: relative; z-index: 1; display: flex; gap: .65rem; align-items: center; color: #c9d2d8; font-size: .88rem; }
.auth-trust svg { width: 1.15rem; color: #f0c8cb; }
.auth-form-panel { display: grid; place-items: center; padding: 2rem; background: var(--surface-warm); }
.auth-card { width: min(100%, 450px); padding: clamp(1.7rem, 4vw, 3rem); border: 1px solid rgba(213,220,225,.85); border-radius: var(--radius-lg); background: rgba(255,255,255,.94); box-shadow: var(--shadow-lg); }
.auth-card-heading { margin-bottom: 2rem; }
.auth-card h2, .password-card h1 { margin: .45rem 0 .65rem; font-size: 2rem; }
.auth-card-heading p, .password-card > p { color: var(--muted); margin: 0; }
.eyebrow, .modal-eyebrow { color: var(--brand); font-size: .7rem; font-weight: 750; text-transform: uppercase; letter-spacing: .13em; }
.input-icon-wrap { position: relative; }
.input-icon-wrap > svg { position: absolute; left: .9rem; top: 50%; z-index: 2; transform: translateY(-50%); width: 1rem; color: #7b8792; pointer-events: none; }
.input-icon-wrap .form-control { padding-left: 2.65rem; }
.password-toggle { position: absolute; right: .5rem; top: 50%; transform: translateY(-50%); width: 2.25rem; height: 2.25rem; border: 0; background: transparent; color: #657180; border-radius: .45rem; display: grid; place-items: center; }
.password-toggle:hover { background: var(--surface-soft); color: var(--ink); }
.password-toggle svg { width: 1rem; }
.auth-help { color: var(--muted); font-size: .8rem; text-align: center; margin: 1.5rem 0 0; }
.password-page { min-height: 100vh; display: grid; place-items: center; padding: 2rem; background: radial-gradient(circle at 0 0, rgba(169,29,44,.08), transparent 30%), var(--surface-warm); }
.password-card { text-align: center; }
.password-card form { text-align: left; margin-top: 1.6rem; }
.password-icon { width: 3.5rem; height: 3.5rem; margin: 0 auto 1rem; display: grid; place-items: center; border-radius: 1rem; background: var(--brand-soft); color: var(--brand); }

/* App shell */
.app-body { min-height: 100vh; }
.app-sidebar { position: fixed; inset: 0 auto 0 0; z-index: 1031; width: var(--sidebar-width); padding: 1rem .8rem .8rem; flex-direction: column; background: var(--nav); color: white; border-right: 1px solid rgba(255,255,255,.05); }
.sidebar-brand { height: 76px; padding: .35rem .7rem 1rem; display: flex; align-items: center; gap: .75rem; text-decoration: none; color: white; }
.sidebar-brand img { width: 176px; max-height: 52px; object-fit: contain; object-position: left center; }
.sidebar-brand span { margin-left: auto; padding: .18rem .4rem; color: #f2bdc1; border: 1px solid rgba(242,189,193,.22); border-radius: .35rem; font-size: .62rem; font-weight: 750; letter-spacing: .1em; }
.app-nav { display: flex; flex-direction: column; gap: .16rem; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #3a4853 transparent; }
.nav-section-label { margin: 1.05rem .75rem .35rem; color: #7f929f; font-size: .62rem; font-weight: 750; text-transform: uppercase; letter-spacing: .14em; }
.app-nav-link { position: relative; min-height: 2.55rem; padding: .62rem .75rem; display: flex; align-items: center; gap: .72rem; color: #b8c4cc; text-decoration: none; border-radius: .58rem; font-size: .86rem; font-weight: 560; transition: color .15s ease, background-color .15s ease, transform .15s ease; }
.app-nav-link:hover { color: #fff; background: rgba(255,255,255,.055); }
.app-nav-link.active { color: #fff; background: linear-gradient(90deg, rgba(169,29,44,.95), rgba(144,23,36,.82)); box-shadow: 0 6px 18px rgba(82,8,17,.25); }
.app-nav-link.active::before { content: ""; position: absolute; left: -.8rem; width: 3px; height: 1.5rem; border-radius: 0 4px 4px 0; background: #f1b8bd; }
.app-nav-link svg { flex: 0 0 auto; width: 1.05rem; height: 1.05rem; }
.nav-count { margin-left: auto; min-width: 1.25rem; height: 1.25rem; padding: 0 .3rem; display: grid; place-items: center; color: #fff; background: rgba(255,255,255,.15); border-radius: 999px; font-size: .65rem; }
.sidebar-footer { margin-top: auto; padding: .8rem .55rem .2rem; display: flex; align-items: center; gap: .65rem; border-top: 1px solid rgba(255,255,255,.08); }
.sidebar-footer strong, .sidebar-footer small { max-width: 120px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-footer strong { color: #fff; font-size: .78rem; }
.sidebar-footer small { color: #8699a6; font-size: .67rem; margin-top: .08rem; }
.user-avatar, .avatar-button { flex: 0 0 auto; display: grid; place-items: center; color: #fff; background: linear-gradient(145deg, var(--brand), #79212a); border-radius: .62rem; font-weight: 750; }
.user-avatar { width: 2.15rem; height: 2.15rem; font-size: .8rem; }
.avatar-button { width: 2.35rem; height: 2.35rem; border: 0; }
.app-mobile-nav { color: white; background: var(--nav); width: min(88vw, 310px) !important; }
.app-mobile-nav .offcanvas-header { border-bottom: 1px solid rgba(255,255,255,.08); }
.app-mobile-nav .sidebar-brand { padding: 0; height: 54px; }
.app-mobile-nav .offcanvas-body { padding: .5rem .75rem 1rem; }
.app-frame { min-height: 100vh; }
.app-topbar { position: sticky; top: 0; z-index: 1020; height: var(--topbar-height); padding: 0 clamp(1rem, 2.6vw, 2.4rem); display: flex; align-items: center; gap: 1rem; background: rgba(255,255,255,.92); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.global-search { width: min(43vw, 490px); min-width: 240px; height: 2.65rem; position: relative; display: flex; align-items: center; }
.global-search > svg { position: absolute; left: .85rem; width: 1rem; color: #73808b; }
.global-search input { width: 100%; height: 100%; padding: 0 3.7rem 0 2.55rem; color: var(--ink); background: #f2f5f6; border: 1px solid transparent; border-radius: .7rem; font-size: .84rem; }
.global-search input:focus { outline: 0; border-color: rgba(169,29,44,.35); background: white; box-shadow: 0 0 0 .2rem rgba(169,29,44,.08); }
.global-search kbd { position: absolute; right: .65rem; padding: .12rem .35rem; color: #76828c; background: white; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: .3rem; font-family: inherit; font-size: .65rem; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: .55rem; }
.operational-date { align-items: center; gap: .45rem; margin-right: .25rem; color: var(--muted); font-size: .78rem; }
.operational-date svg { width: .95rem; }
.icon-button { width: 2.35rem; height: 2.35rem; padding: 0; display: inline-grid; place-items: center; color: #5c6975; background: transparent; border: 1px solid transparent; border-radius: .62rem; text-decoration: none; }
.icon-button:hover { color: var(--ink); background: #eef2f3; }
.icon-button svg { width: 1.1rem; height: 1.1rem; }
.notification-dot { position: absolute; right: .43rem; top: .4rem; width: .47rem; height: .47rem; border: 2px solid white; border-radius: 50%; background: var(--brand); }
.dropdown-item { display: flex; align-items: center; gap: .55rem; font-size: .86rem; }
.dropdown-item svg { width: 1rem; }
.app-main { padding: clamp(1.4rem, 3vw, 2.6rem); }
.page-heading { margin-bottom: 1.65rem; display: flex; align-items: flex-end; justify-content: space-between; gap: 1.25rem; }
.page-heading h1 { margin: .24rem 0 .25rem; font-size: clamp(1.65rem, 3vw, 2.25rem); font-weight: 750; }
.page-subtitle { margin: 0; color: var(--muted); font-size: .9rem; }
.page-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: .55rem; }
.page-content { min-height: 240px; }

/* Content components */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.panel-header { min-height: 4.2rem; padding: 1rem 1.15rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--line); }
.panel-title { margin: 0; font-size: .98rem; font-weight: 750; }
.panel-subtitle { margin: .18rem 0 0; color: var(--muted); font-size: .76rem; }
.panel-body { padding: 1.15rem; }
.filter-bar { margin-bottom: 1rem; padding: .75rem; display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.filter-search { position: relative; flex: 1 1 260px; }
.filter-search > svg { position: absolute; left: .82rem; top: 50%; transform: translateY(-50%); width: 1rem; color: var(--muted); }
.filter-search input { padding-left: 2.5rem; }
.filter-bar .form-select { flex: 0 1 190px; }
.table-responsive { scrollbar-width: thin; }
.data-table { margin: 0; min-width: 760px; --bs-table-bg: transparent; }
.data-table thead th { padding: .72rem 1rem; color: #71808c; background: #f8fafb; border-bottom: 1px solid var(--line); font-size: .66rem; font-weight: 750; text-transform: uppercase; letter-spacing: .075em; white-space: nowrap; }
.data-table tbody td { padding: .82rem 1rem; vertical-align: middle; border-color: #edf0f2; color: #34414d; font-size: .83rem; }
.data-table tbody tr { transition: background-color .15s ease; }
.data-table tbody tr:hover { background: #fafbfc; }
.data-table .primary-cell { color: var(--ink); font-weight: 670; }
.data-table .secondary-line { display: block; margin-top: .14rem; color: var(--muted); font-size: .72rem; font-weight: 400; }
.table-actions { display: flex; justify-content: flex-end; gap: .3rem; }
.table-action { width: 2rem; height: 2rem; display: inline-grid; place-items: center; color: #667480; background: transparent; border: 1px solid transparent; border-radius: .5rem; }
.table-action:hover { color: var(--brand); background: var(--brand-soft); }
.table-action svg { width: .95rem; }
.status-badge { display: inline-flex; align-items: center; gap: .35rem; min-height: 1.55rem; padding: .2rem .52rem; border-radius: 999px; font-size: .67rem; font-weight: 680; line-height: 1; white-space: nowrap; }
.status-badge::before { content: ""; width: .36rem; height: .36rem; border-radius: 50%; background: currentColor; }
.status-success { color: #0f7354; background: #e6f5ef; }
.status-primary { color: #245e94; background: #e8f1f9; }
.status-warning { color: #9c5d09; background: #fff3dd; }
.status-danger { color: #ac2b31; background: #fae7e8; }
.status-secondary { color: #63717c; background: #eef1f3; }
.metric-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .8rem; margin-bottom: 1.2rem; }
.metric-card { min-height: 122px; padding: 1rem; position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.metric-card::after { content: ""; position: absolute; width: 4.3rem; height: 4.3rem; border-radius: 50%; right: -1.8rem; bottom: -2.1rem; background: var(--metric-soft, #eef2f4); }
.metric-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.metric-label { color: var(--muted); font-size: .7rem; font-weight: 600; line-height: 1.25; }
.metric-icon { width: 2rem; height: 2rem; display: grid; place-items: center; color: var(--metric, #526573); background: var(--metric-soft, #eef2f4); border-radius: .6rem; }
.metric-icon svg { width: 1rem; }
.metric-value { margin-top: .75rem; font-family: "Manrope", system-ui, sans-serif; font-size: 1.65rem; font-weight: 750; line-height: 1; }
.metric-card.brand { --metric: var(--brand); --metric-soft: var(--brand-soft); }
.metric-card.green { --metric: var(--success); --metric-soft: #e5f5ef; }
.metric-card.amber { --metric: var(--warning); --metric-soft: #fff3dd; }
.metric-card.blue { --metric: var(--info); --metric-soft: #e8f2f8; }
.metric-card.red { --metric: var(--danger); --metric-soft: #fae7e8; }
.dashboard-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 1rem; }
.dashboard-span-7 { grid-column: span 7; }
.dashboard-span-5 { grid-column: span 5; }
.dashboard-span-4 { grid-column: span 4; }
.dashboard-list { list-style: none; margin: 0; padding: 0; }
.dashboard-list-item { padding: .75rem 1.05rem; display: flex; align-items: center; gap: .8rem; border-bottom: 1px solid #edf0f2; }
.dashboard-list-item:last-child { border-bottom: 0; }
.room-token { flex: 0 0 auto; min-width: 2.65rem; height: 2.15rem; display: grid; place-items: center; color: var(--ink); background: #edf1f3; border-radius: .55rem; font-family: "Manrope"; font-size: .74rem; font-weight: 750; }
.dashboard-list-main { min-width: 0; flex: 1; }
.dashboard-list-main strong { display: block; overflow: hidden; color: var(--ink); font-size: .8rem; white-space: nowrap; text-overflow: ellipsis; }
.dashboard-list-main span { display: block; margin-top: .14rem; color: var(--muted); font-size: .7rem; }
.quick-actions { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .55rem; }
.quick-action { min-height: 4.1rem; padding: .7rem; display: flex; align-items: center; gap: .65rem; text-align: left; color: #33414d; background: #f8fafb; border: 1px solid var(--line); border-radius: .7rem; font-size: .74rem; font-weight: 650; }
.quick-action:hover { color: var(--brand); background: var(--brand-soft); border-color: #efc9cd; }
.quick-action svg { width: 1.1rem; flex: 0 0 auto; }
.empty-state { min-height: 240px; padding: 2rem; display: grid; place-items: center; text-align: center; }
.empty-state > div { max-width: 370px; }
.empty-icon { width: 3.5rem; height: 3.5rem; margin: 0 auto 1rem; display: grid; place-items: center; color: #7a8893; background: #edf1f3; border-radius: 1rem; }
.empty-state h3 { font-size: 1rem; }
.empty-state p { color: var(--muted); font-size: .82rem; }

/* Occupancy */
.occupancy-wrap { overflow: auto; max-height: calc(100vh - 255px); border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: var(--shadow-sm); }
.occupancy-grid { --days: 14; display: grid; grid-template-columns: 185px repeat(var(--days), minmax(54px, 1fr)); min-width: calc(185px + var(--days) * 54px); position: relative; }
.occupancy-cell { min-height: 46px; padding: .35rem; border-right: 1px solid #edf0f2; border-bottom: 1px solid #edf0f2; }
.occupancy-header { position: sticky; top: 0; z-index: 4; min-height: 57px; display: grid; place-items: center; text-align: center; color: var(--muted); background: #f8fafb; font-size: .65rem; font-weight: 650; }
.occupancy-header strong { display: block; color: var(--ink); font-size: .76rem; }
.occupancy-room { position: sticky; left: 0; z-index: 3; min-height: 46px; padding: .55rem .7rem; display: flex; align-items: center; justify-content: space-between; gap: .5rem; background: white; }
.occupancy-room strong { font-size: .8rem; }
.occupancy-room small { display: block; margin-top: .1rem; color: var(--muted); font-size: .63rem; }
.occupancy-grid > .occupancy-room:first-child { top: 0; z-index: 6; background: #f8fafb; }
.occupancy-day { appearance: none; padding: 0; background: white; border-top: 0; border-left: 0; border-right: 1px solid #edf0f2; border-bottom: 1px solid #edf0f2; border-radius: 0; }
.occupancy-day:hover { background: #f7f9fa; }
.occupancy-day.weekend { background: #fbfaf8; }
.occupancy-day.today { background: #fff6f6; }
.occupancy-booking { margin: .1rem; padding: .34rem .42rem; position: relative; z-index: 2; align-self: center; overflow: hidden; color: #fff; background: #356f9d; border: 1px solid rgba(0,0,0,.04); border-radius: .42rem; box-shadow: 0 2px 8px rgba(36,76,110,.18); font-size: .64rem; font-weight: 650; white-space: nowrap; text-overflow: ellipsis; cursor: pointer; }
.occupancy-booking.checked_in { background: #17785b; }
.occupancy-booking.tentative { color: #65400c; background: #f3c56d; }
.occupancy-block { margin: .1rem; padding: .33rem; z-index: 2; align-self: center; color: #9c282f; background: repeating-linear-gradient(135deg,#f9dcde,#f9dcde 7px,#f4cdd0 7px,#f4cdd0 14px); border: 1px solid #eab7bb; border-radius: .42rem; font-size: .62rem; font-weight: 700; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* Rooms / mobile cards */
.room-status-row { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem; }
.room-number-cell { display: flex; align-items: center; gap: .65rem; }
.room-number-box { width: 2.65rem; height: 2.45rem; display: grid; place-items: center; color: #fff; background: var(--nav-soft); border-radius: .6rem; font-family: "Manrope"; font-size: .75rem; font-weight: 750; }
.mobile-task-list { display: grid; gap: .75rem; }
.mobile-task-card { padding: 1rem; background: white; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.mobile-task-top { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; }
.mobile-task-room { font-family: "Manrope"; font-size: 1.15rem; font-weight: 750; }
.mobile-task-meta { margin: .3rem 0 .85rem; color: var(--muted); font-size: .75rem; }
.task-actions { display: flex; flex-wrap: wrap; gap: .45rem; }

/* Modal and details */
.modal-content { border: 0; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.modal-header { padding: 1.15rem 1.35rem; }
.modal-body { padding: 1.35rem; }
.modal-footer { padding: .9rem 1.35rem; background: #fafbfb; border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.modal-title { margin-top: .12rem; }
.form-section { padding: 1rem; margin-bottom: 1rem; background: #fafbfc; border: 1px solid var(--line); border-radius: .75rem; }
.form-section-title { margin: 0 0 .85rem; font-size: .83rem; font-weight: 750; }
.detail-hero { padding: 1.1rem; margin-bottom: 1rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; background: linear-gradient(135deg,#f8f2f2,#fff); border: 1px solid #f0dfe1; border-radius: .85rem; }
.detail-hero h3 { margin: .25rem 0 .2rem; font-size: 1.25rem; }
.detail-hero p { margin: 0; color: var(--muted); font-size: .78rem; }
.detail-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .6rem; }
.detail-item { padding: .75rem; background: #f7f9fa; border-radius: .65rem; }
.detail-item dt { color: var(--muted); font-size: .65rem; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; }
.detail-item dd { margin: .22rem 0 0; color: var(--ink); font-size: .82rem; font-weight: 620; }
.timeline { position: relative; margin: 0; padding: .25rem 0 .25rem 1.45rem; list-style: none; }
.timeline::before { content: ""; position: absolute; left: .38rem; top: .6rem; bottom: .6rem; width: 1px; background: var(--line-strong); }
.timeline li { position: relative; padding: .15rem 0 1rem; }
.timeline li::before { content: ""; position: absolute; left: -1.29rem; top: .42rem; width: .48rem; height: .48rem; border: 2px solid white; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 1px #e1b9bd; }
.timeline strong { font-size: .76rem; }
.timeline span { display: block; color: var(--muted); font-size: .68rem; margin-top: .12rem; }
.nav-tabs { --bs-nav-tabs-border-color: var(--line); }
.nav-tabs .nav-link { color: var(--muted); font-size: .78rem; font-weight: 650; }
.nav-tabs .nav-link.active { color: var(--brand); }

.app-toast { border: 0; box-shadow: var(--shadow-lg); }
.toast-status-icon { width: 1.5rem; height: 1.5rem; margin-right: .45rem; display: grid; place-items: center; color: var(--success); background: #e5f5ef; border-radius: 50%; }
.toast-status-icon svg { width: .8rem; }
.app-alert { margin-bottom: 1.2rem; }
.skeleton-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: .8rem; }
.skeleton-card { height: 130px; border-radius: var(--radius); background: linear-gradient(90deg,#eceff1 25%,#f8f9fa 40%,#eceff1 60%); background-size: 400% 100%; animation: shimmer 1.25s infinite; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
.text-truncate-2 { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.print-only { display: none; }

@media (min-width: 992px) {
    .app-frame { margin-left: var(--sidebar-width); }
}

@media (max-width: 1399.98px) {
    .metric-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .dashboard-span-7, .dashboard-span-5 { grid-column: span 6; }
    .dashboard-span-4 { grid-column: span 6; }
}

@media (max-width: 991.98px) {
    .metric-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .dashboard-span-7, .dashboard-span-5, .dashboard-span-4 { grid-column: span 12; }
    .global-search { width: min(55vw,490px); }
    .auth-shell { grid-template-columns: 1fr; }
    .auth-brand-panel { min-height: 300px; padding: 2rem; }
    .auth-brand-panel h1 { font-size: 2.6rem; }
    .auth-brand-panel p { max-width: 650px; }
    .auth-logo { width: 280px; }
    .auth-form-panel { padding: 2.5rem 1rem; }
}

@media (max-width: 767.98px) {
    :root { --topbar-height: 62px; }
    .app-topbar { padding: 0 .8rem; gap: .55rem; }
    .app-main { padding: 1.15rem .8rem 2rem; }
    .page-heading { align-items: flex-start; flex-direction: column; margin-bottom: 1rem; }
    .page-actions { width: 100%; justify-content: flex-start; }
    .page-actions .btn { flex: 1 1 auto; }
    .global-search { min-width: 0; width: auto; flex: 1; }
    .global-search kbd { display: none; }
    .global-search input { padding-right: .7rem; }
    .metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: .6rem; }
    .metric-card { min-height: 108px; padding: .8rem; }
    .metric-value { font-size: 1.35rem; }
    .panel-header { padding: .85rem; }
    .panel-body { padding: .85rem; }
    .filter-bar { align-items: stretch; }
    .filter-bar .form-select { flex: 1 1 135px; }
    .auth-brand-panel { min-height: 250px; }
    .auth-brand-panel h1 { font-size: 2.05rem; }
    .auth-brand-panel p { font-size: .95rem; }
    .auth-trust { display: none; }
    .auth-card { padding: 1.5rem; }
    .detail-grid { grid-template-columns: 1fr; }
    .detail-hero { align-items: flex-start; flex-direction: column; }
    .modal-dialog { margin: .5rem; }
}

@media (max-width: 399px) {
    .metric-grid { grid-template-columns: 1fr 1fr; }
    .metric-label { font-size: .64rem; }
    .quick-actions { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media print {
    .app-sidebar, .app-topbar, .page-actions, .filter-bar, .table-actions, .no-print { display: none !important; }
    .app-frame { margin: 0; }
    .app-main { padding: 0; }
    .panel { box-shadow: none; border-color: #bbb; }
    .print-only { display: block; }
    body { background: white; color: black; }
}
