:root {
  --navy: #0b2342;
  --navy-2: #12365f;
  --blue: #246bfd;
  --blue-soft: #eaf1ff;
  --green: #0f9f6e;
  --green-soft: #e8f8f1;
  --orange: #f26a21;
  --orange-soft: #fff0e7;
  --purple: #7657e8;
  --purple-soft: #f0edff;
  --red: #e5484d;
  --red-soft: #feeeee;
  --ink: #17243a;
  --muted: #708099;
  --line: #e5ebf3;
  --surface: #ffffff;
  --canvas: #f5f8fc;
  --shadow: 0 16px 45px rgba(20, 43, 76, .08);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 16px; background: var(--canvas); -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }
.icon { flex: 0 0 auto; }

.app-body { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 254px; display: flex; flex-direction: column; padding: 24px 17px 18px; color: #dce8f7; background: var(--navy); z-index: 50; box-shadow: 12px 0 36px rgba(6, 25, 48, .08); }
.logo { display: flex; align-items: center; gap: 12px; padding: 0 8px 25px; color: #fff; }
.brand-mark { display: inline-grid; place-items: center; flex: 0 0 42px; width: 42px; height: 42px; border-radius: 13px; color: #fff; background: #2b6ff0; box-shadow: 0 9px 25px rgba(33, 105, 245, .28); font-weight: 850; letter-spacing: -.04em; }
.logo strong { display: block; font-size: 17px; letter-spacing: -.02em; }
.logo small { display: block; margin-top: 2px; color: #91a8c5; font-size: 12px; }
.side-nav { display: grid; gap: 5px; }
.side-nav a { position: relative; display: flex; align-items: center; gap: 13px; min-height: 47px; padding: 0 13px; border-radius: 12px; color: #a9bdd5; font-weight: 650; font-size: 14px; transition: .2s ease; }
.side-nav a:hover { color: #fff; background: rgba(255,255,255,.07); }
.side-nav a.active { color: #fff; background: #1e4775; box-shadow: inset 3px 0 0 #64a2ff; }
.side-nav a b { margin-left: auto; display: grid; place-items: center; min-width: 21px; height: 21px; padding: 0 6px; color: #fff; background: var(--orange); border-radius: 99px; font-size: 11px; }
.sidebar-card { margin-top: auto; padding: 16px; border: 1px solid rgba(255,255,255,.09); border-radius: 15px; background: rgba(255,255,255,.055); }
.sidebar-card span, .sidebar-card small { display: block; color: #8fa7c3; font-size: 12px; }
.sidebar-card strong { display: block; margin: 5px 0 11px; color: #fff; font-size: 17px; }
.mini-progress, .progress { height: 6px; overflow: hidden; background: #e8edf4; border-radius: 99px; }
.mini-progress { background: rgba(255,255,255,.1); }
.mini-progress i, .progress i { display: block; height: 100%; background: #31d399; border-radius: inherit; }
.sidebar-card small { margin-top: 8px; }
.sidebar-user { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; margin-top: 15px; padding: 14px 8px 0; border-top: 1px solid rgba(255,255,255,.09); }
.sidebar-user strong, .sidebar-user small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user strong { color: #fff; font-size: 13px; }
.sidebar-user small { margin-top: 2px; color: #8fa7c3; font-size: 11px; }
.sidebar-user a { display: grid; place-items: center; color: #8fa7c3; }
.avatar { display: inline-grid; place-items: center; flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%; color: #fff; background: var(--avatar, #2563eb); font-size: 12px; font-weight: 800; }

.app-shell { min-height: 100vh; margin-left: 254px; }
.topbar { position: sticky; top: 0; z-index: 30; height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 34px; border-bottom: 1px solid rgba(218,226,237,.88); background: rgba(255,255,255,.92); backdrop-filter: blur(18px); }
.building-picker { display: flex; align-items: center; gap: 11px; min-width: 0; }
.building-icon { display: grid; place-items: center; width: 39px; height: 39px; color: var(--blue); background: var(--blue-soft); border-radius: 12px; }
.building-picker strong, .building-picker small { display: block; }
.building-picker strong { font-size: 15px; }
.building-picker small { margin-top: 2px; color: var(--muted); font-size: 12px; }
.building-picker select { max-width: 155px; height: 36px; padding: 0 28px 0 10px; color: var(--muted); background: var(--canvas); border: 1px solid var(--line); border-radius: 9px; font-size: 13px; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.search-button { width: 230px; height: 40px; display: flex; align-items: center; gap: 9px; padding: 0 11px; color: #8491a4; background: #f7f9fc; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.search-button span { flex: 1; text-align: left; font-size: 13px; }
.search-button kbd { padding: 2px 6px; color: #8491a4; background: #fff; border: 1px solid var(--line); border-radius: 5px; font-size: 11px; }
.icon-btn { position: relative; width: 40px; height: 40px; display: inline-grid; place-items: center; padding: 0; color: #617189; background: #fff; border: 1px solid var(--line); border-radius: 11px; cursor: pointer; }
.icon-btn:hover { color: var(--blue); border-color: #bfd2f9; }
.icon-btn.has-dot i { position: absolute; top: 6px; right: 6px; width: 7px; height: 7px; background: var(--orange); border: 2px solid #fff; border-radius: 50%; }
.top-avatar { width: 40px; height: 40px; }
.mobile-menu { display: none; }

.content { width: min(1540px, 100%); margin: 0 auto; padding: 33px 34px 55px; }
.eyebrow { margin-bottom: 6px; color: var(--blue); font-size: 12px; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 7px; font-size: clamp(28px, 2.7vw, 38px); line-height: 1.12; letter-spacing: -.04em; }
h2 { margin-bottom: 5px; font-size: 18px; letter-spacing: -.02em; }
h3 { letter-spacing: -.015em; }
.welcome-row, .page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 25px; }
.page-head-actions { display: flex; align-items: center; gap: 9px; }
.welcome-row p, .page-head p { margin-bottom: 0; color: var(--muted); font-size: 14px; }
.btn { min-height: 43px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 17px; border: 0; border-radius: 11px; font-weight: 760; font-size: 14px; cursor: pointer; transition: transform .16s ease, box-shadow .16s ease, background .16s ease; }
.btn:hover { transform: translateY(-1px); }
.btn.primary { color: #fff; background: var(--blue); box-shadow: 0 8px 20px rgba(36,107,253,.2); }
.btn.primary:hover { background: #165be0; }
.btn.soft { color: var(--blue); background: var(--blue-soft); }
.btn.full { width: 100%; }

.notice-banner { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; margin-bottom: 20px; padding: 15px 17px; border: 1px solid #f8d1bc; border-radius: 14px; background: #fff8f4; }
.notice-banner > span { display: grid; place-items: center; width: 36px; height: 36px; color: var(--orange); background: var(--orange-soft); border-radius: 10px; }
.notice-banner strong { font-size: 14px; }
.notice-banner p { margin: 3px 0 0; color: #86634f; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notice-banner > .icon { color: #a77a; }
.notice-banner.info { border-color: #cadbf7; background: #f4f8ff; }
.notice-banner.info > span { color: var(--blue); background: var(--blue-soft); }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 15px; margin-bottom: 17px; }
.stat-card { display: flex; align-items: center; gap: 14px; min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 6px 25px rgba(23,36,58,.035); }
.stat-icon { display: grid; place-items: center; flex: 0 0 47px; width: 47px; height: 47px; border-radius: 14px; }
.stat-card.green .stat-icon { color: var(--green); background: var(--green-soft); }
.stat-card.orange .stat-icon { color: var(--orange); background: var(--orange-soft); }
.stat-card.blue .stat-icon { color: var(--blue); background: var(--blue-soft); }
.stat-card.purple .stat-icon { color: var(--purple); background: var(--purple-soft); }
.stat-card small, .stat-card strong, .stat-card em { display: block; }
.stat-card small { color: var(--muted); font-size: 12px; }
.stat-card strong { margin: 4px 0 5px; font-size: clamp(20px, 1.6vw, 25px); line-height: 1; letter-spacing: -.035em; }
.stat-card em { color: var(--muted); font-size: 11px; font-style: normal; }
.stat-card.green em { color: var(--green); }

.dashboard-grid { display: grid; grid-template-columns: minmax(0,1.08fr) minmax(0,1.42fr); gap: 17px; margin-bottom: 17px; }
.dashboard-grid.lower { grid-template-columns: 1.3fr .7fr; }
.dashboard-grid.finances { grid-template-columns: 1.4fr .6fr; }
.panel { min-width: 0; padding: 21px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 7px 28px rgba(23,36,58,.035); }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; margin-bottom: 17px; }
.panel-head h2 { margin-bottom: 4px; }
.panel-head p { margin-bottom: 0; color: var(--muted); font-size: 12px; }
.panel-head > a { display: flex; align-items: center; color: var(--blue); font-size: 12px; font-weight: 750; }
.chart-legend { display: flex; justify-content: flex-end; gap: 14px; margin: -4px 0 7px; }
.chart-legend span { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11px; }
.chart-legend i { width: 8px; height: 8px; border-radius: 3px; }
.chart-legend i.income, .bar-chart i.income { background: var(--green); }
.chart-legend i.expense, .bar-chart i.expense { background: var(--orange); }
.bar-chart { position: relative; height: 155px; display: flex; align-items: stretch; justify-content: space-around; gap: 6px; padding: 15px 5px 0; border-bottom: 1px solid var(--line); background-image: linear-gradient(to bottom, transparent 24%, #edf1f6 25%, transparent 26%, transparent 49%, #edf1f6 50%, transparent 51%, transparent 74%, #edf1f6 75%, transparent 76%); }
.bar-chart.tall { height: 220px; }
.bar-group { height: 100%; display: flex; flex: 1; max-width: 55px; flex-direction: column; align-items: center; justify-content: flex-end; }
.bars { height: calc(100% - 20px); display: flex; align-items: flex-end; gap: 4px; }
.bars i { display: block; width: 11px; min-height: 3px; border-radius: 5px 5px 1px 1px; transition: height .6s ease; }
.bar-group > span { height: 20px; padding-top: 6px; color: var(--muted); font-size: 10px; }
.finance-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 17px; padding-top: 16px; border-top: 1px solid var(--line); }
.finance-summary > div { padding: 0 8px; }
.finance-summary > div + div { border-left: 1px solid var(--line); }
.finance-summary small, .finance-summary strong { display: block; }
.finance-summary small { color: var(--muted); font-size: 11px; }
.finance-summary strong { margin-top: 5px; font-size: 15px; }
.positive { color: var(--green) !important; }
.negative { color: var(--red) !important; }

.issue-columns { display: grid; grid-template-columns: repeat(3,1fr); gap: 9px; }
.issue-column { min-width: 0; padding: 11px; background: #f7f9fc; border-radius: 12px; }
.issue-column h3 { display: flex; justify-content: space-between; margin: 0 0 10px; font-size: 12px; }
.issue-column h3 span { color: var(--muted); }
.issue-column a { position: relative; display: block; margin-top: 7px; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: 9px; }
.issue-column a:hover { border-color: #bfd2f9; }
.issue-column strong, .issue-column small { display: block; padding-right: 35px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.issue-column strong { font-size: 11px; }
.issue-column small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.issue-column .priority { position: absolute; top: 8px; right: 7px; padding: 3px 5px; font-size: 7px; }
.column-empty, .empty-mini { padding: 16px; color: var(--muted); text-align: center; font-size: 12px; }
.priority, .status { display: inline-flex; align-items: center; justify-content: center; width: max-content; padding: 5px 8px; border-radius: 99px; font-size: 10px; font-weight: 800; font-style: normal; }
.priority.low { color: #2563eb; background: #eaf1ff; }
.priority.medium { color: #a65a00; background: #fff1cf; }
.priority.high { color: #c0460a; background: #ffeadf; }
.priority.urgent { color: #d02f37; background: #ffe8e8; }
.priority.large { padding: 7px 12px; font-size: 12px; }
.status.new, .status.planned { color: #2563eb; background: #eaf1ff; }
.status.accepted, .status.scheduled, .status.approved { color: #6b46c1; background: #f0edff; }
.status.in_progress, .status.collecting_offers { color: #b45b02; background: #fff1cf; }
.status.completed { color: #087b55; background: #e6f7ef; }
.status.rejected, .status.paused { color: #c3363d; background: #feeeee; }

.work-list { display: grid; gap: 11px; }
.work-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 11px 0; }
.work-row + .work-row { border-top: 1px solid var(--line); }
.work-row > div { min-width: 0; }
.work-row strong, .work-row small { display: block; }
.work-row strong { font-size: 13px; }
.work-row small { margin: 3px 0 8px; color: var(--muted); font-size: 11px; }
.work-row b { font-size: 13px; }
.round-icon { display: inline-grid; place-items: center; flex: 0 0 auto; width: 42px; height: 42px; color: var(--blue); background: var(--blue-soft); border-radius: 13px; }
.round-icon.purple { color: var(--purple); background: var(--purple-soft); }
.vote-preview { display: flex; flex-direction: column; align-items: flex-start; }
.vote-preview h3 { margin: 13px 0 6px; font-size: 16px; }
.vote-preview p { margin-bottom: 14px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.vote-preview > div { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 15px; }
.vote-preview > div span { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 11px; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 16px; }
.toolbar.embedded { margin-bottom: 13px; }
.toolbar.embedded > span { color: var(--muted); font-size: 13px; }
.filter-search { width: min(360px,100%); height: 43px; display: flex; align-items: center; gap: 9px; padding: 0 13px; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 11px; }
.filter-search input { width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 14px; }
.filter-chips { display: flex; gap: 6px; }
.filter-chips button { min-height: 36px; padding: 0 13px; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; font-size: 12px; font-weight: 700; }
.filter-chips button.active { color: var(--blue); border-color: #c6d8fe; background: var(--blue-soft); }
.issue-list { display: grid; gap: 11px; }
.issue-card { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 16px; padding: 18px; border: 1px solid var(--line); border-radius: 15px; background: #fff; transition: .18s ease; }
.issue-card:hover { transform: translateY(-1px); border-color: #c7d8f5; box-shadow: 0 10px 28px rgba(23,36,58,.06); }
.category-icon { display: grid; place-items: center; width: 47px; height: 47px; color: var(--orange); background: var(--orange-soft); border-radius: 14px; }
.category-icon.water { color: var(--blue); background: var(--blue-soft); }
.category-icon.electricity { color: #aa7100; background: #fff6d7; }
.category-icon.cleaning { color: var(--green); background: var(--green-soft); }
.issue-main { min-width: 0; }
.issue-main > div { display: flex; align-items: center; gap: 8px; }
.ticket { color: var(--blue); font-size: 11px; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
.issue-main h3 { margin: 6px 0 4px; font-size: 15px; }
.issue-main p { max-width: 760px; margin-bottom: 7px; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.issue-main small { display: flex; align-items: center; gap: 5px; color: #8591a2; font-size: 11px; }
.issue-side { display: grid; grid-template-columns: auto auto; align-items: center; gap: 13px; }
.issue-side small { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 11px; }
.issue-side > .icon { color: #a5b0bf; }

.back-link { display: inline-block; margin-bottom: 18px; color: var(--blue); font-size: 13px; font-weight: 750; }
.issue-detail-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.issue-detail-head h1 { margin: 6px 0; }
.issue-detail-head p { display: flex; align-items: center; gap: 5px; margin: 0; color: var(--muted); font-size: 13px; }
.detail-layout { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(290px,.55fr); align-items: start; gap: 18px; }
.detail-main, .detail-side { display: grid; gap: 18px; }
.issue-description > img { width: 100%; max-height: 360px; object-fit: cover; margin-bottom: 20px; border-radius: 13px; }
.issue-description > p { color: #4c5d73; line-height: 1.7; }
.detail-meta { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.detail-meta span { padding: 10px; background: #f7f9fc; border-radius: 10px; }
.detail-meta small, .detail-meta strong { display: block; }
.detail-meta small { margin-bottom: 4px; color: var(--muted); font-size: 10px; }
.detail-meta strong { font-size: 12px; }
.timeline { display: grid; margin: 18px 0; }
.timeline > div { position: relative; display: flex; gap: 11px; min-height: 55px; }
.timeline > div:not(:last-child)::before { content: ''; position: absolute; left: 13px; top: 28px; width: 2px; height: 27px; background: #dfe5ed; }
.timeline > div.done:not(:last-child)::before { background: var(--green); }
.timeline i { position: relative; z-index: 1; display: grid; place-items: center; flex: 0 0 28px; width: 28px; height: 28px; color: #8a96a8; background: #eef2f6; border-radius: 50%; font-size: 11px; font-style: normal; font-weight: 800; }
.timeline > div.done i { color: #fff; background: var(--green); }
.timeline strong, .timeline small { display: block; }
.timeline strong { padding-top: 4px; font-size: 12px; }
.timeline small { margin-top: 2px; color: var(--green); font-size: 10px; }
.appointment-box { display: flex; align-items: center; gap: 10px; margin: 5px 0 16px; padding: 12px; color: var(--blue); background: var(--blue-soft); border-radius: 11px; }
.appointment-box small, .appointment-box strong { display: block; }
.appointment-box small { color: #6681ac; font-size: 10px; }
.appointment-box strong { margin-top: 2px; font-size: 12px; }
.manager-box { border-top: 3px solid var(--blue); }
.comments { display: grid; gap: 14px; }
.comment { display: grid; grid-template-columns: auto 1fr; gap: 11px; }
.comment > div { padding: 11px 13px; background: #f7f9fc; border-radius: 4px 12px 12px; }
.comment > div > div { display: flex; justify-content: space-between; gap: 10px; }
.comment strong { font-size: 12px; }
.comment small { color: var(--muted); font-size: 10px; }
.comment p { margin: 6px 0 0; color: #516177; font-size: 13px; line-height: 1.55; }
.comment-form { display: flex; gap: 8px; margin-top: 5px; }
.comment-form input { flex: 1; min-width: 0; height: 43px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; outline: 0; }
.comment-form input:focus { border-color: var(--blue); }

.finance-hero { min-height: 170px; display: flex; align-items: center; justify-content: space-between; margin-bottom: 17px; padding: 25px 30px; color: #fff; background: var(--navy); border-radius: 20px; overflow: hidden; box-shadow: 0 18px 40px rgba(11,35,66,.15); }
.finance-hero small, .finance-hero strong, .finance-hero p { display: block; }
.finance-hero small { color: #adc3dc; font-size: 12px; }
.finance-hero strong { margin: 7px 0 10px; font-size: clamp(31px,4vw,45px); letter-spacing: -.045em; }
.finance-hero p { display: flex; align-items: center; gap: 5px; margin: 0; color: #5de5b5; font-size: 12px; }
.fund-meter { position: relative; width: 116px; height: 116px; }
.fund-meter svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.fund-meter circle { fill: none; stroke: rgba(255,255,255,.12); stroke-width: 10; }
.fund-meter circle.value { stroke: #46dba7; stroke-linecap: round; stroke-dasharray: 314; stroke-dashoffset: calc(314 - (314 * var(--percent))/100); }
.fund-meter > span { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.fund-meter b, .fund-meter small { display: block; }
.fund-meter b { font-size: 21px; }
.fund-meter small { color: #adc3dc; font-size: 10px; }
.budget-breakdown { display: flex; flex-direction: column; gap: 14px; }
.budget-number { display: flex; align-items: center; gap: 12px; padding: 15px; border-radius: 13px; }
.budget-number.positive { background: var(--green-soft); }
.budget-number.negative { background: var(--red-soft); }
.budget-number > span { display: grid; place-items: center; width: 38px; height: 38px; color: #fff; background: currentColor; border-radius: 11px; }
.budget-number > span .icon { color: #fff; }
.budget-number small, .budget-number strong { display: block; }
.budget-number small { color: var(--muted); font-size: 11px; }
.budget-number strong { margin-top: 4px; color: var(--ink); font-size: 17px; }
.net-row { display: flex; justify-content: space-between; margin-top: auto; padding: 17px 3px 0; border-top: 1px solid var(--line); font-size: 13px; }
.table-panel { padding-bottom: 8px; }
.responsive-table { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 10px 12px; color: var(--muted); border-bottom: 1px solid var(--line); text-align: left; font-size: 11px; font-weight: 750; text-transform: uppercase; letter-spacing: .04em; }
td { padding: 14px 12px; border-bottom: 1px solid #edf1f5; font-size: 12px; }
tr:last-child td { border-bottom: 0; }
.table-title, .resident-cell { display: flex; align-items: center; gap: 10px; min-width: 215px; }
.table-title strong, .table-title small, .resident-cell strong, .resident-cell small, .table-sub { display: block; }
.table-title strong, .resident-cell strong { font-size: 12px; }
.table-title small, .resident-cell small, .table-sub { margin-top: 3px; color: var(--muted); font-size: 10px; }
.tx-icon { display: grid; place-items: center; width: 35px; height: 35px; border-radius: 10px; }
.tx-icon.income { color: var(--green); background: var(--green-soft); }
.tx-icon.expense { color: var(--red); background: var(--red-soft); }
.amount { white-space: nowrap; text-align: right; font-weight: 800; }
.amount.income { color: var(--green); }
.amount.expense { color: var(--red); }
.file-link { display: inline-flex; align-items: center; gap: 5px; color: var(--blue); font-weight: 700; }
.doc-icon { display: grid; place-items: center; width: 36px; height: 41px; color: #fff; background: var(--red); border-radius: 7px; font-size: 9px; font-weight: 850; }

.work-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.work-card { padding: 21px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.work-card-head { display: flex; align-items: center; justify-content: space-between; }
.work-card h2 { margin: 17px 0 5px; }
.work-card > p { color: var(--muted); font-size: 12px; }
.work-progress { margin: 21px 0; }
.work-progress > div:first-child { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 12px; }
.work-numbers { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.work-numbers div + div { padding-left: 12px; border-left: 1px solid var(--line); }
.work-numbers small, .work-numbers strong { display: block; }
.work-numbers small { color: var(--muted); font-size: 10px; }
.work-numbers strong { margin-top: 5px; font-size: 14px; }
.work-card footer { padding-top: 14px; color: var(--muted); font-size: 11px; }
.work-card footer span { display: flex; align-items: center; gap: 5px; }
.quick-edit { margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--line); }
.quick-edit summary { color: var(--blue); cursor: pointer; font-size: 11px; font-weight: 800; }
.quick-edit form { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 12px; }
.quick-edit label { display: grid; gap: 5px; color: var(--muted); font-size: 10px; font-weight: 700; }
.quick-edit label:nth-child(6), .quick-edit .btn { grid-column: 1/-1; }
.quick-edit input, .quick-edit select { min-height: 38px; padding: 7px 9px; font-size: 11px; }

.invite-strip { display: flex; align-items: center; gap: 13px; margin-bottom: 16px; padding: 16px 18px; color: #fff; background: var(--navy); border-radius: 15px; }
.invite-strip > span { display: grid; place-items: center; width: 42px; height: 42px; color: #8db8ff; background: rgba(255,255,255,.08); border-radius: 12px; }
.invite-strip > div { flex: 1; }
.invite-strip small, .invite-strip strong { display: block; }
.invite-strip small { color: #9eb4cf; font-size: 11px; }
.invite-strip strong { margin-top: 2px; font-size: 18px; letter-spacing: .1em; }
.invite-strip .btn { color: #fff; background: rgba(255,255,255,.1); }

.votes-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 17px; }
.vote-card { padding: 23px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.vote-card header { display: flex; justify-content: space-between; align-items: center; }
.vote-card header > div { display: grid; justify-items: end; gap: 6px; }
.vote-card header small { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 10px; }
.vote-card h2 { margin: 17px 0 7px; }
.vote-card > p { color: var(--muted); font-size: 13px; line-height: 1.55; }
.vote-options { display: grid; gap: 9px; margin-top: 18px; }
.vote-option { position: relative; overflow: hidden; display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 11px; cursor: pointer; }
.vote-option.selected { border-color: #9ebcfa; }
.vote-option input, .vote-option span { position: relative; z-index: 2; }
.vote-option span { flex: 1; }
.vote-option strong, .vote-option small { display: block; }
.vote-option strong { font-size: 12px; }
.vote-option small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.vote-option > i { position: absolute; inset: 0 auto 0 0; z-index: 1; opacity: .58; background: var(--blue-soft); }
.vote-card footer { margin-top: 15px; padding-top: 14px; color: var(--muted); border-top: 1px solid var(--line); font-size: 11px; }

.document-categories { display: grid; grid-template-columns: repeat(4,1fr); gap: 13px; margin-bottom: 16px; }
.document-categories article { display: flex; align-items: center; gap: 12px; padding: 17px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.document-categories article > span { display: grid; place-items: center; width: 40px; height: 40px; color: var(--blue); background: var(--blue-soft); border-radius: 11px; }
.document-categories strong, .document-categories small { display: block; }
.document-categories strong { font-size: 13px; }
.document-categories small { margin-top: 3px; color: var(--muted); font-size: 10px; }

.announcement-list { display: grid; gap: 13px; }
.announcement-card { display: grid; grid-template-columns: auto 1fr; gap: 15px; padding: 20px; border: 1px solid var(--line); border-left: 4px solid var(--blue); border-radius: 15px; background: #fff; }
.announcement-card.urgent { border-left-color: var(--red); }
.announcement-card.warning { border-left-color: #d58c00; }
.announcement-card.success { border-left-color: var(--green); }
.announcement-icon { display: grid; place-items: center; width: 43px; height: 43px; color: var(--blue); background: var(--blue-soft); border-radius: 12px; }
.announcement-card.urgent .announcement-icon { color: var(--red); background: var(--red-soft); }
.announcement-card header { display: flex; align-items: center; gap: 9px; }
.announcement-card h2 { margin: 0; }
.announcement-card p { margin: 8px 0 12px; color: #53647b; line-height: 1.6; }
.announcement-card footer { color: var(--muted); font-size: 11px; }
.pin { padding: 4px 7px; color: var(--orange); background: var(--orange-soft); border-radius: 99px; font-size: 9px; font-weight: 800; }

.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; }
.settings-list { display: grid; margin-top: 15px; }
.settings-list > div { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 15px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.settings-list > div:last-child { border-bottom: 0; }
.settings-list span { color: var(--muted); }
.settings-form { margin-top: 18px; }
.settings-code { display: flex; align-items: center; justify-content: space-between; padding: 12px; color: var(--muted); background: #f7f9fc; border-radius: 10px; font-size: 11px; }
.settings-code strong { color: var(--ink); font-size: 14px; letter-spacing: .08em; }
.building-list { display: grid; gap: 8px; margin-top: 15px; }
.building-list a { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 11px; padding: 11px; border: 1px solid var(--line); border-radius: 12px; }
.building-list a.active { border-color: #b9cff8; background: #f8faff; }
.building-list strong, .building-list small { display: block; }
.building-list strong { font-size: 13px; }
.building-list small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.building-list em { padding: 4px 7px; color: var(--green); background: var(--green-soft); border-radius: 99px; font-size: 9px; font-style: normal; font-weight: 800; }

.modal { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 20px; }
.modal.open { display: flex; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(5,18,35,.62); backdrop-filter: blur(4px); }
.modal-card { position: relative; width: min(600px,100%); max-height: calc(100vh - 40px); overflow-y: auto; padding: 24px; background: #fff; border-radius: 20px; box-shadow: 0 30px 80px rgba(6,25,48,.28); animation: modal-in .2s ease both; }
@keyframes modal-in { from { opacity: 0; transform: translateY(15px) scale(.98); } }
.modal-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; margin-bottom: 20px; }
.modal-card > header h2 { margin: 0; font-size: 24px; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.form-grid h2 { grid-column: 1/-1; margin: 9px 0 -3px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 15px; }
.form-grid h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.form-grid label, .stack-form label, .auth-form label { display: grid; gap: 7px; color: #48576b; font-size: 12px; font-weight: 720; }
.form-grid label.wide, .form-grid .wide { grid-column: 1/-1; }
input, textarea, select { width: 100%; min-height: 43px; padding: 10px 12px; color: var(--ink); background: #fff; border: 1px solid #dce4ee; border-radius: 10px; outline: 0; }
textarea { resize: vertical; line-height: 1.5; }
input:focus, textarea:focus, select:focus { border-color: #7da6fa; box-shadow: 0 0 0 3px rgba(36,107,253,.09); }
.upload-field { position: relative; place-items: center; min-height: 125px; padding: 20px; color: var(--blue) !important; background: #f8faff; border: 1.5px dashed #afc7f7; border-radius: 13px; cursor: pointer; text-align: center; }
.upload-field span { color: var(--muted); font-size: 10px; font-weight: 500; }
.upload-field input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.check-label { align-content: center; grid-template-columns: auto 1fr !important; align-items: center; }
.check-label input { width: 18px; min-height: 18px; }
.stack-form { display: grid; gap: 12px; margin-top: 15px; }

.toast { position: fixed; top: 92px; right: 24px; z-index: 200; max-width: 420px; padding: 14px 18px; color: #fff; background: var(--green); border-radius: 12px; box-shadow: 0 15px 45px rgba(0,0,0,.17); font-size: 13px; font-weight: 700; animation: toast-in .25s ease; }
.toast.danger { background: var(--red); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-10px); } }
.empty-state { grid-column: 1/-1; display: grid; place-items: center; min-height: 270px; padding: 30px; color: var(--muted); background: #fff; border: 1px dashed #cfdae7; border-radius: var(--radius); text-align: center; }
.empty-state > span { display: grid; place-items: center; width: 58px; height: 58px; margin-bottom: 10px; color: var(--green); background: var(--green-soft); border-radius: 18px; }
.empty-state h1, .empty-state h2 { color: var(--ink); }
.empty-state p { margin-bottom: 0; }

.command-search { position: fixed; inset: 0; z-index: 130; display: none; align-items: flex-start; justify-content: center; padding-top: 14vh; }
.command-search.open { display: flex; }
.command-search > div { position: absolute; inset: 0; background: rgba(5,18,35,.58); backdrop-filter: blur(4px); }
.command-search > section { position: relative; width: min(560px,calc(100% - 30px)); padding: 10px; background: #fff; border-radius: 17px; box-shadow: 0 30px 80px rgba(6,25,48,.32); }
.command-search label { display: flex; align-items: center; gap: 10px; padding: 0 10px; border-bottom: 1px solid var(--line); }
.command-search label input { border: 0; box-shadow: none; }
.command-results { display: grid; padding: 8px 0 0; }
.command-results a { display: grid; grid-template-columns: auto 1fr; gap: 12px; padding: 11px; border-radius: 10px; }
.command-results a:hover { background: #f5f8fc; }
.command-results strong, .command-results small { display: block; }
.command-results strong { font-size: 13px; }
.command-results small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.mobile-nav { display: none; }

.auth-body { min-height: 100vh; display: grid; place-items: center; padding: 35px; color: var(--ink); background: #eef4fb; }
.auth-shell { width: min(1060px,100%); min-height: 660px; display: grid; grid-template-columns: 1.18fr .82fr; overflow: hidden; border-radius: 28px; background: #fff; box-shadow: 0 30px 90px rgba(18,52,95,.15); }
.auth-copy { position: relative; padding: 55px; color: #fff; background: var(--navy); overflow: hidden; }
.auth-copy::before { content: ''; position: absolute; width: 360px; height: 360px; right: -130px; top: -100px; border: 70px solid rgba(61,130,255,.18); border-radius: 50%; }
.auth-copy::after { content: ''; position: absolute; width: 270px; height: 270px; left: -140px; bottom: -120px; border: 55px solid rgba(61,215,166,.12); border-radius: 50%; }
.auth-logo { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; }
.auth-logo strong { font-size: 18px; }
.auth-copy h1 { position: relative; z-index: 1; margin-top: 110px; font-size: clamp(39px,5vw,62px); line-height: 1.03; letter-spacing: -.055em; }
.auth-copy > p { position: relative; z-index: 1; max-width: 450px; color: #aec2da; line-height: 1.65; }
.auth-proof { position: relative; z-index: 1; display: grid; gap: 10px; margin-top: 45px; color: #d8e5f3; font-size: 13px; }
.auth-card { display: flex; flex-direction: column; justify-content: center; padding: 50px; }
.auth-card h2 { margin-bottom: 7px; font-size: 31px; }
.auth-card > p { margin-bottom: 25px; color: var(--muted); font-size: 13px; }
.auth-form { display: grid; gap: 17px; }
.auth-form .btn { margin-top: 4px; }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 74px; }
.password-toggle { position: absolute; right: 8px; top: 7px; padding: 6px 8px; color: var(--blue); background: transparent; border: 0; font-size: 10px; font-weight: 800; cursor: pointer; }
.demo-box { display: grid; gap: 3px; margin-top: 22px; padding: 13px; color: var(--muted); background: #f7f9fc; border-radius: 11px; font-size: 10px; }
.demo-box strong { color: var(--ink); font-size: 11px; }
.join-link { display: block; margin-top: 17px; color: var(--blue); text-align: center; font-size: 12px; font-weight: 750; }
.register-shell { grid-template-columns: .82fr 1.18fr; }
.register-shell .auth-copy h1 { margin-top: 95px; font-size: clamp(37px,4.5vw,55px); }
.register-shell .auth-card { padding: 36px 45px; }
.import-note { padding: 12px 13px; color: #54647a; background: #f6f8fb; border-radius: 10px; font-size: 12px; line-height: 1.55; }
.alert { margin-bottom: 17px; padding: 12px 14px; border-radius: 10px; font-size: 12px; }
.alert.danger { color: #b52e35; background: var(--red-soft); }
.alert.success { color: #087b55; background: var(--green-soft); }
.install-shell { width: min(820px,100%); }
.auth-brand { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 20px; }
.auth-brand strong, .auth-brand span { display: block; }
.auth-brand strong { font-size: 18px; }
.auth-brand span { color: var(--muted); font-size: 11px; }
.install-card { padding: 35px; background: #fff; border-radius: 24px; box-shadow: var(--shadow); }
.install-card h1 { margin-bottom: 25px; font-size: 30px; }
.profile-body { display: block; }
.profile-shell { width: min(930px,calc(100% - 30px)); margin: 50px auto; }
.profile-grid { display: grid; grid-template-columns: .72fr 1.28fr; align-items: start; gap: 17px; }
.profile-summary { text-align: center; }
.profile-avatar { width: 78px; height: 78px; margin: 5px auto 16px; font-size: 21px; }
.profile-summary h1 { margin-bottom: 5px; font-size: 25px; }
.profile-summary > p { color: var(--muted); font-size: 12px; }
.profile-buildings { display: grid; gap: 8px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); text-align: left; }
.profile-buildings > div { display: flex; gap: 9px; padding: 10px; background: #f7f9fc; border-radius: 10px; }
.profile-buildings strong,.profile-buildings small { display:block; }
.profile-buildings strong { font-size: 12px; }
.profile-buildings small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.profile-grid h3 { margin: 12px 0 0; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14px; }

@media (max-width: 1180px) {
  .stats-grid { grid-template-columns: repeat(2,1fr); }
  .work-grid { grid-template-columns: repeat(2,1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .dashboard-grid.lower { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  body { padding-bottom: 72px; }
  .sidebar { transform: translateX(-102%); transition: transform .22s ease; box-shadow: 15px 0 50px rgba(4,20,40,.25); }
  .sidebar.open { transform: translateX(0); }
  .app-shell { margin-left: 0; }
  .topbar { height: 68px; padding: 0 18px; }
  .mobile-menu { display: inline-grid; }
  .building-picker .building-icon, .building-picker small { display: none; }
  .building-picker select { max-width: 110px; }
  .search-button { width: 40px; justify-content: center; padding: 0; }
  .search-button span, .search-button kbd { display: none; }
  .top-avatar { display: none; }
  .content { padding: 25px 18px 35px; }
  .mobile-nav { position: fixed; inset: auto 0 0; z-index: 45; height: calc(66px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(5,1fr); padding: 7px 6px env(safe-area-inset-bottom); border-top: 1px solid var(--line); background: rgba(255,255,255,.96); backdrop-filter: blur(16px); }
  .mobile-nav a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: #8491a4; font-size: 9px; font-weight: 700; }
  .mobile-nav a.active { color: var(--blue); }
  .mobile-nav a.active::before { content: ''; position: absolute; top: -7px; width: 28px; height: 3px; background: var(--blue); border-radius: 0 0 4px 4px; }
  .document-categories { grid-template-columns: repeat(2,1fr); }
  .detail-layout { grid-template-columns: 1fr; }
  .auth-shell { grid-template-columns: 1fr; min-height: 0; }
  .auth-copy { display: none; }
  .auth-card { padding: 42px; }
}

@media (max-width: 620px) {
  .content { padding: 21px 13px 30px; }
  .topbar { padding: 0 12px; gap: 8px; }
  .building-picker { flex: 1; }
  .building-picker strong { max-width: 125px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .top-actions { gap: 6px; }
  .welcome-row, .page-head { align-items: flex-start; margin-bottom: 20px; }
  .welcome-row > div, .page-head > div { min-width: 0; }
  .welcome-row h1, .page-head h1 { font-size: 27px; }
  .welcome-row p, .page-head p { display: none; }
  .welcome-row .btn, .page-head .btn { min-width: 43px; width: 43px; padding: 0; overflow: hidden; font-size: 0; }
  .page-head-actions { gap: 6px; }
  .notice-banner { padding: 13px; }
  .notice-banner p { max-width: 230px; }
  .stats-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
  .stat-card { align-items: flex-start; gap: 9px; padding: 14px 12px; }
  .stat-icon { width: 36px; height: 36px; flex-basis: 36px; border-radius: 11px; }
  .stat-icon .icon { width: 18px; }
  .stat-card strong { margin-top: 6px; font-size: 18px; }
  .stat-card em { display: none; }
  .dashboard-grid.lower { grid-template-columns: 1fr; }
  .panel { padding: 17px; border-radius: 15px; }
  .issues-panel { overflow: hidden; }
  .issue-columns { width: max-content; grid-template-columns: repeat(3,220px); overflow-x: auto; max-width: 100%; }
  .bar-chart { height: 140px; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .filter-search { width: 100%; }
  .filter-chips { overflow-x: auto; }
  .issue-card { grid-template-columns: auto 1fr; align-items: start; gap: 12px; padding: 14px; }
  .category-icon { width: 40px; height: 40px; }
  .issue-main p { max-width: 230px; }
  .issue-side { grid-column: 1/-1; display: flex; padding-top: 10px; border-top: 1px solid var(--line); }
  .issue-side > .icon { margin-left: auto; }
  .issue-detail-head { align-items: flex-start; }
  .issue-detail-head h1 { font-size: 25px; }
  .detail-meta { grid-template-columns: 1fr; }
  .comment-form { flex-direction: column; }
  .finance-hero { min-height: 150px; padding: 22px; }
  .finance-hero strong { font-size: 30px; }
  .fund-meter { width: 88px; height: 88px; }
  .fund-meter b { font-size: 17px; }
  .dashboard-grid.finances { grid-template-columns: 1fr; }
  .work-grid, .votes-grid, .settings-grid { grid-template-columns: 1fr; }
  .document-categories { gap: 8px; }
  .document-categories article { padding: 12px; }
  .announcement-card { padding: 15px; }
  .announcement-card p { font-size: 13px; }
  .invite-strip .btn { min-width: 43px; width: 43px; padding: 0; font-size: 0; }
  .invite-strip .btn::after { content: '⧉'; font-size: 17px; }
  .modal { align-items: flex-end; padding: 0; }
  .modal-card { width: 100%; max-height: 92vh; padding: 20px 16px calc(20px + env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid label.wide, .form-grid .wide, .form-grid h2 { grid-column: auto; }
  .auth-body { padding: 15px; }
  .auth-card { padding: 31px 22px; }
  .auth-card h2 { font-size: 27px; }
  .install-card { padding: 25px 18px; }
  .toast { top: 78px; right: 12px; left: 12px; max-width: none; }
  .profile-shell { margin: 25px auto; }
  .profile-grid { grid-template-columns: 1fr; }
}

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