@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@500;600;700;800&display=swap');

:root {
    --page: #05090f;
    --card: #080d14;
    --field: #070b11;
    --text: #f8fafc;
    --muted: #9ca3af;
    --blue: #1789ef;
    --blue-bright: #218ff4;
}

* { box-sizing: border-box; }
html { background: var(--page); }
body {
    min-width: 320px;
    margin: 0;
    color: var(--text);
    background: radial-gradient(circle at 50% -20%, rgba(25, 137, 239, .16), transparent 43%), var(--page);
    font-family: 'DM Sans', sans-serif;
}
button, input { font: inherit; }
button { cursor: pointer; }

.login-page {
    min-height: 100vh;
    min-height: 100svh;
    display: grid;
    place-items: center;
    padding: 24px;
}
.auth-card {
    position: relative;
    width: min(650px, 100%);
    overflow: hidden;
    border: 1px solid #242a33;
    border-radius: 28px;
    background: rgba(8, 13, 20, .96);
    box-shadow: 0 35px 100px rgba(0, 0, 0, .5), 0 0 80px rgba(16, 102, 189, .08);
}
.auth-header { display: grid; gap: 22px; padding: 26px 30px 0; }
.brand-lockup { display: flex; align-items: center; gap: 14px; }
.logo-frame {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    overflow: hidden;
    border: 1px solid #dfe5eb;
    border-radius: 15px;
    background: white;
    box-shadow: 0 7px 25px rgba(16, 125, 225, .14);
}
.logo-frame img { width: 100%; height: 100%; object-fit: cover; }
.brand-copy { display: grid; gap: 2px; }
.brand-copy strong { color: var(--text); font: 800 19px/1 'Manrope', sans-serif; letter-spacing: -.05em; }
.brand-copy strong span { color: var(--blue-bright); }
.brand-copy small { color: #697585; font-size: 10px; letter-spacing: .09em; text-transform: uppercase; }

.role-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 0; padding: 5px; border-radius: 18px; background: #262a2f; }
.role-tab {
    padding: 15px 13px;
    border: 0;
    border-radius: 13px;
    color: #b2b6bd;
    background: transparent;
    font: 700 19px/1 'Manrope', sans-serif;
    transition: color .35s ease, background .35s ease, box-shadow .35s ease, transform .35s ease;
}
.role-tab:hover { color: white; }
.role-tab.active { color: white; background: linear-gradient(135deg, var(--blue-bright), #0876df); box-shadow: 0 8px 22px rgba(14, 123, 232, .25); transform: translateY(-1px); }

.auth-content { padding: 48px 46px 38px; }
.heading-block { margin-bottom: 24px; }
.section-label { margin: 0 0 13px; color: var(--blue-bright); font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.heading-block h1 { margin: 0 0 11px; color: var(--text); font: 800 clamp(34px, 6vw, 46px)/1 'Manrope', sans-serif; letter-spacing: -.06em; }
.heading-block p:last-child { margin: 0; color: var(--muted); font-size: 16px; }

.forms-window { overflow: hidden; }
.forms-track { display: flex; width: 200%; transform: translateX(-50%); transition: transform .62s cubic-bezier(.22, .8, .24, 1); }
.role-form-card { flex: 0 0 50%; min-width: 0; padding-right: 20px; }
.role-form-card:last-child { padding-right: 0; padding-left: 20px; }
.login-form { display: grid; gap: 11px; }
.input-field { display: flex; align-items: center; gap: 17px; min-height: 72px; padding: 0 24px; border: 2px solid #20252c; border-radius: 17px; background: var(--field); transition: border-color .25s ease, box-shadow .25s ease; }
.input-field:focus-within { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(23, 137, 239, .08); }
.input-icon { display: grid; place-items: center; width: 28px; color: var(--blue); }
.input-icon svg { width: 30px; height: 30px; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.input-field input { width: 100%; min-width: 0; border: 0; outline: 0; color: var(--text); background: transparent; font-size: 17px; }
.input-field input::placeholder { color: #a4a7ac; opacity: 1; }
.login-button { display: flex; align-items: center; justify-content: center; gap: 13px; min-height: 70px; margin-top: 2px; border: 0; border-radius: 17px; color: white; background: linear-gradient(110deg, #0d7fe8, #1a89ed); box-shadow: 0 13px 27px rgba(12, 123, 230, .17); font: 700 18px 'Manrope', sans-serif; transition: transform .25s ease, box-shadow .25s ease, filter .25s ease; }
.login-button span { font-size: 29px; font-weight: 400; transition: transform .25s ease; }
.login-button:hover { filter: brightness(1.08); transform: translateY(-2px); box-shadow: 0 17px 34px rgba(12, 123, 230, .26); }
.login-button:hover span { transform: translateX(5px); }
.security-note { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 24px 0 0; color: #777f8b; font-size: 12px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #28b37b; box-shadow: 0 0 11px #28b37b; }
.login-error { margin: 0 0 18px; padding: 13px 17px; border: 1px solid rgba(255, 105, 70, .45); border-radius: 10px; color: #ffb09c; background: rgba(120, 39, 25, .32); font-size: 13px; line-height: 1.45; text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-width: 620px) {
    .login-page { padding: 0; align-items: start; }
    .auth-card { min-height: 100svh; border: 0; border-radius: 0; }
    .auth-header { padding: 24px 20px 0; }
    .auth-content { padding: 55px 20px 44px; }
    .role-tab { padding: 16px 12px; font-size: 18px; }
    .heading-block p:last-child { font-size: 16px; line-height: 1.5; }
    .input-field { min-height: 75px; padding: 0 22px; border-radius: 17px; }
    .input-field input { font-size: 17px; }
    .login-button { min-height: 75px; border-radius: 17px; font-size: 18px; }
    .role-form-card:last-child { padding-left: 12px; }
    .role-form-card:first-child { padding-right: 12px; }
}

/* Theme switch */
.header-top { display:flex; align-items:center; justify-content:space-between; gap:18px; }
.theme-toggle {
    display:inline-flex;
    align-items:center;
    gap:8px;
    padding:9px 12px;
    border:1px solid #303946;
    border-radius:10px;
    color:#aeb7c3;
    background:#101720;
    font-size:11px;
    white-space:nowrap;
    transition:color .2s, border-color .2s, background .2s;
}
.theme-toggle:hover { color:#fff; border-color:#218ff4; }
.theme-symbol { color:#218ff4; font-size:16px; line-height:1; }

:root[data-theme="light"] {
    --page:#edf2f7;
    --card:#ffffff;
    --field:#f8fafc;
    --text:#142235;
    --muted:#637084;
}
body[data-theme="light"] {
    color:var(--text);
    background:radial-gradient(circle at 50% -20%, rgba(25,137,239,.16), transparent 43%), var(--page);
}
body[data-theme="light"] .auth-card { border-color:#d7e0e9; background:var(--card); box-shadow:0 25px 70px rgba(35,65,95,.15); }
body[data-theme="light"] .brand-copy strong { color:var(--text); }
body[data-theme="light"] .brand-copy small { color:#748194; }
body[data-theme="light"] .role-switch { background:#e1e7ee; }
body[data-theme="light"] .role-tab { color:#607085; }
body[data-theme="light"] .role-tab:hover { color:#142235; }
body[data-theme="light"] .heading-block h1 { color:var(--text); }
body[data-theme="light"] .heading-block p:last-child { color:var(--muted); }
body[data-theme="light"] .input-field { border-color:#d4dce5; background:var(--field); }
body[data-theme="light"] .input-field input { color:var(--text); }
body[data-theme="light"] .input-field input::placeholder { color:#7f8b9a; }
body[data-theme="light"] .security-note { color:#718096; }
body[data-theme="light"] .theme-toggle { border-color:#cbd6e2; color:#4b5b70; background:#f4f7fa; }
body[data-theme="light"] .theme-toggle:hover { color:#142235; background:#fff; }
body[data-theme="light"] .login-error { border-color:rgba(190,67,42,.3); color:#a43e2a; background:#fff0eb; }
body[data-theme="light"] main.auth-card h1[style] { color:var(--text) !important; }
body[data-theme="light"] main.auth-card p[style] { color:var(--muted) !important; }

/* Post-login workspace */
.workspace-page { display:block; padding:0; }
.workspace-shell { width:100%; min-height:100vh; }
.workspace-bar {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:20px;
    min-height:92px;
    padding:18px clamp(22px, 5vw, 72px);
    background:linear-gradient(110deg, #0755b8, #1687ed 62%, #0c6fd0);
    box-shadow:0 8px 28px rgba(7,80,173,.24);
}
.workspace-brand { display:flex; align-items:center; gap:13px; }
.workspace-brand img { width:48px; height:48px; object-fit:cover; border:1px solid rgba(255,255,255,.65); border-radius:12px; background:white; }
.workspace-brand strong { display:block; color:#fff; font:800 17px/1 'Manrope',sans-serif; letter-spacing:.02em; }
.workspace-brand small { display:block; margin-top:6px; color:rgba(255,255,255,.72); font-size:11px; }
.workspace-bar .theme-toggle { border-color:rgba(255,255,255,.32); color:#fff; background:rgba(0,0,0,.14); }
.workspace-bar .theme-toggle:hover { border-color:#fff; background:rgba(0,0,0,.23); }
.workspace-bar .theme-symbol { color:#fff; }
.workspace-actions { display:flex; align-items:center; gap:15px; }
.workspace-signout { display:inline-flex; align-items:center; justify-content:center; margin-right:4px; padding:9px 13px; border:1px solid #ff7272; border-radius:9px; outline:2px solid rgba(255,92,92,.12); color:#ff9d9d !important; background:rgba(190,45,55,.18); font-size:12px; font-weight:700; text-decoration:none; transition:background .2s, border-color .2s, color .2s; }
.workspace-signout:hover { border-color:#ff7272; color:#fff !important; background:#c93e48; text-decoration:none; }
.menu-button { display:grid; place-content:center; gap:4px; width:40px; height:40px; padding:0; border:1px solid rgba(255,255,255,.35); border-radius:10px; color:#fff; background:rgba(0,0,0,.14); }
.menu-button span { display:block; width:18px; height:2px; border-radius:2px; background:currentColor; transition:transform .25s, opacity .25s; }
.menu-button[aria-expanded="true"] span:nth-child(1) { transform:translateY(6px) rotate(45deg); }
.menu-button[aria-expanded="true"] span:nth-child(2) { opacity:0; }
.menu-button[aria-expanded="true"] span:nth-child(3) { transform:translateY(-6px) rotate(-45deg); }
.workspace-drawer { position:fixed; z-index:30; top:0; bottom:0; left:0; display:flex; width:min(290px, 86vw); flex-direction:column; padding:24px 16px; border-right:1px solid #d7e0e9; background:#fff; box-shadow:18px 0 45px rgba(0,0,0,.18); transform:translateX(-105%); transition:transform .3s ease; }
.workspace-drawer.open { transform:translateX(0); }
.drawer-backdrop { position:fixed; z-index:20; inset:0; background:transparent; opacity:0; pointer-events:none; }
.drawer-backdrop.open { opacity:0; pointer-events:none; }
.drawer-title { display:flex; align-items:center; gap:11px; margin-bottom:28px; color:#142235; font:800 17px 'Manrope',sans-serif; }
.drawer-title img { width:38px; height:38px; object-fit:cover; border-radius:10px; background:#fff; }
.drawer-link { display:flex; min-height:44px; box-sizing:border-box; align-items:center; gap:11px; padding:11px 12px; border-radius:10px; color:#53657a; font-size:13px; text-decoration:none; white-space:nowrap; }
.drawer-link-badge { display:inline-flex; min-width:18px; height:18px; box-sizing:border-box; align-items:center; justify-content:center; margin-left:auto; padding:0 5px; border-radius:999px; color:#fff; background:#d94b58; font-size:10px; font-weight:800; line-height:1; }
.drawer-link:hover, .drawer-link.active { color:#1161ac; background:#eaf5ff; }
.drawer-link svg { width:18px; height:18px; flex:0 0 18px; color:#53657a; stroke:currentColor; fill:none; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.drawer-group { display:block; }
.drawer-group-head { display:flex; min-height:44px; align-items:center; gap:4px; }
.drawer-group-head > .drawer-link { flex:1; min-width:0; }
.drawer-group-toggle { display:grid; width:34px; height:34px; place-items:center; flex:0 0 34px; border:0; border-radius:8px; color:#7a8796; background:transparent; cursor:pointer; }
.drawer-group-toggle:hover { color:#1161ac; background:#eaf5ff; }
.drawer-group-chevron { display:block; font-size:14px; line-height:1; transition:transform .2s ease; }
.drawer-group.is-collapsed .drawer-group-chevron { transform:rotate(-90deg); }
.drawer-submenu { max-height:500px; overflow:hidden; opacity:1; transition:max-height .25s ease, opacity .2s ease; }
.drawer-group.is-collapsed .drawer-submenu { max-height:0; opacity:0; }
.drawer-submenu .drawer-link { margin-left:14px; }
.drawer-section-label { display:flex; min-height:40px; flex:1; align-items:center; padding:0 12px; color:#53657a; font-size:13px; font-weight:700; }
.drawer-footer { margin-top:auto; display:grid; gap:14px; }
.drawer-footer a { color:#7a8796; font-size:12px; text-decoration:none; }
.drawer-footer a:hover { color:#1161ac; }
.workspace-bar > .workspace-brand { gap:12px; }
.workspace-bar > .workspace-brand .menu-button { margin-right:2px; }
body[data-theme="dark"] .workspace-drawer { border-color:#242a33; background:#080d14; }
body[data-theme="dark"] .drawer-title { color:#f8fafc; }
body[data-theme="dark"] .drawer-link { color:#aab5c2; }
body[data-theme="dark"] .drawer-link svg { color:#aab5c2; }
body[data-theme="dark"] .drawer-link:hover, body[data-theme="dark"] .drawer-link.active { color:#fff; background:rgba(23,137,239,.14); }
body[data-theme="dark"] .drawer-group-toggle { color:#7c8998; }
body[data-theme="dark"] .drawer-group-toggle:hover { color:#fff; background:rgba(23,137,239,.14); }
body[data-theme="dark"] .drawer-section-label { color:#f8fafc; }
body[data-theme="dark"] .drawer-footer a { color:#7c8998; }
.workspace-content { width:min(1050px, calc(100% - 40px)); margin:0 auto; padding:clamp(58px, 9vw, 120px) 0; }
.workspace-heading { margin-bottom:42px; text-align:center; }
.workspace-heading p { margin:0 0 10px; color:var(--blue-bright); font-size:11px; font-weight:700; letter-spacing:.17em; text-transform:uppercase; }
.workspace-heading h1 { margin:0; color:var(--text); font:800 clamp(38px, 5vw, 58px)/1 'Manrope',sans-serif; letter-spacing:-.07em; }
.workspace-heading span { display:block; margin-top:12px; color:var(--muted); font-size:15px; }
.tool-grid { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:22px; }
.tool-card { display:flex; min-height:200px; flex-direction:column; align-items:center; justify-content:center; padding:26px 18px; border:1px solid #d9e1e9; border-radius:15px; color:var(--text); background:rgba(255,255,255,.92); box-shadow:0 12px 28px rgba(40,73,105,.09); text-align:center; text-decoration:none; transition:transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.tool-card:hover { border-color:#85bff2; box-shadow:0 18px 34px rgba(40,102,157,.16); transform:translateY(-5px); }
.tool-icon { display:grid; place-items:center; width:62px; height:62px; margin-bottom:17px; border-radius:17px; color:#1380d9; background:#e5f3ff; }
.tool-icon svg { width:35px; height:35px; stroke:currentColor; stroke-width:1.7; fill:none; stroke-linecap:round; stroke-linejoin:round; }
.tool-card h2 { margin:0 0 8px; color:#155486; font:700 19px 'Manrope',sans-serif; }
.tool-card p { margin:0; color:#7f8b99; font-size:12px; }
.admin-tools { margin-bottom:28px; }
.admin-tools .tool-card { min-height:145px; padding:20px 14px; border-color:#242a33; background:#080d14; box-shadow:0 12px 28px rgba(0,0,0,.15); }
.admin-tools .tool-icon { width:48px; height:48px; margin-bottom:12px; border-radius:13px; }
.admin-tools .tool-icon svg { width:27px; height:27px; }
.admin-tools .tool-card h2 { margin-bottom:5px; color:#f8fafc; font-size:16px; }
.admin-tools .tool-card p { color:#7f8b9b; }
body[data-theme="light"] .admin-tools .tool-card { border-color:#d9e1e9; background:#fff; box-shadow:0 12px 28px rgba(40,73,105,.09); }
body[data-theme="light"] .admin-tools .tool-card h2 { color:#155486; }

@media (max-width:760px) {
    .reference-home .workspace-shell { width:calc(100% - 20px); min-height:calc(100vh - 20px); margin:10px auto; }
    .reference-home .workspace-bar { padding:18px 16px; }
    .reference-home .workspace-content { width:calc(100% - 32px); }
    .tool-grid { grid-template-columns:1fr; max-width:390px; margin:0 auto; }
    .tool-card, .admin-tools .tool-card { min-height:150px; }
    .workspace-content { padding-top:60px; }
}

/* Inventory stock list */
.inventory-content { width:min(1180px, calc(100% - 56px)); padding-top:48px; }
.inventory-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:20px; margin-bottom:28px; text-align:left; }
.inventory-heading h1 { font-size:clamp(40px, 5vw, 58px); }
.inventory-notice { margin:0 0 18px; padding:12px 15px; border-radius:10px; font-size:13px; }
.inventory-notice.success { border:1px solid rgba(40,179,123,.35); color:#8ee2bd; background:rgba(40,179,123,.1); }
.inventory-notice.error { border:1px solid rgba(255,105,70,.35); color:#ffb09c; background:rgba(120,39,25,.25); }
.inventory-panel { margin-bottom:20px; overflow:hidden; border:1px solid #242a33; border-radius:18px; background:#080d14; box-shadow:0 18px 45px rgba(0,0,0,.2); }
.inventory-panel-header { display:flex; align-items:center; justify-content:space-between; gap:18px; padding:21px 23px 17px; border-bottom:1px solid #202731; }
.inventory-panel-header h2 { margin:0 0 6px; color:#f8fafc; font:700 19px 'Manrope',sans-serif; letter-spacing:-.04em; }
.inventory-panel-header p { margin:0; color:#7f8b9b; font-size:12px; }
.inventory-inline-link { color:#218ff4; text-decoration:none; }
.inventory-inline-link:hover { text-decoration:underline; }
.inventory-count, .inventory-user { color:#218ff4; font-size:11px; font-weight:700; white-space:nowrap; }
.inventory-panel-actions { display:flex; align-items:center; gap:16px; }
.inventory-view-link { display:inline-flex; align-items:center; justify-content:center; padding:9px 13px; border:1px solid rgba(33,143,244,.55); border-radius:8px; color:#73bdff; background:rgba(23,137,239,.1); font-size:11px; font-weight:700; text-decoration:none; white-space:nowrap; }
.inventory-view-link:hover { border-color:#218ff4; color:#fff; background:#1789ef; }
.inventory-view-footer { display:flex; justify-content:flex-end; margin:-8px 0 22px; }
.inventory-form { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:13px; padding:20px 23px 23px; }
.inventory-form label { display:grid; gap:7px; color:#aab5c2; font-size:11px; font-weight:700; }
.inventory-form input, .inventory-form select { width:100%; min-width:0; padding:11px 12px; border:1px solid #303946; border-radius:8px; outline:0; color:#f8fafc; background:#0d141d; font-size:13px; }
.inventory-form option { color:#f8fafc; background:#0d141d; }
.inventory-form input::placeholder, .inventory-filter-row input::placeholder { color:#6f7c8c; }
.inventory-form input:focus, .inventory-filter-row input:focus { border-color:#1789ef; box-shadow:0 0 0 3px rgba(23,137,239,.1); }
.inventory-description-field { grid-column:span 2; }
.inventory-image-field { grid-column:span 2; }
.inventory-quantity-item-field { grid-column:span 2; }
.inventory-form input[type="file"] { padding:8px 10px; color:#aab5c2; }
.inventory-submit { align-self:end; min-height:40px; padding:11px 16px; border:0; border-radius:8px; color:#fff; background:#1789ef; font-size:12px; font-weight:700; cursor:pointer; }
.inventory-submit:disabled { cursor:not-allowed; opacity:.55; }
.inventory-submit:hover, .inventory-filter-actions button:hover { background:#0e70c7; }
.inventory-filter-form { display:grid; gap:16px; padding:18px 23px; border-bottom:1px solid #202731; background:#0b111a; }
.inventory-search-row { display:grid; grid-template-columns:minmax(0,1fr) minmax(170px,.35fr) auto auto; align-items:end; gap:12px; padding:0; border:0; }
.inventory-search-row label { display:grid; flex:1; gap:7px; color:#aab5c2; font-size:11px; font-weight:700; }
.inventory-search-row input { width:100%; padding:11px 12px; border:1px solid #303946; border-radius:8px; outline:0; color:#f8fafc; background:#0d141d; font-size:13px; }
.inventory-search-row input:focus { border-color:#1789ef; box-shadow:0 0 0 3px rgba(23,137,239,.1); }
.inventory-search-row .inventory-sort-field { min-width:190px; }
.inventory-search-row select { width:100%; min-height:40px; padding:0 11px; border:1px solid #303946; border-radius:8px; outline:0; color:#f8fafc; background:#0d141d; font-size:12px; }
.inventory-search-row select:focus { border-color:#1789ef; box-shadow:0 0 0 3px rgba(23,137,239,.1); }
.inventory-search-row .filter-button { padding:11px 17px; }
.inventory-search-row a { padding:11px 0; color:#7f8b9b; font-size:11px; text-decoration:none; white-space:nowrap; }
.inventory-search-row a:hover { color:#218ff4; }
.inventory-quick-filters { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)) auto; align-items:end; gap:10px; }
.inventory-filter-dialog { width:min(560px,100%); }
.inventory-filter-dialog .inventory-quick-filters { grid-template-columns:repeat(2,minmax(0,1fr)); align-items:stretch; }
.inventory-filter-modal-actions { justify-content:flex-end; margin-top:18px; }
.inventory-quick-filters label { display:grid; gap:7px; color:#9ca8b6; font-size:11px; font-weight:700; }
.inventory-quick-filters select { width:100%; min-height:40px; padding:0 11px; border:1px solid #303946; border-radius:8px; outline:0; color:#f8fafc; background:#0d141d; font-size:12px; }
.inventory-quick-filters select:focus { border-color:#1789ef; box-shadow:0 0 0 3px rgba(23,137,239,.1); }
.inventory-apply-button { min-height:40px; white-space:nowrap; }
.inventory-filter-actions { display:flex; align-items:center; gap:12px; padding:15px 23px; color:#7f8b9b; font-size:11px; font-weight:700; }
.inventory-filter-actions .filter-button { margin-left:auto; padding:9px 14px; }
.inventory-filter-actions a { color:#7f8b9b; font-size:11px; text-decoration:none; }
.inventory-filter-actions a:hover { color:#218ff4; }
.inventory-table-scroll { overflow-x:auto; }
.inventory-table { width:100%; min-width:1060px; border-collapse:collapse; color:#cbd5e1; font-size:12px; }
.inventory-table th, .inventory-table td { padding:13px 14px; border-bottom:1px solid #202731; text-align:left; vertical-align:middle; }
.inventory-table thead tr:first-child { background:linear-gradient(110deg,#0755b8,#1687ed 62%,#0c6fd0); }
.inventory-table thead tr:first-child th { border-bottom:0; color:#fff; font-size:11px; letter-spacing:.04em; white-space:nowrap; }
.inventory-table tbody tr:nth-child(even) { background:rgba(255,255,255,.018); }
.inventory-table tbody tr:hover { background:rgba(23,137,239,.08); }
.inventory-table tbody tr.stock-empty { color:#ffaba5; background:rgba(190,45,55,.09); }
.inventory-table tbody tr.stock-empty:hover { background:rgba(190,45,55,.15); }
.inventory-table tbody tr.stock-empty td { color:#ffaba5; }
.inventory-table tbody tr.stock-low { color:#f5d06e; background:rgba(220,170,45,.1); }
.inventory-table tbody tr.stock-low:hover { background:rgba(220,170,45,.17); }
.inventory-table tbody tr.stock-low td { color:#f5d06e; }
.inventory-table .sku-cell { color:#68b5ff; font-weight:700; white-space:nowrap; }
.inventory-table td:nth-child(5) { color:#f5c47d; font-variant-numeric:tabular-nums; white-space:nowrap; }
.inventory-table .reserved-cell { color:#c3b0ff; font-variant-numeric:tabular-nums; white-space:nowrap; }
.inventory-filter-row th { padding:7px 5px; background:#0d141d; }
.inventory-filter-row input { width:100%; min-width:88px; padding:8px 9px; border:1px solid #303946; border-radius:6px; outline:0; color:#f8fafc; background:#080d14; font-size:11px; }
.delete-button { padding:7px 10px; border:1px solid #d64545; border-radius:7px; color:#fff; background:#b9353f; font-size:10px; font-weight:700; cursor:pointer; }
.delete-button:hover { border-color:#ff7373; background:#d64545; }
.inventory-table td .delete-button { padding:6px 8px; border-color:#d64545; color:#fff; background:#b9353f; }
.inventory-table td .delete-button:hover { border-color:#ff7373; background:#d64545; }
.delete-modal[hidden] { display:none; }
.delete-modal { position:fixed; z-index:1100; inset:0; display:grid; place-items:center; padding:20px; }
.delete-modal-backdrop { position:absolute; inset:0; background:rgba(0,0,0,.72); }
.delete-modal-dialog { position:relative; z-index:1; display:grid; grid-template-columns:auto 1fr; gap:4px 14px; width:min(430px,100%); padding:24px; border:1px solid #3a2630; border-radius:16px; background:#0b1018; box-shadow:0 24px 70px rgba(0,0,0,.5); }
.delete-modal-icon { display:grid; grid-row:span 2; place-items:center; width:38px; height:38px; border:1px solid #e05b63; border-radius:50%; color:#ff9b9f; background:rgba(190,45,55,.18); font-size:23px; font-weight:800; }
.delete-modal-copy h2 { margin:0 0 6px; color:#f8fafc; font:700 18px 'Manrope',sans-serif; }
.delete-modal-copy p { margin:0; color:#aab5c2; font-size:13px; line-height:1.5; }
.delete-modal-actions { display:flex; grid-column:2; justify-content:flex-end; gap:10px; margin-top:18px; }
.delete-modal-cancel, .delete-modal-confirm { padding:10px 15px; border-radius:8px; font-size:12px; font-weight:700; cursor:pointer; }
.delete-modal-cancel { border:1px solid #3b4655; color:#cbd5e1; background:transparent; }
.delete-modal-cancel:hover { border-color:#7f8b9b; background:#17202c; }
.delete-modal-confirm { border:1px solid #d64545; color:#fff; background:#b9353f; }
.delete-modal-confirm:hover { border-color:#ff7373; background:#d64545; }
.complete-modal[hidden] { display:none; }
.complete-modal { position:fixed; z-index:1100; inset:0; display:grid; place-items:center; padding:20px; }
.complete-modal-backdrop { position:absolute; inset:0; background:rgba(0,0,0,.72); }
.complete-modal-dialog { position:relative; z-index:1; display:grid; grid-template-columns:auto 1fr; gap:4px 14px; width:min(430px,100%); padding:24px; border:1px solid #214c45; border-radius:16px; background:#0b1018; box-shadow:0 24px 70px rgba(0,0,0,.5); }
.complete-modal-icon { display:grid; grid-row:span 2; place-items:center; width:38px; height:38px; border:1px solid #38b98b; border-radius:50%; color:#7ee4bb; background:rgba(44,167,125,.18); font-size:23px; font-weight:800; }
.complete-modal-copy h2 { margin:0 0 6px; color:#f8fafc; font:700 18px 'Manrope',sans-serif; }
.complete-modal-copy p { margin:0; color:#aab5c2; font-size:13px; line-height:1.5; }
.complete-modal-actions { display:flex; grid-column:2; justify-content:flex-end; gap:10px; margin-top:18px; }
.complete-modal-cancel, .complete-modal-confirm { padding:10px 15px; border-radius:8px; font-size:12px; font-weight:700; cursor:pointer; }
.complete-modal-cancel { border:1px solid #3b4655; color:#cbd5e1; background:transparent; }
.complete-modal-cancel:hover { border-color:#7f8b9b; background:#17202c; }
.complete-modal-confirm { border:1px solid #168459; color:#fff; background:#168459; }
.complete-modal-confirm:hover { border-color:#38b98b; background:#1b9b70; }
body[data-theme="light"] .complete-modal-dialog { border-color:#b9dfd2; background:#f8fafb; }
body[data-theme="light"] .complete-modal-copy h2 { color:#243b4d; }
body[data-theme="light"] .complete-modal-copy p { color:#617084; }
body[data-theme="light"] .complete-modal-icon { color:#168459; background:#e9faf3; }
body[data-theme="light"] .complete-modal-cancel { border-color:#b7c7d3; color:#30485d; background:#fff; }
body[data-theme="light"] .complete-modal-cancel:hover { background:#eef3f6; }
body[data-theme="light"] .complete-modal-confirm { border-color:#168459; background:#168459; }
body[data-theme="light"] .complete-modal-confirm:hover { border-color:#116b49; background:#116b49; }
body[data-theme="light"] .delete-modal-dialog { border-color:#e0c9ce; background:#f8fafb; }
body[data-theme="light"] .delete-modal-copy h2 { color:#243b4d; }
body[data-theme="light"] .delete-modal-copy p { color:#617084; }
body[data-theme="light"] .delete-modal-icon { color:#b52f3c; background:#fff0f0; }
body[data-theme="light"] .delete-modal-cancel { border-color:#b7c7d3; color:#30485d; background:#fff; }
body[data-theme="light"] .delete-modal-cancel:hover { background:#eef3f6; }
body[data-theme="light"] .delete-modal-confirm { border-color:#c94752; background:#c94752; }
body[data-theme="light"] .delete-modal-confirm:hover { border-color:#a9333d; background:#a9333d; }
.image-preview-button { padding:7px 10px; border:1px solid rgba(33,143,244,.6); border-radius:7px; color:#73bdff; background:rgba(23,137,239,.12); font-size:10px; font-weight:700; cursor:pointer; white-space:nowrap; }
.image-preview-button:hover { color:#fff; background:#1789ef; }
.image-none { color:#7f8b9b; font-size:10px; white-space:nowrap; }
.inventory-table tbody tr[data-row-preview] { cursor:pointer; }
.inventory-table tbody tr[data-row-preview]:focus { outline:2px solid #1789ef; outline-offset:-2px; }
.image-modal[hidden] { display:none; }
.image-modal { position:fixed; z-index:1000; inset:0; display:grid; place-items:center; padding:24px; }
.image-modal-backdrop { position:absolute; inset:0; background:rgba(0,0,0,.78); }
.image-modal-dialog { position:relative; z-index:1; width:min(920px,100%); max-height:calc(100vh - 48px); overflow:auto; padding:18px; border:1px solid #303946; border-radius:16px; background:#080d14; box-shadow:0 24px 70px rgba(0,0,0,.45); }
.image-modal-header { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:14px; }
.image-modal-header h2 { margin:0; color:#f8fafc; font:700 18px 'Manrope',sans-serif; }
.image-modal-close { width:32px; height:32px; border:1px solid #475364; border-radius:8px; color:#f8fafc; background:transparent; font-size:22px; line-height:1; cursor:pointer; }
.image-modal-close:hover { border-color:#ff7373; color:#fff; background:#b9353f; }
.image-modal-body { display:grid; grid-template-columns:minmax(0,1.15fr) minmax(260px,.85fr); gap:22px; align-items:stretch; }
.image-modal-visual { display:grid; min-height:330px; place-items:center; overflow:hidden; border:1px solid #242a33; border-radius:12px; background:#05090f; }
.image-modal-preview { display:block; width:100%; max-height:calc(100vh - 180px); object-fit:contain; border-radius:10px; }
.image-modal-preview[hidden], .image-modal-no-image[hidden] { display:none; }
.image-modal-no-image { display:grid; min-height:330px; margin:0; place-items:center; padding:20px; color:#aab5c2; font-size:13px; text-align:center; }
.image-modal-details { display:flex; flex-direction:column; gap:22px; padding:6px 4px; }
.image-detail-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.image-detail { display:grid; gap:6px; padding:13px; border:1px solid #242a33; border-radius:10px; background:#0d141d; }
.image-detail-full { grid-column:1 / -1; }
.image-detail span, .image-detail-description > span { color:#7f8b9b; font-size:10px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; }
.image-detail strong { color:#f8fafc; font-size:14px; overflow-wrap:anywhere; }
.image-detail-description { padding:15px; border:1px solid #242a33; border-radius:10px; background:#0d141d; }
.image-modal-description { margin:8px 0 0; color:#cbd5e1; font-size:13px; line-height:1.6; white-space:pre-wrap; }
.image-modal-upload { display:grid; gap:10px; padding:13px; border:1px solid rgba(33,143,244,.35); border-radius:10px; background:rgba(23,137,239,.08); }
.image-modal-upload label { display:grid; gap:7px; color:#aab5c2; font-size:11px; font-weight:700; }
.image-modal-upload input[type="file"] { width:100%; padding:8px 10px; border:1px solid #303946; border-radius:8px; color:#f8fafc; background:#0d141d; font-size:12px; }
.image-modal-upload .inventory-submit { width:100%; }
body[data-theme="light"] .image-modal-dialog { border-color:#cbd7e0; background:#f8fafb; }
body[data-theme="light"] .image-modal-header h2 { color:#243b4d; }
body[data-theme="light"] .image-modal-close { border-color:#b7c7d3; color:#243b4d; }
body[data-theme="light"] .image-modal-visual { border-color:#d7e0e9; background:#e8eef2; }
body[data-theme="light"] .image-detail, body[data-theme="light"] .image-detail-description { border-color:#d7e0e9; background:#fff; }
body[data-theme="light"] .image-modal-upload { border-color:#a9c8df; background:#edf7ff; }
body[data-theme="light"] .image-modal-upload label { color:#617084; }
body[data-theme="light"] .image-modal-upload input[type="file"] { border-color:#b9cad7; color:#243b4d; background:#f8fbfd; }
body[data-theme="light"] .image-detail span, body[data-theme="light"] .image-detail-description > span { color:#718096; }
body[data-theme="light"] .image-detail strong { color:#243b4d; }
body[data-theme="light"] .image-modal-description { color:#30485d; }
body[data-theme="light"] .image-modal-no-image { color:#617084; }
@media (max-width:700px) { .image-modal { padding:12px; } .image-modal-dialog { max-height:calc(100vh - 24px); padding:14px; } .image-modal-body { grid-template-columns:1fr; gap:14px; } .image-modal-visual, .image-modal-no-image { min-height:220px; } .image-modal-preview { max-height:45vh; } }
.checkout-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:20px; text-align:left; }
.checkout-heading > div { min-width:0; }
.checkout-open-button { padding:12px 18px; border:0; border-radius:9px; color:#fff; background:#1789ef; font-size:12px; font-weight:700; cursor:pointer; white-space:nowrap; }
.checkout-open-button:hover { background:#0e70c7; }
.checkout-records-panel { margin-top:22px; }
.checkout-table-scroll { overflow-x:auto; }
.checkout-table { width:100%; min-width:760px; border-collapse:collapse; color:#cbd5e1; font-size:12px; }
.checkout-table th, .checkout-table td { padding:13px 14px; border-bottom:1px solid #202731; text-align:left; vertical-align:top; }
.checkout-table thead { background:linear-gradient(110deg,#0755b8,#1687ed 62%,#0c6fd0); }
.checkout-table th { color:#fff; font-size:11px; letter-spacing:.04em; }
.checkout-modal[hidden] { display:none; }
.checkout-modal { position:fixed; z-index:1050; inset:0; display:grid; place-items:center; padding:20px; }
.checkout-modal-backdrop { position:absolute; inset:0; background:rgba(0,0,0,.72); }
.checkout-modal-dialog { position:relative; z-index:1; width:min(620px,100%); max-height:calc(100vh - 40px); overflow:auto; padding:24px; border:1px solid #303946; border-radius:16px; background:#080d14; box-shadow:0 24px 70px rgba(0,0,0,.5); }
.checkout-modal-header { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; margin-bottom:20px; }
.checkout-modal-header p { margin:0 0 7px; color:#218ff4; font-size:10px; font-weight:700; letter-spacing:.14em; text-transform:uppercase; }
.checkout-modal-header h2 { margin:0; color:#f8fafc; font:700 22px 'Manrope',sans-serif; }
.checkout-modal-close { width:32px; height:32px; border:1px solid #475364; border-radius:8px; color:#f8fafc; background:transparent; font-size:22px; line-height:1; cursor:pointer; }
.checkout-modal-close:hover { border-color:#ff7373; color:#fff; background:#b9353f; }
.checkout-form { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.checkout-form label { display:grid; gap:7px; color:#aab5c2; font-size:11px; font-weight:700; }
.checkout-form input, .checkout-form textarea { width:100%; min-width:0; padding:11px 12px; border:1px solid #303946; border-radius:8px; outline:0; color:#f8fafc; background:#0d141d; font:inherit; font-size:13px; resize:vertical; }
.checkout-form input:focus, .checkout-form textarea:focus { border-color:#1789ef; box-shadow:0 0 0 3px rgba(23,137,239,.1); }
.checkout-notes-field { grid-column:1 / -1; }
.checkout-submit { grid-column:1 / -1; min-height:42px; border:0; border-radius:8px; color:#fff; background:#1789ef; font-size:12px; font-weight:700; cursor:pointer; }
.checkout-submit:hover { background:#0e70c7; }
body[data-theme="light"] .checkout-open-button, body[data-theme="light"] .checkout-submit { background:#1478c9; }
body[data-theme="light"] .checkout-open-button:hover, body[data-theme="light"] .checkout-submit:hover { background:#0d62a7; }
body[data-theme="light"] .checkout-table { color:#30485d; }
body[data-theme="light"] .checkout-table th, body[data-theme="light"] .checkout-table td { border-color:#e3e9ef; }
body[data-theme="light"] .checkout-table tbody tr:nth-child(even) { background:#f1f5f7; }
body[data-theme="light"] .checkout-modal-dialog { border-color:#cbd7e0; background:#f8fafb; }
body[data-theme="light"] .checkout-modal-header h2 { color:#243b4d; }
body[data-theme="light"] .checkout-modal-close { border-color:#b7c7d3; color:#243b4d; }
body[data-theme="light"] .checkout-form label { color:#617084; }
body[data-theme="light"] .checkout-form input, body[data-theme="light"] .checkout-form textarea { border-color:#d4dce5; color:#142235; background:#fff; }
@media (max-width:700px) { .checkout-heading { display:block; text-align:center; } .checkout-open-button { width:100%; margin-top:18px; } .checkout-form { grid-template-columns:1fr; } .checkout-notes-field, .checkout-submit { grid-column:auto; } }
.inventory-empty { padding:45px 20px !important; color:#7f8b9b; text-align:center !important; }
.subnav-link { margin-left:14px; padding-top:10px; padding-bottom:10px; border-left:1px solid #303946; border-radius:0 10px 10px 0; font-size:12px; }
.category-form { display:flex; align-items:end; gap:13px; padding:20px 23px 23px; }
.category-form label { display:grid; flex:1; gap:7px; color:#aab5c2; font-size:11px; font-weight:700; }
.category-form input { width:100%; padding:11px 12px; border:1px solid #303946; border-radius:8px; outline:0; color:#f8fafc; background:#0d141d; font-size:13px; }
.category-form input:focus { border-color:#1789ef; box-shadow:0 0 0 3px rgba(23,137,239,.1); }
.category-form .inventory-submit { min-width:130px; }
.category-list { padding:8px 23px 20px; }
.category-row { display:flex; align-items:center; justify-content:space-between; gap:15px; padding:14px 0; border-bottom:1px solid #202731; color:#f8fafc; font-size:13px; }
.category-row:last-child { border-bottom:0; }
.category-row form { margin:0; }
.inventory-options-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; }
.inventory-option-panel { min-width:0; }
body[data-theme="light"] .inventory-panel { border-color:#d7e0e9; background:#fff; box-shadow:0 12px 28px rgba(40,73,105,.09); }
body[data-theme="light"] .inventory-panel-header { border-color:#e3e9ef; }
body[data-theme="light"] .inventory-panel-header h2 { color:#142235; }
body[data-theme="light"] .inventory-panel-header p, body[data-theme="light"] .inventory-filter-actions a { color:#718096; }
body[data-theme="light"] .inventory-view-link { border-color:#a9c8df; color:#1266a4; background:#edf7ff; }
body[data-theme="light"] .inventory-view-link:hover { border-color:#1678c7; color:#fff; background:#1678c7; }
body[data-theme="light"] .inventory-search-row { border-color:#e3e9ef; }
body[data-theme="light"] .inventory-search-row label { color:#617084; }
body[data-theme="light"] .inventory-search-row input { border-color:#d4dce5; color:#142235; background:#f8fafc; }
body[data-theme="light"] .inventory-search-row a { color:#718096; }
body[data-theme="light"] .inventory-filter-form { border-color:#e3e9ef; background:#f8fafb; }
body[data-theme="light"] .inventory-quick-filters label { color:#617084; }
body[data-theme="light"] .inventory-quick-filters select { border-color:#b9cad7; color:#18324b; background:#fff; }
body[data-theme="light"] .inventory-search-row select { border-color:#b9cad7; color:#18324b; background:#fff; }
body[data-theme="light"] .inventory-form label { color:#617084; }
body[data-theme="light"] .inventory-form input, body[data-theme="light"] .inventory-form select { border-color:#d4dce5; color:#142235; background:#f8fafc; }
body[data-theme="light"] .inventory-form input[type="file"] { color:#617084; background:#f8fafc; }
body[data-theme="light"] .image-preview-button { border-color:#a9c8df; color:#1266a4; background:#edf7ff; }
body[data-theme="light"] .image-preview-button:hover { color:#fff; background:#1678c7; }
body[data-theme="light"] .image-none { color:#718096; }
body[data-theme="light"] .inventory-form option { color:#142235; background:#fff; }
body[data-theme="light"] .inventory-table { color:#30485d; }
body[data-theme="light"] .inventory-table th, body[data-theme="light"] .inventory-table td { border-color:#e3e9ef; }
body[data-theme="light"] .inventory-table tbody tr:nth-child(even) { background:#f8fafc; }
body[data-theme="light"] .inventory-table tbody tr:hover { background:#eef7ff; }
body[data-theme="light"] .inventory-table tbody tr.stock-empty { color:#a43e48; background:#fff0f0; }
body[data-theme="light"] .inventory-table tbody tr.stock-empty td { color:#a43e48; }
body[data-theme="light"] .inventory-table tbody tr.stock-low { color:#876300; background:#fff7dc; }
body[data-theme="light"] .inventory-table tbody tr.stock-low:hover { background:#ffefbd; }
body[data-theme="light"] .inventory-table tbody tr.stock-low td { color:#876300; }
body[data-theme="light"] .inventory-table .sku-cell { color:#116bb4; }
body[data-theme="light"] .inventory-table td:nth-child(5) { color:#9a641d; }
body[data-theme="light"] .inventory-table .reserved-cell { color:#6950ad; }
body[data-theme="light"] .inventory-filter-row th { background:#f1f6fa; }
body[data-theme="light"] .inventory-filter-row input { border-color:#cedae3; color:#18324b; background:#fff; }
body[data-theme="light"] .inventory-empty { color:#7f8b9a; }
body[data-theme="light"] .subnav-link { border-color:#cbd6e2; }
body[data-theme="light"] .category-form label { color:#617084; }
body[data-theme="light"] .category-form input { border-color:#d4dce5; color:#142235; background:#f8fafc; }
body[data-theme="light"] .category-row { border-color:#e3e9ef; color:#142235; }

/* Shared data-table header */
.standard-table thead th,
.standard-table > tbody > tr:first-child > th,
.inventory-table thead th,
.employee-data-table thead th,
.employee-history-table thead th,
.cash-list thead th,
.reim-list thead th,
.report-data-table thead th {
    padding:13px 14px !important;
    border-bottom:0 !important;
    color:#fff !important;
    background:linear-gradient(110deg,#0755b8,#1687ed 62%,#0c6fd0) !important;
    font-size:11px !important;
    font-weight:700 !important;
    letter-spacing:.04em !important;
    line-height:1.35 !important;
    text-align:left !important;
    text-transform:none !important;
    white-space:nowrap;
}
.standard-table thead th:first-child,
.inventory-table thead th:first-child,
.employee-data-table thead th:first-child,
.employee-history-table thead th:first-child,
.cash-list thead th:first-child,
.reim-list thead th:first-child,
.report-data-table thead th:first-child {
    border-top-left-radius:0;
}
.standard-table thead th:last-child,
.inventory-table thead th:last-child,
.employee-data-table thead th:last-child,
.employee-history-table thead th:last-child,
.cash-list thead th:last-child,
.reim-list thead th:last-child,
.report-data-table thead th:last-child {
    border-top-right-radius:0;
}
body[data-theme="light"] .standard-table thead th,
body[data-theme="light"] .employee-data-table thead th,
body[data-theme="light"] .employee-history-table thead th,
body[data-theme="light"] .cash-list thead th,
body[data-theme="light"] .reim-list thead th,
body[data-theme="light"] .report-data-table thead th {
    color:#fff !important;
}

@media (max-width:900px) { .inventory-form { grid-template-columns:repeat(2,minmax(0,1fr)); } .inventory-description-field, .inventory-image-field, .inventory-quantity-item-field { grid-column:span 1; } }
@media (max-width:760px) { .inventory-content { width:calc(100% - 32px); padding-top:40px; } .inventory-panel-header { align-items:flex-start; flex-direction:column; gap:8px; } .inventory-form { grid-template-columns:1fr; padding:18px; } .inventory-description-field, .inventory-image-field, .inventory-quantity-item-field { grid-column:auto; } .inventory-submit { width:100%; } .inventory-filter-form { padding:15px; } .inventory-search-row { grid-template-columns:1fr; align-items:stretch; } .inventory-search-row .filter-button { width:100%; } .inventory-search-row a { padding:0; text-align:center; } .inventory-quick-filters { grid-template-columns:1fr 1fr; } .inventory-apply-button { width:100%; } .inventory-filter-actions { padding:13px 15px; } .category-form { align-items:stretch; flex-direction:column; padding:18px; } .category-form .inventory-submit { width:100%; } .category-list { padding:8px 18px 18px; } .inventory-options-grid { grid-template-columns:1fr; } }

/* Sales reports */
.report-page { min-height:100vh; color:#18324b; background:#edf2f5; }
.report-shell { min-height:100vh; }
.report-bar { display:flex; align-items:center; justify-content:space-between; gap:20px; min-height:86px; padding:18px clamp(22px, 5vw, 72px); color:#fff; background:linear-gradient(110deg,#0755b8,#1687ed 62%,#0c6fd0); box-shadow:0 8px 28px rgba(7,80,173,.24); }
.report-brand { display:flex; align-items:center; gap:12px; }
.report-brand img { width:46px; height:46px; object-fit:cover; border:1px solid rgba(255,255,255,.7); border-radius:12px; background:#fff; }
.report-brand strong { display:block; font:800 17px/1 'Manrope',sans-serif; letter-spacing:.02em; }
.report-brand small { display:block; margin-top:6px; color:rgba(255,255,255,.72); font-size:11px; }
.report-actions { display:flex; align-items:center; gap:14px; }
.report-export-actions { display:flex; align-items:center; gap:8px; }
.inventory-report-actions, .employee-report-actions { display:flex; align-items:center; gap:7px; }
.inventory-import-form { display:inline-flex; margin:0; }
.report-import-button { color:#8a5312; border-color:#e2c48b; background:#fff8e8; cursor:pointer; }
.report-import-button:hover { color:#fff; border-color:#c5851d; background:#c5851d; }
.report-import-button input { display:none; }
.report-action { display:inline-flex; align-items:center; justify-content:center; min-height:36px; padding:0 12px; border:1px solid transparent; border-radius:8px; font-size:11px; font-weight:700; text-decoration:none; white-space:nowrap; }
.report-print-button { color:#155486; border-color:#b9ccda; background:#f4f8fb; }
.report-print-button:hover { color:#0d6bb6; border-color:#1789ef; background:#eaf5fd; }
.report-excel-button { color:#14764f; border-color:#91cfb2; background:#effaf4; }
.report-excel-button:hover { color:#fff; border-color:#168459; background:#168459; }
.report-csv-button { color:#6950ad; border-color:#c4b8e4; background:#f5f1ff; }
.report-csv-button:hover { color:#fff; border-color:#6950ad; background:#6950ad; }
.print-report { display:none; }
.report-actions .theme-toggle { border-color:rgba(255,255,255,.35); color:#fff; background:rgba(0,0,0,.14); }
.report-actions .theme-symbol { color:#fff; }
.report-signout { padding:9px 13px; border:1px solid rgba(255,92,92,.7); border-radius:9px; color:#ffd1d1; background:rgba(150,20,30,.22); font-size:12px; font-weight:700; text-decoration:none; }
.report-signout:hover { color:#fff; background:#c93e48; }
.report-content { width:min(1450px,calc(100% - 48px)); margin:0 auto; padding:38px 0 60px; }
.report-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:24px; margin-bottom:22px; }
.report-heading p { margin:0 0 8px; color:#1d82d7; font-size:11px; font-weight:700; letter-spacing:.14em; text-transform:uppercase; }
.report-heading h1 { margin:0; color:#18324b; font:800 clamp(34px,4vw,50px)/1 'Manrope',sans-serif; letter-spacing:-.06em; }
.report-period { color:#6b8193; font-size:13px; }
.report-filters { display:grid; grid-template-columns:repeat(3,minmax(150px,1fr)) auto; align-items:end; gap:14px; margin-bottom:22px; padding:18px; border:1px solid #d6e0e7; border-radius:14px; background:#fff; box-shadow:0 8px 22px rgba(36,74,105,.06); }
.report-filters label { display:grid; gap:7px; color:#60758a; font-size:11px; font-weight:700; }
.report-filters input { width:100%; padding:11px 12px; border:1px solid #cedae3; border-radius:8px; outline:0; color:#18324b; background:#f8fafc; font-size:13px; }
.report-filters input:focus { border-color:#1789ef; box-shadow:0 0 0 3px rgba(23,137,239,.1); }
.report-filter-actions { display:flex; align-items:center; gap:9px; }
.filter-button { padding:12px 20px; border:0; border-radius:8px; color:#fff; background:#1789ef; font-size:12px; font-weight:700; cursor:pointer; }
.filter-button:hover { background:#0e70c7; }
.clear-filter-button { color:#6b8193; font-size:10px; font-weight:700; text-decoration:none; white-space:nowrap; }
.clear-filter-button:hover { color:#1789ef; text-decoration:underline; }
.report-kpis { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; margin-bottom:20px; align-items:stretch; }
.report-kpi { display:flex; min-width:0; min-height:108px; padding:18px 17px; flex-direction:column; justify-content:space-between; border:1px solid #d6e0e7; border-radius:14px; background:#fff; box-shadow:0 8px 22px rgba(36,74,105,.06); }
.report-kpi p { min-height:30px; margin:0 0 12px; color:#6e8293; font-size:11px; line-height:1.4; }
.report-kpi strong { display:block; overflow:hidden; color:#155486; font:800 clamp(19px,1.65vw,24px)/1.05 'Manrope',sans-serif; letter-spacing:-.04em; text-overflow:ellipsis; white-space:nowrap; }
.report-kpi.accent strong { color:#1685df; }
.report-kpi:nth-child(3) strong { color:#168459; }
.report-layout { display:grid; grid-template-columns:minmax(0,1.35fr) minmax(300px,.65fr); gap:18px; align-items:stretch; }
.report-panel { min-width:0; padding:22px; border:1px solid #d6e0e7; border-radius:14px; background:#fff; box-shadow:0 8px 22px rgba(36,74,105,.06); }
.report-panel h2 { margin:0 0 5px; color:#18324b; font:700 18px 'Manrope',sans-serif; }
.report-panel-subtitle { margin:0 0 20px; color:#738798; font-size:12px; }
.scale-header { display:flex; justify-content:space-between; gap:12px; margin-top:24px; color:#60758a; font-size:12px; }
.scale-header strong { color:#155486; }
.target-scale { height:13px; margin:10px 0 7px; overflow:hidden; border-radius:99px; background:#e3ebf1; }
.target-fill { height:100%; min-width:2px; border-radius:inherit; background:linear-gradient(90deg,#1685df,#31b493); transition:width .3s ease; }
.target-fill.no-target { min-width:0; }
.scale-marks { display:flex; justify-content:space-between; color:#8a9aa7; font-size:10px; }
.chart-summary { display:grid; grid-template-columns:repeat(4,1fr); gap:8px; margin:20px 0 10px; }
.chart-summary div { padding:10px 11px; border:1px solid #e2e9ee; border-radius:8px; background:#f8fafc; }
.chart-summary span { display:block; margin-bottom:5px; color:#7a8d9c; font-size:10px; }
.chart-summary strong { color:#18324b; font-size:13px; }
.chart-summary div:nth-child(2) strong { color:#c43f4a; }
.chart-summary div:nth-child(3) strong { color:#168459; }
.chart-summary div:nth-child(4) strong { color:#b7791f; }
.chart-visual { display:grid; grid-template-columns:45px minmax(0,1fr); gap:8px; }
.project-chart-visual { overflow-x:auto; padding-bottom:2px; }
.project-chart-visual .bar-chart { min-width:680px; }
.chart-axis { display:flex; height:250px; padding:20px 0 26px; flex-direction:column; justify-content:space-between; text-align:right; }
.chart-axis span { color:#8a9aa7; font-size:9px; line-height:1; }
.bar-chart { display:flex; align-items:flex-end; gap:clamp(11px,2.5vw,28px); height:250px; padding:20px 4px 0; border-bottom:1px solid #dce5eb; background:repeating-linear-gradient(to bottom, transparent 0, transparent calc(25% - 1px), rgba(137,158,174,.16) calc(25% - 1px), rgba(137,158,174,.16) 25%); }
.bar-group { display:flex; min-width:0; flex:1; align-items:center; flex-direction:column; justify-content:flex-end; height:100%; gap:7px; }
.bar-values { height:18px; color:#718596; font-size:9px; line-height:1; white-space:nowrap; }
.bar-pair { display:flex; align-items:flex-end; justify-content:center; gap:5px; width:100%; height:calc(100% - 40px); }
.bar { width:clamp(10px,2.3vw,27px); min-height:3px; border-radius:4px 4px 0 0; background:#55a7d3; }
.bar.expense { background:#d64545; }
.bar.profit { background:#2ca77d; }
.bar-label { max-width:92px; overflow:hidden; color:#728698; font-size:10px; text-overflow:ellipsis; white-space:nowrap; }
.bar-profit-label { color:#168459; font-size:9px; white-space:nowrap; }
.chart-empty { display:grid; width:100%; place-items:center; color:#7a8d9c; font-size:11px; }
.chart-legend { display:flex; gap:18px; margin-top:14px; color:#718596; font-size:11px; }
.legend-dot { display:inline-block; width:10px; height:10px; margin-right:5px; border-radius:2px; background:#55a7d3; vertical-align:-1px; }
.legend-dot.expense { background:#d64545; }
.legend-dot.profit { background:#2ca77d; }
.chart-detail-table { margin-top:18px; overflow-x:auto; border-top:1px solid #e2e9ee; }
.chart-detail-table table { width:100%; min-width:540px; border-collapse:collapse; color:#60758a; font-size:10px; }
.chart-detail-table th { padding:10px 8px 8px; color:#7a8d9c; font-size:9px; text-align:right; text-transform:uppercase; letter-spacing:.05em; }
.chart-detail-table td { padding:8px; border-top:1px solid #edf1f4; text-align:right; white-space:nowrap; }
.chart-detail-table th:first-child, .chart-detail-table td:first-child { text-align:left; }
.distribution { display:grid; place-items:center; padding:12px 0 8px; }
.donut { width:min(230px,75%); aspect-ratio:1; border-radius:50%; background:conic-gradient(#2ca77d 0 66%,#3e79d2 66% 78%,#eb8f32 78% 88%,#d74e52 88% 95%,#8f55bc 95% 100%); position:relative; box-shadow:inset 0 0 0 1px rgba(255,255,255,.25); }
.donut::after { position:absolute; inset:28%; border-radius:50%; background:#fff; content:""; }
.donut-center { position:absolute; z-index:1; inset:0; display:grid; place-items:center; color:#18324b; font-size:12px; font-weight:700; text-align:center; }
.report-list { display:grid; gap:8px; margin-top:15px; }
.report-list-row { display:flex; align-items:center; justify-content:space-between; gap:15px; color:#6b8193; font-size:11px; }
.report-list-row strong { color:#155486; }
.report-list-row small { display:block; margin-top:4px; color:#7f8b9b; font-size:10px; }
.top-project-card { display:grid; grid-template-columns:28px minmax(0,1fr); gap:11px; align-items:start; padding:12px 0; border-bottom:1px solid #edf1f4; }
.top-project-card:last-child { border-bottom:0; }
.top-project-rank { display:grid; width:26px; height:26px; place-items:center; border:1px solid #b9d8ee; border-radius:8px; color:#1789ef; background:#f1f8fd; font-size:11px; font-weight:800; }
.top-project-content { min-width:0; }
.top-project-heading { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.top-project-heading span { overflow:hidden; color:#18324b; font-size:12px; font-weight:700; text-overflow:ellipsis; white-space:nowrap; }
.top-project-heading strong { color:#155486; font-size:12px; white-space:nowrap; }
.top-project-meta { display:flex; justify-content:space-between; gap:8px; margin-top:5px; color:#7f8b9b; font-size:10px; }
.top-project-bar { height:6px; margin-top:8px; overflow:hidden; border-radius:99px; background:#e6eef3; }
.top-project-bar span { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,#1789ef,#2ca77d); }
.margin-kpi strong { color:#b7791f !important; }
.report-insights { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; justify-content:space-between; gap:24px; margin-bottom:20px; padding:20px 22px; border:1px solid #b9d8ee; border-radius:14px; background:linear-gradient(110deg,#f5fbff,#fff); box-shadow:0 8px 22px rgba(36,74,105,.06); }
.report-insights h2 { margin:0 0 8px; color:#18324b; font:700 17px 'Manrope',sans-serif; }
.report-insights ul { display:grid; gap:6px; margin:0; padding-left:18px; color:#60758a; font-size:12px; }
.report-insights strong { color:#155486; }
.report-comparison { display:grid; min-width:170px; gap:7px; padding:8px 0 8px 24px; border-left:1px solid #d6e0e7; color:#738798; font-size:11px; }
.report-comparison strong { font-size:21px; }
.report-comparison .positive, .profit-positive { color:#168459; }
.report-comparison .negative, .profit-negative { color:#c43f4a; }
.report-profitability-panel { margin-top:20px; }
.report-table-wrap { overflow-x:auto; }
.report-data-table { width:100%; border-collapse:collapse; min-width:720px; color:#60758a; font-size:11px; }
.report-data-table th { padding:11px 10px; border-bottom:1px solid #d6e0e7; color:#738798; font-size:10px; text-align:left; text-transform:uppercase; letter-spacing:.06em; }
.report-data-table td { padding:12px 10px; border-bottom:1px solid #edf1f4; white-space:nowrap; }
.report-data-table th:not(:first-child), .report-data-table td:not(:first-child) { text-align:right; }
.report-data-table th:nth-child(2), .report-data-table td:nth-child(2) { text-align:left; }
.report-data-table td:first-child { white-space:normal; }
.report-data-table td strong { color:#18324b; }
.report-data-table td small { display:block; margin-top:4px; color:#8999a6; font-size:10px; }
.report-cancelled-panel { margin-top:20px; }
.report-cancelled-list .report-list-row > span:last-child { display:flex; align-items:center; flex-wrap:wrap; justify-content:flex-end; gap:8px; }
/* Report page dark theme */
body[data-theme="dark"].report-page {
    color:#d7e1ec;
    background:#05090f;
    color-scheme:dark;
}
body[data-theme="dark"] .report-heading h1 { color:#f8fafc; }
body[data-theme="dark"] .report-heading p { color:#2b9bff; }
body[data-theme="dark"] .report-period { color:#7f8b9b; }
body[data-theme="dark"] .report-filters,
body[data-theme="dark"] .report-kpi,
body[data-theme="dark"] .report-panel,
body[data-theme="dark"] .report-insights {
    border-color:#242a33;
    background:#080d14;
    box-shadow:0 18px 45px rgba(0,0,0,.2);
}
body[data-theme="dark"] .report-insights { border-color:#263b50; background:#0b131d; }
body[data-theme="dark"] .report-insights h2,
body[data-theme="dark"] .report-data-table td strong { color:#f8fafc; }
body[data-theme="dark"] .report-insights ul,
body[data-theme="dark"] .report-data-table { color:#aab5c2; }
body[data-theme="dark"] .report-comparison { border-color:#303946; }
body[data-theme="dark"] .report-data-table th { border-color:#303946; color:#8fa1b2; }
body[data-theme="dark"] .report-data-table td { border-color:#1e2731; }
body[data-theme="dark"] .report-filters label { color:#aab5c2; }
body[data-theme="dark"] .report-filters input {
    border-color:#303946;
    color:#f8fafc;
    background:#0d141d;
}
body[data-theme="dark"] .report-filters input:focus { border-color:#1789ef; }
body[data-theme="dark"] .report-kpi p,
body[data-theme="dark"] .report-panel-subtitle,
body[data-theme="dark"] .scale-header,
body[data-theme="dark"] .report-list-row,
body[data-theme="dark"] .chart-legend { color:#7f8b9b; }
body[data-theme="dark"] .report-kpi strong,
body[data-theme="dark"] .report-panel h2,
body[data-theme="dark"] .scale-header strong,
body[data-theme="dark"] .report-list-row strong { color:#f8fafc; }
body[data-theme="dark"] .top-project-card { border-bottom-color:#1e2731; }
body[data-theme="dark"] .top-project-rank { border-color:#264765; color:#8bc8ff; background:#0d1d2b; }
body[data-theme="dark"] .top-project-heading span { color:#f8fafc; }
body[data-theme="dark"] .top-project-heading strong { color:#9fd4ff; }
body[data-theme="dark"] .top-project-bar { background:#202a35; }
body[data-theme="dark"] .report-kpi:nth-child(3) strong { color:#70d9a9; }
body[data-theme="dark"] .target-scale { background:#202a35; }
body[data-theme="dark"] .scale-marks,
body[data-theme="dark"] .bar-label { color:#788797; }
body[data-theme="dark"] .bar-chart { border-bottom-color:#242a33; }
body[data-theme="dark"] .chart-summary div { border-color:#26313d; background:#0d141d; }
body[data-theme="dark"] .chart-summary strong { color:#f8fafc; }
body[data-theme="dark"] .chart-detail-table { border-top-color:#26313d; }
body[data-theme="dark"] .chart-detail-table th { color:#8fa1b2; }
body[data-theme="dark"] .chart-detail-table td { border-top-color:#1e2731; }
body[data-theme="dark"] .donut::after { background:#080d14; }
body[data-theme="dark"] .donut-center { color:#f8fafc; }
@media (max-width:1180px) { .report-kpis { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media (max-width:900px) { .report-kpis { grid-template-columns:repeat(2,minmax(0,1fr)); } .report-layout { grid-template-columns:1fr; } }
@media (max-width:620px) { .report-bar { align-items:flex-start; padding:16px; } .report-actions { flex-direction:column; align-items:flex-end; gap:8px; } .report-content { width:calc(100% - 28px); padding-top:26px; } .report-heading { display:block; } .report-period { display:block; margin-top:12px; } .report-filters { grid-template-columns:1fr 1fr; } .report-filters label:nth-child(3), .report-filter-actions { grid-column:1 / -1; } .report-filter-actions { justify-content:space-between; } .report-kpis { grid-template-columns:1fr; } .report-insights { grid-template-columns:1fr; gap:16px; } .report-comparison { min-width:0; padding:14px 0 0; border-top:1px solid #d6e0e7; border-left:0; } }
@media (max-width:520px) {
    .workspace-bar { align-items:flex-start; }
    .workspace-actions { flex-direction:column; align-items:flex-end; gap:9px; }
}

/* Cost management budget sheets */
.cost-management-content { width:min(1360px, calc(100% - 48px)); }
.cost-budget-selector-body { display:grid; grid-template-columns:minmax(240px,360px) 1fr; align-items:end; gap:24px; padding:20px 23px 23px; }
.cost-budget-selector-body label,
.cost-meta-fields label { display:grid; gap:7px; color:#aab5c2; font-size:11px; font-weight:700; }
.cost-budget-selector-body select,
.cost-meta-fields input,
.cost-meta-fields select { width:100%; padding:11px 12px; border:1px solid #303946; border-radius:8px; outline:0; color:#f8fafc; background:#0d141d; font:inherit; }
.cost-budget-summary { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:18px; color:#91a1b2; font-size:11px; }
.cost-budget-summary span { display:grid; gap:4px; }
.cost-budget-summary strong { color:#f8fafc; font:700 16px 'Manrope',sans-serif; }
.cost-management-tabs { display:flex; gap:0; margin-bottom:20px; padding:5px; border:1px solid #24384b; border-radius:12px; background:#0b1520; }
.cost-management-tab { flex:1; padding:12px 16px; border-radius:8px; color:#91a1b2; font-size:11px; font-weight:800; letter-spacing:.08em; text-align:center; text-decoration:none; }
.cost-management-tab:hover { color:#fff; background:rgba(23,137,239,.12); }
.cost-management-tab.active { color:#fff; background:linear-gradient(135deg,#0755b8,#1687ed 62%,#0c6fd0); box-shadow:0 8px 18px rgba(14,123,232,.2); }
.cost-saved-table-panel { margin-bottom:0; }
.cost-saved-table-scroll { overflow-x:auto; }
.cost-saved-table { width:100%; min-width:680px; border-collapse:collapse; color:#c8d8e5; font-size:12px; }
.cost-saved-table th,
.cost-saved-table td { padding:12px 15px; border-top:1px solid #263546; text-align:left; vertical-align:middle; }
.cost-saved-table th { color:#8fa1b2; font-size:10px; letter-spacing:.06em; text-transform:uppercase; }
.cost-saved-table td strong { color:#f8fafc; }
.cost-saved-table td:last-child { width:1%; white-space:nowrap; text-align:right; }
.cost-saved-actions { display:flex; align-items:center; justify-content:flex-end; gap:7px; }
.cost-saved-actions form { margin:0; }
.cost-saved-actions .delete-button { padding:8px 10px; }
.cost-saved-preview-modal { position:fixed; z-index:80; inset:0; display:grid; place-items:center; padding:20px; background:rgba(3,9,16,.78); }
.cost-saved-preview-backdrop { position:absolute; inset:0; }
.cost-saved-preview-dialog { position:relative; z-index:1; width:min(1240px,100%); max-height:calc(100vh - 40px); overflow:auto; padding:20px; border:1px solid #2d8dcb; border-radius:16px; background:#0b1722; box-shadow:0 24px 70px rgba(0,0,0,.46); }
.cost-saved-preview-head { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; margin-bottom:18px; }
.cost-saved-preview-head p { margin:0 0 5px; color:#5db8ff; font-size:10px; font-weight:800; letter-spacing:.1em; text-transform:uppercase; }
.cost-saved-preview-head h2 { margin:0; color:#f8fafc; font-size:24px; }
.cost-saved-preview-head span { display:block; margin-top:5px; color:#91a1b2; font-size:12px; }
.cost-saved-preview-actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; justify-content:flex-end; }
.cost-saved-preview-sheets { display:grid; gap:14px; }
.cost-saved-preview-sheets .cost-sheet-panel { margin:0; }
.cost-saved-preview-sheets .cost-grid-table { min-width:0; }
.cost-heading-actions { display:flex; align-items:center; flex-wrap:wrap; justify-content:flex-end; gap:9px; }
.cost-print-button,
.cost-print-link { border-color:#2c8ed8; color:#9ad1ff; background:rgba(23,137,239,.12); }
.cost-print-button { padding:9px 13px; border:1px solid #2c8ed8; border-radius:8px; font-size:11px; font-weight:700; cursor:pointer; }
.cost-print-button:hover,
.cost-print-link:hover { color:#fff; background:#176da8; }
.cost-budget-form { display:grid; gap:18px; }
.cost-budget-meta { margin-bottom:0; }
.cost-meta-fields { display:grid; grid-template-columns:1fr 1fr; gap:16px; padding:20px 23px 23px; }
.cost-sheet-panel { overflow:hidden; border:1px solid #1d222a; border-radius:13px; background:#fff; box-shadow:0 16px 32px rgba(0,0,0,.18); }
.cost-sheet-title { width:44%; min-width:300px; margin-bottom:20px; padding:7px 10px; color:#111; background:#f2a3ad; font-size:15px; font-weight:800; letter-spacing:.01em; }
.cost-sheet-title-small { display:none; }
.cost-table-scroll { overflow-x:auto; }
.cost-grid-table { width:100%; min-width:850px; border-collapse:collapse; table-layout:fixed; color:#111; background:#fff; font-family:Arial,Helvetica,sans-serif; font-size:13px; }
.cost-grid-table th,
.cost-grid-table td { height:29px; padding:3px 6px; border:1px solid #111; vertical-align:middle; }
.cost-grid-table thead th { height:34px; color:#111; background:#8fc5f5; font-weight:800; text-align:center; }
.cost-grid-table tbody td { background:#fff; text-align:right; }
.cost-grid-table tbody td:nth-child(2),
.cost-grid-table tbody td:nth-child(3),
.cost-grid-table tbody td:nth-child(5),
.cost-grid-table tbody td:nth-child(6) { text-align:center; }
.cost-grid-table tbody td:nth-child(6) { background:#a9d58f; }
.cost-grid-table tbody input { width:100%; min-width:0; padding:2px 3px; border:0; outline:0; color:#111; background:transparent; font:inherit; text-align:inherit; }
.cost-grid-table tbody input[type="date"] { min-height:22px; }
.cost-grid-table tbody input:focus { outline:2px solid #2379bd; outline-offset:-2px; background:#eef8ff; }
.cost-grid-table tbody output { display:block; white-space:nowrap; font-variant-numeric:tabular-nums; }
.cost-grid-table .cost-row-number { width:38px; text-align:center; font-weight:700; }
.cost-grid-table tfoot th,
.cost-grid-table tfoot td { height:34px; background:#d9eafa; font-weight:800; text-align:right; }
.cost-grid-table tfoot th { text-align:right; }
.cost-grid-table tfoot output { white-space:nowrap; }
.cost-grid-table[data-cost-table="manpower"] th:nth-child(1) { width:6%; }
.cost-grid-table[data-cost-table="manpower"] th:nth-child(2) { width:19%; }
.cost-grid-table[data-cost-table="manpower"] th:nth-child(3) { width:19%; }
.cost-grid-table[data-cost-table="manpower"] th:nth-child(4) { width:19%; }
.cost-grid-table[data-cost-table="manpower"] th:nth-child(5) { width:7%; }
.cost-grid-table[data-cost-table="manpower"] th:nth-child(6) { width:8%; }
.cost-grid-table[data-cost-table="manpower"] th:nth-child(7) { width:22%; }
.cost-expense-grid { min-width:760px; }
.cost-expense-grid th,
.cost-expense-grid td { width:20%; text-align:center; }
.cost-hardware-grid { min-width:620px; }
.cost-hardware-grid th:nth-child(1) { width:6%; }
.cost-hardware-grid th:nth-child(2) { width:54%; }
.cost-hardware-grid th:nth-child(3) { width:34%; }
.cost-hardware-grid th:nth-child(4) { width:6%; }
.cost-hardware-grid tbody td:nth-child(2) { text-align:left; }
.cost-hardware-grid tbody td:nth-child(3),
.cost-hardware-grid tbody td:nth-child(4) { text-align:right; }
.cost-add-row { margin:10px 12px 12px; padding:8px 11px; border:1px solid #2379bd; border-radius:7px; color:#14639d; background:#edf7ff; font-size:11px; font-weight:700; cursor:pointer; }
.cost-add-row:hover { color:#fff; background:#2379bd; }
.cost-budget-actions { display:flex; align-items:center; justify-content:flex-end; gap:16px; padding:2px 0 12px; }
.cost-budget-actions span,
.cost-readonly-note { margin:0 auto 0 0; color:#91a1b2; font-size:11px; }
.cost-readonly-note { padding:0 0 12px; }
body[data-theme="light"] .cost-budget-selector-body label,
body[data-theme="light"] .cost-meta-fields label { color:#536b7d; }
body[data-theme="light"] .cost-budget-selector-body select,
body[data-theme="light"] .cost-meta-fields input,
body[data-theme="light"] .cost-meta-fields select { border-color:#b8c8d4; color:#1e3447; background:#f8fbfd; }
body[data-theme="light"] .cost-budget-summary { color:#617084; }
body[data-theme="light"] .cost-budget-summary strong { color:#245878; }
@media (max-width:760px) {
    .cost-management-content { width:calc(100% - 32px); }
    .cost-budget-selector-body,
    .cost-meta-fields { grid-template-columns:1fr; }
    .cost-budget-summary { justify-content:flex-start; }
    .cost-budget-actions { align-items:stretch; flex-direction:column; }
    .cost-budget-actions span { margin:0; }
    .cost-sheet-title { width:72%; min-width:240px; }
    .cost-management-tabs { flex-direction:column; }
    .cost-saved-preview-modal { padding:10px; }
    .cost-saved-preview-dialog { max-height:calc(100vh - 20px); padding:14px; border-radius:12px; }
    .cost-saved-preview-head { display:block; }
    .cost-saved-preview-actions { justify-content:flex-start; margin-top:14px; }
}

/* Cost Management tables integrated with the existing dark workspace theme. */
.cost-sheet-panel {
    border-color:#263f54;
    background:linear-gradient(145deg,#101d2b,#080f18);
    box-shadow:0 16px 32px rgba(0,0,0,.2);
}
.cost-sheet-title {
    color:#f8fafc;
    background:linear-gradient(110deg,#0755b8,#1687ed 62%,#0c6fd0);
}
.cost-grid-table {
    color:#dbe8f2;
    background:#09131e;
}
.cost-grid-table th,
.cost-grid-table td { border-color:#294256; }
.cost-grid-table thead th {
    color:#fff;
    background:linear-gradient(135deg,#0755b8,#1687ed 62%,#0c6fd0);
}
.cost-grid-table tbody td { background:#0d1823; }
.cost-grid-table tbody tr:nth-child(even) td { background:#101d2b; }
.cost-grid-table tbody input { color:#e6f0f7; }
.cost-grid-table tbody input:focus { outline-color:#58b7ff; background:#132b40; }
.cost-grid-table tbody td:nth-child(6) { color:#c5f1d4; background:#1e5d43; }
.cost-grid-table tfoot th,
.cost-grid-table tfoot td { color:#f8fafc; background:#163653; }
.cost-add-row {
    border-color:#2c8ed8;
    color:#9ad1ff;
    background:rgba(23,137,239,.12);
}
.cost-add-row:hover { color:#fff; background:#176da8; }

@media print {
    @page { size:A4 landscape; margin:10mm; }
    body.cost-management-page { color:#111 !important; background:#fff !important; }
    body.cost-management-page .workspace-bar,
    body.cost-management-page .workspace-drawer,
    body.cost-management-page .drawer-backdrop,
    body.cost-management-page .workspace-heading,
    body.cost-management-page .inventory-notice,
    body.cost-management-page .cost-management-tabs,
    body.cost-management-page .cost-budget-selector,
    body.cost-management-page .cost-budget-meta,
    body.cost-management-page .cost-saved-table-panel,
    body.cost-management-page .cost-add-row,
    body.cost-management-page .cost-heading-actions,
    body.cost-management-page .cost-budget-actions,
    body.cost-management-page .cost-readonly-note { display:none !important; }
    body.cost-management-page .workspace-shell,
    body.cost-management-page .workspace-content,
    body.cost-management-page .cost-budget-form { width:100% !important; max-width:none !important; min-height:0 !important; margin:0 !important; padding:0 !important; border:0 !important; background:#fff !important; box-shadow:none !important; }
    body.cost-management-page .cost-budget-form { display:block !important; }
    body.cost-management-page .cost-sheet-panel { display:block !important; margin:0 0 9mm !important; border:1px solid #111 !important; border-radius:0 !important; background:#fff !important; box-shadow:none !important; break-inside:avoid; }
    body.cost-management-page .cost-sheet-title { width:44%; min-width:0; margin:0; color:#111; background:#f2a3ad; -webkit-print-color-adjust:exact; print-color-adjust:exact; }
    body.cost-management-page .cost-grid-table { width:100%; min-width:0; color:#111; background:#fff; font-size:10px; -webkit-print-color-adjust:exact; print-color-adjust:exact; }
    body.cost-management-page .cost-grid-table th,
    body.cost-management-page .cost-grid-table td { border-color:#111; }
    body.cost-management-page .cost-grid-table thead th { color:#111; background:#8fc5f5; -webkit-print-color-adjust:exact; print-color-adjust:exact; }
    body.cost-management-page .cost-grid-table tbody td,
    body.cost-management-page .cost-grid-table tbody tr:nth-child(even) td { color:#111; background:#fff; }
    body.cost-management-page .cost-grid-table tbody td:nth-child(6) { background:#a9d58f; -webkit-print-color-adjust:exact; print-color-adjust:exact; }
    body.cost-management-page .cost-grid-table tbody input { color:#111; }
    body.cost-management-page .cost-grid-table tfoot th,
    body.cost-management-page .cost-grid-table tfoot td { color:#111; background:#d9eafa; -webkit-print-color-adjust:exact; print-color-adjust:exact; }
}
@media (max-width:850px) {
    .workspace-content .admin-grid { grid-template-columns:1fr; }
}

/* Homepage follows the User Management visual language */
.reference-home .workspace-shell { width:min(1120px, calc(100% - 48px)); min-height:calc(100vh - 48px); margin:24px auto; overflow:hidden; border:1px solid #242a33; border-radius:22px; background:#05090f; }
.reference-home .workspace-bar { min-height:86px; padding:22px 28px 18px; background:transparent; box-shadow:none; }
.reference-home .workspace-brand strong { color:#f8fafc; }
.reference-home .workspace-brand strong span { color:#218ff4; }
.reference-home .workspace-brand small { color:#7f8b9b; }
.reference-home .workspace-bar .theme-toggle { border-color:#303946; background:#101720; }
.reference-home .workspace-bar .theme-toggle:hover { background:#151f2b; }
.reference-home .workspace-content { width:calc(100% - 56px); padding:52px 0 58px; }
.reference-home .workspace-heading { margin-bottom:34px; text-align:left; }
.reference-home .workspace-heading h1 { font-size:clamp(42px, 5vw, 62px); }
.reference-home .workspace-heading span { color:#7f8b9b; }
.reference-home .tool-grid { gap:20px; }
.reference-home .tool-card { min-height:180px; border-color:#242a33; border-radius:18px; color:#f8fafc; background:#080d14; box-shadow:0 18px 45px rgba(0,0,0,.2); }
.reference-home .tool-card:hover { border-color:#1789ef; box-shadow:0 18px 45px rgba(0,0,0,.28); }
.reference-home .tool-icon { color:#218ff4; background:rgba(23,137,239,.13); }
.reference-home .tool-card h2 { color:#f8fafc; }
.reference-home .tool-card p { color:#7f8b9b; }
.tools-empty { display:grid; place-items:center; min-height:260px; padding:35px; border:1px dashed #303946; border-radius:18px; color:#7f8b9b; background:#080d14; text-align:center; }
.tools-empty-icon { display:grid; place-items:center; width:56px; height:56px; margin-bottom:16px; border-radius:15px; color:#218ff4; background:rgba(23,137,239,.13); }
.tools-empty-icon svg { width:29px; height:29px; fill:none; stroke:currentColor; stroke-linecap:round; stroke-linejoin:round; stroke-width:1.7; }
.tools-empty h2 { margin:0 0 8px; color:#f8fafc; font:700 20px 'Manrope',sans-serif; }
.tools-empty p { max-width:360px; margin:0; font-size:13px; line-height:1.5; }
body[data-theme="light"] .reference-home .workspace-brand strong { color:#142235; }
body[data-theme="light"] .reference-home .workspace-brand small, body[data-theme="light"] .reference-home .workspace-heading span { color:#718096; }
body[data-theme="light"] .reference-home .tool-card { border-color:#d9e1e9; color:#142235; background:#fff; box-shadow:0 12px 28px rgba(40,73,105,.09); }
body[data-theme="light"] .reference-home .tool-card h2 { color:#155486; }
body[data-theme="light"] .reference-home .tool-card p { color:#7f8b99; }
body[data-theme="light"] .reference-home .workspace-shell { border-color:#d7e0e9; background:#edf2f7; }
body[data-theme="light"] .tools-empty { border-color:#cbd6e2; color:#718096; background:#fff; }
body[data-theme="light"] .tools-empty h2 { color:#155486; }
@media (max-width:760px) {
    .reference-home .workspace-shell { width:calc(100% - 20px); min-height:calc(100vh - 20px); margin:10px auto; }
    .reference-home .workspace-bar { padding:18px 16px; }
    .reference-home .workspace-content { width:calc(100% - 32px); }
}

/* Shared responsive navigation layout */
.workspace-shell,
.workspace-content {
    min-width:0;
}
.workspace-shell {
    transition:width .28s ease, margin-left .28s ease, margin-right .28s ease;
}
.admin-shell {
    transition:width .28s ease, margin-left .28s ease, margin-right .28s ease;
}
body.nav-initializing .workspace-shell,
body.nav-initializing .admin-shell,
body.nav-initializing .workspace-drawer {
    transition:none !important;
}
.workspace-drawer {
    overflow-y:auto;
    overscroll-behavior:contain;
}

@media (min-width:1100px) {
    .workspace-page.nav-open:not(.reference-home) .workspace-shell {
        width:calc(100% - 290px);
        margin-right:0;
        margin-left:290px;
    }

    .workspace-page.reference-home.nav-open .workspace-shell {
        width:calc(100% - 338px);
        margin-right:24px;
        margin-left:314px;
    }

    .admin-page.nav-open .admin-shell {
        width:calc(100% - 290px);
        margin-right:0;
        margin-left:290px;
    }

    .workspace-page .drawer-backdrop.open,
    .admin-page .drawer-backdrop.open {
        opacity:0;
        pointer-events:none;
    }
}

@media (max-width:1099px) {
    .workspace-page .drawer-backdrop.open,
    .admin-page .drawer-backdrop.open {
        background:rgba(3, 9, 16, .5);
        opacity:1;
        pointer-events:auto;
        transition:opacity .25s ease;
    }
}

@media (max-width:760px) {
    .workspace-page .workspace-content,
    .workspace-page.reference-home .workspace-content {
        width:calc(100% - 32px);
        max-width:none;
    }

    .workspace-page .workspace-bar {
        gap:12px;
        padding-right:16px;
        padding-left:16px;
    }

    .workspace-page .workspace-brand {
        min-width:0;
    }

    .workspace-page .workspace-brand strong,
    .workspace-page .workspace-brand small {
        overflow:hidden;
        text-overflow:ellipsis;
        white-space:nowrap;
    }
}

@media (max-width:850px) {
    .admin-page .admin-shell {
        width:100%;
    }
}

/* Softer light theme */
body[data-theme="light"] {
    color:#263b4d;
    background:#e8eef2;
    color-scheme:light;
}
body[data-theme="light"] .workspace-shell,
body[data-theme="light"] .admin-shell {
    border-color:#cbd7e0;
    background:#eef3f6;
    box-shadow:0 18px 45px rgba(49,76,96,.1);
}
body[data-theme="light"] .workspace-bar,
body[data-theme="light"] .admin-topbar { background:transparent; box-shadow:none; }
body[data-theme="light"] .workspace-brand strong,
body[data-theme="light"] .admin-brand strong,
body[data-theme="light"] .workspace-heading h1,
body[data-theme="light"] .admin-hero h1 { color:#243b4d; }
body[data-theme="light"] .workspace-brand small,
body[data-theme="light"] .workspace-heading span,
body[data-theme="light"] .admin-brand small { color:#718394; }
body[data-theme="light"] .workspace-drawer { border-color:#cbd7e0; background:#f7f9fa; box-shadow:18px 0 45px rgba(49,76,96,.15); }
body[data-theme="light"] .drawer-title { color:#243b4d; }
body[data-theme="light"] .drawer-link { color:#5e7181; }
body[data-theme="light"] .drawer-link svg { color:#5e7181; }
body[data-theme="light"] .drawer-link:hover,
body[data-theme="light"] .drawer-link.active { color:#175d91; background:#e3eff6; }
body[data-theme="light"] .drawer-group-toggle { color:#718096; }
body[data-theme="light"] .drawer-group-toggle:hover { color:#175d91; background:#e3eff6; }
body[data-theme="light"] .drawer-section-label { color:#53657a; }
body[data-theme="light"] .tool-card,
body[data-theme="light"] .tools-empty {
    border-color:#cbd7e0;
    background:#f8fafb;
    box-shadow:0 10px 25px rgba(49,76,96,.08);
}
body[data-theme="light"] .reference-home .tool-card h2,
body[data-theme="light"] .tools-empty h2 { color:#245878; }
body[data-theme="light"] .reference-home .tool-card p,
body[data-theme="light"] .tools-empty p { color:#728594; }
body[data-theme="light"] .admin-panel,
body[data-theme="light"] .admin-side,
body[data-theme="light"] .inventory-panel {
    border-color:#cbd7e0;
    background:#f8fafb;
    box-shadow:0 10px 25px rgba(49,76,96,.08);
}
body[data-theme="light"] .auth-card { border-color:#cbd7e0; background:#f8fafb; box-shadow:0 20px 55px rgba(49,76,96,.14); }
body[data-theme="light"] .panel-header,
body[data-theme="light"] .inventory-panel-header { border-color:#dbe3e8; }
body[data-theme="light"] .admin-form input,
body[data-theme="light"] .admin-form select,
body[data-theme="light"] .inventory-form input,
body[data-theme="light"] .inventory-form select,
body[data-theme="light"] .category-form input,
body[data-theme="light"] .inventory-search-row input,
body[data-theme="light"] .inventory-filter-row input,
body[data-theme="light"] .report-filters input {
    border-color:#cbd7e0;
    color:#263b4d;
    background:#f1f5f7;
}
body[data-theme="light"] .admin-form input:focus,
body[data-theme="light"] .admin-form select:focus,
body[data-theme="light"] .inventory-form input:focus,
body[data-theme="light"] .inventory-form select:focus,
body[data-theme="light"] .category-form input:focus,
body[data-theme="light"] .inventory-search-row input:focus,
body[data-theme="light"] .inventory-filter-row input:focus { background:#f8fafb; }
body[data-theme="light"] .admin-form option,
body[data-theme="light"] .inventory-form option { color:#263b4d; background:#f8fafb; }
body[data-theme="light"] .inventory-table tbody tr:nth-child(even) { background:#f1f5f7; }
body[data-theme="light"] .inventory-table tbody tr:hover { background:#e7f2f8; }
body[data-theme="light"] .report-page { color:#263b4d; background:#e8eef2; }
body[data-theme="light"] .report-filters,
body[data-theme="light"] .report-kpi,
body[data-theme="light"] .report-panel { border-color:#cbd7e0; background:#f8fafb; box-shadow:0 10px 25px rgba(49,76,96,.08); }
body[data-theme="light"] .report-heading h1,
body[data-theme="light"] .report-panel h2 { color:#243b4d; }
body[data-theme="light"] .report-kpi strong,
body[data-theme="light"] .scale-header strong,
body[data-theme="light"] .report-list-row strong { color:#245878; }
body[data-theme="light"] .report-kpi:nth-child(3) strong { color:#168459; }
body[data-theme="light"] .top-project-card { border-bottom-color:#e1e8ed; }
body[data-theme="light"] .donut::after { background:#f8fafb; }
body[data-theme="light"] .donut-center { color:#243b4d; }
body[data-theme="light"] .workspace-bar .menu-button,
body[data-theme="light"] .admin-topbar .menu-button {
    border-color:#aebfcb;
    color:#31546b;
    background:#f7fafb;
}
body[data-theme="light"] .workspace-bar .menu-button:hover,
body[data-theme="light"] .admin-topbar .menu-button:hover { border-color:#1789ef; background:#e8f3f8; }
body[data-theme="light"] .reference-home .workspace-bar .theme-toggle,
body[data-theme="light"] .admin-topbar .theme-toggle {
    border-color:#aebfcb;
    color:#31546b;
    background:#f7fafb;
}
body[data-theme="light"] .reference-home .workspace-bar .theme-toggle:hover,
body[data-theme="light"] .admin-topbar .theme-toggle:hover { border-color:#1789ef; color:#173d57; background:#e8f3f8; }
body[data-theme="light"] .workspace-signout {
    border-color:#d45d66;
    outline-color:rgba(190,45,55,.1);
    color:#b13d48 !important;
    background:#fff0f1;
}
body[data-theme="light"] .workspace-signout:hover { border-color:#c94752; color:#fff !important; background:#c94752; }
body[data-theme="light"] .inventory-submit,
body[data-theme="light"] .filter-button,
body[data-theme="light"] .create-button {
    color:#fff;
    background:#1478c9;
    box-shadow:0 3px 8px rgba(20,120,201,.2);
}
body[data-theme="light"] .inventory-submit:hover,
body[data-theme="light"] .filter-button:hover,
body[data-theme="light"] .create-button:hover { color:#fff; background:#0d62a7; }
body[data-theme="light"] .delete-button,
body[data-theme="light"] .inventory-table td .delete-button {
    border-color:#d45d66;
    color:#fff;
    background:#c94752;
}
body[data-theme="light"] .delete-button:hover,
body[data-theme="light"] .inventory-table td .delete-button:hover { border-color:#a9333d; color:#fff; background:#a9333d; }

.reference-home .tool-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
@media (max-width:1000px) { .reference-home .tool-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:760px) { .reference-home .tool-grid { grid-template-columns:1fr; max-width:390px; margin:0 auto; } }

/* Profile settings */
.profile-content { width:min(760px, calc(100% - 56px)); padding-top:48px; }
.profile-heading { margin-bottom:28px; }
.profile-panel { overflow:hidden; border:1px solid #242a33; border-radius:18px; background:#080d14; box-shadow:0 18px 45px rgba(0,0,0,.2); }
.profile-panel-header { display:flex; align-items:center; justify-content:space-between; gap:18px; padding:22px 24px 18px; border-bottom:1px solid #202731; }
.profile-panel-header h2 { margin:0 0 6px; color:#f8fafc; font:700 19px 'Manrope',sans-serif; }
.profile-panel-header p { margin:0; color:#7f8b9b; font-size:12px; }
.profile-role { padding:6px 10px; border-radius:99px; color:#8ec9ff; background:rgba(23,137,239,.13); font-size:10px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; }
.profile-form { display:grid; gap:14px; padding:23px 24px 26px; }
.profile-form label { display:grid; gap:7px; color:#aab5c2; font-size:11px; font-weight:700; }
.profile-form input { width:100%; padding:12px 13px; border:1px solid #303946; border-radius:8px; outline:0; color:#f8fafc; background:#0d141d; font-size:13px; }
.profile-form input:focus { border-color:#1789ef; box-shadow:0 0 0 3px rgba(23,137,239,.1); }
.profile-divider { display:flex; align-items:center; gap:12px; margin-top:9px; color:#218ff4; font-size:11px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; }
.profile-divider::after { flex:1; height:1px; background:#202731; content:""; }
.profile-help { margin:-3px 0 2px; color:#7f8b9b; font-size:12px; line-height:1.5; }
.profile-save-button { min-height:42px; margin-top:5px; border:0; border-radius:8px; color:#fff; background:#1789ef; font-size:12px; font-weight:700; cursor:pointer; }
.profile-save-button:hover { background:#0e70c7; }
.profile-notice { margin:0 0 18px; padding:12px 15px; border-radius:10px; font-size:13px; }
.profile-notice.success { border:1px solid rgba(40,179,123,.35); color:#8ee2bd; background:rgba(40,179,123,.1); }
.profile-notice.error { border:1px solid rgba(255,105,70,.35); color:#ffb09c; background:rgba(120,39,25,.25); }
body[data-theme="light"] .profile-panel { border-color:#cbd7e0; background:#f8fafb; box-shadow:0 10px 25px rgba(49,76,96,.08); }
body[data-theme="light"] .profile-panel-header { border-color:#dbe3e8; }
body[data-theme="light"] .profile-panel-header h2 { color:#243b4d; }
body[data-theme="light"] .profile-panel-header p,
body[data-theme="light"] .profile-help { color:#718394; }
body[data-theme="light"] .profile-form label { color:#536b7d; }
body[data-theme="light"] .profile-form input { border-color:#cbd7e0; color:#263b4d; background:#f1f5f7; }
body[data-theme="light"] .profile-form input:focus { background:#f8fafb; }
body[data-theme="light"] .profile-divider::after { background:#dbe3e8; }
body[data-theme="light"] .profile-save-button { color:#fff; background:#1478c9; box-shadow:0 3px 8px rgba(20,120,201,.2); }
body[data-theme="light"] .profile-save-button:hover { background:#0d62a7; }
@media (max-width:760px) { .profile-content { width:calc(100% - 32px); padding-top:40px; } .profile-panel-header { align-items:flex-start; flex-direction:column; gap:8px; } }
.history-summary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin-bottom:20px; }
.history-filter { display:flex; flex-direction:column; gap:5px; padding:16px 17px; border:1px solid #242a33; border-radius:12px; color:#aab5c2; background:#080d14; text-decoration:none; transition:border-color .2s, background .2s, transform .2s; }
.history-filter:hover { border-color:#218ff4; background:#0d1621; transform:translateY(-1px); }
.history-filter.active { border-color:#218ff4; background:rgba(23,137,239,.13); box-shadow:inset 3px 0 #218ff4; }
.history-filter strong { color:#f8fafc; font-size:24px; line-height:1; }
.history-filter span { color:#7f8b9b; font-size:11px; font-weight:700; }
.history-filter-added strong { color:#70d9a9; }
.history-filter-deducted strong { color:#f5d06e; }
.history-filter-deleted strong { color:#ff8585; }
.history-table { min-width:1020px; }
.history-table td:nth-child(5) { min-width:250px; max-width:430px; white-space:normal; line-height:1.5; }
.history-badge { display:inline-flex; align-items:center; padding:5px 8px; border-radius:999px; font-size:10px; font-weight:800; letter-spacing:.04em; text-transform:uppercase; }
.history-badge-added { color:#8ee2bd; background:rgba(40,179,123,.14); }
.history-badge-deducted { color:#f5d06e; background:rgba(220,170,45,.14); }
.history-badge-deleted { color:#ff9b9f; background:rgba(190,45,55,.16); }
.history-filter-pending strong { color:#b8a0ff; }
.history-filter-completed strong { color:#70d9a9; }
.history-filter-cancelled strong { color:#ff9b9f; }
.history-badge-pending { color:#c3b0ff; background:rgba(121,91,204,.18); }
.history-badge-completed { color:#8ee2bd; background:rgba(40,179,123,.14); }
.history-badge-cancelled { color:#ff9b9f; background:rgba(190,45,55,.16); }
body[data-theme="light"] .history-filter { border-color:#d7e0e9; color:#617084; background:#fff; }
body[data-theme="light"] .history-filter:hover { border-color:#1678c7; background:#f7fbfe; }
body[data-theme="light"] .history-filter.active { border-color:#1678c7; background:#edf7ff; }
body[data-theme="light"] .history-filter strong { color:#243b4d; }
body[data-theme="light"] .history-filter-added strong { color:#168459; }
body[data-theme="light"] .history-filter-deducted strong { color:#876300; }
body[data-theme="light"] .history-filter-deleted strong { color:#b52f3c; }
body[data-theme="light"] .history-filter-pending strong { color:#6950ad; }
body[data-theme="light"] .history-filter-completed strong { color:#168459; }
body[data-theme="light"] .history-filter-cancelled strong { color:#b52f3c; }
body[data-theme="light"] .history-badge-added { color:#14764f; background:#e2f7ed; }
body[data-theme="light"] .history-badge-deducted { color:#876300; background:#fff5cf; }
body[data-theme="light"] .history-badge-deleted { color:#a9333d; background:#fff0f0; }
body[data-theme="light"] .history-badge-pending { color:#5f479e; background:#f0ecff; }
body[data-theme="light"] .history-badge-completed { color:#14764f; background:#e2f7ed; }
body[data-theme="light"] .history-badge-cancelled { color:#a9333d; background:#fff0f0; }
@media (max-width:760px) { .history-summary { grid-template-columns:repeat(2,minmax(0,1fr)); } }

/* Shared visibility and interaction polish */
:focus-visible { outline:3px solid rgba(33,143,244,.72); outline-offset:3px; }
body[data-theme="dark"] {
    --page:#05090f;
    --card:#0b121b;
    --field:#0d141d;
    --text:#f8fafc;
    --muted:#aab5c2;
}
body[data-theme="dark"] .inventory-panel,
body[data-theme="dark"] .admin-panel,
body[data-theme="dark"] .admin-side,
body[data-theme="dark"] .profile-panel,
body[data-theme="dark"] .admin-tools .tool-card {
    border-color:#334154;
}
body[data-theme="dark"] .inventory-panel-header,
body[data-theme="dark"] .panel-header,
body[data-theme="dark"] .profile-panel-header { border-color:#2b3746; }
body[data-theme="dark"] .inventory-form label,
body[data-theme="dark"] .inventory-search-row label,
body[data-theme="dark"] .admin-form label,
body[data-theme="dark"] .profile-form label { color:#c4cfdb; }
body[data-theme="dark"] .inventory-form input,
body[data-theme="dark"] .inventory-form select,
body[data-theme="dark"] .inventory-search-row input,
body[data-theme="dark"] .inventory-filter-row input,
body[data-theme="dark"] .admin-form input,
body[data-theme="dark"] .admin-form select,
body[data-theme="dark"] .profile-form input,
body[data-theme="dark"] .category-form input {
    border-color:#3a4858;
    background:#0d141d;
}
body[data-theme="dark"] .inventory-form input::placeholder,
body[data-theme="dark"] .inventory-search-row input::placeholder,
body[data-theme="dark"] .admin-form input::placeholder,
body[data-theme="dark"] .profile-form input::placeholder { color:#8795a5; }
body[data-theme="light"] {
    --page:#e8eef2;
    --card:#ffffff;
    --field:#ffffff;
    --text:#243b4d;
    --muted:#617084;
}
body[data-theme="light"] .workspace-shell { border-color:#b8c8d4; box-shadow:0 18px 45px rgba(40,73,105,.12); }
body[data-theme="light"] .inventory-panel,
body[data-theme="light"] .admin-panel,
body[data-theme="light"] .admin-side,
body[data-theme="light"] .profile-panel {
    border-color:#b8c8d4;
    background:#ffffff;
    box-shadow:0 12px 30px rgba(40,73,105,.11);
}
body[data-theme="light"] .inventory-panel-header,
body[data-theme="light"] .panel-header,
body[data-theme="light"] .profile-panel-header { border-color:#d2dde5; }
body[data-theme="light"] .inventory-panel-header p,
body[data-theme="light"] .panel-header p,
body[data-theme="light"] .inventory-empty,
body[data-theme="light"] .profile-help { color:#536b7d; }
body[data-theme="light"] .inventory-form label,
body[data-theme="light"] .inventory-search-row label,
body[data-theme="light"] .admin-form label,
body[data-theme="light"] .profile-form label { color:#40586b; }
body[data-theme="light"] .inventory-form input,
body[data-theme="light"] .inventory-form select,
body[data-theme="light"] .inventory-search-row input,
body[data-theme="light"] .inventory-filter-row input,
body[data-theme="light"] .admin-form input,
body[data-theme="light"] .admin-form select,
body[data-theme="light"] .profile-form input,
body[data-theme="light"] .category-form input {
    border-color:#b8c8d4;
    color:#1e3447;
    background:#ffffff;
    box-shadow:inset 0 1px 2px rgba(36,59,77,.04);
}
body[data-theme="light"] .inventory-form input::placeholder,
body[data-theme="light"] .inventory-search-row input::placeholder,
body[data-theme="light"] .admin-form input::placeholder,
body[data-theme="light"] .profile-form input::placeholder { color:#718394; }
body[data-theme="light"] .inventory-notice.success,
body[data-theme="light"] .profile-notice.success { border-color:#86c9aa; color:#146844; background:#e8f8ef; }
body[data-theme="light"] .inventory-notice.error,
body[data-theme="light"] .profile-notice.error { border-color:#e2a0a5; color:#9e2f3b; background:#fff0f1; }

/* Final visual system: consistent contrast, rhythm, and focus states across both themes. */
:root {
    --accent:#2d9bf3;
    --accent-strong:#1478d1;
    --surface:#0b121b;
    --surface-raised:#101a26;
    --line:#263546;
    --line-strong:#3a4c60;
    --copy:#f3f7fb;
    --copy-muted:#a8b6c5;
}
body {
    color-scheme:dark;
    background:
        radial-gradient(circle at 8% 0%, rgba(45,155,243,.12), transparent 30%),
        radial-gradient(circle at 92% 12%, rgba(112,217,169,.06), transparent 25%),
        var(--page);
    line-height:1.5;
}
:focus-visible {
    outline:3px solid rgba(45,155,243,.48);
    outline-offset:3px;
}
.auth-card,
.reference-home .workspace-shell {
    border-color:var(--line);
    background:linear-gradient(145deg, rgba(16,26,38,.98), rgba(8,14,22,.98));
}
.auth-header { padding-top:30px; }
.auth-content { padding-top:42px; }
.brand-copy small,
.workspace-brand small { letter-spacing:.06em; }
.heading-block h1,
.workspace-heading h1 { letter-spacing:-.055em; }
.heading-block p:last-child,
.workspace-heading span { line-height:1.6; }
.input-field,
.inventory-form input,
.inventory-form select,
.inventory-search-row input,
.inventory-filter-row input {
    border-color:var(--line);
    background:var(--surface);
}
.input-field:hover,
.inventory-form input:hover,
.inventory-form select:hover,
.inventory-search-row input:hover { border-color:var(--line-strong); }
.input-field input::placeholder,
.inventory-form input::placeholder,
.inventory-search-row input::placeholder { color:#91a1b2; }
.login-button,
.inventory-submit,
.filter-button,
.create-button { background:linear-gradient(135deg, var(--accent-strong), var(--accent)); }
.login-button:hover,
.inventory-submit:hover,
.filter-button:hover,
.create-button:hover { filter:brightness(1.08); }
.workspace-heading p,
.section-label { color:var(--accent); }
.workspace-heading { margin-bottom:36px; }
.inventory-panel,
.dashboard-kpi,
.admin-panel,
.profile-panel {
    border-color:var(--line);
    background:linear-gradient(145deg, rgba(16,26,38,.98), rgba(10,17,26,.98));
    box-shadow:0 16px 34px rgba(0,0,0,.18);
}
.inventory-panel-header,
.panel-header,
.profile-panel-header { border-color:var(--line); }
.inventory-panel-header h2,
.dashboard-panel h2 { letter-spacing:-.025em; }
.inventory-panel-header p,
.dashboard-kpi p,
.inventory-empty,
.dashboard-list-row small { color:var(--copy-muted); }
.inventory-table th,
.inventory-table td { border-color:var(--line); }
.inventory-table tbody tr:nth-child(even) { background:rgba(255,255,255,.025); }
.inventory-table tbody tr:hover { background:rgba(45,155,243,.10); }
.drawer-link { transition:background .2s ease, color .2s ease, transform .2s ease; }
.drawer-link:hover { transform:translateX(2px); }
.security-note { color:#91a1b2; }

body[data-theme="light"] {
    color-scheme:light;
    background:
        radial-gradient(circle at 5% 0%, rgba(45,155,243,.13), transparent 30%),
        #edf3f7;
}
body[data-theme="light"] .auth-card,
body[data-theme="light"] .reference-home .workspace-shell,
body[data-theme="light"] .inventory-panel,
body[data-theme="light"] .dashboard-kpi,
body[data-theme="light"] .admin-panel,
body[data-theme="light"] .profile-panel {
    border-color:#c6d4df;
    background:#fff;
    box-shadow:0 16px 34px rgba(40,73,105,.10);
}
body[data-theme="light"] .heading-block p:last-child,
body[data-theme="light"] .workspace-heading span,
body[data-theme="light"] .inventory-panel-header p,
body[data-theme="light"] .dashboard-kpi p,
body[data-theme="light"] .inventory-empty,
body[data-theme="light"] .dashboard-list-row small { color:#5f7283; }
body[data-theme="light"] .input-field,
body[data-theme="light"] .inventory-form input,
body[data-theme="light"] .inventory-form select,
body[data-theme="light"] .inventory-search-row input,
body[data-theme="light"] .inventory-filter-row input {
    border-color:#b9cad7;
    background:#f8fbfd;
}
body[data-theme="light"] .input-field:hover,
body[data-theme="light"] .inventory-form input:hover,
body[data-theme="light"] .inventory-form select:hover,
body[data-theme="light"] .inventory-search-row input:hover { border-color:#7fa9c6; }
body[data-theme="light"] .input-field input::placeholder,
body[data-theme="light"] .inventory-form input::placeholder,
body[data-theme="light"] .inventory-search-row input::placeholder { color:#708496; }
body[data-theme="light"] .inventory-table th,
body[data-theme="light"] .inventory-table td { border-color:#d5e0e7; }
body[data-theme="light"] .inventory-table tbody tr:nth-child(even) { background:#f5f9fb; }
body[data-theme="light"] .inventory-table tbody tr:hover { background:#eaf5fb; }
.delete-modal-close:focus-visible,
.delete-modal-confirm:focus-visible,
.delete-modal-cancel:focus-visible { outline-offset:2px; }
.reservation-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:20px; text-align:left; }
.reservation-heading > div { min-width:0; }
.reservation-open-button { padding:12px 18px; border:0; border-radius:9px; color:#fff; background:#1789ef; font-size:12px; font-weight:700; cursor:pointer; white-space:nowrap; }
.reservation-open-button:hover { background:#0e70c7; }
.reservation-table { min-width:900px; }
.reservation-done-button { padding:7px 10px; border:1px solid #2ca77d; border-radius:7px; color:#fff; background:#16865f; font-size:10px; font-weight:700; cursor:pointer; white-space:nowrap; }
.reservation-done-button:hover { border-color:#70d9a9; background:#1b9d70; }
.reservation-actions { display:grid; gap:7px; }
.reservation-actions form { width:100%; margin:0; }
.reservation-actions button { display:block; width:100%; text-align:center; }
.reservation-cancel-button { padding:7px 10px; border:1px solid #d05b63; border-radius:7px; color:#ffb0b3; background:rgba(190,45,55,.14); font-size:10px; font-weight:700; cursor:pointer; white-space:nowrap; }
.reservation-cancel-button:hover { border-color:#ff7373; color:#fff; background:#b9353f; }
.reservation-readonly { margin:0 0 20px; color:#7f8b9b; font-size:12px; text-align:right; }
.reservation-modal[hidden] { display:none; }
.reservation-modal { position:fixed; z-index:1050; inset:0; display:grid; place-items:center; padding:20px; }
.reservation-modal-backdrop { position:absolute; inset:0; background:rgba(0,0,0,.72); }
.reservation-modal-dialog { position:relative; z-index:1; width:min(620px,100%); max-height:calc(100vh - 40px); overflow:auto; padding:24px; border:1px solid #303946; border-radius:16px; background:#080d14; box-shadow:0 24px 70px rgba(0,0,0,.5); }
.reservation-modal-header { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; margin-bottom:20px; }
.reservation-modal-header p { margin:0 0 7px; color:#218ff4; font-size:10px; font-weight:700; letter-spacing:.14em; text-transform:uppercase; }
.reservation-modal-header h2 { margin:0; color:#f8fafc; font:700 22px 'Manrope',sans-serif; }
.reservation-modal-close { width:32px; height:32px; border:1px solid #475364; border-radius:8px; color:#f8fafc; background:transparent; font-size:22px; line-height:1; cursor:pointer; }
.reservation-modal-close:hover { border-color:#ff7373; color:#fff; background:#b9353f; }
.reservation-form { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.reservation-form label { display:grid; gap:7px; color:#aab5c2; font-size:11px; font-weight:700; }
.reservation-form input, .reservation-form select, .reservation-form textarea { width:100%; min-width:0; padding:11px 12px; border:1px solid #303946; border-radius:8px; outline:0; color:#f8fafc; background:#0d141d; font:inherit; font-size:13px; resize:vertical; }
.reservation-form option { color:#f8fafc; background:#0d141d; }
.reservation-form input:focus, .reservation-form select:focus, .reservation-form textarea:focus { border-color:#1789ef; box-shadow:0 0 0 3px rgba(23,137,239,.1); }
.reservation-items-field { grid-column:1 / -1; }
.reservation-items-header { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:10px; color:#aab5c2; font-size:11px; }
.reservation-form-warning { margin:0 0 10px; padding:10px 12px; border:1px solid rgba(255,105,70,.4); border-radius:8px; color:#ffb09c; background:rgba(120,39,25,.25); font-size:11px; line-height:1.4; }
.reservation-add-item, .reservation-remove-item { padding:7px 10px; border:1px solid #2c8ed8; border-radius:7px; color:#9ad1ff; background:rgba(23,137,239,.12); font-size:10px; font-weight:700; cursor:pointer; }
.reservation-add-item:hover, .reservation-remove-item:hover { border-color:#5ab5ff; color:#fff; background:#176da8; }
.reservation-items { display:grid; gap:10px; }
.reservation-item-row { display:grid; grid-template-columns:minmax(0,1fr) minmax(130px,.35fr) auto; align-items:end; gap:10px; padding:12px; border:1px solid #242a33; border-radius:10px; background:#080d14; }
.reservation-remove-item { border-color:#63404a; color:#ff9b9f; background:rgba(190,45,55,.12); }
.reservation-remove-item:hover { border-color:#ff7373; background:#8f2f39; }
.reservation-item-list { display:grid; gap:4px; margin:0; padding:0; list-style:none; }
.reservation-item-list li { display:flex; justify-content:space-between; gap:14px; color:#aab5c2; }
.reservation-item-list li + li { padding-top:4px; border-top:1px solid #242a33; }
.reservation-notes-field { grid-column:1 / -1; }
.reservation-submit { grid-column:1 / -1; min-height:42px; border:0; border-radius:8px; color:#fff; background:#1789ef; font-size:12px; font-weight:700; cursor:pointer; }
.reservation-submit:hover { background:#0e70c7; }
body[data-theme="light"] .reservation-open-button,
body[data-theme="light"] .reservation-submit { background:#1478c9; }
body[data-theme="light"] .reservation-open-button:hover,
body[data-theme="light"] .reservation-submit:hover { background:#0d62a7; }
body[data-theme="light"] .reservation-done-button { border-color:#168459; background:#168459; }
body[data-theme="light"] .reservation-done-button:hover { border-color:#0f6948; background:#0f6948; }
body[data-theme="light"] .reservation-cancel-button { border-color:#e0a0a5; color:#b52f3c; background:#fff0f0; }
body[data-theme="light"] .reservation-cancel-button:hover { border-color:#c94752; color:#fff; background:#c94752; }
body[data-theme="light"] .reservation-modal-dialog { border-color:#cbd7e0; background:#f8fafb; }
body[data-theme="light"] .reservation-modal-header h2 { color:#243b4d; }
body[data-theme="light"] .reservation-modal-close { border-color:#b7c7d3; color:#243b4d; }
body[data-theme="light"] .reservation-form label { color:#617084; }
body[data-theme="light"] .reservation-form input,
body[data-theme="light"] .reservation-form select,
body[data-theme="light"] .reservation-form textarea { border-color:#d4dce5; color:#142235; background:#fff; }
body[data-theme="light"] .reservation-form option { color:#142235; background:#fff; }
body[data-theme="light"] .reservation-items-header { color:#617084; }
body[data-theme="light"] .reservation-form-warning { border-color:#e2a0a5; color:#9e2f3b; background:#fff0f1; }
body[data-theme="light"] .reservation-item-row { border-color:#dbe3e8; background:#f8fafb; }
body[data-theme="light"] .reservation-item-list li { color:#617084; }
body[data-theme="light"] .reservation-item-list li + li { border-color:#dbe3e8; }
body[data-theme="light"] .reservation-add-item { border-color:#9fc9e7; color:#116bb4; background:#edf7ff; }
body[data-theme="light"] .reservation-add-item:hover { border-color:#1478c9; color:#fff; background:#1478c9; }
body[data-theme="light"] .reservation-remove-item { border-color:#e0b9be; color:#b52f3c; background:#fff0f0; }
body[data-theme="light"] .reservation-remove-item:hover { border-color:#c94752; color:#fff; background:#c94752; }

/* Operations */
.operations-form { grid-template-columns:repeat(4,minmax(0,1fr)); }
.operations-create-actions { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:8px; }
.operations-tabs { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:20px; padding:6px; border:1px solid #242a33; border-radius:12px; background:#080d14; }
.operations-tab { flex:1; padding:11px 14px; border-radius:8px; color:#7f8b9b; font-size:12px; font-weight:700; text-align:center; text-decoration:none; transition:color .2s, background .2s; }
.operations-tab:hover { color:#f8fafc; background:#111923; }
.operations-tab.active { color:#fff; background:#1789ef; }
.operations-form .inventory-submit { grid-column:1 / -1; }
.operations-table { width:100%; min-width:0; border-collapse:separate; border-spacing:0; table-layout:fixed; font-size:10px; }
.operations-table th,
.operations-table td { padding:9px 7px; border-right:1px solid rgba(148,163,184,.08); line-height:1.3; }
.operations-table th { padding:10px 7px; }
.operations-table th { position:sticky; top:0; z-index:2; background:linear-gradient(135deg,#0755b8,#1687ed 62%,#0c6fd0); }
.operations-table tbody tr { transition:background .18s ease, box-shadow .18s ease; }
.operations-table tbody tr:hover { box-shadow:inset 3px 0 0 #2d9bf3; }
.operations-table td { max-width:none; white-space:normal; overflow-wrap:anywhere; }
.operations-table th:nth-child(1), .operations-table td:nth-child(1) { width:4%; }
.operations-table th:nth-child(2), .operations-table td:nth-child(2) { width:5%; }
.operations-table th:nth-child(3), .operations-table td:nth-child(3) { width:8%; }
.operations-table th:nth-child(4), .operations-table td:nth-child(4),
.operations-table th:nth-child(5), .operations-table td:nth-child(5) { width:4%; }
.operations-table th:nth-child(6), .operations-table td:nth-child(6) { width:5%; }
.operations-table th:nth-child(7), .operations-table td:nth-child(7) { width:10%; }
.operations-table th:nth-child(8), .operations-table td:nth-child(8),
.operations-table th:nth-child(9), .operations-table td:nth-child(9) { width:7%; }
.operations-table th:nth-child(10), .operations-table td:nth-child(10) { width:6%; }
.operations-table th:nth-child(11), .operations-table td:nth-child(11) { width:7%; text-align:right; }
.operations-table th:nth-child(12), .operations-table td:nth-child(12) { width:4%; }
.operations-table th:nth-child(13), .operations-table td:nth-child(13) { width:6%; }
.operations-table th:nth-child(14), .operations-table td:nth-child(14) { width:5%; }
.operations-table th:nth-child(15), .operations-table td:nth-child(15) { width:6%; }
.operations-table th:nth-child(16), .operations-table td:nth-child(16) { width:12%; }
.operations-table th:nth-child(1),
.operations-table td:nth-child(1),
.operations-table th:nth-child(3),
.operations-table td:nth-child(3),
.operations-table th:nth-child(6),
.operations-table td:nth-child(6),
.operations-table th:nth-child(10),
.operations-table td:nth-child(10),
.operations-table th:nth-child(13),
.operations-table td:nth-child(13),
.operations-table th:nth-child(14),
.operations-table td:nth-child(14) { border-left:2px solid rgba(45,155,243,.24); }
.operations-table th:last-child,
.operations-table td:last-child { border-left:2px solid rgba(45,155,243,.3); border-right:0; background:#0d141d; }
.operations-table th:last-child { z-index:3; background:#116fc4; }
.operations-table tbody tr:nth-child(even) td:last-child { background:#101923; }
.operations-table tbody tr:hover td:last-child { background:#13283a; }
.operations-table .sales-cell { white-space:nowrap; overflow-wrap:normal; }
.operations-table .operation-actions { display:flex; flex-wrap:wrap; gap:4px; white-space:normal; }
.operations-table .operation-actions .view-button,
.operations-table .operation-actions .edit-button,
.operations-table .operation-actions .complete-button,
.operations-table .operation-actions .delete-button { padding:5px 6px; font-size:9px; }
.operations-project-table { min-width:900px; table-layout:auto; }
.operations-project-table th,
.operations-project-table td { padding:13px 12px; }
.operations-project-table th:nth-child(1),
.operations-project-table td:nth-child(1) { width:13%; }
.operations-project-table th:nth-child(2),
.operations-project-table td:nth-child(2) { width:13%; }
.operations-project-table th:nth-child(3),
.operations-project-table td:nth-child(3) { width:22%; }
.operations-project-table th:nth-child(4),
.operations-project-table td:nth-child(4) { width:13%; }
.operations-project-table th:nth-child(5),
.operations-project-table td:nth-child(5) { width:12%; text-align:right; }
.operations-project-table th:nth-child(6),
.operations-project-table td:nth-child(6) { width:12%; }
.operations-project-table th:nth-child(7),
.operations-project-table td:nth-child(7) { width:12%; }
.operations-project-table th:last-child,
.operations-project-table td:last-child { width:260px; }
.operations-project-table .project-name-cell { font-size:12px; }
.project-name-cell { color:#f8fafc; font-weight:700; }
.sales-cell { color:#70d9a9; font-variant-numeric:tabular-nums; white-space:nowrap; }
.expense-cell { color:#ff8585; font-variant-numeric:tabular-nums; white-space:nowrap; }
.project-status { display:inline-flex; padding:5px 8px; border-radius:999px; font-size:10px; font-weight:700; white-space:nowrap; }
.project-status-active { color:#8ee2bd; background:rgba(40,179,123,.14); }
.project-status-completed { color:#9ad1ff; background:rgba(23,137,239,.14); }
.project-status-cancelled { color:#ff9b9f; background:rgba(190,45,55,.16); }
.project-status-sample { color:#9ad1ff; background:rgba(23,137,239,.14); }
.project-status-demo { color:#c3b0ff; background:rgba(140,100,240,.16); }
.maintenance-condition, .maintenance-due { display:inline-flex; padding:5px 8px; border-radius:999px; font-size:10px; font-weight:700; white-space:nowrap; }
.maintenance-condition-good { color:#8ee2bd; background:rgba(40,179,123,.14); }
.maintenance-condition-needs-attention { color:#f5d06e; background:rgba(220,170,45,.14); }
.maintenance-condition-out-of-service { color:#ff9b9f; background:rgba(190,45,55,.16); }
.maintenance-due-scheduled { color:#9ad1ff; background:rgba(23,137,239,.14); }
.maintenance-due-due-soon { color:#f5d06e; background:rgba(220,170,45,.14); }
.maintenance-due-overdue { color:#ff9b9f; background:rgba(190,45,55,.16); }
.maintenance-due-not-scheduled { color:#aab5c2; background:rgba(120,135,150,.14); }
.maintenance-actions { display:flex; align-items:center; gap:7px; white-space:nowrap; }
.maintenance-actions form { display:flex; margin:0; }
.maintenance-action-button { display:inline-flex; align-items:center; justify-content:center; box-sizing:border-box; width:68px; min-height:32px; padding:7px 8px !important; }
.maintenance-cancel-edit { display:inline-flex; align-items:center; justify-content:center; min-height:38px; text-decoration:none; }
.maintenance-add-button { white-space:nowrap; }
.maintenance-modal[hidden] { display:none; }
.maintenance-modal { position:fixed; z-index:1050; inset:0; display:grid; place-items:center; padding:20px; }
.maintenance-modal-backdrop { position:absolute; inset:0; background:rgba(0,0,0,.72); }
.maintenance-modal-dialog { position:relative; z-index:1; width:min(820px,100%); max-height:calc(100vh - 40px); overflow:auto; padding:24px; border:1px solid #303946; border-radius:16px; background:#080d14; box-shadow:0 24px 70px rgba(0,0,0,.5); }
.maintenance-modal-header { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; margin-bottom:9px; }
.maintenance-modal-header p { margin:0 0 7px; color:#218ff4; font-size:10px; font-weight:700; letter-spacing:.14em; text-transform:uppercase; }
.maintenance-modal-header h2 { margin:0; color:#f8fafc; font:700 22px 'Manrope',sans-serif; }
.maintenance-modal-close { width:32px; height:32px; border:1px solid #475364; border-radius:8px; color:#f8fafc; background:transparent; font-size:22px; line-height:1; cursor:pointer; }
.maintenance-modal-close:hover { border-color:#ff7373; color:#fff; background:#b9353f; }
.maintenance-modal-help { margin:0 0 14px; color:#aab5c2; font-size:13px; line-height:1.5; }
.project-modal-dialog { width:min(720px,100%); }
.expense-modal-dialog { width:min(760px,100%); }
.project-modal-form { padding:0; }
.expense-modal-form { padding:0; }
.maintenance-form { grid-template-columns:repeat(3,minmax(0,1fr)); padding:0; }
.maintenance-form .inventory-description-field { grid-column:span 2; }
.maintenance-form-actions { display:flex; align-items:center; gap:10px; grid-column:1 / -1; }
.maintenance-form-actions .inventory-submit { width:auto; }
.maintenance-optional { color:#718096; font-size:10px; font-weight:400; }
.view-button { padding:6px 9px; border:1px solid #2c8ed8; border-radius:7px; color:#9ad1ff; background:rgba(23,137,239,.12); font-size:10px; font-weight:700; cursor:pointer; white-space:nowrap; }
.view-button:hover { border-color:#5ab5ff; color:#fff; background:#176da8; }
.project-view-dialog { width:min(680px,100%); }
.project-view-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.project-view-grid > div { display:grid; gap:5px; padding:13px; border:1px solid #263546; border-radius:10px; background:#0d141d; }
.project-view-grid span { color:#91a1b2; font-size:10px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; }
.project-view-grid strong { color:#f8fafc; font-size:14px; overflow-wrap:anywhere; }
.tools-modal-dialog { width:min(900px,100%); }
.tools-form { grid-template-columns:repeat(4,minmax(0,1fr)); padding:0; }
.tools-form .inventory-description-field, .tools-form .inventory-image-field { grid-column:span 2; }
.inventory-action-card > .inventory-form { display:none; }
.inventory-action-open-button { white-space:nowrap; }
.inventory-action-dialog { width:min(900px,100%); }
.inventory-action-form { grid-template-columns:repeat(4,minmax(0,1fr)); padding:0; }
.inventory-action-form.inventory-quantity-form { grid-template-columns:repeat(2,minmax(0,1fr)); }
.inventory-action-form .inventory-description-field, .inventory-action-form .inventory-image-field { grid-column:span 2; }
.inventory-action-form .maintenance-form-actions { grid-column:1 / -1; }
body.modal-open { overflow:hidden; }
.operation-actions { display:flex; align-items:center; gap:8px; white-space:nowrap; }
.operation-actions form { margin:0; }
.operation-history-table { min-width:980px; }
.operation-history-table td:nth-child(3) { width:230px; min-width:190px; max-width:260px; white-space:normal; line-height:1.35; }
.operation-history-record { display:block; color:#f8fafc; font-size:12px; }
.operation-history-table td:nth-child(2) small,
.operation-history-table td:nth-child(3) small { display:block; margin-top:4px; color:#7f8b9b; font-size:10px; }
.operation-history-details { color:#aab5c2; }
.operation-history-count { display:block; color:#f8fafc; font-size:11px; }
.operation-history-dialog { width:min(860px,100%); }
.operation-history-modal-meta { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin-bottom:16px; }
.operation-history-modal-meta span { display:grid; gap:4px; padding:11px 12px; border:1px solid #263546; border-radius:9px; background:#0d141d; }
.operation-history-modal-meta b { color:#91a1b2; font-size:9px; letter-spacing:.08em; text-transform:uppercase; }
.operation-history-modal-meta strong { color:#f8fafc; font-size:12px; overflow-wrap:anywhere; }
.operation-history-modal-help { margin:0 0 12px; color:#aab5c2; font-size:12px; }
.operation-history-timeline { position:relative; display:grid; gap:12px; max-height:45vh; overflow:auto; padding:2px 4px 2px 28px; }
.operation-history-timeline::before { position:absolute; top:8px; bottom:8px; left:10px; width:1px; background:#33485e; content:""; }
.operation-history-timeline-item { position:relative; }
.operation-history-timeline-marker { position:absolute; top:13px; left:-28px; z-index:1; display:grid; place-items:center; width:21px; height:21px; border:2px solid #2d9bf3; border-radius:50%; color:#fff; background:#102338; font-size:9px; font-weight:800; }
.operation-history-event { padding:14px; border:1px solid #263546; border-radius:10px; background:#0d141d; }
.operation-history-event h3 { margin:0 0 3px; color:#f8fafc; font:700 14px 'Manrope',sans-serif; }
.operation-history-event > small { color:#91a1b2; font-size:10px; }
.operation-history-event-message { margin:11px 0 0; color:#cbd5e1; font-size:12px; line-height:1.5; }
.operation-history-change-list { display:grid; gap:9px; margin:12px 0 0; font-size:12px; }
.operation-history-change { display:grid; gap:6px; padding:9px; border:1px solid #263546; border-radius:8px; background:rgba(5,9,15,.28); }
.operation-history-change-label { color:#91a1b2; font-size:10px; letter-spacing:.05em; text-transform:uppercase; }
.operation-history-change-values { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.operation-history-value { display:grid; gap:3px; min-width:0; padding:8px 9px; border-radius:6px; background:#111d2a; }
.operation-history-value small { color:#91a1b2; font-size:9px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; }
.operation-history-value strong { color:#f8fafc; font-size:12px; font-weight:600; overflow-wrap:anywhere; }
.operation-history-value-before { border-left:3px solid #718096; }
.operation-history-value-after { border-left:3px solid #2d9bf3; }
.operation-history-modal-empty { margin:0; color:#aab5c2; font-size:12px; }
.operation-history-badge { display:inline-flex; align-items:center; padding:5px 8px; border-radius:999px; color:#9ad1ff; background:rgba(23,137,239,.14); font-size:10px; font-weight:800; letter-spacing:.04em; text-transform:uppercase; white-space:nowrap; }
.operation-history-completed, .operation-history-reopened, .operation-history-restored { color:#8ee2bd; background:rgba(40,179,123,.14); }
.operation-history-archived, .operation-history-cancelled { color:#ff9b9f; background:rgba(190,45,55,.16); }
.edit-button, .cancel-edit-button { display:inline-flex; align-items:center; justify-content:center; padding:6px 9px; border:1px solid #2c8ed8; border-radius:7px; color:#9ad1ff; background:rgba(23,137,239,.12); font-size:10px; font-weight:700; text-decoration:none; }
.edit-button:hover, .cancel-edit-button:hover { border-color:#5ab5ff; color:#fff; background:#176da8; }
.cancel-edit-button { padding:8px 11px; font-size:11px; }
.complete-button { padding:6px 9px; border:1px solid #2ca77d; border-radius:7px; color:#8ee2bd; background:rgba(40,179,123,.14); font-size:10px; font-weight:700; cursor:pointer; white-space:nowrap; }
.complete-button:hover { border-color:#70d9a9; color:#fff; background:#16865f; }
.report-empty { padding:28px 0; color:#738798; font-size:12px; text-align:center; }
.expense-kpi strong { color:#d64545; }
.net-kpi strong { color:#168459; }
body[data-theme="dark"] .expense-kpi strong { color:#ff7373; }
body[data-theme="dark"] .net-kpi strong { color:#70d9a9; }
body[data-theme="light"] .expense-kpi strong { color:#c93636; }
body[data-theme="light"] .net-kpi strong { color:#168459; }
body[data-theme="light"] .project-name-cell { color:#243b4d; }
body[data-theme="light"] .sales-cell { color:#168459; }
body[data-theme="light"] .operations-table th,
body[data-theme="light"] .operations-table th:last-child { background:linear-gradient(135deg,#116fc4,#1687ed); }
body[data-theme="light"] .operations-table th,
body[data-theme="light"] .operations-table td { border-right-color:rgba(71,101,122,.12); }
body[data-theme="light"] .operations-table th:nth-child(1),
body[data-theme="light"] .operations-table td:nth-child(1),
body[data-theme="light"] .operations-table th:nth-child(3),
body[data-theme="light"] .operations-table td:nth-child(3),
body[data-theme="light"] .operations-table th:nth-child(6),
body[data-theme="light"] .operations-table td:nth-child(6),
body[data-theme="light"] .operations-table th:nth-child(10),
body[data-theme="light"] .operations-table td:nth-child(10),
body[data-theme="light"] .operations-table th:nth-child(13),
body[data-theme="light"] .operations-table td:nth-child(13),
body[data-theme="light"] .operations-table th:nth-child(14),
body[data-theme="light"] .operations-table td:nth-child(14) { border-left-color:rgba(20,120,201,.22); }
body[data-theme="light"] .operations-table th:last-child,
body[data-theme="light"] .operations-table td:last-child { background:#fff; box-shadow:-8px 0 14px rgba(39,76,105,.1); }
body[data-theme="light"] .operations-table tbody tr:nth-child(even) td:last-child { background:#f5f9fb; }
body[data-theme="light"] .operations-table tbody tr:hover td:last-child { background:#eaf5fb; }

/* Keep the full project record readable without forcing a horizontal scroll. */
.operations-table-scroll { overflow:visible; }
.operations-table { display:block; width:100%; min-width:0; table-layout:auto; }
.operations-table thead { display:none; }
.operations-table tbody { display:grid; gap:14px; }
.operations-table tbody tr {
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:0;
    padding:8px;
    border:1px solid #263546;
    border-radius:12px;
    background:#0d141d;
}
.operations-table tbody tr:nth-child(even) { background:#101923; }
.operations-table tbody tr:hover { box-shadow:0 8px 24px rgba(0,0,0,.2), inset 3px 0 0 #2d9bf3; }
.operations-table tbody td,
.operations-table tbody td:last-child {
    position:static;
    display:grid;
    grid-template-rows:auto auto;
    align-content:start;
    width:auto !important;
    min-width:0;
    max-width:none;
    min-height:52px;
    padding:10px 12px;
    border:0;
    border-bottom:1px solid rgba(148,163,184,.1);
    background:transparent;
    box-shadow:none;
    overflow-wrap:anywhere;
}
.operations-table tbody td::before {
    display:block;
    width:max-content;
    margin-bottom:6px;
    padding:3px 6px;
    border-left:3px solid #2d9bf3;
    border-radius:3px;
    color:#d7edff;
    background:rgba(45,155,243,.14);
    content:attr(data-label);
    font-size:11px;
    font-weight:800;
    letter-spacing:.08em;
    line-height:1.1;
    text-transform:uppercase;
}
.operations-table tbody td:nth-child(1),
.operations-table tbody td:nth-child(3),
.operations-table tbody td:nth-child(6),
.operations-table tbody td:nth-child(10),
.operations-table tbody td:nth-child(13),
.operations-table tbody td:nth-child(14) { border-left:0; }
.operations-table tbody td:nth-child(11) { text-align:left; }
.operations-table tbody td:nth-child(15) { border-bottom:0; }
.operations-table tbody td:last-child {
    grid-column:1 / -1;
    display:flex;
    align-items:center;
    gap:8px;
    min-height:0;
    padding-top:12px;
    border-top:1px solid rgba(148,163,184,.1);
}
.operations-table tbody td:last-child::before { margin:0 auto 0 0; }
.operations-table .sales-cell { white-space:nowrap; overflow-wrap:normal; }
.operations-table .operation-actions { display:flex; flex-wrap:wrap; gap:6px; white-space:normal; }
.operations-table .operation-actions .view-button,
.operations-table .operation-actions .edit-button,
.operations-table .operation-actions .complete-button,
.operations-table .operation-actions .delete-button { padding:7px 10px; font-size:10px; }
.operations-project-table tbody { gap:16px; }
.operations-project-table tbody tr {
    grid-template-columns:repeat(4,minmax(0,1fr));
    padding:0;
    overflow:hidden;
    border-color:#2b4054;
    background:linear-gradient(145deg,#102234,#0d1824);
    box-shadow:0 8px 20px rgba(0,0,0,.12);
}
.operations-project-table tbody tr:nth-child(even) {
    background:linear-gradient(145deg,#0f202f,#0c1722);
}
.operations-project-table tbody tr:hover {
    border-color:#2d9bf3;
    background:linear-gradient(145deg,#132b40,#0e1c2a);
    box-shadow:0 10px 24px rgba(0,0,0,.2),inset 3px 0 0 #2d9bf3;
}
.operations-project-table tbody td {
    min-height:0;
    padding:15px 18px 16px;
    border-bottom:1px solid rgba(148,163,184,.12);
}
.operations-project-table tbody td::before {
    margin-bottom:8px;
    padding:0;
    border-left:0;
    color:#7eb9e9;
    background:transparent;
    font-size:10px;
    letter-spacing:.1em;
}
.operations-project-table tbody .project-name-cell {
    color:#fff;
    font-size:15px;
    line-height:1.35;
}
.operations-project-table tbody .sales-cell {
    color:#76e6b3;
    font-size:14px;
}
.operations-project-table tbody td:nth-child(5) {
    text-align:left;
}
.operations-project-table tbody td:last-child {
    grid-column:1 / -1;
    justify-content:flex-end;
    min-height:0;
    padding:12px 18px;
    border-top:0;
    border-bottom:0;
    background:rgba(5,12,20,.28);
}
.operations-project-table tbody td:last-child::before {
    display:none;
}
.operations-project-table tbody td:last-child .operation-actions {
    justify-content:flex-end;
    width:100%;
}
.operations-project-table .operation-actions .view-button,
.operations-project-table .operation-actions .edit-button,
.operations-project-table .operation-actions .complete-button,
.operations-project-table .operation-actions .delete-button {
    min-width:68px;
    min-height:32px;
    padding:8px 12px;
    font-size:11px;
}
.operations-project-table .operation-actions form {
    display:flex;
}
.expense-table { display:table; width:100%; table-layout:auto; }
.expense-table thead { display:table-header-group; }
.expense-table tbody { display:table-row-group; }
.expense-table tbody tr { display:table-row; padding:0; border:0; border-radius:0; background:transparent; }
.expense-table tbody tr:nth-child(even) { background:transparent; }
.expense-table tbody td,
.expense-table tbody td:last-child {
    display:table-cell;
    width:auto !important;
    min-height:0;
    padding:9px 7px;
    border:0;
    border-right:1px solid rgba(148,163,184,.08);
    border-bottom:1px solid rgba(148,163,184,.1);
    background:transparent;
    box-shadow:none;
}
.expense-table tbody td::before { display:none; }
.expense-table tbody td:last-child {
    display:table-cell;
    border-top:0;
}
.expense-table tbody td:nth-child(1) { min-width:180px; }
.expense-table tbody td:nth-child(2) { min-width:160px; }
.expense-table tbody td:nth-child(3) { min-width:125px; white-space:nowrap; }
.expense-table tbody td:nth-child(4) { min-width:130px; white-space:nowrap; }
.expense-table tbody td:nth-child(5) { min-width:100px; }
.expense-table .operation-actions { display:flex; flex-wrap:wrap; gap:6px; white-space:normal; }
.expense-table .operation-actions .edit-button,
.expense-table .operation-actions .delete-button {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:70px;
    min-height:32px;
    box-sizing:border-box;
    margin:0;
    padding:7px 10px;
}
.expense-table .operation-actions form {
    display:flex;
    flex:0 0 70px;
    width:70px;
    margin:0;
}
.expense-table .operation-actions form .delete-button { width:100%; }
.project-search-row {
    display:flex;
    align-items:center;
    gap:12px;
    margin:0 0 16px;
    padding:12px 14px;
    border:1px solid #263546;
    border-radius:10px;
    background:#0d141d;
}
.project-search-row label { color:#d9e8f5; font-size:12px; font-weight:800; white-space:nowrap; }
.project-search-row input {
    flex:1;
    min-width:0;
    padding:10px 12px;
    border:1px solid #3c5268;
    border-radius:8px;
    outline:0;
    color:#f8fafc;
    background:#111d2a;
    font:inherit;
    font-size:12px;
}
.project-search-row input::placeholder { color:#8fa4b8; }
.project-search-row input:focus { border-color:#2d9bf3; box-shadow:0 0 0 3px rgba(45,155,243,.14); }
.project-search-row span { color:#8fc8f5; font-size:11px; font-weight:700; white-space:nowrap; }
.project-pagination {
    display:flex;
    align-items:center;
    justify-content:center;
    gap:12px;
    margin-top:18px;
}
.project-pagination button {
    padding:8px 13px;
    border:1px solid #2c8ed8;
    border-radius:7px;
    color:#b9ddfa;
    background:rgba(23,137,239,.12);
    font-size:11px;
    font-weight:800;
    cursor:pointer;
}
.project-pagination button:hover:not(:disabled) { color:#fff; background:#176da8; }
.project-pagination button:disabled { cursor:not-allowed; opacity:.4; }
.project-pagination span { min-width:90px; color:#d7edff; font-size:11px; font-weight:800; text-align:center; }
.project-pagination[hidden] { display:none; }
.operations-table tbody tr[hidden] { display:none; }
.operations-table tbody td { color:#d7e5f0; font-size:12px; font-weight:500; }
.operations-table tbody td::before { color:#9cc1dd; }
.operations-table tbody td:nth-child(1),
.operations-table tbody td:nth-child(2) { color:#b9ddfa; font-weight:700; }
.operations-table tbody .project-name-cell { color:#ffffff; font-size:13px; font-weight:800; }
.operations-table tbody .sales-cell { color:#76e6b3; font-size:13px; font-weight:800; }
.operations-table tbody .project-status { font-weight:800; }
body[data-theme="light"] .project-search-row { border-color:#d5e0e7; background:#f5f9fb; }
body[data-theme="light"] .project-search-row label { color:#30485d; }
body[data-theme="light"] .project-search-row input { border-color:#b8cad8; color:#142235; background:#fff; }
body[data-theme="light"] .project-search-row input::placeholder { color:#718394; }
body[data-theme="light"] .project-search-row span { color:#116bb4; }
body[data-theme="light"] .project-pagination button { border-color:#9fc9e7; color:#116bb4; background:#edf7ff; }
body[data-theme="light"] .project-pagination button:hover:not(:disabled) { color:#fff; background:#1478c9; }
body[data-theme="light"] .project-pagination span { color:#30485d; }
body[data-theme="light"] .operations-table tbody td { color:#30485d; }
body[data-theme="light"] .operations-table tbody td::before { color:#5d7890; }
body[data-theme="light"] .operations-table tbody td:nth-child(1),
body[data-theme="light"] .operations-table tbody td:nth-child(2) { color:#116bb4; }
body[data-theme="light"] .operations-table tbody .project-name-cell { color:#183247; }
body[data-theme="light"] .operations-table tbody tr {
    border-color:#d5e0e7;
    background:#fff;
}
body[data-theme="light"] .operations-table tbody tr:nth-child(even) { background:#f5f9fb; }
body[data-theme="light"] .operations-table tbody td::before {
    border-left-color:#1478c9;
    color:#116bb4;
    background:#eaf5ff;
}
body[data-theme="light"] .operations-table tbody td { border-bottom-color:#e3e9ef; }
body[data-theme="light"] .operations-table tbody td:last-child { border-top-color:#e3e9ef; }
body[data-theme="light"] .operations-project-table tbody tr,
body[data-theme="light"] .operations-project-table tbody tr:nth-child(even) {
    border-color:#cddce8;
    background:linear-gradient(145deg,#fff,#f4f9fc);
    box-shadow:0 8px 20px rgba(39,76,105,.08);
}
body[data-theme="light"] .operations-project-table tbody tr:hover {
    border-color:#2d9bf3;
    background:linear-gradient(145deg,#fff,#eef8ff);
}
body[data-theme="light"] .operations-project-table tbody .project-name-cell { color:#183247; }
body[data-theme="light"] .operations-project-table tbody td::before { color:#116bb4; background:transparent; }
body[data-theme="light"] .operations-project-table tbody td:last-child { background:rgba(224,239,249,.58); }

@media (max-width:900px) {
    .operations-table tbody tr { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .project-search-row { align-items:stretch; flex-direction:column; gap:7px; }
    .project-search-row input { width:100%; }
}

@media (max-width:560px) {
    .operations-table tbody tr { grid-template-columns:1fr; }
}
body[data-theme="light"] .expense-cell { color:#c93636; }
body[data-theme="light"] .project-status-active { color:#14764f; background:#e2f7ed; }
body[data-theme="light"] .project-status-completed { color:#116bb4; background:#edf7ff; }
body[data-theme="light"] .project-status-cancelled { color:#a9333d; background:#fff0f0; }
body[data-theme="light"] .project-status-sample { color:#116bb4; background:#edf7ff; }
body[data-theme="light"] .project-status-demo { color:#6950ad; background:#f1edff; }
body[data-theme="light"] .maintenance-condition-good { color:#14764f; background:#e2f7ed; }
body[data-theme="light"] .maintenance-condition-needs-attention { color:#876300; background:#fff7dc; }
body[data-theme="light"] .maintenance-condition-out-of-service { color:#a9333d; background:#fff0f0; }
body[data-theme="light"] .maintenance-due-scheduled { color:#116bb4; background:#edf7ff; }
body[data-theme="light"] .maintenance-due-due-soon { color:#876300; background:#fff7dc; }
body[data-theme="light"] .maintenance-due-overdue { color:#a9333d; background:#fff0f0; }
body[data-theme="light"] .maintenance-due-not-scheduled { color:#617084; background:#eef2f5; }
body[data-theme="light"] .maintenance-modal-dialog { border-color:#cbd7e0; background:#f8fafb; }
body[data-theme="light"] .maintenance-modal-header h2 { color:#243b4d; }
body[data-theme="light"] .maintenance-modal-close { border-color:#b7c7d3; color:#243b4d; }
body[data-theme="light"] .maintenance-modal-help { color:#617084; }
body[data-theme="light"] .view-button { border-color:#a9c8df; color:#1266a4; background:#edf7ff; }
body[data-theme="light"] .view-button:hover { border-color:#1678c7; color:#fff; background:#1678c7; }
body[data-theme="light"] .project-view-grid > div { border-color:#d7e0e9; background:#fff; }
body[data-theme="light"] .project-view-grid span { color:#718394; }
body[data-theme="light"] .project-view-grid strong { color:#243b4d; }
body[data-theme="light"] .maintenance-optional { color:#718096; }
@media (max-width:900px) {
    .maintenance-form { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .tools-form { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .inventory-action-form { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .inventory-action-form.inventory-quantity-form { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:760px) {
    .maintenance-modal { padding:12px; }
    .maintenance-modal-dialog { max-height:calc(100vh - 24px); padding:18px; }
    .operation-history-modal-meta { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .operation-history-change-values { grid-template-columns:1fr; }
    .inventory-panel-actions { width:100%; flex-wrap:wrap; gap:8px; }
    .inventory-panel-actions .inventory-action-open-button { flex:1 1 auto; }
    .maintenance-form { grid-template-columns:1fr; }
    .maintenance-form .inventory-description-field { grid-column:auto; }
    .tools-form { grid-template-columns:1fr; }
    .tools-form .inventory-description-field, .tools-form .inventory-image-field { grid-column:auto; }
    .inventory-action-form, .inventory-action-form.inventory-quantity-form { grid-template-columns:1fr; }
    .inventory-action-form .inventory-description-field, .inventory-action-form .inventory-image-field { grid-column:auto; }
    .maintenance-form-actions { flex-direction:column; align-items:stretch; }
    .maintenance-form-actions .inventory-submit { width:100%; }
}
body[data-theme="light"] .operation-history-record { color:#245878; }
body[data-theme="light"] .operation-history-table td:nth-child(2) small,
body[data-theme="light"] .operation-history-details { color:#617084; }
body[data-theme="light"] .operation-history-modal-meta span,
body[data-theme="light"] .operation-history-event { border-color:#d7e0e9; background:#fff; }
body[data-theme="light"] .operation-history-change { border-color:#d7e0e9; background:#f8fafb; }
body[data-theme="light"] .operation-history-modal-meta b,
body[data-theme="light"] .operation-history-event > small,
body[data-theme="light"] .operation-history-change-label,
body[data-theme="light"] .operation-history-value small { color:#718394; }
body[data-theme="light"] .operation-history-modal-meta strong,
body[data-theme="light"] .operation-history-event h3,
body[data-theme="light"] .operation-history-value strong { color:#243b4d; }
body[data-theme="light"] .operation-history-value { background:#fff; }
body[data-theme="light"] .operation-history-event-message,
body[data-theme="light"] .operation-history-modal-empty,
body[data-theme="light"] .operation-history-modal-help { color:#617084; }
body[data-theme="light"] .operation-history-count { color:#243b4d; }
body[data-theme="light"] .operation-history-timeline::before { background:#cbd7e0; }
body[data-theme="light"] .operation-history-timeline-marker { color:#116bb4; background:#edf7ff; }
body[data-theme="light"] .operation-history-badge { color:#116bb4; background:#edf7ff; }
body[data-theme="light"] .operation-history-completed,
body[data-theme="light"] .operation-history-reopened,
body[data-theme="light"] .operation-history-restored { color:#14764f; background:#e2f7ed; }
body[data-theme="light"] .operation-history-archived, body[data-theme="light"] .operation-history-cancelled { color:#a9333d; background:#fff0f0; }
body[data-theme="light"] .edit-button, body[data-theme="light"] .cancel-edit-button { border-color:#9fc9e7; color:#116bb4; background:#edf7ff; }
body[data-theme="light"] .edit-button:hover, body[data-theme="light"] .cancel-edit-button:hover { border-color:#1478c9; color:#fff; background:#1478c9; }
body[data-theme="light"] .complete-button { border-color:#86c9aa; color:#14764f; background:#e2f7ed; }
body[data-theme="light"] .complete-button:hover { border-color:#168459; color:#fff; background:#168459; }
body[data-theme="light"] .report-empty { color:#617084; }

@media print {
    .workspace-bar, .workspace-drawer, .drawer-backdrop, .admin-topbar, .report-filters, .report-export-actions,
    .inventory-panel-actions, .inventory-report-actions, .employee-report-actions, .inventory-filter-form, .theme-toggle, .workspace-signout,
    .inventory-view-footer, .inventory-table th:last-child, .inventory-table td:last-child,
    .employee-data-topbar, .employee-data-hero, .employee-notice, .employee-data-panel { display:none !important; }
    .workspace-content, .report-content { display:none !important; }
    .report-page, .workspace-page, .employee-data-page { background:#fff !important; color:#111 !important; padding:0 !important; }
    .workspace-shell { width:100% !important; min-height:0 !important; margin:0 !important; overflow:visible !important; border:0 !important; border-radius:0 !important; background:#fff !important; box-shadow:none !important; }
    .employee-data-shell { width:100% !important; min-height:0 !important; margin:0 !important; overflow:visible !important; border:0 !important; border-radius:0 !important; background:#fff !important; }
    .print-report { display:block !important; padding:0; color:#172b3d; background:#fff; font-family:Arial,sans-serif; }
    .print-report-header { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; padding-bottom:18px; border-bottom:3px solid #1789ef; }
    .print-report-header h1 { margin:2px 0 5px; color:#123b5b; font-size:28px; }
    .print-report-header p { margin:0; color:#60758a; font-size:11px; }
    .print-kicker { color:#1789ef !important; font-size:10px !important; font-weight:700; letter-spacing:1.5px; text-transform:uppercase; }
    .print-report-date { color:#60758a; font-size:10px; }
    .print-kpi-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; margin:18px 0; }
    .print-kpi-grid > div { padding:12px; border:1px solid #cedae3; border-radius:7px; background:#f4f8fb; }
    .print-kpi-grid span { display:block; color:#60758a; font-size:10px; }
    .print-kpi-grid strong { display:block; margin-top:5px; color:#123b5b; font-size:17px; }
    .print-report-grid { display:grid; grid-template-columns:1.3fr .7fr; gap:14px; margin-bottom:14px; }
    .print-report-card { margin-bottom:14px; padding:14px; border:1px solid #cedae3; border-radius:7px; break-inside:avoid; }
    .print-report-card h2 { margin:0 0 12px; color:#123b5b; font-size:14px; }
    .print-bars { display:flex; align-items:flex-end; gap:12px; height:145px; border-bottom:1px solid #cedae3; }
    .print-bar-group { display:flex; flex:1; min-width:0; height:100%; align-items:center; justify-content:flex-end; gap:4px; flex-direction:column; }
    .print-bar-pair { display:flex; align-items:flex-end; justify-content:center; gap:3px; width:100%; height:100%; }
    .print-bar { display:block; width:12px; min-height:2px; border-radius:3px 3px 0 0; }
    .print-bar.sales { background:#1789ef; }
    .print-bar.expenses { background:#d64545; }
    .print-bar.profit { background:#2ca77d; }
    .print-bar-group strong { color:#60758a; font-size:9px; white-space:nowrap; }
    .print-bar-group small { color:#8a9aa7; font-size:8px; }
    .print-legend { color:#60758a; font-size:9px; }
    .sales-dot, .expenses-dot { display:inline-block; width:8px; height:8px; margin-right:3px; background:#1789ef; }
    .expenses-dot { margin-left:10px; background:#d64545; }
    .print-target { height:12px; overflow:hidden; border-radius:8px; background:#e3ebf1; }
    .print-target span { display:block; height:100%; background:#2ca77d; }
    .print-target-value { margin:7px 0 18px; color:#60758a; font-size:10px; }
    .print-ranking, .print-status-row { display:grid; grid-template-columns:1fr auto; gap:10px; align-items:center; margin:8px 0; color:#405d73; font-size:10px; }
    .print-ranking strong, .print-status-row strong { color:#123b5b; }
    .print-status-row i { grid-column:1 / -1; height:7px; overflow:hidden; border-radius:5px; background:#e3ebf1; }
    .print-status-row i b { display:block; height:100%; background:#1789ef; }
    .print-table { width:100%; border-collapse:collapse; font-size:9px; }
    .print-table th { color:#fff; background:#145486; font-weight:700; text-align:left; }
    .print-table th, .print-table td { padding:7px 6px; border:1px solid #d5e0e7; }
    .print-table td:nth-child(n+4) { text-align:right; }
    .print-muted { color:#738798; font-size:10px; }
}
body[data-theme="light"] .operations-tabs { border-color:#cbd7e0; background:#f8fafb; }
body[data-theme="light"] .operations-tab { color:#617084; }
body[data-theme="light"] .operations-tab:hover { color:#245878; background:#edf2f5; }
body[data-theme="light"] .operations-tab.active { color:#fff; background:#1478c9; }
@media (max-width:900px) { .operations-form { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:620px) { .operations-form { grid-template-columns:1fr; } .operations-form .inventory-submit { grid-column:auto; } }
@media (max-width:760px) { .operations-tabs { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); } .operations-tab { min-width:0; } }
@media (max-width:420px) { .operations-tabs { grid-template-columns:1fr; } }

/* Operations project list follows the shared horizontal data-table pattern. */
.operations-project-table-scroll {
    overflow-x:auto;
}
.operations-project-table {
    display:table;
    width:100%;
    min-width:1900px;
    table-layout:fixed;
    border-collapse:collapse;
    border-spacing:0;
    font-size:12px;
}
.operations-project-table thead {
    display:table-header-group;
}
.operations-project-table thead th {
    display:table-cell;
    position:sticky;
    top:0;
    z-index:2;
    padding:13px 14px;
    border:0;
    color:#fff;
    background:linear-gradient(110deg,#0755b8,#1687ed 62%,#0c6fd0);
    font-size:11px;
    font-weight:700;
    letter-spacing:.04em;
    line-height:1.35;
    text-align:left;
    white-space:nowrap;
}
.operations-project-table tbody {
    display:table-row-group;
}
.operations-project-table tbody tr,
.operations-project-table tbody tr:nth-child(even),
.operations-project-table tbody tr:hover {
    display:table-row;
    padding:0;
    border:0;
    border-radius:0;
    background:#0d141d;
    box-shadow:none;
}
.operations-project-table tbody tr:nth-child(even) {
    background:#101923;
}
.operations-project-table tbody tr:hover {
    background:rgba(23,137,239,.08);
    box-shadow:inset 3px 0 0 #2d9bf3;
}
.operations-project-table tbody td,
.operations-project-table tbody td:last-child {
    display:table-cell;
    width:auto !important;
    min-width:0;
    min-height:0;
    padding:15px 16px;
    border:0;
    border-bottom:1px solid #202731;
    background:transparent;
    box-shadow:none;
    color:#d7e5f0;
    font-size:12px;
    line-height:1.45;
    vertical-align:middle;
    overflow-wrap:anywhere;
}
.operations-project-table tbody td::before,
.operations-project-table tbody td:last-child::before {
    display:none;
}
.operations-project-table th:nth-child(1),
.operations-project-table td:nth-child(1) { width:8% !important; }
.operations-project-table th:nth-child(2),
.operations-project-table td:nth-child(2) { width:8% !important; }
.operations-project-table th:nth-child(3),
.operations-project-table td:nth-child(3) { width:11% !important; }
.operations-project-table th:nth-child(4),
.operations-project-table td:nth-child(4) { width:8% !important; }
.operations-project-table th:nth-child(5),
.operations-project-table td:nth-child(5) { width:7% !important; }
.operations-project-table th:nth-child(6),
.operations-project-table td:nth-child(6) { width:8% !important; }
.operations-project-table th:nth-child(7),
.operations-project-table td:nth-child(7) { width:13% !important; }
.operations-project-table th:nth-child(8),
.operations-project-table td:nth-child(8) { width:11% !important; }
.operations-project-table th:nth-child(9),
.operations-project-table td:nth-child(9) { width:12% !important; }
.operations-project-table th:nth-child(10),
.operations-project-table td:nth-child(10) { width:9% !important; }
.operations-project-table th:nth-child(11),
.operations-project-table td:nth-child(11) { width:8% !important; text-align:right; }
.operations-project-table th:nth-child(12),
.operations-project-table td:nth-child(12) { width:6% !important; }
.operations-project-table th:nth-child(13),
.operations-project-table td:nth-child(13) { width:7% !important; }
.operations-project-table th:nth-child(14),
.operations-project-table td:nth-child(14) { width:8% !important; }
.operations-project-table th:nth-child(15),
.operations-project-table td:nth-child(15) { width:8% !important; }
.operations-project-table th:last-child,
.operations-project-table td:last-child {
    width:130px !important;
    border-left:0;
    text-align:left;
}
.operations-project-table tbody .project-name-cell {
    color:#f8fafc;
    font-size:13px;
    font-weight:700;
}
.operations-project-table tbody .sales-cell {
    color:#70d9a9;
    font-size:13px;
    font-weight:700;
    text-align:right;
}
.operations-project-table .operation-actions {
    padding:10px 12px !important;
    text-align:center !important;
    white-space:normal;
}
.operation-menu {
    position:relative;
    display:inline-block;
    width:100%;
    text-align:left;
}
.shared-action-menu {
    position:relative;
    display:inline-block;
    width:100%;
    text-align:left;
}
.operation-menu summary {
    display:flex;
    align-items:center;
    justify-content:center;
    min-height:34px;
    padding:8px 12px;
    border:1px solid #2c8ed8;
    border-radius:8px;
    color:#b9ddfa;
    background:rgba(23,137,239,.12);
    font-size:11px;
    font-weight:800;
    cursor:pointer;
    list-style:none;
}
.shared-action-menu summary {
    display:flex;
    align-items:center;
    justify-content:center;
    min-height:34px;
    padding:8px 12px;
    border:1px solid #2c8ed8;
    border-radius:8px;
    color:#b9ddfa;
    background:rgba(23,137,239,.12);
    font-size:11px;
    font-weight:800;
    cursor:pointer;
    list-style:none;
}
.shared-action-menu summary::after {
    margin-left:8px;
    content:'▾';
    color:#8ec9ff;
}
.shared-action-menu summary::-webkit-details-marker { display:none; }
.shared-action-menu[open] summary {
    border-color:#5ab5ff;
    color:#fff;
    background:#176da8;
}
.shared-action-menu .operation-menu-list {
    position:absolute;
    top:calc(100% + 6px);
    right:0;
}
.shared-action-menu .action-links {
    display:grid;
    gap:6px;
    width:100%;
}
.shared-action-menu .action-links form {
    display:block;
    width:100%;
    margin:0;
}
.shared-action-menu .action-links .action-link {
    display:flex;
    align-items:center;
    justify-content:center;
    width:100%;
    min-width:134px;
    height:34px;
    box-sizing:border-box;
    margin:0;
    padding:0 12px;
    font-size:11px;
    line-height:1;
    text-align:center;
}
.operation-menu summary::-webkit-details-marker { display:none; }
.operation-menu summary::after {
    margin-left:8px;
    content:'▾';
    color:#8ec9ff;
    font-size:12px;
}
.operation-menu[open] summary {
    border-color:#5ab5ff;
    color:#fff;
    background:#176da8;
}
.operation-menu-list {
    position:absolute;
    z-index:10;
    bottom:calc(100% + 6px);
    right:0;
    display:grid;
    gap:6px;
    width:150px;
    min-width:150px;
    padding:8px;
    border:1px solid #30485d;
    border-radius:10px;
    background:#0b141f;
    box-shadow:0 12px 28px rgba(0,0,0,.35);
}
.operation-menu-list.is-floating {
    position:fixed;
    top:auto;
    right:auto;
    bottom:auto;
    left:auto;
    z-index:2000;
}
.operation-menu-list .view-button,
.operation-menu-list .edit-button,
.operation-menu-list .complete-button,
.operation-menu-list .delete-button {
    display:flex;
    align-items:center;
    justify-content:center;
    width:100%;
    min-width:134px;
    height:34px;
    box-sizing:border-box;
    margin:0;
    padding:0 12px;
    font-size:11px;
    line-height:1;
    text-align:center;
    white-space:nowrap;
}
.operation-menu-list .view-button,
.operation-menu-list .edit-button,
.operation-menu-list .complete-button,
.operation-menu-list .delete-button {
    border-radius:8px;
    font-weight:800;
}
.operation-menu-list .view-button {
    border-color:#2c8ed8;
    color:#9ad1ff;
    background:#102a40;
}
.operation-menu-list .view-button:hover {
    color:#fff;
    background:#176da8;
}
.operation-menu-list .edit-button {
    border-color:#b28a37;
    color:#ffd77c;
    background:#4d3917;
}
.operation-menu-list .edit-button:hover {
    color:#fff3c7;
    background:#70521c;
}
.operation-menu-list .complete-button {
    border-color:#2ca77d;
    color:#8ee2bd;
    background:#123d32;
}
.operation-menu-list .complete-button:hover {
    color:#d5ffe9;
    background:#16865f;
}
.operation-menu-list .delete-button {
    border-color:#d64545;
    color:#ffb0b3;
    background:#57232b;
}
.operation-menu-list .delete-button:hover {
    color:#fff;
    background:#b9353f;
}
.operation-menu-list form {
    display:block;
    width:100%;
    height:34px;
    margin:0;
}
.operation-menu-list form > button {
    width:100%;
    height:34px;
}
body[data-theme="light"] .operation-menu summary {
    border-color:#9fc9e7;
    color:#116bb4;
    background:#edf7ff;
}
body[data-theme="light"] .shared-action-menu summary {
    border-color:#9fc9e7;
    color:#116bb4;
    background:#edf7ff;
}
body[data-theme="light"] .operation-menu-list {
    border-color:#cddce8;
    background:#fff;
    box-shadow:0 12px 28px rgba(39,76,105,.18);
}
body[data-theme="light"] .operation-menu-list .view-button {
    border-color:#9fc9e7;
    color:#116bb4;
    background:#edf7ff;
}
body[data-theme="light"] .operation-menu-list .edit-button {
    border-color:#d6b66c;
    color:#805d08;
    background:#fff7dc;
}
body[data-theme="light"] .operation-menu-list .complete-button {
    border-color:#7ac8a7;
    color:#14764f;
    background:#e2f7ed;
}
body[data-theme="light"] .operation-menu-list .delete-button {
    border-color:#e08a91;
    color:#a9333d;
    background:#fff0f0;
}
body[data-theme="light"] .operations-project-table tbody tr,
body[data-theme="light"] .operations-project-table tbody tr:nth-child(even) {
    background:#fff;
}
body[data-theme="light"] .operations-project-table tbody tr:nth-child(even) {
    background:#f5f9fb;
}
body[data-theme="light"] .operations-project-table tbody tr:hover {
    background:#eef7ff;
}
body[data-theme="light"] .operations-project-table tbody td {
    border-bottom-color:#e3e9ef;
    color:#30485d;
}
body[data-theme="light"] .operations-project-table tbody .project-name-cell {
    color:#183247;
}

/* Keep every table action menu aligned with the Operations reference. */
.operation-menu summary,
.shared-action-menu summary {
    min-height:42px;
    box-sizing:border-box;
    padding:10px 12px;
}
.operation-menu-list,
.shared-action-menu .operation-menu-list {
    width:168px;
    min-width:168px;
    padding:8px;
    gap:6px;
    grid-template-columns:1fr;
}
.operation-menu-list .view-button,
.operation-menu-list .edit-button,
.operation-menu-list .complete-button,
.operation-menu-list .delete-button,
.shared-action-menu .operation-menu-list .cash-button,
.shared-action-menu .operation-menu-list .reim-button,
.shared-action-menu .operation-menu-list .action-link {
    display:flex;
    align-items:center;
    justify-content:center;
    width:100%;
    min-width:0;
    height:42px;
    box-sizing:border-box;
    margin:0;
    padding:0 12px;
    border-radius:8px;
    font-size:12px;
    font-weight:800;
    line-height:1;
    text-align:center;
    text-decoration:none;
    white-space:nowrap;
}
.operation-menu-list .edit-button {
    border-color:#2c8ed8;
    color:#9ad1ff;
    background:#102a40;
}
.operation-menu-list .edit-button:hover {
    color:#fff;
    background:#176da8;
}
body[data-theme="light"] .operation-menu-list .edit-button {
    border-color:#9fc9e7;
    color:#116bb4;
    background:#edf7ff;
}
.shared-action-menu .operation-menu-list form {
    display:block;
    width:100%;
    height:42px;
    margin:0;
}
.shared-action-menu .operation-menu-list form > button {
    width:100%;
    height:42px;
}
.shared-action-menu .operation-menu-list .cash-action-view,
.shared-action-menu .operation-menu-list .cash-action-edit,
.shared-action-menu .operation-menu-list .reim-action-view,
.shared-action-menu .operation-menu-list .reim-action-edit,
.shared-action-menu .operation-menu-list .action-link-view,
.shared-action-menu .operation-menu-list .action-link-edit {
    border:1px solid #2c8ed8;
    color:#9ad1ff;
    background:#102a40;
}
.shared-action-menu .operation-menu-list .cash-action-view:hover,
.shared-action-menu .operation-menu-list .cash-action-edit:hover,
.shared-action-menu .operation-menu-list .reim-action-view:hover,
.shared-action-menu .operation-menu-list .reim-action-edit:hover,
.shared-action-menu .operation-menu-list .action-link-view:hover,
.shared-action-menu .operation-menu-list .action-link-edit:hover {
    color:#fff;
    background:#176da8;
}
.shared-action-menu .operation-menu-list .reim-action-approve,
.shared-action-menu .operation-menu-list .cash-button-accept,
.shared-action-menu .operation-menu-list .reim-action-complete {
    border:1px solid #2ca77d;
    color:#8ee2bd;
    background:#123d32;
}
.shared-action-menu .operation-menu-list .reim-action-approve:hover,
.shared-action-menu .operation-menu-list .cash-button-accept:hover,
.shared-action-menu .operation-menu-list .reim-action-complete:hover {
    color:#d5ffe9;
    background:#16865f;
}
.shared-action-menu .operation-menu-list .cash-button-danger,
.shared-action-menu .operation-menu-list .reim-action-delete,
.shared-action-menu .operation-menu-list .action-link-delete {
    border:1px solid #d64545;
    color:#ffb0b3;
    background:#57232b;
}
.shared-action-menu .operation-menu-list .cash-button-danger:hover,
.shared-action-menu .operation-menu-list .reim-action-delete:hover,
.shared-action-menu .operation-menu-list .action-link-delete:hover {
    color:#fff;
    background:#b9353f;
}
body[data-theme="light"] .shared-action-menu .operation-menu-list .cash-action-view,
body[data-theme="light"] .shared-action-menu .operation-menu-list .cash-action-edit,
body[data-theme="light"] .shared-action-menu .operation-menu-list .reim-action-view,
body[data-theme="light"] .shared-action-menu .operation-menu-list .reim-action-edit,
body[data-theme="light"] .shared-action-menu .operation-menu-list .action-link-view,
body[data-theme="light"] .shared-action-menu .operation-menu-list .action-link-edit {
    border-color:#2c8ed8;
    color:#116bb4;
    background:#edf7ff;
}
body[data-theme="light"] .shared-action-menu .operation-menu-list .reim-action-approve,
body[data-theme="light"] .shared-action-menu .operation-menu-list .cash-button-accept,
body[data-theme="light"] .shared-action-menu .operation-menu-list .reim-action-complete {
    border-color:#7ac8a7;
    color:#14764f;
    background:#e2f7ed;
}
body[data-theme="light"] .shared-action-menu .operation-menu-list .cash-button-danger,
body[data-theme="light"] .shared-action-menu .operation-menu-list .reim-action-delete,
body[data-theme="light"] .shared-action-menu .operation-menu-list .action-link-delete {
    border-color:#e08a91;
    color:#a9333d;
    background:#fff0f0;
}

/* Floating menus are reparented to body, so their styles cannot depend on the trigger ancestor. */
.operation-menu-list .action-links {
    display:grid;
    grid-template-columns:1fr;
    gap:6px;
    width:100%;
}
.operation-menu-list form {
    display:block;
    width:100%;
    height:42px;
    margin:0;
}
.operation-menu-list form > button {
    width:100%;
    height:42px;
}
.operation-menu-list .cash-button,
.operation-menu-list .reim-button,
.operation-menu-list .action-link {
    display:flex;
    align-items:center;
    justify-content:center;
    width:100%;
    min-width:0;
    height:42px;
    box-sizing:border-box;
    margin:0;
    padding:0 12px;
    border-radius:8px;
    font-size:12px;
    font-weight:800;
    line-height:1;
    text-align:center;
    text-decoration:none;
    white-space:nowrap;
}
.operation-menu-list .cash-action-view,
.operation-menu-list .cash-action-edit,
.operation-menu-list .reim-action-view,
.operation-menu-list .reim-action-edit,
.operation-menu-list .action-link-view,
.operation-menu-list .action-link-edit {
    border:1px solid #2c8ed8;
    color:#9ad1ff;
    background:#102a40;
}
.operation-menu-list .reim-action-approve,
.operation-menu-list .cash-button-accept,
.operation-menu-list .reim-action-complete {
    border:1px solid #2ca77d;
    color:#8ee2bd;
    background:#123d32;
}
.operation-menu-list .cash-button-danger,
.operation-menu-list .reim-action-delete,
.operation-menu-list .action-link-delete {
    border:1px solid #d64545;
    color:#ffb0b3;
    background:#57232b;
}

@media (max-width:1200px) {
    .operations-project-table-scroll {
        overflow:visible;
    }
    .operations-project-table {
        min-width:0;
        table-layout:auto;
    }
    .operations-project-table thead {
        display:none;
    }
    .operations-project-table tbody {
        display:grid;
        gap:14px;
    }
    .operations-project-table tbody tr,
    .operations-project-table tbody tr:nth-child(even),
    .operations-project-table tbody tr:hover {
        display:grid;
        grid-template-columns:repeat(3,minmax(0,1fr));
        padding:0;
        border:1px solid #263546;
        border-radius:12px;
        background:#0d141d;
        box-shadow:none;
    }
    .operations-project-table tbody tr:nth-child(even) {
        background:#101923;
    }
    .operations-project-table tbody tr:hover {
        background:rgba(23,137,239,.08);
        box-shadow:inset 3px 0 0 #2d9bf3;
    }
    .operations-project-table tbody td,
    .operations-project-table tbody td:last-child {
        display:grid;
        grid-template-rows:auto auto;
        align-content:start;
        width:auto !important;
        min-height:72px;
        padding:13px 15px;
        border:0;
        border-bottom:1px solid rgba(148,163,184,.1);
        background:transparent;
        box-shadow:none;
        overflow-wrap:anywhere;
    }
    .operations-project-table tbody td::before {
        display:block;
        width:max-content;
        margin-bottom:7px;
        color:#7eb9e9;
        content:attr(data-label);
        font-size:10px;
        font-weight:800;
        letter-spacing:.08em;
        line-height:1.1;
        text-transform:uppercase;
    }
    .operations-project-table tbody td:last-child {
        grid-column:1 / -1;
        display:flex;
        align-items:center;
        min-height:0;
        border-top:1px solid rgba(148,163,184,.1);
        border-bottom:0;
    }
    .operations-project-table tbody td:last-child::before {
        display:none;
    }
    .operations-project-table .operation-actions {
        width:100%;
    }
    .operations-project-table .operation-menu-list {
        position:absolute;
        bottom:calc(100% + 6px);
        right:auto;
        left:0;
    }
    body[data-theme="light"] .operations-project-table tbody tr,
    body[data-theme="light"] .operations-project-table tbody tr:nth-child(even) {
        background:#fff;
    }
    body[data-theme="light"] .operations-project-table tbody tr:nth-child(even) {
        background:#f5f9fb;
    }
    body[data-theme="light"] .operations-project-table tbody td {
        border-bottom-color:#e3e9ef;
        color:#30485d;
    }
}

@media (max-width:700px) {
    .operations-project-table tbody tr {
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
}

@media (max-width:480px) {
    .operations-project-table tbody tr {
        grid-template-columns:1fr;
    }
}
@media (max-width:700px) { .reservation-heading { display:block; text-align:center; } .reservation-open-button { width:100%; margin-top:18px; } .reservation-form { grid-template-columns:1fr; } .reservation-notes-field, .reservation-submit { grid-column:auto; } .reservation-item-row { grid-template-columns:1fr 1fr; } .reservation-remove-item { grid-column:1 / -1; } .reservation-readonly { text-align:center; } }
.signout-modal[hidden] { display:none; }
.signout-modal { position:fixed; z-index:1200; inset:0; display:grid; place-items:center; padding:20px; }
.signout-modal-backdrop { position:absolute; inset:0; background:rgba(0,0,0,.72); }
.signout-modal-dialog { position:relative; z-index:1; display:grid; grid-template-columns:auto 1fr; gap:4px 14px; width:min(430px,100%); padding:24px; border:1px solid #3a2630; border-radius:16px; background:#0b1018; box-shadow:0 24px 70px rgba(0,0,0,.5); }
.signout-modal-icon { display:grid; grid-row:span 2; place-items:center; width:38px; height:38px; border:1px solid #e05b63; border-radius:50%; color:#ff9b9f; background:rgba(190,45,55,.18); font-size:20px; font-weight:800; }
.signout-modal-copy h2 { margin:0 0 6px; color:#f8fafc; font:700 18px 'Manrope',sans-serif; }
.signout-modal-copy p { margin:0; color:#aab5c2; font-size:13px; line-height:1.5; }
.signout-modal-actions { display:flex; grid-column:2; justify-content:flex-end; gap:10px; margin-top:18px; }
.signout-modal-cancel, .signout-modal-confirm { padding:10px 15px; border-radius:8px; font-size:12px; font-weight:700; cursor:pointer; }
.signout-modal-cancel { border:1px solid #3b4655; color:#cbd5e1; background:transparent; }
.signout-modal-cancel:hover { border-color:#7f8b9b; background:#17202c; }
.signout-modal-confirm { border:1px solid #d64545; color:#fff; background:#b9353f; }
.signout-modal-confirm:hover { border-color:#ff7373; background:#d64545; }
body[data-theme="light"] .signout-modal-dialog { border-color:#e0c9ce; background:#f8fafb; }
body[data-theme="light"] .signout-modal-copy h2 { color:#243b4d; }
body[data-theme="light"] .signout-modal-copy p { color:#617084; }
body[data-theme="light"] .signout-modal-icon { color:#b52f3c; background:#fff0f0; }
body[data-theme="light"] .signout-modal-cancel { border-color:#b7c7d3; color:#30485d; background:#fff; }
body[data-theme="light"] .signout-modal-cancel:hover { background:#eef3f6; }
body[data-theme="light"] .signout-modal-confirm { border-color:#c94752; background:#c94752; }
body[data-theme="light"] .signout-modal-confirm:hover { border-color:#a9333d; background:#a9333d; }

/* Shared table pagination */
.table-pagination { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:6px; padding:14px 20px 20px; border-top:1px solid #202731; }
.table-pagination[hidden] { display:none; }
.table-pagination-button { min-width:34px; min-height:30px; padding:6px 9px; border:1px solid #303946; border-radius:7px; color:#aab5c2; background:#0d141d; font-size:10px; font-weight:700; cursor:pointer; }
.table-pagination-button:hover:not(:disabled) { border-color:#218ff4; color:#fff; background:#132438; }
.table-pagination-button.active { border-color:#1789ef; color:#fff; background:#1789ef; }
.table-pagination-button:disabled { cursor:not-allowed; opacity:.45; }
.table-pagination-ellipsis { padding:0 2px; color:#718096; font-size:12px; }
body[data-theme="light"] .table-pagination { border-color:#dbe3e8; }
body[data-theme="light"] .table-pagination-button { border-color:#cbd7e0; color:#617084; background:#f1f5f7; }
body[data-theme="light"] .table-pagination-button:hover:not(:disabled) { border-color:#1478c9; color:#245878; background:#e3eff6; }
body[data-theme="light"] .table-pagination-button.active { border-color:#1478c9; color:#fff; background:#1478c9; }
@media (max-width:620px) { .table-pagination { justify-content:center; padding-right:12px; padding-left:12px; } .table-pagination-button { min-width:31px; padding-right:7px; padding-left:7px; } }

/* Dashboard overview */
.dashboard-content { padding-top:52px; }
.dashboard-heading { margin-bottom:28px; text-align:left; }
.dashboard-kpis { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; margin-bottom:20px; align-items:stretch; }
.dashboard-kpi { min-width:0; min-height:132px; padding:19px 20px; border:1px solid #242a33; border-radius:15px; background:#080d14; box-shadow:0 14px 32px rgba(0,0,0,.16); }
.dashboard-kpi p { margin:0 0 11px; color:#7f8b9b; font-size:11px; font-weight:700; }
.dashboard-kpi strong { display:block; overflow:hidden; color:#f8fafc; font:800 clamp(20px,2.4vw,28px)/1.1 'Manrope',sans-serif; letter-spacing:-.05em; text-overflow:ellipsis; white-space:nowrap; }
.dashboard-kpi small { display:block; min-height:24px; margin-top:6px; color:#7f8b9b; font-size:9px; line-height:1.35; }
.dashboard-kpi a { display:inline-block; margin-top:14px; color:#218ff4; font-size:10px; font-weight:700; text-decoration:none; }
.dashboard-kpi a:hover { text-decoration:underline; }
.dashboard-kpi-sales strong { color:#73bdff; }
.dashboard-kpi-expenses strong { color:#ff8585; }
.dashboard-kpi-net strong { color:#70d9a9; }
.dashboard-kpi-margin strong { color:#f5d06e; }
.dashboard-chart-grid { display:grid; grid-template-columns:minmax(0,1.35fr) minmax(280px,.65fr); gap:20px; margin-bottom:20px; }
.dashboard-chart-panel { overflow:hidden; }
.dashboard-chart-summary { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin:0 23px 10px; }
.dashboard-chart-summary div { padding:9px 10px; border:1px solid #242a33; border-radius:8px; background:#0d141d; }
.dashboard-chart-summary span { display:block; margin-bottom:4px; color:#7f8b9b; font-size:9px; }
.dashboard-chart-summary strong { color:#73bdff; font-size:12px; }
.dashboard-chart-summary div:nth-child(2) strong { color:#ff8585; }
.dashboard-chart-summary div:nth-child(3) strong { color:#70d9a9; }
.dashboard-chart-formula { margin:0 23px 10px; color:#aab5c2; font-size:10px; font-weight:700; text-align:center; }
.dashboard-bar-chart { display:flex; align-items:flex-end; justify-content:space-around; gap:clamp(4px,1vw,12px); width:100%; min-height:220px; margin:0; padding:20px 10px 0; border-bottom:1px solid #202731; background:repeating-linear-gradient(to bottom, transparent 0, transparent calc(25% - 1px), rgba(137,158,174,.12) calc(25% - 1px), rgba(137,158,174,.12) 25%); }
.dashboard-bar-group { display:flex; flex:1 1 0; flex-direction:column; align-items:center; justify-content:flex-end; gap:8px; min-width:0; height:200px; }
.dashboard-bar-pair { display:flex; align-items:flex-end; justify-content:center; gap:4px; width:100%; height:100%; }
.dashboard-bar { display:block; width:clamp(10px,2vw,25px); min-height:3px; border-radius:4px 4px 0 0; background:#55a7d3; }
.dashboard-bar-expense { background:#d64545; }
.dashboard-bar-profit { background:#2ca77d; }
.dashboard-bar-group > span { color:#7f8b9b; font-size:10px; font-weight:700; }
.dashboard-chart-empty { align-self:center; color:#7f8b9b; font-size:12px; }
.dashboard-chart-legend { display:flex; flex-wrap:wrap; gap:16px; padding:14px 23px 0; color:#7f8b9b; font-size:11px; }
.dashboard-chart-legend > span { display:inline-flex; align-items:center; gap:5px; }
.dashboard-chart-legend i { display:inline-block; width:10px; height:10px; border-radius:2px; background:#55a7d3; }
.dashboard-chart-legend i.expense { background:#d64545; }
.dashboard-chart-legend i.profit { background:#2ca77d; }
.dashboard-donut-wrap { display:grid; place-items:center; min-height:220px; padding:20px 20px 10px; }
.dashboard-donut { position:relative; width:min(190px,70%); aspect-ratio:1; border-radius:50%; background:conic-gradient(#70d9a9 0 var(--healthy), #f5d06e var(--healthy) calc(var(--healthy) + var(--low)), #ff7373 calc(var(--healthy) + var(--low)) 100%); }
.dashboard-donut::after { position:absolute; inset:26%; border-radius:50%; background:#080d14; content:""; }
.dashboard-donut-center { position:absolute; z-index:1; inset:0; display:grid; place-content:center; color:#f8fafc; font:800 26px/1 'Manrope',sans-serif; text-align:center; }
.dashboard-donut-center small { display:block; margin-top:6px; color:#7f8b9b; font:700 10px/1 sans-serif; letter-spacing:.08em; text-transform:uppercase; }
.dashboard-inventory-legend { display:grid; gap:9px; padding-top:4px; }
.dashboard-inventory-legend > span { display:flex; align-items:center; justify-content:space-between; width:100%; }
.dashboard-inventory-legend > span > span { display:inline-flex; align-items:center; gap:7px; }
.dashboard-inventory-legend b { color:#f8fafc; font-size:12px; }
.dashboard-chart-legend i.healthy { background:#70d9a9; }
.dashboard-chart-legend i.low { background:#f5d06e; }
.dashboard-chart-legend i.out { background:#ff7373; }
.dashboard-status-grid, .dashboard-lists-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; margin-bottom:20px; }
.dashboard-panel { min-width:0; margin-bottom:0; }
.dashboard-stat-list { display:grid; gap:0; padding:5px 23px 12px; }
.dashboard-stat-list > div { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:14px 0; border-bottom:1px solid #202731; color:#aab5c2; font-size:12px; }
.dashboard-stat-list > div:last-child { border-bottom:0; }
.dashboard-stat-list strong { color:#f8fafc; font-size:16px; }
.dashboard-stat-list .dashboard-warning strong { color:#f5d06e; }
.dashboard-stat-list .dashboard-danger strong { color:#ff8585; }
.dashboard-reservation-summary { display:grid; place-items:center; min-height:172px; padding:20px; text-align:center; }
.dashboard-reservation-summary strong { color:#c3b0ff; font:800 42px/1 'Manrope',sans-serif; letter-spacing:-.07em; }
.dashboard-reservation-summary span { margin-top:9px; color:#f8fafc; font-size:14px; font-weight:700; }
.dashboard-reservation-summary small { margin-top:5px; color:#7f8b9b; font-size:11px; }
.dashboard-list { padding:4px 23px 10px; }
.dashboard-list-row { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:14px 0; border-bottom:1px solid #202731; color:#f8fafc; text-decoration:none; }
.dashboard-list-row:last-child { border-bottom:0; }
.dashboard-list-row:hover strong { color:#73bdff; }
.dashboard-list-row span { display:grid; min-width:0; gap:5px; }
.dashboard-list-row strong { overflow:hidden; font-size:12px; text-overflow:ellipsis; white-space:nowrap; }
.dashboard-list-row small { color:#7f8b9b; font-size:10px; }
.dashboard-list-row b { flex:0 0 auto; color:#70d9a9; font-size:11px; font-weight:700; text-align:right; }
.dashboard-empty { padding:32px 20px; }
.dashboard-activity-panel { margin-bottom:0; }
.dashboard-activity-list { padding:5px 23px 12px; }
.dashboard-activity-row { display:grid; grid-template-columns:auto minmax(80px,.35fr) 70px minmax(160px,1fr) auto; align-items:center; gap:14px; padding:13px 0; border-bottom:1px solid #202731; color:#aab5c2; font-size:11px; }
.dashboard-activity-row:last-child { border-bottom:0; }
.dashboard-activity-row strong { color:#f8fafc; }
.dashboard-activity-row small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.dashboard-activity-row time { color:#7f8b9b; white-space:nowrap; }
body[data-theme="light"] .dashboard-kpi { border-color:#cbd7e0; background:#f8fafb; box-shadow:0 10px 25px rgba(49,76,96,.08); }
body[data-theme="light"] .dashboard-kpi p { color:#718394; }
body[data-theme="light"] .dashboard-kpi small { color:#617084; }
body[data-theme="light"] .dashboard-kpi strong { color:#245878; }
body[data-theme="light"] .dashboard-kpi-sales strong { color:#1478c9; }
body[data-theme="light"] .dashboard-kpi-expenses strong { color:#c93636; }
body[data-theme="light"] .dashboard-kpi-net strong { color:#168459; }
body[data-theme="light"] .dashboard-kpi-margin strong { color:#b7791f; }
body[data-theme="light"] .dashboard-chart-summary div { border-color:#dbe3e8; background:#f1f5f7; }
body[data-theme="light"] .dashboard-chart-summary strong { color:#1478c9; }
body[data-theme="light"] .dashboard-chart-summary div:nth-child(2) strong { color:#c93636; }
body[data-theme="light"] .dashboard-chart-summary div:nth-child(3) strong { color:#168459; }
body[data-theme="light"] .dashboard-bar-chart { border-color:#dbe3e8; }
body[data-theme="light"] .dashboard-bar-group > span,
body[data-theme="light"] .dashboard-chart-empty,
body[data-theme="light"] .dashboard-chart-legend { color:#617084; }
body[data-theme="light"] .dashboard-donut::after { background:#f8fafb; }
body[data-theme="light"] .dashboard-donut-center { color:#245878; }
body[data-theme="light"] .dashboard-donut-center small { color:#617084; }
body[data-theme="light"] .dashboard-inventory-legend b { color:#245878; }
body[data-theme="light"] .dashboard-stat-list > div,
body[data-theme="light"] .dashboard-list-row,
body[data-theme="light"] .dashboard-activity-row { border-color:#dbe3e8; }
body[data-theme="light"] .dashboard-stat-list > div { color:#617084; }
body[data-theme="light"] .dashboard-stat-list strong { color:#245878; }
body[data-theme="light"] .dashboard-stat-list .dashboard-warning strong { color:#876300; }
body[data-theme="light"] .dashboard-stat-list .dashboard-danger strong { color:#b52f3c; }
body[data-theme="light"] .dashboard-reservation-summary strong { color:#6950ad; }
body[data-theme="light"] .dashboard-reservation-summary span,
body[data-theme="light"] .dashboard-list-row strong,
body[data-theme="light"] .dashboard-activity-row strong { color:#245878; }
body[data-theme="light"] .dashboard-list-row small,
body[data-theme="light"] .dashboard-activity-row,
body[data-theme="light"] .dashboard-activity-row time { color:#617084; }
body[data-theme="light"] .dashboard-list-row b { color:#168459; }
@media (max-width:1000px) { .dashboard-kpis { grid-template-columns:repeat(2,minmax(0,1fr)); } .dashboard-chart-grid { grid-template-columns:1fr; } }
@media (max-width:760px) { .dashboard-content { padding-top:40px; } .dashboard-status-grid, .dashboard-lists-grid { grid-template-columns:1fr; } .dashboard-activity-row { grid-template-columns:auto 1fr auto; } .dashboard-activity-row small { grid-column:1 / -1; } }
@media (max-width:520px) { .dashboard-kpis { grid-template-columns:1fr; } .dashboard-kpi { min-height:118px; } .dashboard-bar-chart { min-height:190px; margin:0 10px; padding-right:2px; padding-left:2px; } .dashboard-bar-group { height:170px; } .dashboard-bar-pair { gap:2px; } .dashboard-bar { width:10px; } .dashboard-activity-row { grid-template-columns:1fr auto; } .dashboard-activity-row .history-badge { justify-self:start; } .dashboard-activity-row strong { grid-column:1; } .dashboard-activity-row small { grid-column:1 / -1; } .dashboard-activity-row time { grid-column:2; grid-row:1 / span 2; } }

/* Dashboard visual refinement */
.reference-home {
    background:
        radial-gradient(circle at 82% 0%, rgba(36, 145, 244, .14), transparent 28%),
        radial-gradient(circle at 14% 18%, rgba(42, 167, 125, .08), transparent 24%),
        var(--page);
}
.reference-home .workspace-shell {
    border-color: rgba(78, 112, 145, .34);
    background: linear-gradient(180deg, rgba(9, 17, 27, .98), rgba(5, 10, 17, .98));
}
.dashboard-content {
    width: min(1240px, calc(100% - 56px));
    padding-top: clamp(42px, 6vw, 72px);
    padding-bottom: 72px;
}
.dashboard-heading {
    position: relative;
    margin-bottom: 34px;
    padding: 28px 32px 30px;
    border: 1px solid rgba(65, 103, 137, .34);
    border-radius: 22px;
    background:
        linear-gradient(105deg, rgba(19, 75, 124, .34), rgba(11, 27, 43, .7) 52%, rgba(17, 71, 64, .2)),
        rgba(8, 16, 26, .76);
    box-shadow: 0 22px 50px rgba(0, 0, 0, .18);
    overflow: hidden;
}
.dashboard-heading::after {
    position: absolute;
    top: -80px;
    right: 8%;
    width: 220px;
    height: 220px;
    border: 1px solid rgba(86, 181, 255, .13);
    border-radius: 50%;
    box-shadow: 0 0 0 22px rgba(86, 181, 255, .035), 0 0 0 44px rgba(86, 181, 255, .025);
    content: "";
    pointer-events: none;
}
.dashboard-heading p {
    position: relative;
    z-index: 1;
    margin-bottom: 12px;
}
.dashboard-heading h1 {
    position: relative;
    z-index: 1;
    font-size: clamp(42px, 5vw, 64px);
}
.dashboard-heading span {
    position: relative;
    z-index: 1;
    max-width: 640px;
}
.dashboard-kpis {
    gap: 16px;
}
.dashboard-kpi {
    position: relative;
    min-height: 146px;
    padding: 22px 22px 20px;
    border-color: rgba(74, 109, 141, .42);
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(17, 29, 43, .98), rgba(8, 15, 24, .98));
    box-shadow: 0 18px 38px rgba(0, 0, 0, .2);
    transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.dashboard-kpi p { min-height:28px; line-height:1.35; }
.dashboard-kpi::before {
    position: absolute;
    top: 0;
    right: 22px;
    left: 22px;
    height: 2px;
    border-radius: 0 0 8px 8px;
    background: #3e79d2;
    content: "";
}
.dashboard-kpi-expenses::before { background: #d64545; }
.dashboard-kpi-net::before { background: #2ca77d; }
.dashboard-kpi-margin::before { background: #d8a62b; }
.dashboard-kpi:hover {
    border-color: rgba(82, 171, 245, .72);
    box-shadow: 0 22px 44px rgba(0, 0, 0, .27);
    transform: translateY(-3px);
}
.dashboard-kpi p {
    margin-bottom: 14px;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.dashboard-kpi strong {
    font-size: clamp(21px, 2.25vw, 30px);
}
.dashboard-kpi a {
    margin-top: 17px;
    color: #74c2ff;
}
.dashboard-chart-grid,
.dashboard-status-grid,
.dashboard-lists-grid {
    gap: 16px;
}
.dashboard-panel {
    border-color: rgba(74, 109, 141, .42);
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(15, 26, 39, .98), rgba(8, 14, 22, .98));
    box-shadow: 0 18px 38px rgba(0, 0, 0, .18);
}
.dashboard-panel .inventory-panel-header {
    padding: 22px 24px 18px;
    background: linear-gradient(90deg, rgba(255,255,255,.025), transparent);
}
.dashboard-panel .inventory-panel-header h2 {
    font-size: 18px;
}
.dashboard-bar-chart {
    position: relative;
    min-height: 250px;
    margin: 0 24px;
    padding: 28px 14px 0;
    border-bottom-color: rgba(115, 143, 169, .28);
    background: repeating-linear-gradient(to bottom, transparent 0, transparent 49px, rgba(127, 159, 188, .09) 50px);
}
.dashboard-bar-group {
    height: 226px;
}
.dashboard-bar {
    position: relative;
    width: clamp(13px, 2.2vw, 28px);
    min-height: 4px;
    background: linear-gradient(180deg, #75c9ff, #287fc0);
    box-shadow: 0 0 18px rgba(43, 148, 224, .2);
    transition: filter .2s ease, transform .2s ease;
}
.dashboard-bar-expense {
    background: linear-gradient(180deg, #ff8888, #b83848);
    box-shadow: 0 0 18px rgba(214, 69, 69, .16);
}
.dashboard-bar:hover {
    filter: brightness(1.22);
    transform: translateY(-3px);
}
.dashboard-bar-group > span {
    color: #9aabba;
    letter-spacing: .05em;
}
.dashboard-chart-legend {
    padding: 16px 24px 2px;
}
.dashboard-chart-legend i {
    box-shadow: 0 0 10px rgba(85, 167, 211, .35);
}
.dashboard-donut-wrap {
    min-height: 250px;
}
.dashboard-donut {
    width: min(204px, 72%);
    box-shadow: 0 0 0 8px rgba(255,255,255,.018), 0 14px 35px rgba(0,0,0,.22);
}
.dashboard-donut::after {
    inset: 25%;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
}
.dashboard-stat-list,
.dashboard-activity-list {
    padding-right: 24px;
    padding-left: 24px;
}
.dashboard-stat-list > div,
.dashboard-activity-row,
.dashboard-list-row {
    border-bottom-color: rgba(115, 143, 169, .2);
}
.dashboard-list {
    padding-right: 24px;
    padding-left: 24px;
}
.dashboard-list-row {
    transition: padding .2s ease, background .2s ease;
}
.dashboard-list-row:hover {
    padding-right: 8px;
    padding-left: 8px;
    border-radius: 8px;
    background: rgba(48, 147, 226, .08);
}
.dashboard-activity-row {
    min-height: 50px;
}
body[data-theme="light"] .reference-home {
    background:
        radial-gradient(circle at 82% 0%, rgba(36, 145, 244, .13), transparent 28%),
        #e8eef2;
}
body[data-theme="light"] .reference-home .workspace-shell {
    background: linear-gradient(180deg, rgba(246, 250, 252, .98), rgba(232, 240, 245, .98));
}
body[data-theme="light"] .dashboard-heading {
    border-color: #c2d5e1;
    background: linear-gradient(105deg, #e7f3fb, #f7fafc 58%, #e9f7f2);
    box-shadow: 0 18px 38px rgba(49, 76, 96, .1);
}
body[data-theme="light"] .dashboard-kpi,
body[data-theme="light"] .dashboard-panel {
    border-color: #c4d5df;
    background: linear-gradient(145deg, #fff, #f5f9fb);
    box-shadow: 0 14px 30px rgba(49, 76, 96, .1);
}
body[data-theme="light"] .dashboard-kpi:hover {
    border-color: #82b9d8;
    box-shadow: 0 20px 38px rgba(49, 76, 96, .14);
}
body[data-theme="light"] .dashboard-panel .inventory-panel-header {
    background: linear-gradient(90deg, rgba(25, 118, 177, .035), transparent);
}
body[data-theme="light"] .dashboard-bar-chart {
    background: repeating-linear-gradient(to bottom, transparent 0, transparent 49px, rgba(84, 126, 157, .1) 50px);
}
body[data-theme="light"] .dashboard-list-row:hover {
    background: rgba(48, 147, 226, .07);
}
@media (max-width:760px) {
    .dashboard-content { width: calc(100% - 32px); }
    .dashboard-heading { padding: 24px 22px 26px; }
}
@media (max-width:520px) {
    .dashboard-heading h1 { font-size: 42px; }
    .dashboard-panel .inventory-panel-header { align-items: flex-start; }
    .dashboard-bar-chart { min-height: 220px; }
    .dashboard-bar-group { height: 190px; }
}

/* Reference dashboard layout: geometry only */
@media (min-width:1100px) {
    .reference-home .workspace-drawer {
        width: 267px;
        padding: 22px 12px 18px;
    }
    .workspace-page.reference-home.nav-open .workspace-shell {
        width: calc(100% - 291px);
        margin-right: 24px;
        margin-left: 291px;
    }
    .reference-home .workspace-shell {
        min-height: calc(100vh - 42px);
        margin-top: 21px;
        margin-bottom: 21px;
        border-radius: 22px;
    }
    .reference-home .workspace-bar {
        min-height: 96px;
        padding: 22px 28px 16px;
    }
    .reference-home .workspace-brand {
        gap: 13px;
    }
    .reference-home .workspace-brand img {
        width: 44px;
        height: 44px;
    }
    .reference-home .workspace-brand strong {
        font-size: 18px;
    }
    .reference-home .workspace-actions {
        gap: 12px;
    }
    .reference-home .workspace-content {
        width: calc(100% - 56px);
        padding-top: 27px;
    }
    .reference-home .dashboard-heading {
        margin-bottom: 29px;
        padding: 20px 0 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }
    .reference-home .dashboard-heading::after {
        display: none;
    }
    .reference-home .dashboard-heading h1 {
        font-size: clamp(50px, 5vw, 62px);
    }
    .reference-home .dashboard-kpis {
        gap: 13px;
        margin-bottom: 20px;
    }
    .reference-home .dashboard-kpi {
        min-height: 124px;
        padding: 19px 19px 17px;
        border-radius: 14px;
    }
    .reference-home .dashboard-kpi::before {
        display: none;
    }
    .reference-home .dashboard-kpi p {
        margin-bottom: 10px;
    }
    .reference-home .dashboard-kpi strong {
        font-size: clamp(21px, 2.2vw, 27px);
    }
    .reference-home .dashboard-kpi a {
        margin-top: 13px;
    }
    .reference-home .dashboard-chart-grid {
        grid-template-columns: minmax(0, 1.34fr) minmax(280px, .66fr);
        gap: 20px;
    }
    .reference-home .dashboard-panel {
        border-radius: 16px;
    }
    .reference-home .dashboard-panel .inventory-panel-header {
        min-height: 83px;
        padding: 21px 22px 16px;
    }
    .reference-home .dashboard-bar-chart {
        min-height: 222px;
        margin: 0 20px;
        padding: 23px 9px 0;
        background: none;
    }
    .reference-home .dashboard-bar-group {
        height: 195px;
    }
    .reference-home .dashboard-bar {
        width: clamp(11px, 1.8vw, 24px);
    }
    .reference-home .dashboard-donut-wrap {
        min-height: 218px;
        padding-top: 18px;
    }
    .reference-home .dashboard-donut {
        width: min(180px, 70%);
    }
    .reference-home .dashboard-chart-legend {
        padding: 13px 22px 2px;
    }
    .reference-home .dashboard-inventory-legend {
        padding-top: 2px;
    }
}

@media (max-width:1099px) {
    .reference-home .workspace-shell {
        margin: 12px;
        border-radius: 18px;
    }
    .reference-home .workspace-bar {
        padding: 18px 20px 14px;
    }
}

@media (max-width:760px) {
    .reference-home .workspace-shell {
        margin: 0;
        border-radius: 0;
    }
    .reference-home .workspace-content {
        padding-top: 30px;
    }
    .reference-home .dashboard-heading {
        padding-top: 0;
    }
}

/* Net revenue trend chart */
.dashboard-line-chart-wrap {
    margin: 18px 24px 0;
    padding: 15px 0 0;
    border-top: 1px solid rgba(115, 143, 169, .2);
}
.dashboard-line-chart-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 5px;
}
.dashboard-line-chart-heading span {
    color: var(--text);
    font-size: 11px;
    font-weight: 800;
}
.dashboard-line-chart-heading small {
    color: var(--copy-muted);
    font-size: 10px;
}
.dashboard-line-chart {
    display: block;
    width: 100%;
    height: 150px;
    overflow: visible;
}
.dashboard-line-chart line {
    stroke: rgba(115, 143, 169, .2);
    stroke-width: 1;
}
.dashboard-line-chart polyline {
    fill: none;
    stroke: #70d9a9;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 3;
    vector-effect: non-scaling-stroke;
}
.dashboard-line-chart circle {
    fill: #70d9a9;
    stroke: #080d14;
    stroke-width: 2;
    vector-effect: non-scaling-stroke;
}
.dashboard-line-chart-labels {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 0 3px;
    color: var(--copy-muted);
    font-size: 10px;
    font-weight: 700;
}
body[data-theme="light"] .dashboard-line-chart-wrap {
    border-top-color: #dbe3e8;
}
body[data-theme="light"] .dashboard-line-chart line {
    stroke: #dbe3e8;
}
body[data-theme="light"] .dashboard-line-chart circle {
    stroke: #fff;
}
@media (max-width:520px) {
    .dashboard-line-chart-wrap {
        margin-right: 16px;
        margin-left: 16px;
    }
    .dashboard-line-chart {
        height: 125px;
    }
}

/* Cost Management must remain visible when the shared print rules hide workspace content. */
@media print {
    body.cost-management-page .workspace-content.cost-management-content { display:block !important; visibility:visible !important; }
    body.cost-management-page .cost-budget-form { display:block !important; visibility:visible !important; }
    body.cost-management-page .cost-saved-preview-modal { position:static !important; display:block !important; visibility:visible !important; padding:0 !important; background:#fff !important; }
    body.cost-management-page .cost-saved-preview-backdrop,
    body.cost-management-page .cost-saved-preview-actions { display:none !important; }
    body.cost-management-page .cost-saved-preview-dialog { width:100% !important; max-height:none !important; overflow:visible !important; padding:0 !important; border:0 !important; border-radius:0 !important; background:#fff !important; box-shadow:none !important; }
    body.cost-management-page .cost-saved-preview-head { margin:0 0 8mm !important; }
    body.cost-management-page .cost-saved-preview-head p,
    body.cost-management-page .cost-saved-preview-head h2,
    body.cost-management-page .cost-saved-preview-head span { color:#111 !important; }
    body.cost-management-page .cost-saved-preview-sheets { display:block !important; }
    body.cost-management-page .cost-saved-preview-sheets .cost-sheet-panel { display:block !important; margin:0 0 9mm !important; border:1px solid #111 !important; border-radius:0 !important; background:#fff !important; box-shadow:none !important; break-inside:avoid; }
    body.cost-management-page .cost-saved-preview-sheets .cost-sheet-title { width:44%; min-width:0; margin:0; color:#111 !important; background:#f2a3ad !important; -webkit-print-color-adjust:exact; print-color-adjust:exact; }
    body.cost-management-page .cost-saved-preview-sheets .cost-grid-table { width:100%; min-width:0; color:#111 !important; background:#fff !important; font-size:10px; -webkit-print-color-adjust:exact; print-color-adjust:exact; }
    body.cost-management-page .cost-saved-preview-sheets .cost-grid-table th,
    body.cost-management-page .cost-saved-preview-sheets .cost-grid-table td { border-color:#111 !important; }
    body.cost-management-page .cost-saved-preview-sheets .cost-grid-table thead th { color:#111 !important; background:#8fc5f5 !important; -webkit-print-color-adjust:exact; print-color-adjust:exact; }
    body.cost-management-page .cost-saved-preview-sheets .cost-grid-table tbody td,
    body.cost-management-page .cost-saved-preview-sheets .cost-grid-table tbody tr:nth-child(even) td { color:#111 !important; background:#fff !important; }
    body.cost-management-page .cost-saved-preview-sheets .cost-grid-table tbody td:nth-child(6) { background:#a9d58f !important; -webkit-print-color-adjust:exact; print-color-adjust:exact; }
    body.cost-management-page .cost-saved-preview-sheets .cost-grid-table tfoot th,
    body.cost-management-page .cost-saved-preview-sheets .cost-grid-table tfoot td { color:#111 !important; background:#d9eafa !important; -webkit-print-color-adjust:exact; print-color-adjust:exact; }
}
