:root {
    --bg:#f4f6f5; --surface:#fff; --surface-soft:#f8faf9; --surface-strong:#eef3f0;
    --sidebar:#0a281d; --sidebar-soft:#143d2d; --primary:#0b6b45; --primary-strong:#075235;
    --primary-soft:#e7f3ed; --accent:#f3a600; --accent-soft:#fff5dc; --text:#17221d;
    --muted:#6f7c75; --border:#e0e7e3; --danger:#d64545; --danger-soft:#fcebec;
    --info:#3975c6; --info-soft:#eaf1fb; --violet:#7b5bc7; --violet-soft:#f0ebfb;
    --shadow:0 8px 28px rgba(19,47,36,.065); --radius:16px; --sidebar-width:264px;
    --map-road:#a8aea9; --map-road-line:#d7dbd8; --map-land:#edf1ef; --map-outline:#526059;
}
[data-theme="dark"] {
    --bg:#0d1512; --surface:#14201b; --surface-soft:#182720; --surface-strong:#1d3027;
    --sidebar:#061610; --sidebar-soft:#102d21; --primary:#45bd83; --primary-strong:#65d29b;
    --primary-soft:#153a2a; --accent:#efaa25; --accent-soft:#392d13; --text:#edf4f0;
    --muted:#91a39a; --border:#293b33; --danger:#f16e6e; --danger-soft:#3c2020;
    --info:#76a8f1; --info-soft:#1d3049; --violet:#aa91e7; --violet-soft:#2d2442;
    --shadow:0 10px 30px rgba(0,0,0,.22);
    --map-road:#46524c; --map-road-line:#69756f; --map-land:#1b2923; --map-outline:#84958c;
}
* { box-sizing:border-box; }
html,body { margin:0; min-height:100%; }
body { background:var(--bg); color:var(--text); font-family:Inter,Arial,sans-serif; font-size:14px; }
body.modal-open { overflow:hidden; }
a { color:inherit; text-decoration:none; }
button,input,select,textarea { font:inherit; }
button { color:inherit; }
svg { width:19px; height:19px; }
.app-shell { min-height:100vh; }
.sidebar { position:fixed; inset:0 auto 0 0; z-index:60; width:var(--sidebar-width); padding:18px 14px; display:flex; flex-direction:column; background:var(--sidebar); color:#edf7f2; transition:width .25s ease,transform .25s ease; }
.brand { height:72px; padding:0 8px 14px; display:flex; align-items:center; border-bottom:1px solid rgba(255,255,255,.09); overflow:hidden; }
.brand-crop,.auth-logo { position:relative; display:block; width:210px; height:56px; overflow:hidden; border-radius:10px; background:#fff; }
.brand-crop img,.auth-logo img { position:absolute; width:210px; height:374px; object-fit:cover; object-position:center; top:-159px; left:0; }
.main-nav { flex:1; overflow-y:auto; display:flex; flex-direction:column; gap:4px; padding:16px 2px; scrollbar-width:thin; }
.nav-label { margin-top:10px; padding:4px 11px 7px; color:rgba(237,247,242,.4); font-size:10px; font-weight:700; letter-spacing:.14em; text-transform:uppercase; }
.nav-label:first-child { margin-top:0; }
.main-nav a { min-height:42px; padding:0 11px; border-radius:10px; display:flex; align-items:center; gap:12px; color:rgba(237,247,242,.7); transition:.18s ease; }
.main-nav a:hover { color:#fff; background:rgba(255,255,255,.055); }
.main-nav a.active { color:#fff; background:rgba(65,180,123,.16); box-shadow:inset 3px 0 var(--accent); }
.main-nav a span { white-space:nowrap; font-size:13px; font-weight:500; }
.main-nav a b { margin-left:auto; min-width:20px; height:20px; padding:0 5px; border-radius:20px; display:grid; place-items:center; background:var(--accent); color:#18221e; font-size:10px; }
.sidebar-user { min-height:59px; padding:14px 4px 0; border-top:1px solid rgba(255,255,255,.09); display:flex; align-items:center; gap:10px; overflow:hidden; }
.avatar { --avatar:#0b6b45; width:38px; height:38px; min-width:38px; border-radius:11px; display:grid; place-items:center; background:linear-gradient(145deg,var(--avatar),var(--accent)); color:#fff; font-size:11px; font-weight:700; }
.user-copy { min-width:0; flex:1; }
.user-copy strong,.user-copy small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.user-copy strong { color:#fff; font-size:12px; }
.user-copy small { margin-top:3px; color:rgba(237,247,242,.5); font-size:10px; }
.main-area { min-height:100vh; margin-left:var(--sidebar-width); transition:margin-left .25s ease; }
.topbar { position:sticky; top:0; z-index:50; height:68px; padding:0 28px; display:flex; align-items:center; gap:16px; background:color-mix(in srgb,var(--surface) 92%,transparent); backdrop-filter:blur(14px); border-bottom:1px solid var(--border); }
.icon-button,.action-button { width:38px; height:38px; min-width:38px; padding:0; border:1px solid var(--border); border-radius:10px; display:inline-grid; place-items:center; background:transparent; cursor:pointer; transition:.18s ease; }
.icon-button:hover,.action-button:hover { color:var(--primary); border-color:var(--primary); background:var(--primary-soft); }
.icon-button.inverse { width:34px; height:34px; min-width:34px; color:rgba(255,255,255,.55); border-color:rgba(255,255,255,.12); }
.icon-button.danger:hover,.action-button.danger:hover { color:var(--danger); border-color:var(--danger); background:var(--danger-soft); }
.icon-button.warning:hover { color:#a66b00; border-color:var(--accent); background:var(--accent-soft); }
.global-search { width:min(430px,38vw); height:40px; padding:0 13px; border:1px solid var(--border); border-radius:11px; display:flex; align-items:center; gap:9px; color:var(--muted); background:var(--surface-soft); }
.global-search svg { width:18px; height:18px; }
.global-search input { min-width:0; width:100%; border:0; outline:0; color:var(--text); background:transparent; font-size:12px; }
.top-actions { margin-left:auto; display:flex; align-items:center; gap:9px; }
.today { margin-right:7px; color:var(--muted); font-size:12px; }
.notification { position:relative; }
.notification em { position:absolute; top:7px; right:7px; width:7px; height:7px; border-radius:50%; background:var(--accent); box-shadow:0 0 0 2px var(--surface); }
.mobile-menu { display:none; }
.sidebar-backdrop { display:none; }
.page-content { width:100%; max-width:1700px; margin:auto; padding:30px 30px 50px; }
.page-header { margin-bottom:23px; display:flex; justify-content:space-between; align-items:flex-end; gap:18px; }
.page-header.compact { align-items:center; }
.eyebrow { display:block; margin-bottom:7px; color:var(--primary); font-size:10px; font-weight:750; letter-spacing:.14em; text-transform:uppercase; }
.eyebrow.light { color:#8fe0b7; }
.page-header h1,.section-heading h1 { margin:0; font-size:clamp(24px,2.3vw,32px); line-height:1.15; letter-spacing:-.035em; }
.page-header p,.section-heading p { margin:8px 0 0; color:var(--muted); font-size:12px; line-height:1.5; }
.header-actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; justify-content:flex-end; }
.button { min-height:39px; padding:0 14px; border:1px solid var(--border); border-radius:10px; display:inline-flex; align-items:center; justify-content:center; gap:8px; background:transparent; color:var(--text); font-size:11px; font-weight:650; cursor:pointer; transition:.18s ease; }
.button svg { width:17px; height:17px; }
.button:hover { border-color:var(--primary); color:var(--primary); background:var(--primary-soft); }
.button.primary { color:#fff; border-color:var(--primary); background:var(--primary); box-shadow:0 7px 18px color-mix(in srgb,var(--primary) 20%,transparent); }
.button.primary:hover { color:#fff; background:var(--primary-strong); }
.button.danger { color:var(--danger); border-color:color-mix(in srgb,var(--danger) 45%,var(--border)); }
.button.danger:hover { background:var(--danger-soft); border-color:var(--danger); }
.button.wide { width:100%; }
.button.small { min-height:32px; padding:0 10px; border-radius:8px; font-size:10px; }
.panel { min-width:0; padding:19px 20px; border:1px solid var(--border); border-radius:var(--radius); background:var(--surface); box-shadow:var(--shadow); }
.panel + .panel { margin-top:16px; }
.panel-header { margin-bottom:16px; display:flex; align-items:flex-start; justify-content:space-between; gap:14px; }
.panel-header h2,.panel-header h3 { margin:0; font-size:14px; letter-spacing:-.015em; }
.panel-header p { margin:5px 0 0; color:var(--muted); font-size:10px; }
.panel-actions { display:flex; gap:7px; align-items:center; }
.metric-grid { margin-bottom:16px; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; }
.metric-card { min-height:124px; padding:18px; display:flex; align-items:flex-start; gap:13px; position:relative; border:1px solid var(--border); border-radius:var(--radius); background:var(--surface); box-shadow:var(--shadow); }
.metric-icon { width:39px; height:39px; min-width:39px; border-radius:11px; display:grid; place-items:center; }
.metric-icon.green { color:var(--primary); background:var(--primary-soft); }
.metric-icon.amber { color:#b67800; background:var(--accent-soft); }
.metric-icon.red { color:var(--danger); background:var(--danger-soft); }
.metric-icon.blue { color:var(--info); background:var(--info-soft); }
.metric-icon.violet { color:var(--violet); background:var(--violet-soft); }
.metric-copy span,.metric-copy strong,.metric-copy small { display:block; }
.metric-copy span { margin:1px 0 8px; color:var(--muted); font-size:11px; }
.metric-copy strong { font-size:clamp(20px,1.7vw,25px); line-height:1; letter-spacing:-.04em; }
.metric-copy small { margin-top:11px; color:var(--muted); font-size:9px; }
.metric-copy small.positive { color:var(--primary); }
.metric-copy small.negative { color:var(--danger); }
.metric-card .action-button { position:absolute; top:13px; right:13px; width:29px; height:29px; min-width:29px; border-radius:8px; color:var(--muted); }
.grid-2 { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.grid-main-side { display:grid; grid-template-columns:minmax(0,1.75fr) minmax(300px,.72fr); gap:16px; }
.grid-3 { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; }
.stack { display:grid; gap:16px; }
.filters { margin-bottom:16px; padding:13px; display:flex; align-items:center; flex-wrap:wrap; gap:9px; border:1px solid var(--border); border-radius:14px; background:var(--surface); box-shadow:var(--shadow); }
.search-field { min-width:240px; flex:1; height:39px; padding:0 12px; display:flex; align-items:center; gap:8px; border:1px solid var(--border); border-radius:10px; background:var(--surface-soft); color:var(--muted); }
.search-field input { min-width:0; width:100%; border:0; outline:0; background:transparent; color:var(--text); font-size:11px; }
.filters select,.filters input[type=date],.filters input[type=month] { height:39px; padding:0 31px 0 11px; border:1px solid var(--border); border-radius:10px; outline:0; color:var(--text); background:var(--surface-soft); font-size:11px; }
.filter-chips { display:flex; flex-wrap:wrap; gap:7px; }
.chip { min-height:31px; padding:0 10px; border:1px solid var(--border); border-radius:20px; display:inline-flex; align-items:center; gap:6px; color:var(--muted); background:transparent; font-size:9px; font-weight:600; }
.chip.active,.chip:hover { color:var(--primary); border-color:var(--primary); background:var(--primary-soft); }
.table-wrap { overflow-x:auto; margin:0 -4px; }
.data-table { width:100%; min-width:760px; border-collapse:collapse; }
.data-table th { padding:10px 9px; border-bottom:1px solid var(--border); color:var(--muted); font-size:9px; font-weight:650; text-align:left; text-transform:uppercase; letter-spacing:.04em; white-space:nowrap; }
.data-table td { padding:11px 9px; border-bottom:1px solid var(--border); font-size:10px; vertical-align:middle; }
.data-table tbody tr:last-child td { border-bottom:0; }
.data-table tbody tr:hover { background:color-mix(in srgb,var(--surface-soft) 75%,transparent); }
.data-table td strong { font-size:10px; }
.cell-user { display:flex; align-items:center; gap:9px; min-width:150px; }
.cell-user .avatar { width:30px; height:30px; min-width:30px; border-radius:8px; font-size:9px; }
.cell-user span:last-child strong,.cell-user span:last-child small { display:block; }
.cell-user span:last-child small { margin-top:3px; color:var(--muted); font-size:8px; }
.row-actions { display:flex; justify-content:flex-end; gap:6px; }
.row-actions .action-button { width:30px; height:30px; min-width:30px; border-radius:8px; }
.badge { padding:5px 9px; border-radius:20px; display:inline-flex; align-items:center; gap:5px; font-size:9px; font-style:normal; font-weight:650; white-space:nowrap; }
.badge.success,.badge.active,.badge.available,.badge.paid { color:var(--primary); background:var(--primary-soft); }
.badge.warning,.badge.reserved,.badge.pending,.badge.open,.badge.partial { color:#a76d00; background:var(--accent-soft); }
.badge.danger,.badge.overdue,.badge.cancelled,.badge.inactive,.badge.defaulted { color:var(--danger); background:var(--danger-soft); }
.badge.info,.badge.sold { color:var(--info); background:var(--info-soft); }
.badge.neutral,.badge.blocked { color:var(--muted); background:var(--surface-strong); }
.progress { width:100%; max-width:120px; height:5px; overflow:hidden; border-radius:9px; background:var(--surface-strong); }
.progress span { height:100%; display:block; border-radius:inherit; background:var(--primary); }
.pagination { margin-top:16px; display:flex; align-items:center; justify-content:space-between; color:var(--muted); font-size:10px; }
.pagination div { display:flex; gap:6px; }
.pagination a,.pagination span.page { width:32px; height:32px; border:1px solid var(--border); border-radius:8px; display:grid; place-items:center; }
.pagination .active { color:#fff; border-color:var(--primary); background:var(--primary); }
.empty-state { padding:40px 20px; display:flex; align-items:center; justify-content:center; flex-direction:column; text-align:center; color:var(--muted); }
.empty-state.large { min-height:60vh; }
.empty-state h1,.empty-state h3 { margin:14px 0 6px; color:var(--text); }
.empty-state p { margin:0 0 18px; max-width:430px; line-height:1.6; }
.empty-icon { width:56px; height:56px; border-radius:16px; display:grid; place-items:center; color:var(--primary); background:var(--primary-soft); }
.empty-icon svg { width:25px; height:25px; }
.form-card { max-width:1100px; }
.form-section { padding:4px 0 21px; margin-bottom:21px; border-bottom:1px solid var(--border); }
.form-section:last-child { margin-bottom:0; padding-bottom:0; border-bottom:0; }
.form-section-title { margin-bottom:15px; display:flex; align-items:center; gap:10px; }
.form-section-title > span { width:34px; height:34px; border-radius:9px; display:grid; place-items:center; color:var(--primary); background:var(--primary-soft); }
.form-section-title h3 { margin:0; font-size:13px; }
.form-section-title p { margin:4px 0 0; color:var(--muted); font-size:9px; }
.form-grid { display:grid; grid-template-columns:repeat(12,minmax(0,1fr)); gap:13px; }
.form-grid.single { grid-template-columns:1fr; }
.field { grid-column:span 4; display:grid; gap:6px; }
.field.span-2 { grid-column:span 6; }
.field.span-3 { grid-column:span 4; }
.field.span-full { grid-column:1/-1; }
.field.span-8 { grid-column:span 8; }
.field.span-3cols { grid-column:span 3; }
.span-full { grid-column:1/-1; }
.field > span,.field-label { color:var(--muted); font-size:9px; font-weight:650; }
.field .required { color:var(--danger); }
.field input,.field select,.field textarea,.modal-content input,.modal-content select,.modal-content textarea {
    width:100%; min-height:40px; padding:0 11px; border:1px solid var(--border); border-radius:10px; outline:0; color:var(--text); background:var(--surface-soft); font-size:11px; transition:.18s ease;
}
.field textarea,.modal-content textarea { min-height:90px; padding-top:10px; resize:vertical; }
.field input:focus,.field select:focus,.field textarea:focus,.modal-content input:focus,.modal-content select:focus,.modal-content textarea:focus { border-color:var(--primary); box-shadow:0 0 0 3px color-mix(in srgb,var(--primary) 11%,transparent); }
.field small { color:var(--muted); font-size:8px; line-height:1.45; }
.field.inline-check { display:flex; align-items:center; gap:8px; }
.field.inline-check input { width:auto; min-height:auto; }
.form-footer { padding-top:19px; display:flex; justify-content:flex-end; gap:8px; }
.summary-strip { padding:14px; border-radius:12px; display:grid; grid-template-columns:repeat(3,1fr); gap:12px; background:var(--primary-soft); }
.summary-strip span { color:var(--muted); font-size:9px; }
.summary-strip strong { display:block; margin-top:5px; color:var(--text); font-size:14px; }
.info-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.info-item { padding:12px; border:1px solid var(--border); border-radius:11px; background:var(--surface-soft); }
.info-item span,.info-item strong { display:block; }
.info-item span { color:var(--muted); font-size:8px; text-transform:uppercase; letter-spacing:.05em; }
.info-item strong { margin-top:6px; font-size:11px; line-height:1.45; }
.profile-card { display:flex; align-items:center; gap:14px; }
.profile-card .avatar { width:56px; height:56px; min-width:56px; border-radius:16px; font-size:16px; }
.profile-card h2 { margin:0; font-size:19px; }
.profile-card p { margin:5px 0 0; color:var(--muted); font-size:10px; }
.tabs { margin-bottom:15px; display:flex; gap:7px; overflow-x:auto; }
.tab-button { min-height:34px; padding:0 12px; border:1px solid var(--border); border-radius:9px; background:transparent; color:var(--muted); font-size:10px; font-weight:600; cursor:pointer; white-space:nowrap; }
.tab-button.active { color:var(--primary); border-color:var(--primary); background:var(--primary-soft); }
.view-switch { display:inline-flex; align-items:center; gap:5px; padding:4px; border:1px solid var(--border); border-radius:12px; background:var(--surface); }
.view-switch .action-button { width:32px; height:32px; min-width:32px; border-color:transparent; border-radius:8px; color:var(--muted); }
.view-switch .action-button.active { color:var(--primary); border-color:var(--primary); background:var(--primary-soft); }
.lot-map-panel { overflow:hidden; padding-bottom:14px; }
.lot-map-header { align-items:center; }
.lot-map-legend { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:12px; }
.lot-map-legend span { display:inline-flex; align-items:center; gap:6px; color:var(--muted); font-size:8px; font-weight:650; }
.lot-map-legend i { width:11px; height:11px; border:1px solid var(--map-outline); border-radius:3px; background:var(--surface); }
.lot-map-legend i.reserved { border-color:#c18311; background:var(--accent-soft); }
.lot-map-legend i.sold { border-color:var(--danger); background:#f4a3a3; }
.lot-map-legend i.blocked { border-color:#9b9398; background:#d9d3d7; }
.lot-map-shell { position:relative; min-width:0; border:1px solid var(--border); border-radius:14px; overflow:hidden; background:var(--surface-soft); }
.lot-map-scroll { width:100%; overflow:auto hidden; scrollbar-width:thin; scrollbar-color:var(--border) transparent; }
.lot-map-svg { display:block; width:100%; min-width:1120px; height:auto; aspect-ratio:1640/650; background:linear-gradient(155deg,var(--surface) 0,var(--surface-soft) 100%); }
.lot-plan text { pointer-events:none; user-select:none; font-family:Inter,Arial,sans-serif; }
.map-road { fill:url(#pavingPattern); stroke:var(--map-outline); stroke-width:1.2; }
.map-road.avenue { opacity:.96; }
.road-label { fill:var(--text); font-size:13px; font-weight:650; letter-spacing:.08em; }
.road-label.vertical { font-size:11px; }
.block-base path { fill:var(--map-land); stroke:var(--map-outline); stroke-width:1.2; }
.block-label { fill:color-mix(in srgb,var(--text) 11%,transparent); font-size:62px; font-weight:800; letter-spacing:-.07em; }
.lot-shape { outline:none; }
.lot-shape rect,.lot-shape polygon { fill:var(--surface); stroke:var(--map-outline); stroke-width:1.15; vector-effect:non-scaling-stroke; transition:fill .16s ease,stroke .16s ease,filter .16s ease,opacity .16s ease; }
.lot-shape text { fill:var(--text); font-size:10px; font-weight:750; text-anchor:middle; dominant-baseline:middle; }
.lot-shape.status-reserved rect,.lot-shape.status-reserved polygon { fill:var(--accent-soft); stroke:#bd7d06; }
.lot-shape.status-sold rect,.lot-shape.status-sold polygon { fill:#f4a3a3; stroke:#cb4e4e; }
.lot-shape.status-blocked rect,.lot-shape.status-blocked polygon { fill:#d9d3d7; stroke:#91898e; }
.lot-shape.status-not-registered rect,.lot-shape.status-not-registered polygon { fill:color-mix(in srgb,var(--surface-strong) 72%,transparent); stroke:var(--border); stroke-dasharray:3 2; }
.lot-shape.status-not-registered text { fill:var(--muted); opacity:.62; }
.lot-shape[role=button] { cursor:pointer; }
.lot-shape[role=button]:hover rect,.lot-shape[role=button]:hover polygon,.lot-shape[role=button]:focus rect,.lot-shape[role=button]:focus polygon { fill:var(--primary-soft); stroke:var(--primary); stroke-width:2.5; filter:url(#lotHoverShadow); }
.lot-shape.is-selected rect,.lot-shape.is-selected polygon { fill:var(--primary-soft); stroke:var(--primary); stroke-width:4; filter:url(#lotHoverShadow); }
.lot-shape.is-disabled { cursor:not-allowed; opacity:.58; }
.lot-map-mobile-hint { display:none; min-height:34px; padding:0 12px; align-items:center; justify-content:center; gap:7px; border-top:1px solid var(--border); color:var(--muted); background:var(--surface); font-size:8px; }
.lot-map-mobile-hint svg { width:14px; height:14px; }
.lot-picker { padding:14px; border:1px solid var(--border); border-radius:14px; background:var(--surface-soft); }
.lot-picker-heading { margin-bottom:11px; display:flex; align-items:center; justify-content:space-between; gap:12px; }
.lot-picker-heading > div:first-child > span,.lot-picker-heading > div:first-child > small { display:block; }
.lot-picker-heading > div:first-child > span { color:var(--muted); font-size:9px; font-weight:650; }
.lot-picker-heading > div:first-child > small { margin-top:4px; color:var(--muted); font-size:8px; }
.selected-lot-summary { margin-bottom:11px; padding:10px 12px; display:flex; align-items:center; gap:10px; border:1px dashed var(--border); border-radius:11px; background:var(--surface); }
.selected-lot-summary.has-selection { border-style:solid; border-color:color-mix(in srgb,var(--primary) 48%,var(--border)); background:var(--primary-soft); }
.selected-lot-icon { width:31px; height:31px; min-width:31px; border-radius:9px; display:grid; place-items:center; color:var(--primary); background:var(--primary-soft); }
.selected-lot-summary small,.selected-lot-summary strong { display:block; }
.selected-lot-summary small { color:var(--muted); font-size:8px; }
.selected-lot-summary strong { margin-top:3px; font-size:10px; }
.lot-picker [data-lot-picker-view=list] { padding:7px 0 0; }
.lot-drawer-hero { padding:17px; display:flex; align-items:center; gap:13px; border:1px solid var(--border); border-radius:14px; background:var(--surface-soft); }
.lot-drawer-hero.status-sold { border-color:color-mix(in srgb,var(--danger) 35%,var(--border)); background:var(--danger-soft); }
.lot-drawer-hero.status-reserved { border-color:color-mix(in srgb,var(--accent) 45%,var(--border)); background:var(--accent-soft); }
.lot-drawer-mark { width:48px; height:48px; min-width:48px; border-radius:13px; display:grid; place-items:center; color:var(--primary); background:var(--primary-soft); }
.lot-drawer-mark svg { width:23px; height:23px; }
.lot-drawer-hero span,.lot-drawer-hero strong,.lot-drawer-hero small { display:block; }
.lot-drawer-hero > div > span { color:var(--muted); font-size:8px; font-weight:700; text-transform:uppercase; letter-spacing:.08em; }
.lot-drawer-hero strong { margin-top:4px; font-size:18px; }
.lot-drawer-hero small { margin-top:4px; color:var(--muted); font-size:9px; }
.drawer-section { margin-top:20px; }
.drawer-section-heading { margin-bottom:10px; padding-bottom:8px; border-bottom:1px solid var(--border); color:var(--muted); font-size:9px; font-weight:750; text-transform:uppercase; letter-spacing:.08em; }
.buyer-card { margin-bottom:12px; padding:12px; display:flex; align-items:center; gap:10px; border:1px solid var(--border); border-radius:12px; background:var(--surface-soft); }
.buyer-card .avatar { width:38px; height:38px; min-width:38px; border-radius:10px; }
.buyer-card strong,.buyer-card small { display:block; }
.buyer-card strong { font-size:11px; }
.buyer-card small { margin-top:3px; color:var(--muted); font-size:8px; }
.drawer-quick-actions { margin-top:18px; display:flex; justify-content:flex-end; gap:7px; }
.adjustment-box { margin:13px 0; padding:13px; border:1px solid var(--border); border-radius:12px; background:var(--surface-soft); }
.adjustment-box > strong { display:block; margin-bottom:10px; color:var(--primary); font-size:10px; text-transform:uppercase; letter-spacing:.08em; }
.finance-filters { display:grid; grid-template-columns:repeat(6,minmax(125px,1fr)) auto; align-items:end; }
.finance-filters label { display:grid; gap:5px; color:var(--muted); font-size:8px; font-weight:700; text-transform:uppercase; letter-spacing:.05em; }
.payment-whatsapp-card { display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:14px; align-items:center; margin-bottom:18px; padding:16px 18px; border:1px solid color-mix(in srgb,#1fa463 42%,var(--border)); border-radius:15px; background:color-mix(in srgb,#1fa463 8%,var(--surface)); box-shadow:var(--shadow-sm); }
.payment-whatsapp-card p { margin:4px 0 0; color:var(--muted); font-size:.86rem; line-height:1.5; }
.payment-whatsapp-icon { display:grid; place-items:center; width:42px; height:42px; border-radius:12px; background:#dff7e9; color:#087844; }
.payment-whatsapp-icon svg { width:21px; height:21px; }
.whatsapp-action { width:42px; height:42px; border-color:#169b5b!important; color:#087844!important; background:transparent!important; }
.whatsapp-action:hover { background:#e2f7eb!important; }
.dashboard-primary { margin-bottom:16px; }
.bar-chart { height:220px; padding:15px 8px 22px; display:flex; align-items:flex-end; gap:clamp(9px,2vw,24px); border-bottom:1px solid var(--border); background:repeating-linear-gradient(to bottom,transparent,transparent calc(25% - 1px),var(--border) 25%); }
.chart-column { height:100%; flex:1; display:flex; align-items:flex-end; justify-content:center; position:relative; }
.chart-bars { width:min(38px,90%); display:flex; align-items:flex-end; gap:3px; }
.chart-bar { min-width:9px; flex:1; min-height:2px; border-radius:5px 5px 1px 1px; background:var(--primary); }
.chart-bar.expense { background:var(--accent); opacity:.75; }
.chart-column > span { position:absolute; bottom:-20px; color:var(--muted); font-size:8px; }
.donut { --sold:0deg; width:145px; height:145px; margin:20px auto; border-radius:50%; display:grid; place-items:center; background:conic-gradient(var(--primary) 0 var(--sold),var(--accent) var(--sold) calc(var(--sold) + 30deg),var(--surface-strong) 0); }
.donut::before { content:""; width:94px; height:94px; grid-area:1/1; border-radius:50%; background:var(--surface); }
.donut div { z-index:1; grid-area:1/1; text-align:center; }
.donut strong,.donut span { display:block; }
.donut strong { font-size:25px; }
.donut span { margin-top:2px; color:var(--muted); font-size:9px; }
.legend { display:grid; gap:9px; }
.legend div { display:grid; grid-template-columns:8px 1fr auto; align-items:center; gap:8px; font-size:10px; }
.legend i { width:7px; height:7px; border-radius:50%; }
.legend span { color:var(--muted); }
.alert-list { display:grid; gap:7px; }
.alert-row { padding:12px 0; display:grid; grid-template-columns:8px 1fr auto; gap:10px; border-bottom:1px solid var(--border); }
.alert-row:last-child { border-bottom:0; }
.alert-dot { width:7px; height:7px; margin-top:5px; border-radius:50%; background:var(--accent); }
.alert-dot.danger { background:var(--danger); }
.alert-dot.info { background:var(--info); }
.alert-row strong,.alert-row span { display:block; }
.alert-row strong { font-size:10px; }
.alert-row span { margin-top:4px; color:var(--muted); font-size:9px; line-height:1.45; }
.ranking-list { display:grid; gap:10px; }
.ranking-row { padding:9px 0; display:grid; grid-template-columns:26px 1fr auto; align-items:center; gap:9px; border-bottom:1px solid var(--border); }
.ranking-row:last-child { border-bottom:0; }
.ranking-row > b { width:25px; height:25px; border-radius:8px; display:grid; place-items:center; color:var(--primary); background:var(--primary-soft); font-size:9px; }
.ranking-row strong,.ranking-row small { display:block; }
.ranking-row strong { font-size:10px; }
.ranking-row small { margin-top:3px; color:var(--muted); font-size:8px; }
.kanban-toolbar { margin-bottom:16px; display:flex; justify-content:space-between; align-items:center; gap:12px; }
.kanban-board { min-height:560px; padding-bottom:14px; display:flex; align-items:flex-start; gap:13px; overflow-x:auto; scroll-snap-type:x proximity; }
.kanban-column { width:292px; min-width:292px; padding:11px; border:1px solid var(--border); border-radius:14px; background:color-mix(in srgb,var(--surface-soft) 80%,transparent); scroll-snap-align:start; }
.kanban-column-header { margin-bottom:10px; padding:2px 3px 8px; display:flex; align-items:center; gap:8px; border-bottom:1px solid var(--border); }
.kanban-column-header > i { width:8px; height:8px; border-radius:50%; background:var(--stage); }
.kanban-column-header strong { font-size:10px; }
.kanban-count { margin-left:auto; width:22px; height:22px; border-radius:7px; display:grid; place-items:center; color:var(--muted); background:var(--surface-strong); font-size:8px; }
.kanban-cards { min-height:450px; display:grid; align-content:start; gap:9px; transition:.15s; }
.kanban-cards.drag-over { padding:5px; border-radius:10px; background:var(--primary-soft); }
.kanban-card { padding:13px; border:1px solid var(--border); border-radius:12px; background:var(--surface); box-shadow:0 4px 13px rgba(18,46,35,.05); cursor:grab; }
.kanban-card.dragging { opacity:.45; transform:rotate(1deg); }
.kanban-card-head { display:flex; justify-content:space-between; gap:8px; }
.kanban-card h3 { margin:0; font-size:11px; }
.kanban-card p { margin:7px 0 0; display:flex; align-items:center; gap:5px; color:var(--muted); font-size:8px; }
.kanban-card p svg { width:13px; height:13px; }
.kanban-card-meta { margin-top:12px; padding-top:10px; display:flex; justify-content:space-between; align-items:center; border-top:1px solid var(--border); }
.priority { width:7px; height:7px; border-radius:50%; background:var(--muted); }
.priority.high { background:var(--accent); }
.priority.urgent { background:var(--danger); }
.priority.low { background:var(--info); }
.permission-table td:first-child { min-width:210px; }
.permission-state { min-width:260px; display:grid; grid-template-columns:repeat(3,1fr); gap:5px; }
.permission-state label { cursor:pointer; }
.permission-state input { position:absolute; opacity:0; pointer-events:none; }
.permission-state span { min-height:30px; padding:0 8px; display:flex; align-items:center; justify-content:center; border:1px solid var(--border); border-radius:8px; color:var(--muted); font-size:8px; }
.permission-state input:checked + span { color:var(--primary); border-color:var(--primary); background:var(--primary-soft); }
.permission-state label:last-child input:checked + span { color:var(--danger); border-color:var(--danger); background:var(--danger-soft); }
.modal-root { position:fixed; inset:0; z-index:100; display:none; }
.modal-root.open { display:block; }
.modal-backdrop { position:absolute; inset:0; width:100%; height:100%; border:0; background:rgba(4,17,11,.52); backdrop-filter:blur(3px); }
.modal-panel { position:absolute; top:0; right:0; width:min(560px,100%); height:100%; overflow-y:auto; background:var(--surface); box-shadow:-20px 0 60px rgba(0,0,0,.18); animation:slideIn .22s ease; }
@keyframes slideIn { from { transform:translateX(30px); opacity:.5; } }
.modal-panel > header { position:sticky; top:0; z-index:2; min-height:76px; padding:17px 20px; display:flex; justify-content:space-between; gap:15px; border-bottom:1px solid var(--border); background:color-mix(in srgb,var(--surface) 95%,transparent); backdrop-filter:blur(8px); }
.modal-panel h2 { margin:0; font-size:19px; }
.modal-content { padding:21px 20px 36px; }
.modal-content form { display:grid; gap:13px; }
.modal-content label { display:grid; gap:6px; color:var(--muted); font-size:9px; font-weight:600; }
.modal-content .modal-actions { margin-top:8px; display:flex; justify-content:flex-end; gap:8px; }
.toast-stack { position:fixed; top:80px; right:18px; z-index:120; width:min(380px,calc(100vw - 30px)); display:grid; gap:8px; }
.toast { min-height:54px; padding:11px 12px; border:1px solid var(--border); border-left:3px solid var(--info); border-radius:11px; display:grid; grid-template-columns:20px 1fr 28px; align-items:center; gap:8px; background:var(--surface); box-shadow:0 16px 38px rgba(0,0,0,.14); animation:toastIn .25s ease; transition:.25s; }
.toast.success { border-left-color:var(--primary); }
.toast.danger { border-left-color:var(--danger); }
.toast span { font-size:10px; line-height:1.45; }
.toast button { width:27px; height:27px; border:0; display:grid; place-items:center; background:transparent; cursor:pointer; }
.toast button svg { width:15px; height:15px; }
.toast.leaving { opacity:0; transform:translateX(20px); }
@keyframes toastIn { from { opacity:0; transform:translateY(-8px); } }
.flash { margin:12px 0; padding:11px 12px; border-radius:10px; font-size:10px; line-height:1.45; }
.flash.success { color:var(--primary); background:var(--primary-soft); }
.flash.danger { color:var(--danger); background:var(--danger-soft); }
.flash.warning { color:#9a6500; background:var(--accent-soft); }
.auth-body { min-height:100vh; background:var(--surface); }
.auth-layout { min-height:100vh; display:grid; grid-template-columns:minmax(380px,48%) 1fr; }
.auth-aside { position:relative; overflow:hidden; padding:60px; display:flex; align-items:flex-end; color:#fff; background:linear-gradient(145deg,#071f16,#0b5137 68%,#13704c); }
.auth-aside::before { content:""; position:absolute; width:420px; height:420px; top:-130px; right:-100px; border:80px solid rgba(255,255,255,.035); border-radius:50%; }
.auth-aside::after { content:""; position:absolute; width:260px; height:260px; left:-80px; bottom:80px; border-radius:46% 54% 66% 34%; background:rgba(243,166,0,.12); transform:rotate(25deg); }
.auth-aside-copy { position:relative; z-index:1; max-width:520px; }
.auth-aside h1 { margin:0; max-width:500px; font-size:clamp(35px,4.2vw,61px); line-height:1.02; letter-spacing:-.05em; }
.auth-aside p { max-width:480px; margin:21px 0 30px; color:rgba(255,255,255,.68); line-height:1.75; }
.auth-points { display:flex; flex-wrap:wrap; gap:10px; }
.auth-points span { padding:10px 12px; display:flex; align-items:center; gap:7px; border:1px solid rgba(255,255,255,.12); border-radius:10px; background:rgba(255,255,255,.05); font-size:10px; }
.auth-points svg { width:15px; height:15px; color:#83d8ae; }
.auth-form-wrap { padding:35px; display:grid; place-items:center; background:var(--bg); }
.auth-card,.install-card { width:min(410px,100%); padding:32px; border:1px solid var(--border); border-radius:20px; background:var(--surface); box-shadow:var(--shadow); }
.auth-logo { width:220px; margin-bottom:28px; }
.auth-card h2,.install-card h1 { margin:0; font-size:23px; letter-spacing:-.035em; }
.auth-card > p,.install-card > p { margin:9px 0 22px; color:var(--muted); font-size:11px; line-height:1.6; }
.auth-card label { margin-bottom:13px; display:grid; gap:7px; }
.auth-card label > span { color:var(--muted); font-size:9px; font-weight:650; }
.input-icon { height:43px; padding:0 11px; display:flex; align-items:center; gap:8px; border:1px solid var(--border); border-radius:10px; background:var(--surface-soft); color:var(--muted); }
.input-icon input { width:100%; border:0; outline:0; color:var(--text); background:transparent; font-size:11px; }
.input-icon svg { width:16px; height:16px; }
.auth-card > small { margin-top:18px; display:block; color:var(--muted); font-size:8px; text-align:center; }
.install-card { margin:7vh auto; }
.install-card .auth-logo { margin-inline:auto; }
.install-card .form-grid label { display:grid; gap:6px; color:var(--muted); font-size:9px; }
.install-card input { min-height:42px; padding:0 10px; border:1px solid var(--border); border-radius:10px; color:var(--text); background:var(--surface-soft); }
.is-collapsed .sidebar { width:76px; }
.is-collapsed .main-area { margin-left:76px; }
.is-collapsed .brand { padding-inline:2px; }
.is-collapsed .brand-crop { width:44px; }
.is-collapsed .brand-crop img { left:-12px; }
.is-collapsed .nav-label,.is-collapsed .main-nav a span,.is-collapsed .main-nav a b,.is-collapsed .user-copy,.is-collapsed .sidebar-user form { display:none; }
.is-collapsed .main-nav a { padding:0; justify-content:center; }
.is-collapsed .sidebar-user { justify-content:center; padding-inline:0; }
.muted { color:var(--muted); }
.text-danger { color:var(--danger); }
.text-success { color:var(--primary); }
.text-right { text-align:right; }
.nowrap { white-space:nowrap; }
[hidden] { display:none!important; }
@media (max-width:1180px) {
    .metric-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .grid-main-side { grid-template-columns:minmax(0,1.55fr) minmax(280px,.75fr); }
    .today { display:none; }
    .field { grid-column:span 6; }
    .field.span-8 { grid-column:span 8; }
    .field.span-3cols { grid-column:span 4; }
    .finance-filters { grid-template-columns:repeat(3,minmax(140px,1fr)); }
}
@media (max-width:900px) {
    .sidebar { width:var(--sidebar-width); transform:translateX(-100%); box-shadow:18px 0 50px rgba(0,0,0,.2); }
    .sidebar.is-open { transform:translateX(0); }
    .main-area,.is-collapsed .main-area { margin-left:0; }
    .desktop-menu { display:none; }
    .mobile-menu { display:inline-grid; }
    .sidebar-backdrop { position:fixed; inset:0; z-index:55; border:0; background:rgba(4,17,11,.5); backdrop-filter:blur(2px); }
    .sidebar.is-open + * {}
    body:has(.sidebar.is-open) .sidebar-backdrop { display:block; }
    .topbar { padding:0 18px; }
    .page-content { padding:25px 18px 42px; }
    .grid-main-side,.grid-2 { grid-template-columns:1fr; }
    .grid-3 { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .auth-layout { grid-template-columns:1fr; }
    .auth-aside { display:none; }
    .lot-map-svg { min-width:980px; }
    .lot-map-mobile-hint { display:flex; }
}
@media (max-width:620px) {
    .topbar { height:62px; padding:0 12px; gap:8px; }
    .global-search { min-width:0; width:auto; flex:1; }
    .global-search input::placeholder { color:transparent; }
    .top-actions { gap:5px; }
    .top-actions .icon-button { width:35px; height:35px; min-width:35px; }
    .page-content { padding:20px 12px 35px; }
    .page-header { align-items:center; }
    .page-header p { max-width:230px; }
    .header-actions .button.primary { width:39px; padding:0; }
    .header-actions .button.primary span { display:none; }
    .metric-grid,.grid-3 { grid-template-columns:1fr; gap:10px; }
    .metric-card { min-height:108px; }
    .panel { padding:16px 13px; border-radius:14px; }
    .filters { padding:10px; }
    .search-field { min-width:100%; }
    .filters select,.filters input[type=date],.filters input[type=month] { flex:1; min-width:130px; }
    .field,.field.span-2,.field.span-3,.field.span-8,.field.span-3cols { grid-column:1/-1; }
    .form-footer { position:sticky; bottom:0; margin:0 -13px -16px; padding:12px 13px; background:var(--surface); border-top:1px solid var(--border); }
    .summary-strip { grid-template-columns:1fr; }
    .info-list { grid-template-columns:1fr; }
    .auth-form-wrap { padding:15px; }
    .auth-card { padding:26px 20px; }
    .modal-panel { width:100%; }
    .permission-state { min-width:230px; }
    .lot-map-header { align-items:flex-start; flex-direction:column; }
    .lot-map-legend { justify-content:flex-start; }
    .lot-map-panel { padding-inline:10px; }
    .lot-picker { padding:10px; }
    .lot-picker-heading { align-items:flex-start; }
    .lot-map-svg { min-width:900px; }
    .finance-filters { grid-template-columns:1fr 1fr; }
    .payment-whatsapp-card { grid-template-columns:auto 1fr; padding:14px; }
    .payment-whatsapp-card > .action-button,.payment-whatsapp-card > .muted { grid-column:1/-1; justify-self:end; }
}
@media print {
    .sidebar,.topbar,.header-actions,.filters,.row-actions,.toast-stack,.tabs button { display:none!important; }
    .main-area { margin-left:0!important; }
    .page-content { max-width:none; padding:0; }
    body { color:#000; background:#fff; }
    .panel,.metric-card { break-inside:avoid; box-shadow:none; border-color:#ccc; }
    .data-table { min-width:0; }
}
