@layer reset, base, layout, components, responsive, theme;
@layer reset {
  * { box-sizing: border-box; }
  body, h1, h2, h3, p { margin: 0; }
  button, input, select, textarea { font: inherit; }
  button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
  button, a { touch-action: manipulation; }
  a { color: inherit; text-decoration: none; }
  button { cursor: pointer; }
  svg { display: block; flex: 0 0 auto; }
  [hidden] { display: none !important; }
}
@layer base {
  :root { --navy: #1d3549; --green: #afd594; --ink: #243b4c; --muted: #687983; --line: #e3e9eb; --canvas: #f7f9fa; --soft: #edf4e9; --white: #fff; --radius: 12px; }
  body { font: 16px/1.55 'Segoe UI', Arial, sans-serif; color: var(--ink); background: var(--canvas); }
  :focus-visible { outline: 3px solid #648b4e; outline-offset: 4px; }
  h1 { font-size: clamp(1.9rem, 3vw, 2.35rem); letter-spacing: -.045em; font-weight: 600; line-height: 1.2; }
  h2 { font-size: 1.2rem; font-weight: 600; letter-spacing: -.02em; }
  h3 { font-size: 1rem; font-weight: 600; }
  p { color: var(--muted); }
  small, .small { font-size: .875rem; }
  button:disabled, input:disabled, select:disabled, textarea:disabled { cursor: not-allowed; opacity: 1; }
  input, select, textarea { width: 100%; min-height: 46px; border: 1px solid #cfd9de; border-radius: 7px; padding: 10px 13px; background: white; color: var(--ink); }
  input:disabled, select:disabled, textarea:disabled { background: #f4f6f7; color: #74828a; border-color: var(--line); }
  label, .field-label { display: block; font-size: .875rem; font-weight: 600; margin-bottom: 7px; }
  textarea { min-height: 100px; resize: vertical; }
  fieldset { padding: 0; border: 0; margin: 0; min-width: 0; }
  .muted { color: var(--muted); }
  .eyebrow { display: block; font-size: .75rem; letter-spacing: .13em; text-transform: uppercase; font-weight: 600; color: var(--muted); }
  .skip-link { position: fixed; top: -80px; left: 16px; background: white; padding: 12px; z-index: 100; }
  .skip-link:focus { top: 10px; }
  .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
}
@layer layout {
  .app-shell { min-height: 100vh; display: grid; grid-template-columns: 248px minmax(0, 1fr); }
  .sidebar { background: white; border-right: 1px solid var(--line); height: 100dvh; position: sticky; top: 0; display: flex; flex-direction: column; padding: 34px 20px 20px; z-index: 20; overflow-y: auto; }
  .sidebar-brand { padding: 0 15px 32px; border-bottom: 1px solid var(--line); margin-bottom: 28px; }
  .brand-image { overflow: hidden; width: 166px; height: 50px; background: white; display: block; border-radius: 3px; }
  .brand-image img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
  .brand-sub { margin-top: 14px; font-size: .75rem; font-weight: 600; letter-spacing: .13em; text-transform: uppercase; }
  .nav-section-label { padding: 0 14px; margin: 24px 0 10px; font-size: .75rem; letter-spacing: .1em; color: var(--muted); text-transform: uppercase; }
  .nav-section-label:first-child { margin-top: 0; }
  .nav-item { display: flex; align-items: center; gap: 11px; padding: 11px 13px; border-radius: 7px; font-size: .875rem; color: #586c78; margin: 4px 0; min-height: 44px; }
  .nav-item:hover { background: #f4f7f8; color: var(--navy); }
  .nav-item.active { background: var(--soft); color: var(--navy); font-weight: 600; }
  .sidebar-bottom { margin-top: auto; padding-top: 32px; }
  .profile { padding: 18px 9px 3px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
  .avatar { width: 36px; height: 36px; background: #e9eef1; color: var(--navy); display: grid; place-items: center; border-radius: 50%; font-size: .8125rem; font-weight: 600; flex-shrink: 0; }
  .profile strong { font-size: .875rem; display: block; }
  .profile small { display: block; color: var(--muted); font-size: .75rem; }
  .workspace { min-width: 0; }
  .topbar { height: 81px; border-bottom: 1px solid var(--line); padding: 0 42px; display: flex; align-items: center; justify-content: space-between; gap: 16px; background: white; }
  .breadcrumbs { display: flex; gap: 10px; align-items: center; min-width: 0; font-size: .875rem; color: var(--muted); }
  .breadcrumbs span:last-child { color: var(--ink); }
  .breadcrumbs a:hover { text-decoration: underline; }
  .top-actions { display: flex; align-items: center; gap: 20px; }
  .preview-pill { padding: 6px 10px; border: 1px solid #d8e2d1; background: #f5f9f2; border-radius: 6px; color: #49623a; font-size: .75rem; white-space: nowrap; font-weight: 600; }
  .content { padding: 40px 42px 25px; max-width: 1550px; margin: 0 auto; }
  .page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
  .page-heading .eyebrow { margin-bottom: 9px; }
  .page-heading p { margin-top: 12px; max-width: 650px; }
  .page-heading .btn { margin-top: 7px; }
  .notice { border: 1px solid #dce6ed; border-radius: 8px; padding: 13px 16px; display: flex; align-items: flex-start; gap: 10px; background: #f0f5f8; font-size: .875rem; color: #526a7c; margin-bottom: 30px; }
  .notice svg { margin-top: 2px; }
  .project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
  .project-card { display: block; position: relative; min-height: 370px; border: 0; border-radius: 15px; overflow: hidden; isolation: isolate; background: #e5ebee; transition: transform .2s, box-shadow .2s; }
  .project-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px #1d354918; }
  .project-placeholder { position: absolute; inset: 0; color: #758893; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 13px; padding: 0 20px 76px; font-size: .8125rem; }
  .project-card::after { content: ''; position: absolute; inset: 35% 0 0; background: linear-gradient(180deg, transparent, #20394b99 65%, #1d3549eb); pointer-events: none; z-index: 1; }
  .placeholder-icon { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; color: #8a9ba4; background: #ffffff40; }
  .project-caption { position: absolute; inset: auto 0 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 28px 30px; color: white; }
  .project-caption h2 { font-size: 2.25rem; font-weight: 500; line-height: 1.2; letter-spacing: -.04em; overflow-wrap: anywhere; }
  .arrow-link { flex-shrink: 0; width: 43px; height: 43px; border: 1px solid #ffffff60; background: #ffffff0c; display: grid; place-items: center; border-radius: 50%; transition: background .2s, color .2s; }
  .project-card:hover .arrow-link { background: var(--green); border-color: var(--green); color: var(--navy); }
  .page-footer { margin-top: 62px; padding: 20px 0 0; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 14px; font-size: .75rem; color: #7d8b91; }
  .mobile-menu { display: none; }
  .login { min-height: 100vh; display: grid; grid-template-columns: .85fr 1fr; background: white; }
  .login-intro { background: var(--navy); padding: 58px 60px 35px; display: flex; flex-direction: column; align-items: flex-start; color: white; }
  .login-intro .brand-image { width: 200px; height: 60px; background: transparent; }
  .login-intro .brand-image img { filter: grayscale(1) invert(1) brightness(6); mix-blend-mode: screen; }
  .login-title { margin: auto 0; padding: 70px 0; }
  .login-title .eyebrow { color: var(--green); margin-bottom: 23px; }
  .login-title h1 { font-size: clamp(2.8rem, 4.4vw, 4.5rem); font-weight: 400; letter-spacing: -.05em; }
  .login-title p { color: #b9c8d3; margin-top: 25px; max-width: 330px; }
  .login-intro-footer { font-size: .8125rem; color: #a3b5c2; }
  .login-main { display: flex; align-items: center; justify-content: center; padding: 45px; }
  .login-box { width: 100%; max-width: 400px; }
  .login-box h2 { font-size: 1.85rem; margin-top: 23px; }
  .login-box > p { margin: 10px 0 27px; }
  .login-box .field { margin-bottom: 18px; }
  .login-box .btn { width: 100%; }
  .login-box .divider { border-top: 1px solid var(--line); margin: 29px 0 19px; }
  .login-box .preview-links { display: grid; gap: 12px; margin-top: 18px; }
}
@layer components {
  .btn { border: 1px solid transparent; border-radius: 7px; padding: 11px 17px; min-height: 44px; display: inline-flex; justify-content: center; align-items: center; gap: 9px; font-size: .875rem; font-weight: 600; background: var(--navy); color: white; white-space: normal; }
  .btn:hover { background: #2b485e; }
  .btn.secondary { background: white; border-color: #d6dfe3; color: var(--ink); }
  .btn.secondary:hover { background: #f3f6f7; }
  .btn.green { background: var(--green); color: var(--navy); }
  .btn.green:hover { background: #a1ca84; }
  .btn:disabled { background: #e8edef; color: #74838c; border-color: #e2e8eb; }
  .btn.compact { padding: 7px 12px; min-height: 38px; }
  .icon-btn { width: 38px; height: 38px; display: inline-grid; place-items: center; border: 0; border-radius: 6px; background: transparent; color: var(--muted); }
  .icon-btn:hover { background: #eef2f4; }
  .theme-toggle { width:42px; height:42px; border:1px solid var(--line); color:var(--ink); }
  .login-theme { position:absolute; top:24px; right:26px; z-index:5; }
  .login-theme .theme-toggle { background:var(--canvas); }
  .mobile-menu { display: none; }
  .panel { background: white; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
  .panel-head { padding: 22px 25px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 20px; }
  .panel-body { padding: 25px; }
  .empty-state { padding: 64px 25px; display: flex; align-items: center; flex-direction: column; text-align: center; }
  .empty-state .empty-icon { width: 58px; height: 58px; display: grid; place-items: center; background: #f2f5f6; color: #7c8e98; border-radius: 14px; margin-bottom: 20px; }
  .empty-state h2 { font-size: 1.0625rem; margin-bottom: 8px; }
  .empty-state p { font-size: .875rem; max-width: 405px; }
  .empty-state .btn { margin-top: 22px; }
  .section-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 26px; }
  .section-card { padding: 22px; background: white; border: 1px solid var(--line); border-radius: 10px; display: flex; align-items: center; gap: 14px; }
  .section-card:hover { border-color: #a2b49a; }
  .section-card > svg { color: #648158; }
  .section-card h3 { font-size: .9375rem; }
  .section-card p { font-size: .8125rem; margin-top: 4px; }
  .section-card .chevron { margin-left: auto; color: #94a0a6; }
  .context-bar { background: white; padding: 15px 19px; border: 1px solid var(--line); border-left: 3px solid var(--green); border-radius: 7px; display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 24px; }
  .context-bar strong { font-weight: 600; }
  .context-bar small { color: var(--muted); }
  .filter-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding: 22px 25px; border-bottom: 1px solid var(--line); }
  .filter-row.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .legend { display: flex; flex-wrap: wrap; align-items: center; gap: 21px; padding: 18px 25px; border-bottom: 1px solid var(--line); font-size: .875rem; }
  .status { display: inline-flex; align-items: center; gap: 8px; }
  .status::before { content: ''; width: 9px; height: 9px; background: #68a56a; border-radius: 3px; }
  .status.reserved::before { background: #d7a342; }
  .status.negotiation::before { background: #d78850; }
  .status.sold::before { background: #b96f71; }
  .status.blocked::before { background: #8e9aa3; }
  .split { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 22px; align-items: start; }
  .detail-list { margin: 0; }
  .detail-list div { display: flex; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: .875rem; }
  .detail-list dt { color: var(--muted); }
  .detail-list dd { margin: 0; font-weight: 600; }
  .detail-foot { padding-top: 21px; }
  .detail-foot .btn { width: 100%; }
  .detail-foot p { margin-top: 12px; font-size: .8125rem; }
  .table-wrap { overflow-x: auto; }
  .table-checkbox { min-height: 16px; width: 16px; height: 16px; margin: 0; }
  table { border-collapse: collapse; width: 100%; text-align: left; }
  th { padding: 15px 22px; background: #f8fafb; border-bottom: 1px solid var(--line); font-size: .75rem; letter-spacing: .045em; text-transform: uppercase; font-weight: 600; color: #74838b; white-space: nowrap; }
  td { padding: 18px 22px; border-bottom: 1px solid var(--line); font-size: .875rem; }
  tr:last-child td { border-bottom: 0; }
  .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
  .field.full { grid-column: 1 / -1; }
  .form-section + .form-section { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
  .form-section h3 { margin-bottom: 20px; }
  .form-note { font-size: .8125rem; margin-top: 8px; }
  .sim-summary { background: var(--navy); color: white; border: 0; }
  .sim-summary .panel-head { border-color: #385164; }
  .sim-summary .detail-list div { border-color: #385164; }
  .sim-summary dt { color: #b5c4cf; }
  .sim-summary p { color: #b5c4cf; }
  .sim-summary .total { border-top: 1px solid #527042; margin-top: 24px; padding-top: 22px; }
  .sim-summary .total strong { color: var(--green); font-size: 2rem; font-weight: 400; }
  .tag { border: 1px solid var(--line); background: #f6f8f9; font-size: .75rem; padding: 4px 9px; border-radius: 5px; color: var(--muted); display: inline-block; }
  .tag.positive { color: #506943; background: #f0f6eb; border-color: #dbe7d3; }
  .stack { display: grid; gap: 22px; }
  .inline-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
  dialog { border: 1px solid var(--line); border-radius: 14px; padding: 0; width: min(600px, calc(100vw - 32px)); max-height: 90dvh; color: var(--ink); box-shadow: 0 20px 80px #10263426; }
  dialog::backdrop { background: #142a3bbb; }
  .dialog-head { padding: 22px 26px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 20px; }
  .dialog-body { padding: 25px 26px; }
  .dialog-body > p { margin-bottom: 22px; }
  .dialog-footer { padding: 18px 26px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; }
  .dialog-error { color: #9f4047; font-size: .875rem; margin-top: 15px; }
  .toast { position: fixed; bottom: 25px; left: 50%; transform: translateX(-50%); padding: 14px 22px; border-radius: 8px; background: var(--navy); color: white; box-shadow: 0 8px 26px #14263425; max-width: calc(100% - 30px); z-index: 100; font-size: .875rem; }
  .check-list { padding-left: 20px; color: var(--muted); font-size: .875rem; }
  .check-list li { padding: 5px 0; }
  .commercial-meta { display:flex; flex-wrap:wrap; align-items:center; gap:12px 20px; margin-bottom:20px; font-size:.875rem; color:var(--muted); }
  .commercial-source { font-size:.8125rem; margin:-14px 0 22px; }
  .commercial-help { display:flex; justify-content:space-between; flex-wrap:wrap; gap:7px 20px; padding:14px 23px; color:var(--muted); font-size:.8125rem; border-bottom:1px solid var(--line); }
  .commercial-table { min-width:1330px; font-variant-numeric:tabular-nums; }
  .commercial-table th { text-align:right; text-transform:none; letter-spacing:0; font-size:.875rem; padding:16px 19px; }
  .commercial-table th span { display:block; font-weight:400; color:var(--muted); font-size:.75rem; margin-top:4px; }
  .commercial-table th:first-child, .commercial-table th:last-child { text-align:left; }
  .commercial-table td { padding:17px 19px; }
  .commercial-table th:first-child, .commercial-table td:first-child { position:sticky; left:0; z-index:1; background:white; box-shadow:1px 0 var(--line); min-width:145px; }
  .commercial-table th:first-child { background:#f8fafb; }
  .commercial-table tr:hover td { background:#f6f9fa; }
  .commercial-table tr.selected td { background:#f0f6eb; }
  .money-cell { text-align:right; white-space:nowrap; }
  .total-cell { font-weight:600; color:var(--navy); }
  .unit-name { display:inline-flex; align-items:center; gap:8px; border:0; padding:5px 0; min-height:34px; background:transparent; color:var(--navy); font-weight:600; font-size:.9375rem; }
  .unit-name:hover { text-decoration:underline; }
  .cell-secondary { display:block; font-size:.8125rem; color:var(--muted); }
  .review-mini { display:block; font-size:.75rem; color:#91662c; margin-top:5px; }
  .commercial-pagination { border-top:1px solid var(--line); display:flex; align-items:center; justify-content:space-between; gap:16px; padding:17px 22px; color:var(--muted); font-size:.875rem; }
  .review-note { display:flex; gap:11px; align-items:flex-start; background:#fbf7ee; border:1px solid #eadebd; border-radius:8px; padding:16px 19px; font-size:.875rem; color:#7d633b; margin:23px 0; }
  .review-note svg { margin-top:3px; }
  .commercial-terms { margin-top:25px; }
  .terms-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:20px; }
  .commercial-source-links { display:flex; flex-wrap:wrap; gap:10px; margin:12px 0 22px; }
  .commercial-source-links:empty { display:none; }
  .commercial-status-summary { display:flex; flex-wrap:wrap; gap:10px; margin:16px 0 22px; }
  .commercial-status-summary .availability-badge { gap:7px; font-size:.875rem; padding:9px 12px; }
  .commercial-status-summary strong { font-size:1rem; }
  .terms-grid strong { display:block; font-weight:600; margin-top:8px; }
  .terms-grid p { font-size:.8125rem; margin-top:5px; }
  .commercial-footnote { border-top:1px solid var(--line); margin-top:25px; padding-top:18px; }
  .commercial-footnote p { font-size:.8125rem; margin:5px 0; }
  .unit-grid { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:13px; padding:25px; }
  .unit-tile { padding:18px 12px; display:flex; align-items:center; flex-direction:column; border:1px solid #dbe3e7; border-radius:9px; background:#f8fafb; color:var(--ink); }
  .unit-tile:hover, .unit-tile.selected { border-color:#8aa27c; background:#f0f6eb; }
  .unit-tile strong { font-size:1.0625rem; }
  .unit-tile span { font-size:.8125rem; color:var(--muted); margin-top:5px; }
  .unit-tile small { margin-top:9px; font-size:.75rem; color:#70808a; }
  .status.unknown::before { background:white; border:1px solid #8e9aa3; }
  .unit-price { margin:22px 0 6px; }
  .unit-price strong { display:block; font-size:1.8rem; font-weight:500; color:var(--navy); margin-top:4px; }
  .commercial-unit-table { min-width:930px; }
  .sim-summary .sim-review { padding:14px; background:#ffffff0d; border:1px solid #81947b; border-radius:6px; color:#dfebb7; font-size:.8125rem; margin-top:21px; }
  input[readonly] { background:#f5f7f8; border-color:var(--line); color:var(--ink); }
  .mirror-heading-meta { display:flex; align-items:center; flex-wrap:wrap; gap:13px 18px; margin:-9px 0 25px; font-size:.8125rem; color:var(--muted); }
  .mirror-status-note { display:flex; flex-wrap:wrap; gap:10px 22px; padding:15px 25px; font-size:.8125rem; color:var(--muted); border-bottom:1px solid var(--line); }
  .mirror-status-note .status { font-weight:600; color:var(--ink); }
  .floor-scroll { overflow:auto; max-height:690px; padding:0 24px 22px; scrollbar-gutter:stable; }
  .floor-table { width:100%; max-width:850px; min-width:560px; border-collapse:separate; border-spacing:5px; table-layout:fixed; }
  .floor-table thead th { position:sticky; top:0; z-index:2; background:white; border:0; text-align:center; color:var(--muted); font-size:.75rem; padding:18px 7px 13px; }
  .floor-table thead th:first-child { width:75px; }
  .floor-table tbody th { background:transparent; color:var(--ink); font-size:1rem; padding:0 14px 0 5px; text-align:right; border:0; }
  .floor-table td { border:0; padding:0; vertical-align:middle; }
  .floor-unit { position:relative; display:flex; flex-direction:column; align-items:flex-start; justify-content:center; width:100%; min-height:63px; border:1px solid #e5eaed; border-radius:5px; background:#f2f5f6; padding:9px 14px; color:var(--ink); transition:background .15s,border-color .15s; }
  .floor-unit strong { font-size:.9375rem; font-weight:600; line-height:1.35; }
  .floor-unit > span:not(.floor-review) { color:var(--muted); font-size:.8125rem; }
  .floor-unit:hover { background:#e5edf1; border-color:#91a8b6; }
  .floor-unit.disponivel { background:#d2eac0; border-color:#a8cb91; }
  .floor-unit.reservado { background:#f6e2b9; border-color:#d8b778; }
  .floor-unit.negociacao { background:#f9dec7; border-color:#d7a47a; }
  .floor-unit.vendido { background:#f0d3d5; border-color:#d7a1a7; }
  .floor-unit.bloqueado { background:#dbe1e6; border-color:#a8b6c0; }
  .floor-review { position:absolute; right:7px; top:7px; width:16px; height:16px; display:grid; place-items:center; border:1px solid #c2a775; border-radius:50%; color:#8b652d; font-size:.6875rem; font-weight:600; }
  .mirror-shops { padding:23px 28px 28px; border-top:1px solid var(--line); }
  .mirror-shops h2 { font-size:1rem; }
  .mirror-shops p { font-size:.8125rem; margin:5px 0 18px; }
  .shop-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); max-width:850px; gap:8px; }
  .availability-badge { display:inline-flex; align-items:center; border:1px solid var(--line); border-radius:6px; padding:5px 10px; background:var(--canvas); color:var(--muted); font-size:.8125rem; font-weight:500; white-space:nowrap; }
  .availability-badge.disponivel { background:#eaf4e4; color:#365e2f; border-color:#bdd5ad; }
  .availability-badge.reservado { background:#fdf0d2; color:#7a5a25; border-color:#e1c68e; }
  .availability-badge.negociacao { background:#fbe5d4; color:#7c421d; border-color:#d7a47a; }
  .availability-badge.vendido { background:#fae2e4; color:#8f323c; border-color:#dfb4b9; }
  .availability-badge.bloqueado { background:#e6ebef; color:#465762; border-color:#becbd4; }
  .availability-unit { margin-bottom:24px; }
  .availability-unit h3 { margin:7px 0 3px; font-size:1.35rem; }
  .availability-unit .availability-badge { margin-top:12px; }
}
@layer responsive {
  @media(min-width: 1500px) { .content { padding-top: 48px; } .project-card { min-height: 425px; } }
  @media(max-width: 1180px) { .content { padding: 32px 26px; } .topbar { padding: 0 26px; } .app-shell { grid-template-columns: 225px minmax(0, 1fr); } .sidebar { padding-inline: 13px; } .split { grid-template-columns: 1fr; } .section-grid { grid-template-columns: 1fr 1fr; } .filter-row.four { grid-template-columns: 1fr 1fr; } }
  @media(max-width: 800px) {
    .unit-grid { grid-template-columns:repeat(3,minmax(0,1fr)); padding:20px; }
    .terms-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .app-shell { grid-template-columns: 1fr; }
    .sidebar { display: none; position: fixed; width: 260px; left: 0; top: 68px; height: calc(100dvh - 68px); box-shadow: 12px 0 30px #19364a20; padding-top: 25px; }
    .sidebar.open { display: flex; }
    .mobile-menu { display: inline-grid; flex: 0 0 38px; }
    .topbar { height: 68px; padding: 0 17px; gap: 8px; }
    .breadcrumbs { margin-right: auto; font-size: .8125rem; flex-wrap: wrap; gap: 5px; }
    .top-actions { gap: 4px; }
    .top-actions .preview-pill { font-size: .6875rem; padding: 5px 7px; }
    .content { padding: 28px 20px; }
    .page-heading { gap: 15px; flex-wrap: wrap; margin-bottom: 25px; }
    .page-heading p { font-size: .9375rem; }
    .project-grid { gap: 18px; }
    .project-card { min-height: 320px; }
    .project-caption { padding: 24px; }
    .page-footer { margin-top: 40px; flex-wrap: wrap; }
    .login { grid-template-columns: 1fr; }
    .login-intro { padding: 25px 30px; }
    .login-title { padding: 28px 0 6px; }
    .login-title h1 { font-size: 2rem; }
    .login-title h1 br { display: none; }
    .login-title .eyebrow, .login-title p, .login-intro-footer { display: none; }
    .login-main { padding: 32px 24px; }
    .login-box { max-width: 460px; }
    .login-box h2 { margin-top: 15px; }
    .filter-row, .filter-row.four { grid-template-columns: 1fr 1fr; padding: 20px; }
  }
  @media(max-width: 520px) {
    .floor-scroll { padding:0 10px 15px; max-height:600px; }
    .floor-table { min-width:490px; }
    .floor-table thead th:first-child { width:46px; }
    .floor-table tbody th { padding-right:6px; }
    .floor-unit { padding:9px 10px; }
    .mirror-shops { padding:21px 16px; }
    .shop-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .mirror-status-note { padding:15px 18px; }
    .unit-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; padding:16px; }
    .commercial-pagination { align-items:flex-start; flex-direction:column; padding:16px; }
    .commercial-pagination .inline-actions { width:100%; justify-content:space-between; }
    .commercial-help { padding:14px 16px; }
    .commercial-meta { gap:9px 15px; }
    .commercial-table th:first-child, .commercial-table td:first-child { min-width:112px; }
    .commercial-table td, .commercial-table th { padding-left:14px; padding-right:14px; }
    .project-grid, .section-grid, .form-grid { grid-template-columns: 1fr; }
    .project-card { min-height: 290px; }
    .project-caption h2 { font-size: 2rem; }
    .notice { padding: 13px; }
    .content { padding: 25px 16px; }
    .top-actions > .icon-btn { display: none; }
    .top-actions > .theme-toggle { display:inline-grid; flex-shrink:0; width:36px; height:36px; }
    .top-actions .preview-pill { white-space: normal; max-width: 122px; line-height: 1.35; }
    .breadcrumbs { flex: 1; }
    .breadcrumbs span, .breadcrumbs a { overflow-wrap: anywhere; }
    .breadcrumbs > :not(:last-child) { display: none; }
    .panel-head, .panel-body { padding: 20px; }
    .panel-head { align-items: flex-start; flex-wrap: wrap; gap: 12px; }
    .filter-row, .filter-row.four { grid-template-columns: 1fr; }
    .legend { gap: 14px; padding: 18px 20px; font-size: .8125rem; }
    .context-bar { flex-wrap: wrap; gap: 6px; }
    .context-bar small { width: 100%; }
    .empty-state { padding: 46px 20px; }
  }
  @media(prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
}
@layer theme {
  :root { color-scheme:light; }
  :root[data-theme="dark"] { color-scheme:dark; --ink:#e3edf2; --muted:#a0b1bc; --line:#2d414e; --canvas:#0e1a24; --soft:#273d2c; --white:#152733; }
  [data-theme="dark"] :is(.sidebar,.topbar,.panel,.context-bar,.section-card,.login,dialog,.skip-link) { background:var(--white); }
  [data-theme="dark"] .brand-image { background:transparent; }
  [data-theme="dark"] .brand-image img { filter:grayscale(1) invert(1) brightness(6); mix-blend-mode:screen; }
  [data-theme="dark"] .login-intro { background:#1d3549; }
  [data-theme="dark"] .nav-item { color:var(--muted); }
  [data-theme="dark"] .nav-item:hover { background:#213743; color:var(--ink); }
  [data-theme="dark"] .nav-item.active { background:#273d2c; color:#c2e2ab; }
  [data-theme="dark"] .avatar { color:#d7e7ef; background:#2b4352; }
  [data-theme="dark"] :is(input,select,textarea) { background:#12232f; color:var(--ink); border-color:#3c5260; }
  [data-theme="dark"] :is(input,select,textarea):disabled { background:#1c2d38; color:#a3b2bc; border-color:var(--line); }
  [data-theme="dark"] input[readonly] { background:#1a303d; color:var(--ink); border-color:var(--line); }
  [data-theme="dark"] .btn { background:#365c73; color:white; }
  [data-theme="dark"] .btn:hover { background:#466f87; }
  [data-theme="dark"] .btn.secondary { background:#1e3340; color:var(--ink); border-color:#3a515e; }
  [data-theme="dark"] .btn.secondary:hover { background:#2a4352; }
  [data-theme="dark"] .btn.green { background:var(--green); color:#1d3549; }
  [data-theme="dark"] .btn:disabled { background:#273b48; color:#a2b2bd; border-color:#314652; }
  [data-theme="dark"] .icon-btn { color:var(--muted); }
  [data-theme="dark"] .icon-btn:hover { background:#2b414f; color:var(--ink); }
  [data-theme="dark"] .preview-pill { background:#23392b; color:#c3dcb4; border-color:#40583b; }
  [data-theme="dark"] .notice { background:#1b3344; color:#bed5e3; border-color:#385366; }
  [data-theme="dark"] .project-card { background:#2b414e; }
  [data-theme="dark"] .project-placeholder { color:#adbdc6; }
  [data-theme="dark"] .placeholder-icon { color:#b7c6ce; background:#ffffff0c; }
  [data-theme="dark"] .empty-state .empty-icon { background:#253b49; color:#a8bcc9; }
  [data-theme="dark"] .section-card > svg { color:var(--green); }
  [data-theme="dark"] .tag { background:#243844; border-color:#3b505d; color:#b4c3cc; }
  [data-theme="dark"] .tag.positive { background:#273d2c; border-color:#48603e; color:#c4dfb5; }
  [data-theme="dark"] th { background:#1d303e; color:#acbec9; }
  [data-theme="dark"] .commercial-table :is(th:first-child,td:first-child) { background:var(--white); }
  [data-theme="dark"] .commercial-table th:first-child { background:#1d303e; }
  [data-theme="dark"] .commercial-table tr:hover td { background:#213846; }
  [data-theme="dark"] .commercial-table tr.selected td { background:#293f30; }
  [data-theme="dark"] :is(.total-cell,.unit-name,.unit-price strong) { color:var(--ink); }
  [data-theme="dark"] .unit-tile { background:#1b303e; border-color:#3b5361; color:var(--ink); }
  [data-theme="dark"] :is(.unit-tile:hover,.unit-tile.selected) { background:#293e31; border-color:#8aa779; }
  [data-theme="dark"] .unit-tile small { color:#b0c0ca; }
  [data-theme="dark"] .status.unknown::before { background:transparent; border-color:#a6b6c0; }
  [data-theme="dark"] .review-note { background:#373225; border-color:#756242; color:#ead3a8; }
  [data-theme="dark"] .review-mini { color:#ddbd85; }
  [data-theme="dark"] .sim-summary { background:#1d3549; color:white; }
  [data-theme="dark"] .sim-summary .total strong { color:var(--green); }
  [data-theme="dark"] .dialog-error { color:#f2a0a8; }
  [data-theme="dark"] .page-footer { color:#97a9b4; }
  [data-theme="dark"] .floor-table thead th { background:var(--white); }
  [data-theme="dark"] .floor-table tbody th { background:transparent; }
  [data-theme="dark"] .floor-unit { background:#233845; border-color:#354f5e; color:var(--ink); }
  [data-theme="dark"] .floor-unit:hover { background:#2e4a5a; border-color:#728f9f; }
  [data-theme="dark"] .floor-unit.disponivel { background:#304934; border-color:#608952; }
  [data-theme="dark"] .floor-unit.reservado { background:#51452e; border-color:#9c7f46; }
  [data-theme="dark"] .floor-unit.negociacao { background:#503b2e; border-color:#af7951; }
  [data-theme="dark"] .floor-unit.vendido { background:#51333a; border-color:#9c5b67; }
  [data-theme="dark"] .floor-unit.bloqueado { background:#364651; border-color:#647d8c; }
  [data-theme="dark"] .floor-review { color:#e9c68d; border-color:#ae8d56; }
  [data-theme="dark"] .availability-badge.disponivel { background:#304934; border-color:#608952; color:#c4dfb5; }
  [data-theme="dark"] .availability-badge.reservado { background:#51452e; border-color:#9c7f46; color:#efdaa9; }
  [data-theme="dark"] .availability-badge.negociacao { background:#503b2e; border-color:#af7951; color:#f4c9a7; }
  [data-theme="dark"] .availability-badge.vendido { background:#51333a; border-color:#9c5b67; color:#efbcc4; }
  [data-theme="dark"] .availability-badge.bloqueado { background:#364651; border-color:#647d8c; color:#c6d6e1; }
}
@layer components {
  .floor-table.floor-table-wide { min-width:760px; }
}

@layer components { .info-text { white-space:pre-line; overflow-wrap:anywhere; line-height:1.7; } .info-map-link { margin-bottom:24px; } .login-box form { margin-top:24px; } .login-box .field { margin-bottom:18px; } .profile strong,.profile small { overflow-wrap:anywhere; max-width:130px; } .dialog-body textarea { min-height:110px; } }
.login-theme { margin-bottom:24px; }
