:root {
  --ink: #17221f;
  --muted: #73807b;
  --paper: #f4f1ea;
  --card: #fffdf8;
  --line: #e5e0d6;
  --forest: #17332d;
  --forest-2: #24493f;
  --orange: #e56d34;
  --orange-soft: #f9e6d9;
  --green: #3c7c68;
  --green-soft: #dcece5;
  --yellow: #d2a138;
  --yellow-soft: #f6edcf;
  --red: #bd584c;
  --shadow: 0 20px 50px rgba(34, 42, 37, .08);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "DM Sans", "Noto Sans SC", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button { color: inherit; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 246px minmax(0, 1fr); }
.sidebar {
  position: fixed; z-index: 30; inset: 0 auto 0 0; width: 246px;
  display: flex; flex-direction: column; padding: 27px 18px 20px;
  color: #f6f2e8; background: var(--forest);
}
.brand { display: flex; align-items: center; gap: 11px; padding: 0 10px 28px; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: var(--orange); }
.brand-mark svg { width: 23px; color: white; }
.brand strong { display: block; font-size: 18px; letter-spacing: .14em; }
.brand span { display: block; margin-top: 2px; color: #90a39c; font-size: 8px; letter-spacing: .18em; }
.main-nav { display: grid; gap: 5px; }
.nav-item { width: 100%; border: 0; border-radius: 11px; padding: 12px 13px; display: flex; align-items: center; gap: 13px; color: #aebdb8; background: transparent; cursor: pointer; text-align: left; transition: .18s ease; }
.nav-item:hover { color: white; background: rgba(255,255,255,.06); }
.nav-item.active { color: white; background: rgba(255,255,255,.11); box-shadow: inset 3px 0 var(--orange); }
.nav-item svg { width: 19px; }
.sidebar-properties { margin-top: 29px; min-height: 0; overflow: hidden; }
.sidebar-label { padding: 0 10px 9px; display: flex; justify-content: space-between; align-items: center; color: #7f9890; font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.icon-button { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: transparent; cursor: pointer; transition: .18s ease; }
.icon-button:hover { background: rgba(23,51,45,.06); }
.icon-button.mini { width: 22px; height: 22px; padding: 0; border: 0; color: #9fb0aa; }
.sidebar-property-list { display: grid; gap: 3px; max-height: 242px; overflow-y: auto; scrollbar-width: thin; }
.sidebar-property-row { min-width: 0; border-radius: 10px; display: grid; grid-template-columns: minmax(0, 1fr) 34px; align-items: center; transition: .18s ease; }
.sidebar-property-row:hover, .sidebar-property-row.active { background: rgba(255,255,255,.07); }
.sidebar-property { min-width: 0; border: 0; border-radius: 10px; padding: 10px; display: flex; align-items: center; gap: 10px; color: #9fb0aa; background: transparent; cursor: pointer; text-align: left; }
.sidebar-property-row:hover .sidebar-property, .sidebar-property-row.active .sidebar-property { color: white; }
.sidebar-property-delete { width: 28px; height: 28px; padding: 6px; border: 0; border-radius: 8px; color: #789189; background: transparent; cursor: pointer; transition: .18s ease; }
.sidebar-property-delete svg { width: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sidebar-property-delete:hover, .sidebar-property-delete:focus-visible { color: #ffd8ca; background: rgba(229,109,52,.2); outline: none; }
.property-thumb { width: 30px; height: 30px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 8px; color: white; font-size: 12px; font-weight: 700; }
.sidebar-property .text { min-width: 0; }
.sidebar-property strong, .sidebar-property small { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sidebar-property strong { font-size: 12px; font-weight: 500; }
.sidebar-property small { margin-top: 2px; color: #6f8a81; font-size: 9px; }
.sidebar-footer { margin-top: auto; border-top: 1px solid rgba(255,255,255,.1); padding: 18px 6px 0; display: grid; grid-template-columns: 34px 1fr 32px; gap: 9px; align-items: center; }
.sidebar-footer .avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #d7b28f; color: #38271e; font-size: 12px; }
.sidebar-footer strong, .sidebar-footer span { display: block; }
.sidebar-footer strong { font-size: 11px; }
.sidebar-footer span { margin-top: 2px; color: #7f9890; font-size: 9px; }
.sidebar-footer .icon-button { width: 30px; height: 30px; color: #83958f; border: 0; }

.workspace { grid-column: 2; min-width: 0; }
.topbar { height: 92px; position: sticky; top: 0; z-index: 20; padding: 0 clamp(22px, 3.2vw, 48px); display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid rgba(210,204,192,.75); background: rgba(244,241,234,.91); backdrop-filter: blur(16px); }
.page-heading span, .eyebrow { display: block; color: #8a938f; font-size: 10px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }
.page-heading h1 { margin: 5px 0 0; font-family: "Noto Sans SC", sans-serif; font-size: 22px; line-height: 1; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.cloud-status { height: 40px; padding: 0 12px; display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); background: var(--card); font-size: 9px; font-weight: 600; cursor: pointer; }
.cloud-status-dot { width: 7px; height: 7px; border-radius: 50%; background: #b2b8b5; box-shadow: 0 0 0 3px #ecebe7; }
.cloud-status.connected { color: var(--green); }
.cloud-status.connected .cloud-status-dot { background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.cloud-status.saving .cloud-status-dot { background: var(--yellow); box-shadow: 0 0 0 3px var(--yellow-soft); animation: statusPulse 1s infinite; }
.cloud-status.error { color: var(--red); }
.cloud-status.error .cloud-status-dot { background: var(--red); box-shadow: 0 0 0 3px #f8e9e6; }
@keyframes statusPulse { 50% { opacity: .4; } }
.property-switcher-wrap { position: relative; }
.property-switcher { height: 40px; min-width: 158px; padding: 0 12px; display: flex; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); cursor: pointer; }
.property-switcher svg { margin-left: auto; width: 15px; }
.property-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 4px var(--orange-soft); }
.property-menu { position: absolute; z-index: 30; top: calc(100% + 8px); right: 0; width: 230px; padding: 7px; border: 1px solid var(--line); border-radius: 13px; background: var(--card); box-shadow: var(--shadow); visibility: hidden; opacity: 0; transform: translateY(-5px); transition: .16s ease; }
.property-menu.open { visibility: visible; opacity: 1; transform: translateY(0); }
.property-menu button { width: 100%; padding: 10px; display: flex; align-items: center; justify-content: space-between; border: 0; border-radius: 8px; background: transparent; cursor: pointer; text-align: left; }
.property-menu button:hover, .property-menu button.active { background: #f1eee6; }
.notification { position: relative; background: var(--card); }
.notification svg { width: 18px; }
.notification span { position: absolute; top: 7px; right: 7px; width: 6px; height: 6px; border-radius: 50%; border: 1px solid var(--card); background: var(--orange); }
.button { height: 42px; padding: 0 17px; border: 0; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-weight: 600; cursor: pointer; transition: transform .18s, background .18s; }
.button:hover { transform: translateY(-1px); }
.button.primary { color: white; background: var(--orange); box-shadow: 0 8px 18px rgba(229,109,52,.19); }
.button.primary:hover { background: #cf5c27; }
.button.secondary { border: 1px solid var(--line); background: var(--card); }
.button.ghost { color: var(--muted); background: transparent; }
.button.danger { color: var(--red); background: #f8e9e6; }
.mobile-menu { display: none; border: 0; background: none; }

.main-content { padding: 28px clamp(22px, 3.2vw, 48px) 60px; }
.view { display: none; animation: fadeIn .24s ease; }
.view.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } }
.section-head { margin-bottom: 18px; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.section-head h2 { margin: 4px 0 0; font-size: 24px; letter-spacing: -.03em; }
.section-head p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.section-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; justify-content: flex-end; }

.project-strip { min-height: 128px; padding: 25px 28px; display: grid; grid-template-columns: 1fr; align-items: center; overflow: hidden; position: relative; border-radius: var(--radius); color: white; background: var(--forest); box-shadow: var(--shadow); }
.project-strip::before { content: ""; position: absolute; inset: 0 0 0 auto; width: 43%; background: linear-gradient(90deg, var(--forest) 0%, rgba(23,51,45,.42) 45%, rgba(23,51,45,.2)), url("output/material-style-studies/04-futurist-tech-minimal-ceiling-fixed.png") center 56% / cover; opacity: .56; }
.project-strip > * { position: relative; z-index: 1; }
.project-title-row { display: flex; align-items: center; gap: 13px; }
.project-title-row h2 { margin: 0; font-size: 23px; }
.status-pill { padding: 5px 9px; border-radius: 999px; color: #cde9df; background: rgba(87,160,134,.2); font-size: 10px; font-weight: 700; }
.project-address { margin: 7px 0 17px; color: #a8bcb5; font-size: 12px; }
.project-meta { display: flex; gap: 23px; }
.project-meta span { display: flex; align-items: center; gap: 7px; color: #dde7e3; font-size: 11px; }
.project-meta svg { width: 15px; color: #91aaa2; }
.project-progress-card { justify-self: end; width: min(100%, 360px); padding: 17px 19px; border: 1px solid rgba(255,255,255,.14); border-radius: 13px; background: rgba(10,35,29,.64); backdrop-filter: blur(10px); }
.progress-label { display: flex; justify-content: space-between; align-items: center; font-size: 11px; color: #b7c8c2; }
.progress-label strong { color: white; font-size: 20px; }
.progress-track { height: 7px; margin: 10px 0 8px; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.14); }
.progress-track span { display: block; height: 100%; border-radius: inherit; background: var(--orange); transition: width .5s ease; }
.progress-detail { display: flex; justify-content: space-between; color: #8fa69e; font-size: 9px; }

.overview-sections { margin-top: 17px; display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: stretch; gap: 17px; }
.overview-sections > .card { min-width: 0; }
.card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: 0 4px 16px rgba(27,35,30,.025); }
.card-header { padding: 19px 21px 13px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-header h3 { margin: 0; font-size: 14px; }
.card-header p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.text-button { border: 0; padding: 4px; color: var(--orange); background: none; font-size: 11px; font-weight: 600; cursor: pointer; }
.overview-card-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; flex-wrap: wrap; }
.dimension-switch { padding: 3px; display: inline-flex; border: 1px solid var(--line); border-radius: 9px; background: #f4f1ea; }
.dimension-switch button { height: 27px; padding: 0 9px; border: 0; border-radius: 6px; color: var(--muted); background: transparent; font-size: 9px; font-weight: 600; cursor: pointer; }
.dimension-switch button.active { color: white; background: var(--green); box-shadow: 0 2px 6px rgba(35,74,64,.18); }
.cost-breakdown { min-height: 257px; padding: 8px 21px 22px; display: grid; grid-template-columns: 190px 1fr; align-items: center; gap: 30px; }
.overview-cost-card .cost-breakdown { grid-template-columns: 150px minmax(0, 1fr); align-items: start; gap: 20px; }
.overview-cost-card .donut-wrap { width: 146px; height: 146px; margin-top: 16px; }
.overview-cost-card .donut::after { inset: 24px; }
.donut-wrap { position: relative; width: 166px; height: 166px; margin: auto; }
.donut { width: 100%; height: 100%; border-radius: 50%; background: conic-gradient(var(--orange) 0 40%, var(--green) 40% 65%, var(--yellow) 65% 82%, #75958b 82% 92%, #d9d6cc 92% 100%); }
.donut::after { content: ""; position: absolute; inset: 27px; border-radius: 50%; background: var(--card); }
.donut-center { position: absolute; z-index: 2; inset: 0; display: grid; place-content: center; text-align: center; }
.donut-center span { color: var(--muted); font-size: 9px; }
.donut-center strong { margin-top: 3px; font-size: 17px; }
.legend { display: grid; gap: 12px; }
.legend-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
.legend-label { display: flex; align-items: center; gap: 8px; color: #65706c; font-size: 10px; }
.legend-dot { width: 7px; height: 7px; border-radius: 50%; }
.legend-value { display: flex; align-items: baseline; gap: 5px; }
.legend-value strong { font-size: 11px; }
.legend-value small { color: var(--muted); font-size: 8px; }
.legend-bar { grid-column: 1 / -1; height: 3px; border-radius: 3px; background: #eeebe4; }
.legend-bar span { display: block; height: 100%; border-radius: inherit; }

.overview-overall-progress { margin: 3px 21px 20px; padding: 18px 20px; border-radius: 13px; background: var(--forest); color: white; }
.overview-progress-heading, .overview-progress-detail, .milestone-progress-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.overview-progress-heading { color: #c6d5d0; font-size: 11px; }
.overview-progress-heading strong { color: white; font-size: 22px; }
.overview-progress-track, .milestone-progress-track { overflow: hidden; border-radius: 99px; }
.overview-progress-track { height: 9px; margin: 12px 0 8px; background: rgba(255,255,255,.14); }
.overview-progress-track span, .milestone-progress-track span { display: block; height: 100%; border-radius: inherit; background: var(--orange); transition: width .5s ease; }
.overview-progress-detail { color: #96aaa3; font-size: 9px; }
.milestone-progress-grid { padding: 0 21px 22px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 22px; }
.milestone-progress-row { padding: 13px 14px; border: 1px solid #ece8df; border-radius: 11px; background: #fbfaf7; }
.milestone-progress-heading strong { font-size: 11px; }
.milestone-progress-heading span { color: var(--muted); font-size: 9px; }
.milestone-progress-track { height: 6px; margin-top: 10px; background: #e8e5dd; }
.milestone-progress-track span { background: var(--green); }

.table-wrap { overflow-x: auto; }
.table-wrap table { min-width: 980px; }
table { width: 100%; border-collapse: collapse; }
th { padding: 10px 20px; color: #909994; background: #f8f6f1; font-size: 9px; letter-spacing: .07em; text-align: left; text-transform: uppercase; }
td { padding: 13px 20px; border-top: 1px solid #efebe4; font-size: 11px; }
.expense-name { display: flex; align-items: center; gap: 10px; }
.category-icon { width: 29px; height: 29px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 8px; color: var(--orange); background: var(--orange-soft); font-size: 11px; }
.expense-name strong, .expense-name small { display: block; }
.expense-name strong { font-size: 11px; }
.expense-name small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.amount { font-weight: 700; white-space: nowrap; }
.paid-amount { color: var(--green); }
.pending-amount { color: #947022; }
.total-amount { color: var(--ink); }
.work-type-tag { display: inline-flex; align-items: center; padding: 4px 8px; border-radius: 99px; color: var(--green); background: var(--green-soft); font-size: 9px; font-weight: 600; white-space: nowrap; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border-radius: 99px; color: var(--green); background: var(--green-soft); font-size: 9px; }
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge.pending { color: #947022; background: var(--yellow-soft); }
.empty-state { min-height: 190px; padding: 35px; display: grid; place-items: center; text-align: center; color: var(--muted); }
.empty-state-icon { width: 48px; height: 48px; margin: 0 auto 10px; display: grid; place-items: center; border-radius: 14px; color: var(--orange); background: var(--orange-soft); font-size: 22px; }
.empty-state h3 { margin: 0 0 6px; color: var(--ink); font-size: 14px; }
.empty-state p { margin: 0 0 15px; font-size: 11px; }

.toolbar { margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.filter-group { display: flex; gap: 8px; flex-wrap: wrap; }
.select, .search { height: 40px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: var(--card); outline: none; }
.select { padding: 0 30px 0 12px; }
.search { min-width: 230px; padding: 0 13px; }
.ledger-summary { margin-bottom: 17px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; }
.mini-summary { padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; }
.mini-summary span { color: var(--muted); font-size: 10px; }
.mini-summary strong { display: block; margin-top: 5px; font-size: 19px; }
.mini-summary .category-icon { width: 38px; height: 38px; }
.row-actions { display: flex; gap: 5px; justify-content: flex-end; }
.row-actions button { width: 28px; height: 28px; border: 0; border-radius: 7px; color: var(--muted); background: transparent; cursor: pointer; }
.row-actions button.edit:hover { color: var(--green); background: var(--green-soft); }
.row-actions button.delete:hover { color: var(--red); background: #f8e9e6; }

.renovation-hero { margin-bottom: 17px; padding: 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: center; }
.renovation-hero h2 { margin: 4px 0 8px; font-size: 24px; }
.renovation-hero p { margin: 0; color: var(--muted); font-size: 11px; }
.renovation-numbers { margin-top: 21px; display: flex; gap: 30px; }
.renovation-numbers strong, .renovation-numbers span { display: block; }
.renovation-numbers strong { font-size: 18px; }
.renovation-numbers span { margin-top: 3px; color: var(--muted); font-size: 9px; }
.large-progress { padding: 20px; border-radius: 14px; background: var(--forest); color: white; }
.large-progress .progress-label { font-size: 10px; }
.large-progress .progress-label strong { font-size: 28px; }
.large-progress .progress-track { height: 9px; margin-top: 14px; }
.phase-tabs { margin-bottom: 13px; display: flex; gap: 8px; overflow-x: auto; }
.phase-tab { padding: 8px 13px; border: 1px solid var(--line); border-radius: 99px; background: var(--card); color: var(--muted); font-size: 10px; cursor: pointer; white-space: nowrap; }
.phase-tab.active { color: white; border-color: var(--forest); background: var(--forest); }
.task-list { overflow: hidden; }
.task-row { position: relative; padding: 16px 19px; display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto auto; gap: 13px; align-items: center; border-top: 1px solid #ece8df; transition: opacity .15s, background .15s, box-shadow .15s; }
.task-row:first-child { border-top: 0; }
.drag-handle { width: 18px; color: #a8ada9; font-size: 18px; line-height: 1; cursor: grab; user-select: none; touch-action: none; }
.task-row:active .drag-handle { cursor: grabbing; }
.task-row.dragging { opacity: .38; }
.task-row.drag-over-before { box-shadow: inset 0 3px 0 var(--orange); background: var(--orange-soft); }
.task-row.drag-over-after { box-shadow: inset 0 -3px 0 var(--orange); background: var(--orange-soft); }
.task-check { appearance: none; width: 20px; height: 20px; margin: 0; border: 1.5px solid #c7ccc9; border-radius: 6px; display: grid; place-content: center; cursor: pointer; }
.task-check:checked { border-color: var(--green); background: var(--green); }
.task-check:checked::after { content: "✓"; color: white; font-size: 12px; }
.task-info h4 { margin: 0; font-size: 12px; }
.task-row.completed .task-info h4 { color: #99a09d; text-decoration: line-through; }
.task-info p { margin: 4px 0 0; color: var(--muted); font-size: 9px; }
.task-info p .work-type-tag { padding: 2px 6px; font-size: 8px; vertical-align: middle; }
.task-cost { min-width: 90px; text-align: right; }
.task-cost strong, .task-cost span { display: block; }
.task-cost strong { font-size: 11px; }
.task-cost span { margin-top: 3px; color: var(--muted); font-size: 8px; }

.property-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.property-card { overflow: hidden; }
.property-cover { height: 145px; position: relative; overflow: hidden; background: var(--forest); }
.property-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(8,25,21,.68)); }
.property-cover img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.72); transition: transform .35s ease; }
.property-card:hover img { transform: scale(1.04); }
.property-cover-placeholder { width: 100%; height: 100%; background: linear-gradient(135deg, var(--accent, #365f53), #c8b59d); }
.property-code { position: absolute; z-index: 2; left: 14px; bottom: 12px; color: white; font-size: 9px; letter-spacing: .1em; }
.property-body { padding: 17px; }
.property-body h3 { margin: 0; font-size: 14px; }
.property-body p { height: 30px; margin: 5px 0 14px; color: var(--muted); font-size: 10px; }
.property-card-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.property-card-stats div { padding: 9px; border-radius: 9px; background: #f6f3ed; }
.property-card-stats span, .property-card-stats strong { display: block; }
.property-card-stats span { color: var(--muted); font-size: 8px; }
.property-card-stats strong { margin-top: 4px; font-size: 11px; }
.property-card-footer { margin-top: 14px; padding-top: 13px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid #ece8df; }
.property-card-footer span { color: var(--muted); font-size: 9px; }
.property-card-footer button { border: 0; color: var(--orange); background: none; font-size: 10px; font-weight: 600; cursor: pointer; }
.property-card-actions { display: flex; align-items: center; gap: 12px; }
.property-card-footer .property-card-actions .delete { color: var(--muted); font-weight: 500; }
.property-card-footer .property-card-actions .delete:hover { color: var(--red); }
.add-property-card { min-height: 345px; border: 1px dashed #c9c5bb; display: grid; place-items: center; color: var(--muted); background: rgba(255,255,255,.35); cursor: pointer; text-align: center; transition: .2s; }
.add-property-card:hover { border-color: var(--orange); color: var(--orange); background: var(--orange-soft); }
.add-property-card .plus { width: 48px; height: 48px; margin: auto; display: grid; place-items: center; border-radius: 50%; background: var(--card); font-size: 24px; }
.add-property-card strong { display: block; margin-top: 12px; font-size: 12px; }
.add-property-card span { display: block; margin-top: 5px; font-size: 9px; }

.modal-backdrop { position: fixed; z-index: 100; inset: 0; padding: 20px; display: grid; place-items: center; visibility: hidden; opacity: 0; background: rgba(10,24,20,.56); backdrop-filter: blur(4px); transition: .2s ease; }
.modal-backdrop.open { visibility: visible; opacity: 1; }
.modal { width: min(540px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; border-radius: 18px; background: var(--card); box-shadow: 0 30px 80px rgba(7,18,15,.25); transform: translateY(10px) scale(.985); transition: .2s ease; }
.modal-backdrop.open .modal { transform: none; }
.modal-header { padding: 22px 24px 16px; display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 1px solid var(--line); }
.modal-header h2 { margin: 5px 0 0; font-size: 20px; }
.modal-header .icon-button { border: 0; font-size: 25px; color: var(--muted); }
.form { padding: 22px 24px 24px; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }
.field.full { grid-column: 1 / -1; }
.field label { display: block; margin-bottom: 7px; font-size: 10px; font-weight: 600; }
.field label span { color: var(--red); }
.field input, .field select, .field textarea { width: 100%; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: white; outline: none; transition: border .16s, box-shadow .16s; }
.field input, .field select { height: 42px; padding: 0 12px; }
.field textarea { min-height: 76px; padding: 11px 12px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-soft); }
.field input[readonly] { color: #6c7772; background: #f2f0ea; cursor: not-allowed; }
.field-help { margin-top: 5px; color: var(--muted); font-size: 8px; }
.form-actions { margin-top: 22px; display: flex; justify-content: flex-end; gap: 9px; }
.choice-grid { padding: 23px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice-card { padding: 21px; border: 1px solid var(--line); border-radius: 13px; background: #faf8f3; cursor: pointer; text-align: left; }
.choice-card:hover { border-color: var(--orange); background: var(--orange-soft); }
.choice-card .category-icon { width: 42px; height: 42px; margin-bottom: 12px; }
.choice-card strong, .choice-card span { display: block; }
.choice-card strong { font-size: 13px; }
.choice-card span { margin-top: 5px; color: var(--muted); font-size: 9px; line-height: 1.5; }
.toast-region { position: fixed; z-index: 120; right: 22px; bottom: 22px; display: grid; gap: 9px; }
.toast { min-width: 240px; padding: 13px 16px; display: flex; align-items: center; gap: 10px; border-radius: 11px; color: white; background: var(--forest); box-shadow: var(--shadow); font-size: 11px; animation: toastIn .25s ease; }
.toast::before { content: "✓"; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: var(--green); }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }
.auth-gate { position: fixed; z-index: 200; inset: 0; padding: 22px; display: grid; place-items: center; background: linear-gradient(135deg, rgba(16,43,36,.97), rgba(23,51,45,.92)), url("output/material-style-studies/04-futurist-tech-minimal-ceiling-fixed.png") center / cover; transition: opacity .2s, visibility .2s; }
.auth-gate.hidden { visibility: hidden; opacity: 0; pointer-events: none; }
.auth-card { width: min(420px, 100%); padding: 31px; border: 1px solid rgba(255,255,255,.12); border-radius: 21px; color: white; background: rgba(10,30,25,.72); box-shadow: 0 35px 90px rgba(3,13,10,.35); backdrop-filter: blur(18px); }
.auth-brand { display: flex; align-items: center; gap: 11px; font-size: 17px; font-weight: 700; letter-spacing: .12em; }
.auth-brand .brand-mark { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: var(--orange); }
.auth-brand svg { width: 21px; }
.auth-loading { padding: 48px 0 24px; text-align: center; }
.auth-loading h2, .auth-form h2 { margin: 17px 0 7px; font-size: 21px; }
.auth-loading p, .auth-form p { margin: 0; color: #aabcb6; font-size: 11px; line-height: 1.7; }
.auth-spinner { width: 28px; height: 28px; display: inline-block; border: 2px solid rgba(255,255,255,.16); border-top-color: var(--orange); border-radius: 50%; animation: authSpin .8s linear infinite; }
@keyframes authSpin { to { transform: rotate(360deg); } }
.auth-form { padding-top: 36px; }
.auth-form .eyebrow { color: #92aaa2; }
.auth-form label { display: block; margin: 25px 0 8px; color: #dce6e2; font-size: 10px; font-weight: 600; }
.auth-form input { width: 100%; height: 46px; padding: 0 13px; border: 1px solid rgba(255,255,255,.18); border-radius: 10px; color: white; background: rgba(255,255,255,.08); outline: none; }
.auth-form input:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(229,109,52,.18); }
.auth-form input::placeholder { color: #728b83; }
.auth-form .button { width: 100%; margin-top: 5px; }
.auth-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.auth-form small { display: block; margin-top: 13px; color: #768e86; font-size: 8px; text-align: center; }
.auth-form .auth-error { min-height: 24px; padding-top: 6px; color: #ffad97; font-size: 9px; }
.public-home { display: grid; gap: 20px; }
.property-access-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.property-access-card { min-height: 170px; padding: 24px; display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start; }
.property-access-card .property-thumb { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 15px; color: white; font-weight: 700; }
.property-access-card h3 { margin: 5px 0 6px; font-size: 18px; }
.property-access-card p { margin: 0; color: var(--muted); font-size: 11px; }
.property-access-card .button { grid-column: 1 / -1; width: 100%; align-self: end; }
.backup-list { padding: 22px 24px 7px; display: grid; gap: 10px; }
.backup-option { width: 100%; padding: 15px; display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 12px; background: #faf8f3; cursor: pointer; text-align: left; }
.backup-option:hover { border-color: var(--orange); background: var(--orange-soft); }
.backup-option strong, .backup-option small { display: block; }
.backup-option strong { font-size: 11px; }
.backup-option small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.backup-option > span:last-child { color: var(--orange); font-size: 15px; }
.backup-note { margin: 0 24px 22px; padding: 11px 13px; border-radius: 9px; color: var(--muted); background: #f0eee8; font-size: 9px; line-height: 1.6; }
.hidden-input { display: none; }
.sidebar-scrim { display: none; }

@media (max-width: 1100px) {
  .overview-sections { grid-template-columns: 1fr; }
  .property-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 780px) {
  .app-shell { display: block; }
  .sidebar { transform: translateX(-100%); transition: transform .24s ease; box-shadow: 15px 0 50px rgba(8,20,16,.3); }
  .sidebar.open { transform: none; }
  .sidebar-scrim { position: fixed; z-index: 25; inset: 0; display: block; visibility: hidden; opacity: 0; background: rgba(8,20,16,.45); transition: .2s; }
  .sidebar-scrim.open { visibility: visible; opacity: 1; }
  .workspace { width: 100%; }
  .topbar { height: 74px; padding: 0 16px; gap: 12px; }
  .mobile-menu { display: grid; place-items: center; padding: 5px; }
  .page-heading span { display: none; }
  .page-heading h1 { margin: 0; font-size: 17px; }
  .top-actions { margin-left: auto; }
  .cloud-status { width: 36px; padding: 0; justify-content: center; }
  .cloud-status #cloudStatusText { display: none; }
  .property-switcher { min-width: 0; width: 42px; justify-content: center; }
  .property-switcher #currentPropertyName, .property-switcher svg { display: none; }
  .notification { display: none; }
  .top-add { width: 40px; padding: 0; font-size: 0; }
  .top-add span { font-size: 20px; }
  .main-content { padding: 18px 14px 45px; }
  .section-head { align-items: flex-start; flex-direction: column; }
  .section-actions { width: 100%; justify-content: flex-start; }
  .project-strip { padding: 22px; grid-template-columns: 1fr; gap: 22px; }
  .project-strip::before { width: 100%; opacity: .22; }
  .project-progress-card { justify-self: stretch; width: 100%; }
  .project-meta { gap: 12px; flex-wrap: wrap; }
  .cost-breakdown { grid-template-columns: 1fr; gap: 20px; }
  .overview-cost-card .cost-breakdown { grid-template-columns: 1fr; }
  .overview-card-actions { justify-content: flex-start; }
  .legend { grid-template-columns: 1fr 1fr; }
  .milestone-progress-grid { grid-template-columns: 1fr; }
  .ledger-summary { grid-template-columns: 1fr; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .filter-group { display: grid; grid-template-columns: 1fr 1fr; }
  .search { min-width: 0; width: 100%; grid-column: 1 / -1; }
  .renovation-hero { grid-template-columns: 1fr; }
  .property-grid { grid-template-columns: 1fr; }
  .property-access-grid { grid-template-columns: 1fr; }
  .task-row { grid-template-columns: auto auto minmax(0, 1fr) auto; gap: 9px; }
  .task-cost { display: none; }
}

@media (max-width: 450px) {
  .project-title-row { align-items: flex-start; flex-direction: column; gap: 7px; }
  .legend { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .choice-grid { grid-template-columns: 1fr; }
  th, td { padding-left: 14px; padding-right: 14px; }
}
