/* =====================================================================
   Pushpak Business Management System - core stylesheet
   ===================================================================== */
:root {
    --g950: #06200f;
    --g900: #0a2e16;
    --g800: #0d3b1f;
    --g700: #0f5a2b;
    --g600: #157a3a;
    --g500: #1f9d4d;
    --g100: #e3f3e7;
    --g50: #f1f8f2;
    --red: #d81f2a;
    --red-50: #fdecec;
    --amber: #f29100;
    --amber-50: #fff4e1;
    --blue: #0b6fe0;
    --blue-50: #e6f1ff;
    --purple: #7b3fd3;
    --purple-50: #f1e9ff;
    --ink: #17231b;
    --text: #2b3830;
    --muted: #6b786f;
    --line: #e3e9e5;
    --line-2: #d3dcd6;
    --bg: #f5f7f6;
    --card: #ffffff;
    --radius: 8px;
    --shadow: 0 1px 2px rgba(16, 40, 24, .05), 0 2px 10px rgba(16, 40, 24, .04);
    --font: "Avenir Next", "Nunito Sans", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-head: "Avenir Next Condensed", "Barlow Condensed", "Roboto Condensed", "Arial Narrow", "Avenir Next", sans-serif;
    --sidebar-w: 236px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0; font-family: var(--font); font-size: 13.5px; line-height: 1.45; color: var(--text);
    background: var(--g900); -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p { margin: 0; }
a { color: var(--g700); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
.icon { flex: none; vertical-align: middle; }
[hidden] { display: none !important; }

/* ------------------------------------------------------------ shell */
.app { display: flex; min-height: 100vh; margin: 5px; border-radius: 12px; overflow: hidden; background: var(--bg); }
.sidebar {
    width: var(--sidebar-w); flex: none; display: flex; flex-direction: column; color: #fff;
    background: linear-gradient(180deg, var(--g800) 0%, var(--g900) 55%, var(--g950) 100%);
}
.brand { display: flex; justify-content: center; align-items: center; background: #fff; padding: 6px 10px 8px; height: 172px; flex: none; }
.brand img { width: 164px; height: 164px; object-fit: contain; }
.menu { padding: 10px 0 6px; flex: none; }
.menu-item {
    display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 16px 9px 18px; border: 0; background: none;
    color: #fff; font-weight: 600; font-size: 13.5px; text-align: left; cursor: pointer; line-height: 1.25;
}
.menu-item span { flex: 1; }
.menu-item:hover { background: rgba(255, 255, 255, .07); text-decoration: none; }
.menu-item.active { background: linear-gradient(90deg, rgba(47, 125, 71, .55), rgba(47, 125, 71, .18)); }
.menu-item .chev { opacity: .9; transition: transform .18s; }
.menu-group.open > .menu-item .chev { transform: rotate(-90deg); }
.submenu { display: none; padding: 4px 8px 8px; }
.menu-group.open .submenu { display: block; }
.sub-item { display: block; padding: 7px 12px 7px 36px; margin: 2px 0; border-radius: 6px; color: #eaf3ec; font-size: 13px; font-weight: 500; }
.sub-item:hover { background: rgba(255, 255, 255, .08); text-decoration: none; }
.sub-item.active { background: #2f7045; color: #fff; font-weight: 600; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.side-art { position: relative; margin-top: auto; min-height: 250px; flex: 1 0 250px; overflow: hidden; }
.side-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 100%;
    -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 34%); mask-image: linear-gradient(180deg, transparent 0, #000 34%); }
.side-art::after { content: ""; position: absolute; inset: 55% 0 0; background: linear-gradient(180deg, transparent, rgba(4, 22, 10, .82)); }
.tagline { position: absolute; left: 0; right: 0; bottom: 20px; z-index: 1; text-align: center; transform: rotate(-6deg);
    font-family: "Brush Script MT", "Segoe Script", "Snell Roundhand", cursive; font-size: 25px; line-height: 1.05; color: #fff; text-shadow: 0 2px 6px rgba(0, 0, 0, .6); }
.tagline span { color: #ffd23c; padding-left: 26px; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--bg); }
.topbar { display: flex; align-items: center; gap: 16px; background: #fff; padding: 14px 26px 12px 20px; border-bottom: 1px solid var(--line); min-height: 96px; }
.nav-toggle { display: none; border: 0; background: none; padding: 6px; cursor: pointer; color: var(--g800); }
.sys-title { flex: 1; min-width: 0; }
.sys-title h1 { font-family: var(--font-head); font-weight: 800; font-size: 36px; letter-spacing: .3px; line-height: 1.05; color: var(--g800); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-stretch: condensed; }
.sys-title h1 .red { color: var(--red); }
.version-row { display: flex; align-items: center; margin-top: 6px; }
.version { position: relative; background: var(--g700); color: #fff; font-family: var(--font-head); font-weight: 700; font-size: 16px; letter-spacing: 1px; padding: 1px 26px 1px 14px;
    clip-path: polygon(0 0, 100% 0, calc(100% - 14px) 100%, 0 100%); }
.swoosh { position: relative; height: 12px; width: 380px; max-width: 40vw; margin-left: -4px; }
.swoosh::before, .swoosh::after { content: ""; position: absolute; left: 0; right: 0; height: 3px; border-radius: 3px; }
.swoosh::before { top: 1px; right: 80px; background: linear-gradient(90deg, var(--g600), var(--g600) 30%, transparent); transform: skewX(-40deg); }
.swoosh::after { top: 6px; background: linear-gradient(90deg, transparent 6%, var(--red) 20%, var(--red) 55%, transparent); border-radius: 50%; }
.top-tools { display: flex; align-items: center; gap: 22px; flex: none; }
.today { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.today strong { display: block; font-weight: 500; font-size: 14.5px; }
.today span { font-size: 14px; }
.bell { position: relative; border: 0; background: none; cursor: pointer; padding: 4px 8px; color: var(--ink); border-right: 1px solid var(--line); padding-right: 24px; }
.bell .count { position: absolute; top: -6px; right: 12px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.user-btn { display: flex; align-items: center; gap: 12px; border: 0; background: none; cursor: pointer; padding: 2px; text-align: left; }
.avatar { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; background: var(--g100); flex: none; }
.avatar.sm { width: 28px; height: 28px; }
.avatar.lg { width: 96px; height: 96px; }
.who strong { display: block; font-size: 15.5px; font-weight: 500; color: var(--ink); line-height: 1.2; }
.who small { font-size: 13.5px; color: var(--text); }

.dropdown { position: relative; }
.dropdown-menu { display: none; position: absolute; right: 0; top: calc(100% + 10px); z-index: 60; min-width: 230px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 34px rgba(10, 46, 22, .18); padding: 6px; }
.dropdown.open .dropdown-menu { display: block; }
.dd-head { padding: 8px 10px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.dd-empty { padding: 16px 10px; color: var(--muted); text-align: center; }
.user-menu a, .user-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; background: none; border-radius: 6px; color: var(--text); cursor: pointer; font-weight: 500; }
.user-menu a:hover, .user-menu button:hover { background: var(--g50); text-decoration: none; }
.user-menu form { margin: 0; border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; }
.user-menu form button { color: var(--red); }
.notif-menu { width: 340px; max-height: 430px; overflow: auto; }
.note { display: flex; gap: 10px; padding: 9px 8px; border-radius: 6px; color: var(--text); }
.note:hover { background: var(--g50); text-decoration: none; }
.note strong { display: block; font-size: 13px; }
.note small { color: var(--muted); font-size: 12px; }
.note-ico { width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; flex: none; color: #fff; background: var(--g600); }
.tone-red { background: var(--red); } .tone-amber { background: var(--amber); } .tone-blue { background: var(--blue); } .tone-purple { background: var(--purple); } .tone-green { background: var(--g600); }

.content { padding: 18px 24px 26px; flex: 1; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head h2 { font-size: 24px; font-weight: 600; color: var(--ink); letter-spacing: -.1px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 4px; font-size: 12.5px; color: var(--text); }
.crumbs a { color: var(--text); }
.crumbs .sep { color: var(--muted); font-size: 11px; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

/* ------------------------------------------------------------ buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 10px 20px; border-radius: 6px; border: 1px solid var(--line-2);
    background: #fff; color: var(--ink); font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; line-height: 1.2; transition: background .15s, box-shadow .15s, border-color .15s; }
.btn:hover { text-decoration: none; background: #f6f9f7; border-color: #b9c6bd; }
.btn:focus-visible, .input:focus-visible, .menu-item:focus-visible, a:focus-visible, button:focus-visible { outline: 2px solid var(--g500); outline-offset: 2px; }
.btn-primary { background: var(--g700); border-color: var(--g700); color: #fff; }
.btn-primary:hover { background: #0c4a23; border-color: #0c4a23; }
.btn-green { background: var(--g600); border-color: var(--g600); color: #fff; }
.btn-green:hover { background: #126b33; border-color: #126b33; }
.btn-outline-green { border-color: var(--g600); color: var(--g700); }
.btn-outline-green:hover { background: var(--g50); border-color: var(--g600); }
.btn-danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn-danger:hover { background: #b81822; border-color: #b81822; }
.btn-light { background: transparent; border-color: rgba(255, 255, 255, .7); color: #fff; padding: 4px 12px; font-size: 12.5px; }
.btn-light:hover { background: rgba(255, 255, 255, .12); border-color: #fff; }
.btn-sm { padding: 6px 12px; font-size: 12.5px; gap: 6px; }
.btn-lg { padding: 12px 34px; font-size: 14.5px; min-width: 150px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.icon-btn { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 5px; border: 1px solid var(--line-2); background: #fff; cursor: pointer; padding: 0; color: var(--text); }
.icon-btn:hover { background: var(--g50); }
.icon-btn.amber { border-color: #f2b04a; color: var(--amber); }
.icon-btn.red { border-color: #f08a8f; color: var(--red); }
.icon-btn.blue { border-color: #8cbcf2; color: var(--blue); }
.icon-btn.green { border-color: #8fd0a4; color: var(--g600); }
.icon-btn.lg { width: 36px; height: 36px; border-radius: 6px; }
.inline-form { display: inline; margin: 0; }
.link-btn { border: 0; background: none; padding: 0; color: var(--g700); cursor: pointer; font-weight: 600; }
.link-btn:hover { text-decoration: underline; }

/* ------------------------------------------------------------ cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 16px 18px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 16px; background: var(--g800); color: #fff; border-radius: var(--radius) var(--radius) 0 0; min-height: 36px; }
.card-head h3 { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase; }
.card-title { display: flex; align-items: center; gap: 10px; font-size: 15.5px; font-weight: 600; color: var(--ink); margin-bottom: 14px; }
.card-title .icon { color: var(--g700); }
.card-title small { font-weight: 400; color: var(--text); font-size: 13.5px; }
.card-title .spacer { flex: 1; }
.card-title a { font-size: 12.5px; font-weight: 600; }
.card-body { padding: 14px 16px; }
.section-gap { margin-top: 16px; }
.note-bar { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px; color: var(--ink); font-size: 13px; }
.note-bar.left { justify-content: flex-start; }
.note-bar .icon { color: var(--g700); }

/* ------------------------------------------------------------ grid helpers */
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.g6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.g-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.g-3-2 { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
.g-1-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.gap-sm { gap: 10px; }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.span-all { grid-column: 1 / -1; }
.flex { display: flex; align-items: center; gap: 10px; }
.flex-wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.end { justify-content: flex-end; }
.center { text-align: center; }
.right { text-align: right; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.bold { font-weight: 700; }
.nowrap { white-space: nowrap; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 6px; } .mt-2 { margin-top: 12px; } .mt-3 { margin-top: 18px; } .mb-0 { margin-bottom: 0; } .mb-2 { margin-bottom: 12px; }
.text-green { color: var(--g600); } .text-red { color: var(--red); } .text-amber { color: var(--amber); } .text-blue { color: var(--blue); }
.w-100 { width: 100%; }
.stack > * + * { margin-top: 16px; }

/* ------------------------------------------------------------ forms */
.field { display: block; min-width: 0; }
.field > label, .label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink); margin-bottom: 5px; }
.req { color: var(--red); margin-left: 3px; }
.input, select.input, textarea.input { width: 100%; padding: 8px 11px; border: 1px solid var(--line-2); border-radius: 5px; background: #fff; color: var(--ink); font-size: 13.5px; line-height: 1.35; min-height: 36px; transition: border-color .15s, box-shadow .15s; }
.input:focus { border-color: var(--g600); box-shadow: 0 0 0 3px rgba(21, 122, 58, .13); outline: 0; }
.input[readonly], .input:disabled { background: var(--g50); color: var(--ink); }
.input.highlight { background: var(--g100); border-color: #bfdcc6; font-weight: 600; }
textarea.input { resize: vertical; min-height: 70px; }
select.input { appearance: none; -webkit-appearance: none; padding-right: 32px; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2317231b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 10px center; }
.input.num { text-align: right; font-variant-numeric: tabular-nums; }
.input.sm { min-height: 30px; padding: 5px 9px; font-size: 12.5px; }
.input-group { display: flex; }
.input-group .addon { display: grid; place-items: center; padding: 0 11px; border: 1px solid var(--line-2); border-right: 0; border-radius: 5px 0 0 5px; background: #fff; color: var(--ink); }
.input-group .input { border-radius: 0 5px 5px 0; }
.search-box { position: relative; }
.search-box .input { padding-right: 36px; }
.search-box .icon { position: absolute; right: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.field-error { color: var(--red); font-size: 12px; margin-top: 4px; }
.hint { color: var(--muted); font-size: 11.5px; margin-top: 4px; }
.form-row { display: grid; gap: 14px 16px; }
.form-actions { display: flex; justify-content: flex-end; gap: 14px; flex-wrap: wrap; margin-top: 18px; }
.form-actions.center { justify-content: center; }
.check { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-size: 13.5px; }
.check input { width: 17px; height: 17px; accent-color: var(--g700); }
.switch { position: relative; display: inline-flex; align-items: center; cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.switch span { display: flex; align-items: center; width: 50px; height: 22px; border-radius: 11px; background: #c4cdc7; color: #fff; font-size: 11px; font-weight: 700; padding: 0 7px; transition: background .15s; justify-content: flex-end; }
.switch span::before { content: ""; position: absolute; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch span::after { content: "No"; }
.switch input:checked + span { background: var(--g700); justify-content: flex-start; }
.switch input:checked + span::before { transform: translateX(28px); }
.switch input:checked + span::after { content: "Yes"; }
.kv { display: grid; grid-template-columns: minmax(110px, 44%) 1fr; gap: 9px 12px; align-items: center; }
.kv dt { font-weight: 600; color: var(--ink); font-size: 13px; }
.kv dd { margin: 0; color: var(--text); }
.amount-row { display: grid; grid-template-columns: 1fr 180px; gap: 8px 12px; align-items: center; }
.amount-row > span { font-size: 13px; color: var(--ink); }
.amount-row .total-label { font-weight: 700; }
.amount-row .total { background: var(--g100); border-color: #bfdcc6; font-weight: 700; font-size: 16px; color: var(--g800); }

/* file / upload */
.file-drop { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line-2); border-radius: 5px; padding: 8px 11px; background: #fff; min-height: 38px; cursor: pointer; }
.file-drop input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.file-drop .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.file-drop:hover { border-color: var(--g600); }
.file-item { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line-2); border-radius: 5px; padding: 7px 11px; background: #fff; }
.file-item .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-item small { color: var(--muted); }
.doc-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.doc-tile { position: relative; display: flex; align-items: center; gap: 7px; border: 1px solid var(--line-2); border-radius: 5px; padding: 7px 8px; cursor: pointer; background: #fff; min-width: 0; }
.doc-tile:hover { border-color: var(--g600); }
.doc-tile input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.doc-tile b { display: block; font-size: 10.5px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-tile i { display: block; font-style: normal; font-size: 10px; color: var(--muted); }
.doc-tile .st-verified { color: var(--g600); } .doc-tile .st-uploaded { color: var(--blue); } .doc-tile .st-rejected { color: var(--red); }
.thumb { width: 54px; height: 44px; object-fit: contain; border-radius: 4px; background: #fff; }
.thumb.sq { width: 38px; height: 32px; }
.photo-box { border: 1px solid var(--line); border-radius: 6px; background: #fff; display: grid; place-items: center; padding: 8px; }
.photo-box img { max-height: 190px; object-fit: contain; }

/* ------------------------------------------------------------ tables */
.table-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-weight: 700; color: var(--ink); padding: 9px 10px; border-bottom: 1px solid var(--line); background: #fafbfa; white-space: nowrap; font-size: 12.5px; }
.tbl td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover { background: #fafcfa; }
.tbl.dark th { background: var(--g800); color: #fff; border-bottom: 0; }
.tbl.dark th:first-child { border-radius: 5px 0 0 0; } .tbl.dark th:last-child { border-radius: 0 5px 0 0; }
.tbl.bordered td { border-right: 1px solid var(--line); } .tbl.bordered td:last-child { border-right: 0; }
.tbl.compact th, .tbl.compact td { padding: 7px 8px; font-size: 12.5px; }
.tbl .c { text-align: center; } .tbl .r { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .num { font-variant-numeric: tabular-nums; }
.tbl tr.is-selected { background: var(--g50); box-shadow: inset 3px 0 0 var(--g600); }
.tbl .row-actions { display: flex; gap: 8px; justify-content: center; }
.cell-user { display: flex; align-items: center; gap: 10px; }
.cell-prod { display: flex; align-items: center; gap: 10px; min-width: 150px; }
.table-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 4px 2px; font-size: 13px; }
.empty { padding: 28px 12px; text-align: center; color: var(--muted); }
.pagination { display: flex; gap: 8px; align-items: center; }
.pg { min-width: 28px; height: 28px; display: grid; place-items: center; padding: 0 7px; border: 1px solid var(--line-2); border-radius: 5px; background: #fff; color: var(--ink); font-size: 13px; }
.pg:hover { background: var(--g50); text-decoration: none; }
.pg.active { background: var(--g700); border-color: var(--g700); color: #fff; }
.pg.disabled { opacity: .45; } .pg.gap { border: 0; background: none; }

/* pills */
.pill { display: inline-block; padding: 2px 10px; border-radius: 5px; font-size: 11.5px; font-weight: 600; white-space: nowrap; line-height: 1.5; }
.pill-green { background: var(--g100); color: #0d7a35; }
.pill-blue { background: var(--blue-50); color: #0b62c9; }
.pill-amber { background: var(--amber-50); color: #d97a00; }
.pill-purple { background: var(--purple-50); color: #6b2fc4; }
.pill-red { background: var(--red-50); color: #d2202a; }
.pill-grey { background: #eef1ef; color: #55615a; }
.pill.round { border-radius: 12px; padding: 2px 14px; }
.due { font-size: 12.5px; font-weight: 600; } .due-over { color: var(--red); } .due-today { color: var(--amber); } .due-tom { color: var(--g600); }
.src-whatsapp { color: #1fae4b; } .src-phone { color: #0b6fe0; } .src-facebook { color: #1877f2; } .src-ref { color: #4b5750; }
.src { display: inline-flex; align-items: center; gap: 9px; }

/* ------------------------------------------------------------ stat tiles */
.stats { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin-bottom: 16px; }
.stat { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; color: inherit; }
a.stat:hover { text-decoration: none; border-color: #c5d6ca; }
.stat-ico { width: 52px; height: 52px; border-radius: 10px; display: grid; place-items: center; color: #fff; flex: none; background: var(--g700); }
.stat-ico.round { border-radius: 50%; }
.stat-ico.blue { background: var(--blue); } .stat-ico.amber { background: var(--amber); } .stat-ico.purple { background: var(--purple); } .stat-ico.red { background: #e3262f; } .stat-ico.teal { background: #17808c; } .stat-ico.green { background: #1c8a3f; }
.stat-body { min-width: 0; }
.stat-label { font-size: 13px; font-weight: 600; color: var(--ink); }
.stat-value { font-size: 23px; font-weight: 600; color: var(--ink); line-height: 1.2; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat-sub { font-size: 12.5px; color: var(--text); }

/* tabs */
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 14px; overflow-x: auto; }
.tab { padding: 8px 18px; border: 0; background: none; cursor: pointer; font-size: 13px; color: var(--text); border-bottom: 2px solid transparent; white-space: nowrap; margin-bottom: -1px; }
.tab:hover { color: var(--g700); text-decoration: none; }
.tab.active { color: var(--g700); font-weight: 600; border-bottom-color: var(--g600); }
.tab-panel { display: none; } .tab-panel.active { display: block; }
.seg { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.seg .btn { padding: 6px 16px; font-size: 12.5px; }
.seg .btn.active { background: var(--g800); border-color: var(--g800); color: #fff; }

/* alerts */
.alert { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 7px; margin-bottom: 14px; border: 1px solid; font-weight: 500; }
.alert span { flex: 1; }
.alert-success { background: var(--g100); border-color: #b7dfc2; color: #0b5a27; }
.alert-error { background: var(--red-50); border-color: #f5b9bc; color: #a8151d; }
.alert-info { background: var(--blue-50); border-color: #b8d6f8; color: #0a4f9f; }
.alert-warning { background: var(--amber-50); border-color: #f6d59b; color: #8a5200; }
.alert-x { border: 0; background: none; cursor: pointer; color: inherit; opacity: .7; padding: 2px; }
.banner { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; padding: 12px 16px; border: 1px solid #cfe5d4; background: var(--g50); border-radius: var(--radius); margin-bottom: 14px; }
.banner h3 { font-size: 15px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.banner .meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; }
.banner .meta span + span { border-left: 1px solid var(--line-2); padding-left: 14px; }

/* stepper (proposal) */
.stepper { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 14px 16px; margin-bottom: 14px; overflow-x: auto; }
.step { display: flex; align-items: center; gap: 12px; flex: none; }
.step-ico { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--g700); color: #fff; flex: none; }
.step.pending .step-ico { background: #fff; color: var(--g700); border: 2px solid var(--g700); }
.step.purple .step-ico { background: var(--purple); border: 0; color: #fff; }
.step.grey .step-ico { background: #9aa39d; border: 0; color: #fff; }
.step-no { font-size: 19px; font-weight: 600; color: var(--g700); }
.step.purple .step-no { color: var(--purple); } .step.grey .step-no { color: #6b756f; }
.step-text strong { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink); }
.step-text small { font-size: 11.5px; color: var(--muted); }
.step-text small.on { color: var(--g600); font-weight: 600; }
.step-arrow { color: #b4bfb8; flex: 1; min-width: 22px; display: grid; place-items: center; }

/* enquiry status flow */
.flow { display: flex; align-items: flex-start; justify-content: space-between; gap: 4px; padding: 6px 4px 2px; }
.flow-step { display: grid; justify-items: center; gap: 8px; text-align: center; font-weight: 600; font-size: 13px; color: var(--ink); width: 76px; background: none; border: 0; cursor: pointer; padding: 0 0 8px; border-bottom: 3px solid transparent; }
.flow-step.active { border-bottom-color: var(--g600); }
.flow-ico { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--g600); }
.flow-ico.amber { background: #fff; border: 2.5px solid var(--amber); color: var(--amber); }
.flow-ico.purple { background: var(--purple); } .flow-ico.red { background: #fff; border: 2.5px solid var(--red); color: var(--red); } .flow-ico.blue { background: var(--blue); }
.flow-arrow { flex: 1; align-self: flex-start; margin-top: 14px; color: #a9b4ad; display: grid; place-items: center; }
.flow-desc { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--g100); border: 1px solid #cfe5d4; border-radius: 6px; padding: 14px 16px; margin-top: 14px; }
.flow-desc h4 { font-size: 16px; color: var(--ink); margin-bottom: 4px; }
.flow-desc p { font-size: 13px; }
.flow-desc .icon { color: var(--g800); }

/* reminders list */
.reminder { display: grid; grid-template-columns: 34px minmax(0, 1fr) 118px 40px; gap: 10px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); color: inherit; }
.reminder:last-child { border-bottom: 0; }
.reminder strong { display: block; font-size: 13.5px; color: var(--ink); }
.reminder small { font-size: 12.5px; color: var(--text); }
.reminder .when { border-left: 1px solid var(--line); padding-left: 14px; font-size: 12.5px; }
.reminder .when b { display: block; font-weight: 500; }

/* approval timeline */
.timeline { position: relative; display: grid; gap: 8px; }
.tl-row { display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: center; position: relative; }
.tl-dot { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #9aa39d; background: #fff; justify-self: center; position: relative; z-index: 1; display: grid; place-items: center; color: #fff; }
.tl-dot.done { background: var(--g600); border-color: var(--g600); }
.tl-dot.bad { background: var(--red); border-color: var(--red); }
.tl-row:not(:last-child)::after { content: ""; position: absolute; left: 10.5px; top: 50%; height: calc(100% + 8px); border-left: 1.5px solid #c9d2cc; }
.tl-card { display: flex; align-items: center; gap: 10px; justify-content: space-between; border: 1px solid var(--line); border-radius: 5px; padding: 6px 12px; background: #fff; flex-wrap: wrap; }
.tl-card.done { background: #f6faf7; }
.tl-card strong { display: block; font-size: 13px; color: var(--ink); }
.tl-card small { font-size: 12px; color: var(--text); }
.tl-card time { font-size: 11.5px; color: var(--text); }
.pill .icon { vertical-align: -3px; margin-left: 4px; }

/* donut + legend */
.donut-wrap { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; justify-content: center; padding: 6px 0; }
.donut { position: relative; width: 190px; height: 190px; flex: none; }
.donut svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.donut-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; line-height: 1.25; font-size: 13.5px; color: var(--ink); }
.donut-center b { font-size: 20px; font-weight: 600; display: block; }
.legend { display: grid; gap: 11px; flex: 1; min-width: 180px; }
.legend-row { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.legend-row i { width: 11px; height: 11px; border-radius: 50%; flex: none; }
.legend-row span { flex: 1; }
.legend-row b { font-weight: 500; font-variant-numeric: tabular-nums; }

/* mini tiles (attendance / leave balance) */
.mini-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.mini-tile { border: 1px solid var(--line); border-radius: 6px; padding: 10px 6px; text-align: center; background: #f6faf7; }
.mini-tile span { display: block; font-size: 13px; font-weight: 600; }
.mini-tile b { display: block; font-size: 22px; font-weight: 600; line-height: 1.3; }
.mini-tile small { font-size: 12.5px; }
.mini-tile.green { color: #0d7a35; } .mini-tile.red { color: var(--red); background: #fef3f3; border-color: #f7d4d6; }
.mini-tile.amber { color: #d97a00; background: #fff8ec; border-color: #f8e3bd; } .mini-tile.blue { color: var(--blue); background: #f0f6ff; border-color: #cfe1f8; }
.balance-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: #f3f8ff; border-radius: 6px; margin-top: 12px; }
.balance-tiles div { padding: 10px 14px; border-left: 1px solid #dbe6f5; font-size: 12px; font-weight: 600; color: #0a4f9f; }
.balance-tiles div:first-child { border-left: 0; }
.balance-tiles b { display: block; font-size: 15px; margin-top: 4px; }
.kpi-box { background: var(--g50); border: 1px solid var(--line); border-radius: 6px; padding: 9px 12px; }
.kpi-box span { display: block; font-size: 12px; font-weight: 600; color: var(--ink); }
.kpi-box b { display: block; font-size: 19px; font-weight: 600; color: var(--ink); margin-top: 3px; }
.kpi-box b.up { color: var(--g600); }
.rank { display: flex; align-items: center; gap: 12px; padding: 7px 0; font-size: 13px; }
.rank i { width: 20px; height: 20px; border-radius: 4px; border: 1px solid var(--line-2); display: grid; place-items: center; font-style: normal; font-size: 11.5px; color: var(--blue); font-weight: 600; }
.rank span { flex: 1; } .rank b { font-weight: 500; font-variant-numeric: tabular-nums; }
.progress { height: 7px; border-radius: 4px; background: #e6ece8; overflow: hidden; min-width: 70px; }
.progress i { display: block; height: 100%; border-radius: 4px; background: var(--g600); }
.progress i.amber { background: var(--amber); } .progress i.red { background: var(--red); } .progress i.blue { background: var(--blue); }

/* model picker (enquiry) */
.model-pick { display: flex; align-items: center; gap: 16px; border: 1px solid var(--line-2); border-radius: 5px; padding: 6px 10px; background: #fff; position: relative; }
.model-pick img { width: 104px; height: 62px; object-fit: contain; flex: none; }
.model-pick select { border: 0; background-color: transparent; font-weight: 600; font-size: 14px; min-height: 60px; padding-left: 0; white-space: normal; }
.model-pick select:focus { box-shadow: none; }

/* QR */
.qr-preview { display: flex; gap: 16px; align-items: flex-start; }
.qr-preview svg { width: 132px; height: 132px; border: 1px solid var(--line); border-radius: 4px; flex: none; }
.qr-meta strong { display: block; font-size: 14px; color: var(--ink); margin-bottom: 10px; }
.qr-meta span { display: block; font-size: 12.5px; color: var(--text); margin-top: 6px; }
.qr-meta b { display: block; font-weight: 500; color: var(--ink); }
.label-sheet { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.qr-label { display: flex; gap: 12px; align-items: center; border: 1px dashed var(--line-2); border-radius: 6px; padding: 10px; background: #fff; break-inside: avoid; }
.qr-label svg { width: 96px; height: 96px; flex: none; }
.qr-label strong { display: block; font-size: 12.5px; color: var(--ink); }
.qr-label small { display: block; font-size: 11px; color: var(--text); }

/* dialog */
dialog.modal { border: 0; border-radius: 12px; padding: 0; width: min(620px, calc(100vw - 32px)); box-shadow: 0 24px 70px rgba(6, 32, 15, .35); color: var(--text); }
dialog.modal.wide { width: min(900px, calc(100vw - 32px)); }
dialog.modal::backdrop { background: rgba(6, 32, 15, .55); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; background: var(--g800); color: #fff; border-radius: 12px 12px 0 0; }
.modal-head h3 { font-size: 15px; font-weight: 700; }
.modal-head button { border: 0; background: none; color: #fff; cursor: pointer; padding: 2px; }
.modal-body { padding: 18px; max-height: 72vh; overflow: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 12px 18px; border-top: 1px solid var(--line); background: #fafbfa; border-radius: 0 0 12px 12px; }

/* calendar */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.cal-h { padding: 8px; font-weight: 700; font-size: 12px; text-transform: uppercase; background: var(--g800); color: #fff; text-align: center; }
.cal-d { min-height: 104px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 6px; background: #fff; font-size: 12px; }
.cal-d.off { background: #f7f9f8; color: #b0bab3; }
.cal-d.today { background: var(--g50); box-shadow: inset 0 0 0 2px var(--g600); }
.cal-d .dnum { font-weight: 700; margin-bottom: 4px; }
.cal-ev { display: block; padding: 2px 6px; margin-top: 3px; border-radius: 4px; background: var(--amber-50); color: #9a5b00; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-ev.over { background: var(--red-50); color: #a8151d; } .cal-ev.new { background: var(--blue-50); color: #0a4f9f; }

/* detail blocks */
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px 20px; }
.detail-grid div span { display: block; font-size: 11.5px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); font-weight: 600; }
.detail-grid div b { font-weight: 600; color: var(--ink); font-size: 14px; }
.history { display: grid; gap: 12px; }
.history-item { border-left: 3px solid var(--g600); padding: 2px 0 2px 12px; }
.history-item b { color: var(--ink); } .history-item small { color: var(--muted); display: block; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.gallery figure { margin: 0; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: #fff; }
.gallery img { width: 100%; height: 110px; object-fit: cover; display: block; }
.gallery figcaption { padding: 6px 8px; font-size: 12px; font-weight: 600; display: flex; justify-content: space-between; gap: 6px; align-items: center; }
.thumbs { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.thumbs .t { position: relative; width: 72px; height: 60px; border: 1px solid var(--line); border-radius: 5px; background: #fff; display: grid; place-items: center; overflow: hidden; }
.thumbs .t img { max-width: 100%; max-height: 100%; object-fit: contain; }
.thumbs .t.add { border-style: dashed; cursor: pointer; font-size: 11px; color: var(--ink); text-align: center; gap: 2px; align-content: center; }
.thumbs .t.add input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.thumbs .t form { position: absolute; top: 2px; right: 2px; margin: 0; }
.thumbs .t form button { width: 18px; height: 18px; border-radius: 50%; border: 0; background: rgba(216, 31, 42, .9); color: #fff; display: grid; place-items: center; cursor: pointer; padding: 0; }

/* ------------------------------------------------------------ auth pages */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(380px, .75fr); background: var(--g900); }
.auth-art { position: relative; background-size: cover; background-position: center; display: flex; flex-direction: column; justify-content: flex-end; padding: 48px; color: #fff; }
.auth-art::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(6, 32, 15, .15) 30%, rgba(6, 32, 15, .88)); }
.auth-art > * { position: relative; }
.auth-art h2 { font-family: var(--font-head); font-size: 46px; font-weight: 800; line-height: 1.05; letter-spacing: .5px; }
.auth-art h2 .red { color: #ff4a53; }
.auth-art p { font-family: "Brush Script MT", "Segoe Script", cursive; font-size: 34px; color: #ffd23c; margin-top: 8px; }
.auth-panel { background: #fff; display: flex; flex-direction: column; justify-content: center; padding: 40px clamp(24px, 5vw, 64px); }
.auth-panel .logo { width: 168px; height: 168px; object-fit: contain; align-self: center; margin-bottom: 6px; }
.auth-panel h1 { font-size: 23px; font-weight: 600; color: var(--ink); text-align: center; }
.auth-panel .sub { text-align: center; color: var(--muted); margin: 4px 0 22px; }
.auth-panel .field { margin-bottom: 14px; }
.auth-panel .input { min-height: 44px; font-size: 14.5px; }
.auth-foot { margin-top: 22px; text-align: center; font-size: 12px; color: var(--muted); }
.returning { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid #cfe5d4; background: var(--g50); border-radius: 10px; margin-bottom: 18px; }
.returning strong { display: block; font-size: 15px; color: var(--ink); }
.returning small { color: var(--g700); font-weight: 600; }
.pw-wrap { position: relative; }
.pw-wrap button { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: none; cursor: pointer; color: var(--muted); padding: 6px; }
.welcome { min-height: 100vh; display: grid; place-items: center; background: radial-gradient(circle at 50% 30%, #145c2e, var(--g950)); color: #fff; text-align: center; padding: 24px; }
.welcome img.avatar { width: 150px; height: 150px; border: 5px solid #fff; box-shadow: 0 12px 40px rgba(0, 0, 0, .4); }
.welcome h1 { font-size: 34px; font-weight: 600; margin-top: 22px; }
.welcome h1 span { color: #ffd23c; }
.welcome p { font-size: 16px; opacity: .9; margin-top: 6px; }
.welcome .bar { width: 240px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .2); margin: 26px auto 0; overflow: hidden; }
.welcome .bar i { display: block; height: 100%; background: #ffd23c; animation: fill 2.2s linear forwards; }
@keyframes fill { from { width: 0; } to { width: 100%; } }
.error-page { min-height: 100vh; display: grid; place-items: center; background: var(--bg); text-align: center; padding: 24px; }
.error-page b { font-size: 84px; font-weight: 800; color: var(--g700); font-family: var(--font-head); line-height: 1; }
.error-page h1 { font-size: 24px; margin: 8px 0; color: var(--ink); }
.error-page p { color: var(--muted); max-width: 460px; margin: 0 auto 20px; }

/* dashboard */
.hello { display: flex; align-items: center; gap: 18px; padding: 16px 20px; margin-bottom: 16px; background: linear-gradient(100deg, var(--g800), #17753a); color: #fff; border-radius: var(--radius); }
.hello img { width: 68px; height: 68px; border: 3px solid rgba(255, 255, 255, .85); }
.hello h2 { font-size: 21px; font-weight: 600; }
.hello h2 span { color: #ffd23c; }
.hello p { opacity: .9; font-size: 13.5px; }
.hello .grow + div { text-align: right; font-size: 13px; opacity: .95; }
.task-row { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.task-row:last-child { border-bottom: 0; }
.task-row .grow b { display: block; color: var(--ink); font-weight: 600; }
.bars { display: flex; align-items: flex-end; gap: 10px; height: 170px; padding-top: 10px; }
.bars .bar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; height: 100%; font-size: 11.5px; color: var(--text); }
.bars .bar i { width: 100%; max-width: 44px; border-radius: 5px 5px 0 0; background: linear-gradient(180deg, var(--g500), var(--g700)); min-height: 3px; }
.bars .bar b { font-weight: 600; font-size: 11px; }

/* public QR page */
.public { min-height: 100vh; background: var(--bg); padding: 20px 14px; }
.public .sheet { max-width: 520px; margin: 0 auto; background: #fff; border-radius: 14px; overflow: hidden; box-shadow: 0 10px 34px rgba(10, 46, 22, .14); }
.public .sheet-head { background: var(--g800); color: #fff; padding: 18px; display: flex; align-items: center; gap: 14px; }
.public .sheet-head img { width: 66px; height: 66px; background: #fff; border-radius: 50%; }
.public .sheet-body { padding: 18px; }

/* ------------------------------------------------------------ responsive */
.scrim { display: none; }
@media (max-width: 1360px) {
    :root { --sidebar-w: 216px; }
    .sys-title h1 { font-size: 28px; }
    .content { padding: 16px; }
    .topbar { padding: 12px 16px; }
}
@media (max-width: 1180px) {
    .g-2-1, .g-3-2, .g-1-2, .g3 { grid-template-columns: minmax(0, 1fr); }
    .g4, .g5, .g6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .span-2, .span-3 { grid-column: auto; }
    .today { display: none; }
}
@media (max-width: 900px) {
    .app { margin: 0; border-radius: 0; }
    .sidebar { position: fixed; z-index: 90; inset: 0 auto 0 0; transform: translateX(-102%); transition: transform .2s; overflow-y: auto; }
    body.nav-open .sidebar { transform: none; }
    body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(6, 32, 15, .5); z-index: 80; }
    .nav-toggle { display: block; }
    .sys-title h1 { font-size: 19px; white-space: normal; }
    .version-row { display: none; }
    .who { display: none; }
    .g2, .g4, .g5, .g6 { grid-template-columns: minmax(0, 1fr); }
    .auth { grid-template-columns: 1fr; } .auth-art { display: none; }
    .doc-tiles, .mini-tiles, .balance-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .amount-row { grid-template-columns: 1fr 140px; }
    .stepper { justify-content: flex-start; }
    .reminder { grid-template-columns: 30px minmax(0, 1fr) 40px; } .reminder .when { display: none; }
}
@media (min-width: 901px) {
    .sidebar { position: sticky; top: 0; align-self: flex-start; max-height: calc(100vh - 10px); min-height: calc(100vh - 10px); overflow-y: auto; scrollbar-width: none; }
    .sidebar::-webkit-scrollbar { display: none; }
}

/* ------------------------------------------------------------ print */
@media print {
    body { background: #fff; }
    .sidebar, .topbar, .actions, .form-actions, .no-print, .alert, .pagination { display: none !important; }
    .app { margin: 0; display: block; background: #fff; }
    .content { padding: 0; }
    .card { box-shadow: none; break-inside: avoid; }
    .card-head { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ------------------------------------------------------------ proposal screen */
fieldset.plain { border: 0; margin: 0; padding: 0; min-width: 0; }
fieldset.plain:disabled .input { background: #fbfcfb; color: var(--ink); opacity: 1; -webkit-text-fill-color: var(--ink); }
.proposal-top { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr) minmax(0, 1fr); }
.machine-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: stretch; }
.machine-grid .stack > * + * { margin-top: 10px; }
.machine-grid .photo-box img { max-height: 132px; }
.machine-id { grid-template-columns: 96px minmax(0, 1fr); gap: 12px; align-items: start; }
.ident { border: 1px solid var(--line); border-radius: 5px; overflow: hidden; }
.ident-head { background: var(--g100); color: var(--g800); font-weight: 700; font-size: 12px; padding: 6px 12px; }
.ident dl { display: grid; grid-template-columns: 46% 1fr; margin: 0; font-size: 12.5px; }
.ident dt, .ident dd { margin: 0; padding: 6px 12px; border-top: 1px solid var(--line); }
.ident dt { font-weight: 600; color: var(--ink); border-right: 1px solid var(--line); }
.ident dd .input { min-height: 26px; padding: 2px 26px 2px 6px; font-size: 12px; }
.decision { display: flex; gap: 12px; align-items: flex-end; flex: 1 1 100%; flex-wrap: wrap; text-align: left; }
@media (max-width: 1180px) { .proposal-top { grid-template-columns: minmax(0, 1fr); } }

/* printable documents (proposal / quotation / labels) */
.doc-body { background: #e9eeeb; }
.doc { max-width: 860px; margin: 18px auto; background: #fff; padding: 30px 34px; border-radius: 8px; box-shadow: var(--shadow); color: #1c2620; }
.doc-actions { display: flex; gap: 10px; margin-bottom: 18px; }
.doc-head { display: flex; gap: 18px; align-items: center; border-bottom: 3px solid var(--g700); padding-bottom: 14px; }
.doc-head h1 { font-family: var(--font-head); font-size: 28px; color: var(--g800); letter-spacing: .4px; }
.doc-head p { font-size: 12.5px; }
.doc-head > div:nth-child(2) { flex: 1; }
.doc-no { text-align: right; font-size: 12.5px; display: grid; gap: 2px; }
.doc-no b { color: var(--red); font-size: 15px; letter-spacing: .6px; }
.doc-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin: 18px 0; }
.doc-cols h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--g700); border-bottom: 1px solid var(--line); padding-bottom: 4px; margin-bottom: 6px; }
.doc-cols p { font-size: 13px; margin-top: 3px; }
.doc-table { border: 1px solid var(--line); }
.doc-table th { background: var(--g800); color: #fff; }
.doc-total td { background: var(--g100); font-weight: 700; font-size: 15px; }
.doc-sign { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 64px; font-size: 12.5px; text-align: center; }
.doc-sign div { border-top: 1px solid #8b958f; padding-top: 8px; }
@media print {
    .doc-body { background: #fff; }
    .doc { box-shadow: none; margin: 0; padding: 0; max-width: none; }
    .doc-table th, .doc-total td { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ------------------------------------------------------------ model & price management */
.model-filters { grid-template-columns: minmax(0, 1.55fr) minmax(0, .9fr) minmax(0, .9fr) minmax(0, .9fr) auto; align-items: end; gap: 16px 34px; }
.model-detail { grid-template-columns: minmax(0, 2.6fr) minmax(0, 1fr) minmax(0, 1.4fr); align-items: start; }
.model-basic { grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: 18px; }
.model-basic .stack > * + *, .price-stack > * + * { margin-top: 12px; }
.price-stack > * + * { margin-top: 22px; }
.finance-kv { grid-template-columns: 1fr 150px; }
.acc-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 5px 0; }
.acc-type { width: 112px; border-color: transparent; background-color: transparent; text-align: right; color: var(--text); }
.acc-type:hover, .acc-type:focus { border-color: var(--line-2); background-color: #fff; }
@media (max-width: 1180px) { .model-filters, .model-detail, .model-basic { grid-template-columns: minmax(0, 1fr); } }
select.acc-type { width: 112px; }
.acc-row .check { white-space: nowrap; }
.tabs .tab { padding: 8px 15px; }

/* ------------------------------------------------------------ stock */
.stock-grid { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 1180px) { .stock-grid { grid-template-columns: minmax(0, 1fr); } }

/* ------------------------------------------------------------ stock entry */
.entry-grid { grid-template-columns: minmax(0, 2.95fr) minmax(0, 1fr); align-items: start; }
.entry-table td { vertical-align: top; }
.unit-head, .unit-line { display: grid; grid-template-columns: 1fr 1fr 150px 104px; gap: 8px; align-items: center; }
.unit-line + .unit-line { margin-top: 8px; }
.entry-table .cell-prod select { min-width: 150px; }
.summary-kv { grid-template-columns: 1fr auto; font-size: 13px; }
.summary-kv dd { text-align: right; font-variant-numeric: tabular-nums; }
.summary-kv dd .input { min-width: 150px; }
.sum-total { display: flex; justify-content: space-between; align-items: center; background: var(--g100); border-radius: 6px; padding: 10px 12px; margin-top: 12px; }
.sum-total span { font-weight: 700; color: var(--ink); }
.sum-total b { font-size: 21px; color: var(--g800); font-variant-numeric: tabular-nums; }
.qr-box { width: 132px; height: 132px; border: 1px solid var(--line); border-radius: 4px; display: grid; place-items: center; text-align: center; padding: 6px; flex: none; }
.qr-box svg { width: 100%; height: 100%; border: 0; }
@media (max-width: 1180px) { .entry-grid { grid-template-columns: minmax(0, 1fr); } .unit-head, .unit-line { grid-template-columns: 1fr 1fr; } .unit-head span:nth-child(n+3) { display: none; } }
.qr-big svg { width: 260px; height: 260px; max-width: 100%; }
.qr-label > div { display: grid; gap: 1px; }

/* ------------------------------------------------------------ manpower */
.emp-filters { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)) auto; gap: 10px; }
.row-menu .dropdown-menu { min-width: 170px; top: calc(100% + 4px); text-align: left; }
.seg .btn.tab { border: 1px solid var(--line-2); margin: 0; border-radius: 5px; }
.seg .btn.tab.active { background: var(--g800); border-color: var(--g800); color: #fff; }
code { background: var(--g50); border: 1px solid var(--line); border-radius: 4px; padding: 2px 6px; font-size: 12px; }
@media (max-width: 1180px) { .emp-filters { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }

/* layout refinements */
.entry-grid { grid-template-columns: minmax(0, 3.3fr) minmax(250px, 1fr); }
.unit-head, .unit-line { grid-template-columns: minmax(96px, 1fr) minmax(96px, 1fr) 138px 92px; gap: 6px; }
.unit-line .btn-sm { padding: 6px 8px; }
.entry-table th, .entry-table td { padding: 8px 7px; }
.entry-table .cell-prod { min-width: 0; gap: 6px; }
.entry-table .cell-prod .thumb { width: 44px; height: 36px; }
.entry-table .cell-prod select { min-width: 128px; }
.mp-bottom { grid-template-columns: minmax(0, 1fr) minmax(0, .95fr) minmax(0, 1.2fr); }
.mp-perf { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 10px; }
.mp-perf .kpi-box b { font-size: 16.5px; }
.mp-perf .rank { font-size: 12.5px; gap: 8px; padding: 5px 0; }
.mp-perf .rank b { white-space: nowrap; }
.stat-label { line-height: 1.25; }
@media (max-width: 1360px) { .mp-bottom { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .mp-bottom > :last-child { grid-column: 1 / -1; } }
@media (max-width: 1180px) { .mp-bottom { grid-template-columns: minmax(0, 1fr); } }
.doc-tiles { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }

/* ------------------------------------------------------------ small screens: collapse every inline column layout */
@media (max-width: 1180px) {
    .grid[style*="grid-template-columns"] { grid-template-columns: minmax(0, 1fr) !important; }
}
@media (max-width: 900px) {
    .content { padding: 12px; }
    .topbar { min-height: 64px; padding: 8px 12px; gap: 10px; }
    .top-tools { gap: 10px; }
    .bell { border-right: 0; padding-right: 8px; }
    .bell .count { right: -2px; }
    .page-head h2 { font-size: 20px; }
    .actions { width: 100%; }
    .actions .btn { flex: 1 1 auto; padding: 9px 12px; }
    .flow { overflow-x: auto; padding-bottom: 6px; }
    .flow-step { width: 64px; font-size: 12px; flex: none; }
    .flow-ico { width: 40px; height: 40px; }
    .flow-arrow { min-width: 14px; }
    .card-title { flex-wrap: wrap; row-gap: 4px; }
    .donut { width: 160px; height: 160px; }
    .legend { min-width: 0; width: 100%; }
    .stat { padding: 12px; }
    .stat-value { font-size: 20px; }
    .form-actions .btn { flex: 1 1 140px; }
    .btn-lg { min-width: 0; }
    .emp-filters, .model-filters { grid-template-columns: minmax(0, 1fr); }
    .kv { grid-template-columns: minmax(96px, 40%) 1fr; }
    .machine-grid, .machine-id { grid-template-columns: minmax(0, 1fr); }
    .ident dl { grid-template-columns: 44% 1fr; }
    .hello { flex-wrap: wrap; }
    .hello .grow + div { text-align: left; width: 100%; }
    .banner .meta span + span { border-left: 0; padding-left: 0; }
    .notif-menu { width: min(320px, calc(100vw - 24px)); right: -60px; }
    .doc { padding: 16px; margin: 0; border-radius: 0; }
    .doc-head { flex-wrap: wrap; }
    .doc-cols, .doc-sign { grid-template-columns: minmax(0, 1fr); }
    .auth-panel { padding: 28px 22px; }
}
@media (max-width: 900px) {
    .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .stat { gap: 10px; }
    .stat-ico { width: 40px; height: 40px; border-radius: 8px; }
    .stat-ico .icon { width: 22px; height: 22px; }
    .stat-label { font-size: 12px; }
    .stat-value { font-size: 18px; white-space: normal; }
    .stat-sub { font-size: 11.5px; }
}

/* ------------------------------------------------------------ additions matching the samples */
.is-disabled { opacity: .5; pointer-events: none; }
.mini-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; text-align: center; font-size: 12px; }
.mini-cal b { font-weight: 700; color: var(--muted); padding: 2px 0; }
.mini-cal span { position: relative; padding: 7px 0; border-radius: 5px; background: #f6f8f7; color: var(--ink); min-height: 30px; }
.mini-cal span.off { background: none; }
.mini-cal span.on { background: var(--amber-50); color: #9a5b00; font-weight: 700; cursor: help; }
.mini-cal span.today { box-shadow: inset 0 0 0 2px var(--g600); }
.mini-cal span i { position: absolute; top: 1px; right: 3px; font-style: normal; font-size: 9.5px; background: var(--amber); color: #fff; border-radius: 8px; min-width: 14px; line-height: 14px; }
.mp-bottom .tbl.compact th, .mp-bottom .tbl.compact td { padding: 7px 5px; font-size: 12px; }
.mp-bottom .card-title { font-size: 14.5px; gap: 7px; }
.mp-bottom .card-title small { font-size: 12px; }
.mp-perf .rank span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-perf .rank b { font-size: 12.5px; }
.mp-perf .kpi-box { padding: 8px 10px; }
.seg .btn.tab { transition: none; }
.mp-bottom .tbl.compact th, .mp-bottom .tbl.compact td { padding: 7px 4px; font-size: 11.5px; }
.mp-bottom .tbl.compact td:first-child { white-space: nowrap; }
.mp-bottom .pill { font-size: 10.5px; padding: 2px 7px; }
.mp-bottom > .card { padding: 14px 14px; }
.mp-bottom { grid-template-columns: minmax(0, 1.12fr) minmax(0, .9fr) minmax(0, 1.14fr); }
.mp-bottom .tbl.compact th, .mp-bottom .tbl.compact td { padding: 7px 3px; }
.mp-perf { grid-template-columns: minmax(0, .64fr) minmax(0, 1.36fr); gap: 8px; }
.mp-perf .kpi-box b { font-size: 15px; }
.mp-perf .kpi-box span { font-size: 11.5px; }
.mp-perf .rank { gap: 6px; }
.mp-bottom .balance-tiles div { padding: 8px 9px; font-size: 11.5px; }
.mp-bottom .balance-tiles b { font-size: 14px; white-space: nowrap; }

/* =====================================================================
   Desktop density - proportions measured from the sample screens
   (sidebar 210px, ~28px inputs, compact cards). Phones keep larger touch sizes.
   ===================================================================== */
@media (min-width: 901px) {
    :root { --sidebar-w: 212px; }
    body { font-size: 12.5px; }
    .brand { height: 158px; padding: 4px 8px 6px; }
    .brand img { width: 152px; height: 152px; }
    .menu { padding: 8px 0 4px; }
    .menu-item { padding: 8px 12px 8px 14px; font-size: 12.5px; gap: 10px; }
    .submenu { padding: 2px 6px 6px; }
    .sub-item { padding: 6px 10px 6px 30px; font-size: 12px; margin: 1px 0; }
    .side-art { min-height: 220px; flex-basis: 220px; }
    .tagline { font-size: 22px; }
    .topbar { min-height: 84px; padding: 10px 22px 8px 18px; }
    .sys-title h1 { font-size: 33px; }
    .version { font-size: 14.5px; }
    .avatar { width: 42px; height: 42px; }
    .who strong { font-size: 14.5px; } .who small { font-size: 12.5px; }
    .today strong { font-size: 13.5px; } .today span { font-size: 13px; }
    .content { padding: 14px 20px 20px; }
    .page-head { margin-bottom: 10px; }
    .page-head h2 { font-size: 21px; }
    .crumbs { font-size: 11.5px; margin-top: 2px; }
    .btn { padding: 8px 16px; font-size: 13px; }
    .btn-lg { padding: 9px 26px; font-size: 13.5px; }
    .btn-sm { padding: 5px 10px; font-size: 12px; }
    .btn-light { padding: 3px 10px; font-size: 11.5px; }
    .card-pad { padding: 12px 14px; }
    .card-body { padding: 10px 12px; }
    .card-head { padding: 7px 14px; min-height: 30px; }
    .card-head h3 { font-size: 12.5px; }
    .card-title { font-size: 14px; margin-bottom: 10px; }
    .grid { gap: 12px; }
    .stats { gap: 12px; margin-bottom: 12px; }
    .section-gap { margin-top: 12px; }
    .stack > * + * { margin-top: 12px; }
    .stat { padding: 10px 12px; gap: 12px; }
    .stat-ico { width: 46px; height: 46px; }
    .stat-label { font-size: 12px; } .stat-value { font-size: 20px; } .stat-sub { font-size: 11.5px; }
    .field > label, .label { font-size: 11.5px; margin-bottom: 3px; }
    .input, select.input, textarea.input { padding: 5px 9px; font-size: 12.5px; min-height: 29px; }
    textarea.input { min-height: 46px; }
    .input.sm { min-height: 26px; padding: 3px 8px; font-size: 12px; }
    select.input { padding-right: 28px; background-position: right 8px center; }
    .gap-sm, .form-row { gap: 8px 12px; }
    .form-actions { margin-top: 12px; gap: 12px; }
    .tbl { font-size: 12px; }
    .tbl th { padding: 7px 8px; font-size: 11.5px; }
    .tbl td { padding: 6px 8px; }
    .tbl.compact th, .tbl.compact td { padding: 5px 6px; font-size: 11.5px; }
    .table-foot { padding: 8px 4px 0; font-size: 12px; }
    .pg { min-width: 24px; height: 24px; font-size: 12px; }
    .pill { font-size: 10.5px; padding: 1px 8px; }
    .thumb { width: 44px; height: 34px; } .thumb.sq { width: 34px; height: 28px; }
    .icon-btn { width: 25px; height: 25px; }
    .tabs { margin-bottom: 10px; }
    .tab, .tabs .tab { padding: 6px 14px; font-size: 12.5px; }
    .alert { padding: 8px 12px; margin-bottom: 10px; }
    .banner { padding: 9px 14px; margin-bottom: 10px; }
    .banner h3 { font-size: 13.5px; margin-bottom: 4px; } .banner .meta { font-size: 12px; }
    .stepper { padding: 9px 14px; margin-bottom: 10px; }
    .step-ico { width: 36px; height: 36px; } .step-no { font-size: 17px; }
    .step-text strong { font-size: 12.5px; } .step-text small { font-size: 10.5px; }
    .amount-row { gap: 5px 10px; grid-template-columns: 1fr 172px; }
    .amount-row > span { font-size: 12px; } .amount-row .total { font-size: 14.5px; }
    .kv { gap: 6px 10px; } .kv dt { font-size: 12px; }
    .ident-head { padding: 4px 10px; font-size: 11.5px; }
    .ident dl { font-size: 11.5px; } .ident dt, .ident dd { padding: 4px 10px; }
    .doc-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
    .doc-tile { padding: 5px 6px; gap: 5px; } .doc-tile b { font-size: 9.5px; } .doc-tile i { font-size: 9px; }
    .doc-tile .icon { width: 16px; height: 16px; }
    .machine-grid .photo-box img { max-height: 108px; }
    .machine-grid .stack > * + * { margin-top: 8px; }
    .timeline { gap: 6px; } .tl-card { padding: 4px 10px; }
    .donut { width: 170px; height: 170px; }
    .legend { gap: 9px; } .legend-row { font-size: 12px; }
    .flow-ico { width: 40px; height: 40px; } .flow-step { font-size: 12px; }
    .flow-desc { padding: 10px 14px; margin-top: 10px; } .flow-desc h4 { font-size: 14.5px; } .flow-desc p { font-size: 12px; }
    .reminder { padding: 7px 12px; } .reminder strong { font-size: 12.5px; } .reminder small { font-size: 11.5px; }
    .model-pick { padding: 4px 10px; } .model-pick img { width: 92px; height: 52px; }
    .model-pick select { min-height: 50px; font-size: 13px; }
    .mini-tile { padding: 7px 6px; } .mini-tile b { font-size: 19px; } .mini-tile span { font-size: 12px; }
    .note-bar { padding: 8px; font-size: 12px; }
    .hello { padding: 12px 16px; margin-bottom: 12px; } .hello img { width: 56px; height: 56px; } .hello h2 { font-size: 19px; }
    .price-stack > * + * { margin-top: 12px; }
    .model-basic { gap: 14px; } .model-basic .stack > * + * { margin-top: 8px; }
    .model-filters { gap: 12px 26px; }
    .summary-kv { font-size: 12px; } .sum-total { padding: 8px 12px; margin-top: 10px; } .sum-total b { font-size: 19px; }
    .qr-preview svg, .qr-box { width: 118px; height: 118px; }
    .unit-line + .unit-line { margin-top: 6px; }
    .entry-table th, .entry-table td { padding: 6px 6px; }
    .kpi-box { padding: 7px 10px; } .kpi-box b { font-size: 17px; }
    .balance-tiles div { padding: 8px 12px; }
}

/* stock overview: single-line rows and all ten columns visible, as in the sample */
.stock-bottom { grid-template-columns: minmax(0, 1fr) minmax(0, 1.17fr); }
@media (max-width: 1180px) { .stock-bottom { grid-template-columns: minmax(0, 1fr); } }
@media (min-width: 901px) {
    .stock-bottom .tbl.compact th, .stock-bottom .tbl.compact td,
    .stock-grid .stack .tbl.compact th, .stock-grid .stack .tbl.compact td { white-space: nowrap; font-size: 11px; padding: 5px 5px; }
    .stock-grid > .card .tbl.compact th, .stock-grid > .card .tbl.compact td { padding: 5px 4px; font-size: 11px; }
    .stock-grid > .card .tbl.compact th { white-space: nowrap; }
    .stock-grid .cell-prod { min-width: 108px; gap: 6px; }
    .stock-grid .donut { width: 158px; height: 158px; }
    .stock-grid .donut-wrap { gap: 16px; padding: 0; }
}
@media (min-width: 901px) {
    /* proposal form: the sample uses very compact rows */
    .proposal-top .card-pad { padding: 10px 12px; }
    .proposal-top .card-title { margin-bottom: 7px; font-size: 13.5px; }
    .proposal-top .input, .proposal-top select.input { min-height: 26px; padding: 3px 8px; font-size: 12px; }
    .proposal-top textarea.input { min-height: 40px; }
    .proposal-top .gap-sm { gap: 6px 10px; }
    .proposal-top .field > label, .proposal-top .label { margin-bottom: 2px; font-size: 11px; }
    .proposal-top .amount-row { gap: 4px 10px; }
    .proposal-top .ident dt, .proposal-top .ident dd { padding: 3px 9px; }
    .proposal-top .mt-2 { margin-top: 7px; }
    .proposal-top .kv { gap: 5px 10px; }
    .proposal-top .machine-grid .photo-box img { max-height: 96px; }
    .proposal-top .timeline { gap: 5px; }
    .stepper { padding: 7px 14px; margin-bottom: 9px; }
    .stock-bottom td:nth-child(4), .stock-bottom td:first-child { max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
}
@media (min-width: 901px) {
    select.acc-type { width: 98px; font-size: 11.5px; padding-right: 22px; background-position: right 5px center; }
    .acc-row { padding: 3px 0; }
    .thumbs { gap: 8px; margin-top: 8px; }
    .thumbs .t { width: 62px; height: 50px; }
}

/* sidebar at the samples' measured width and type scale; dashboard greeting as a card like the samples' cards */
@media (min-width: 901px) {
    :root { --sidebar-w: 204px; }
    .brand { height: 154px; }
    .brand img { width: 148px; height: 148px; }
    .menu-item { font-size: 11.6px; gap: 8px; padding: 8px 8px 8px 12px; letter-spacing: -.1px; }
    .menu-item > .icon:first-child { width: 17px; height: 17px; }
    .sub-item { font-size: 11.3px; padding: 6px 8px 6px 28px; }
    .tagline { font-size: 21px; }
}
.hello { background: #fff; color: var(--text); border: 1px solid var(--line); border-left: 4px solid var(--g600); box-shadow: var(--shadow); }
.hello h2 { color: var(--ink); }
.hello h2 span { color: var(--g700); }
.hello p { opacity: 1; }
.hello img { border-color: var(--g100); }
.hello .btn-light { color: var(--g700); border-color: var(--g600); }
.hello .btn-light:hover { background: var(--g50); border-color: var(--g600); }

/* welcome screen and print documents in the samples' light card language */
.welcome { background: var(--bg); color: var(--ink); }
.welcome > div { background: #fff; border: 1px solid var(--line); border-top: 6px solid var(--g800); border-radius: 12px; box-shadow: 0 10px 34px rgba(10, 46, 22, .10); padding: 36px 64px 30px; max-width: 560px; width: 100%; }
.welcome img.avatar { border-color: var(--g100); box-shadow: none; }
.welcome h1 { font-size: 28px; }
.welcome h1 span { color: var(--g700); }
.welcome p { opacity: 1; color: var(--text); font-size: 14px; }
.welcome .bar { background: var(--g100); }
.welcome .bar i { background: var(--g600); }
.doc-body { background: var(--bg); }

/* sidebar artwork: bright daylight scene as in the samples (lighter overlay, just enough for the tagline) */
.side-art img { object-position: 50% 100%; -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 20%); mask-image: linear-gradient(180deg, transparent 0, #000 20%); }
.side-art::after { inset: 76% 0 0; background: linear-gradient(180deg, transparent, rgba(4, 22, 10, .5)); }
@media (max-width: 900px) {
    .welcome { padding: 16px; }
    .welcome > div { padding: 28px 20px 24px; }
    .welcome .bar { width: 100%; max-width: 240px; }
    .welcome h1 { font-size: 22px; }
}

/* fit the designed screens in one 1536x1024 screen like the samples */
@media (min-width: 901px) {
    .content { padding: 12px 20px 12px; }
    .page-head { margin-bottom: 8px; }
    .grid { gap: 10px; }
    .stats { gap: 10px; margin-bottom: 10px; }
    .section-gap { margin-top: 10px; }
    .stack > * + * { margin-top: 10px; }
    .stat { padding: 8px 12px; }
    .note-bar { padding: 6px 8px; }
    .form-actions { margin-top: 10px; }
    .tbl.compact th, .tbl.compact td { padding: 4px 6px; }
    .avatar.sm { width: 24px; height: 24px; }
    .side-art { min-height: 250px; flex-basis: 250px; }
    /* proposal */
    .stepper { padding: 5px 14px; margin-bottom: 8px; }
    .banner { padding: 7px 14px; margin-bottom: 8px; }
    .proposal-top .card-pad { padding: 8px 12px; }
    .proposal-top .card-title { margin-bottom: 5px; font-size: 13px; }
    .proposal-top .input, .proposal-top select.input { min-height: 23px; padding: 2px 8px; font-size: 11.5px; }
    .proposal-top select.input { padding-right: 24px; }
    .proposal-top textarea.input { min-height: 34px; }
    .proposal-top .gap-sm { gap: 4px 10px; }
    .proposal-top .field > label, .proposal-top .label { margin-bottom: 1px; font-size: 10.8px; }
    .proposal-top .amount-row { gap: 3px 10px; }
    .proposal-top .ident dt, .proposal-top .ident dd { padding: 2px 9px; }
    .proposal-top .ident dd .input { min-height: 20px; padding: 0 22px 0 6px; }
    .proposal-top .doc-tile { padding: 3px 6px; }
    .proposal-top .mt-2 { margin-top: 5px; }
    .proposal-top .kv { gap: 4px 10px; }
    .proposal-top .tl-card { padding: 3px 10px; }
    .proposal-top .machine-grid .photo-box img { max-height: 90px; }
    /* model & price management */
    .model-detail .card-pad { padding: 10px 12px; }
    .model-detail .tabs { margin-bottom: 8px; }
    .model-detail .input, .model-detail select.input { min-height: 26px; padding: 3px 8px; }
    .model-basic .stack > * + * { margin-top: 5px; }
    .model-basic textarea.input { min-height: 38px; height: 44px; }
    .model-basic .photo-box { min-height: 150px !important; }
    .price-stack > * + * { margin-top: 8px; }
    .finance-kv { gap: 5px 10px; }
    /* manpower */
    .mp-bottom .card-title { margin-bottom: 6px; }
    .mini-tile { padding: 5px 6px; }
    .content .donut { width: 150px; height: 150px; }
}

/* the shell has a 5px margin all round, so one full screen is the viewport minus that margin */
.app { min-height: calc(100vh - 10px); }

/* long open submenus: the artwork gives up height instead of pushing its tagline off the screen */
@media (min-width: 901px) {
    .side-art { flex: 0 1 300px; min-height: 150px; }   /* samples: artwork fills the bottom 250-310px */
    /* captions stay inside the hole of the smaller donuts */
    .content .donut-center { padding: 0 24%; font-size: 11.5px; line-height: 1.2; }
    .content .donut-center b { font-size: 18px; }
    /* model photo strip stays on one row, as in the sample */
    .model-basic .thumbs { flex-wrap: nowrap; gap: 6px; }
    .model-basic .thumbs .t { flex: 1 1 0; min-width: 0; width: auto; height: 46px; }
    .model-basic .thumbs .t.add { font-size: 10px; line-height: 1.1; }
}

/* recent transfers: every column, including Status, stays inside its card */
@media (min-width: 901px) {
    .tbl-fit { table-layout: fixed; width: 100%; }
    .tbl-fit th, .tbl-fit td { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: none !important; }
    .stock-bottom .tbl.compact.transfers-mini th, .stock-bottom .tbl.compact.transfers-mini td { font-size: 10.5px; }
    .transfers-mini th:nth-child(1) { width: 15%; } .transfers-mini th:nth-child(2) { width: 15.7%; }
    .transfers-mini th:nth-child(3) { width: 19.7%; } .transfers-mini th:nth-child(4) { width: 17.2%; }
    .transfers-mini th:nth-child(5) { width: 5.2%; }  .transfers-mini th:nth-child(6) { width: 12.8%; }
    .transfers-mini th:nth-child(7) { width: 14.4%; }
    /* accessory type reads in full next to its caret */
    select.acc-type { width: 104px; padding-left: 4px; padding-right: 20px; text-align: left; text-align-last: left; }
    .transfers-mini .badge { padding-left: 5px; padding-right: 5px; }
}
