:root {
  --forest: #184f31;
  --forest-2: #236a41;
  --leaf: #3b8b57;
  --mint: #e8f3ec;
  --mint-2: #f4f8f5;
  --ink: #17231c;
  --muted: #667269;
  --line: #dfe7e1;
  --canvas: #f2f5f2;
  --green: #237043;
  --amber: #b9600f;
  --red: #b43c32;
  --shadow: 0 10px 28px rgba(24,79,49,.08);
}
* { box-sizing: border-box; }
html { font-size: 16px; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-family: Inter, "Segoe UI", Arial, sans-serif; line-height: 1.45; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: var(--forest); }
button:disabled { cursor: not-allowed; }
button:disabled:not(.nav-btn) { opacity: .58; }
button:disabled:hover { filter: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--leaf); outline-offset: 3px; }
.icon-definitions { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 19px; height: 19px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.app { min-height: 100vh; display: grid; grid-template-columns: 264px minmax(0,1fr); }
.sidebar { background: radial-gradient(circle at 20% -10%, rgba(103,177,125,.24), transparent 35%), linear-gradient(180deg,#15472c 0%,#113a24 100%); color: #fff; }
.sidebar { position: sticky; top: 0; height: 100dvh; min-height: 540px; padding: 24px 16px; display: flex; flex-direction: column; z-index: 30; overflow-y: auto; }
.brand { display: flex; gap: 12px; align-items: center; padding: 0 8px 22px; }
.brand-mark { width: 42px; height: 42px; flex: 0 0 42px; border-radius: 13px; display: grid; place-items: center; background: #fff; overflow: hidden; }
.brand-mark img { display: block; width: 100%; height: 100%; }
.brand strong { display: block; font-size: 1.04rem; letter-spacing: .01em; }
.brand small { color: rgba(255,255,255,.67); }
.nav-label { padding: 0 10px 8px; color: rgba(255,255,255,.6); font-size: .74rem; text-transform: uppercase; letter-spacing: .09em; }
.nav { display: grid; gap: 5px; }
.nav-btn { width: 100%; border: 0; border-radius: 11px; background: transparent; color: rgba(255,255,255,.76); text-align: left; padding: 11px 12px; display: flex; align-items: center; gap: 11px; transition: .18s ease; text-decoration: none; }
.nav-btn .icon { opacity: .8; }
.nav-btn:not(:disabled):hover { background: rgba(255,255,255,.08); color: #fff; }
.nav-btn.active { color: #fff; background: rgba(255,255,255,.14); box-shadow: inset 3px 0 #90d2a2; }
.sidebar-bottom { margin-top: auto; padding: 18px 8px 0; }
.sync-mini { padding: 13px; border: 1px solid rgba(255,255,255,.13); border-radius: 13px; background: rgba(255,255,255,.07); }
.sync-mini strong { display: block; font-size: .86rem; }
.sync-mini span { display: block; margin-top: 3px; font-size: .76rem; color: rgba(255,255,255,.67); }
.logout-btn { margin-top: 10px; }
.main { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 20; min-height: 70px; padding: 12px 26px; display: flex; justify-content: space-between; align-items: center; gap: 18px; background: rgba(255,255,255,.92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.heading-group { display: flex; align-items: center; gap: 11px; min-width: 0; }
.title-wrap { min-width: 0; }
.eyebrow { margin: 0 0 2px; color: var(--leaf); font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
h1 { margin: 0; font-size: 1.38rem; line-height: 1.22; }
.top-actions { display: flex; align-items: center; gap: 9px; }
.top-status { color: var(--muted); font-size: .83rem; white-space: nowrap; margin-right: 4px; }
.btn { min-height: 40px; border: 1px solid var(--line); border-radius: 10px; padding: 9px 14px; background: #fff; color: var(--ink); font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.btn:not(:disabled):hover { border-color: #bdcbbf; background: #fafcfb; }
.btn-primary { color: #fff; background: var(--forest); border-color: var(--forest); box-shadow: 0 7px 18px rgba(24,79,49,.18); }
.btn-primary:not(:disabled):hover { background: #123f27; border-color: #123f27; }
.btn-report-orange { background: #d98b45; border-color: #d98b45; color: #fff; box-shadow: 0 6px 16px rgba(217,139,69,.22); }
.menu-btn, .menu-close { display: none; }
.content { padding: 24px 26px 42px; }
.filters { display: grid; grid-template-columns: minmax(150px,1.1fr) minmax(125px,.72fr) minmax(125px,.72fr) minmax(195px,1fr) minmax(195px,1fr) auto; gap: 12px; padding: 15px; margin-bottom: 16px; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 4px 18px rgba(24,79,49,.04); }
.field { min-width: 0; }
.field label { display: block; margin: 0 0 5px; color: var(--muted); font-size: .76rem; font-weight: 700; }
.control { width: 100%; min-height: 40px; padding: 8px 11px; border: 1px solid #ccd7cf; border-radius: 9px; background: #fff; color: var(--ink); }
.control:focus { outline: 3px solid rgba(59,139,87,.13); border-color: var(--leaf); }
.control:disabled { color: #758077; background: #f9fbf9; opacity: 1; cursor: not-allowed; }
.control::placeholder { color: #758077; opacity: 1; }
.filter-submit { align-self: end; min-width: 128px; white-space: nowrap; }
.period-context { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin-bottom: 16px; }
.period-context-item { padding: 12px 14px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.period-context-item span { display: block; color: var(--muted); font-size: .72rem; font-weight: 750; }
.period-context-item strong { display: block; margin-top: 5px; color: var(--forest); font-size: .88rem; }
.source-strip { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 10px; margin-bottom: 18px; }
.source-pill { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; align-items: center; gap: 9px; }
.source-icon { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 8px; display: grid; place-items: center; background: var(--mint); color: var(--forest); font-weight: 900; font-size: .75rem; }
.source-pill strong { display: block; font-size: .8rem; }
.source-pill small { display: block; color: var(--muted); font-size: .72rem; margin-top: 1px; }
.metrics-scope { margin: -2px 0 9px; color: var(--forest); font-size: .78rem; font-weight: 800; }
.metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 13px; margin-bottom: 18px; }
.metric { min-height: 150px; padding: 17px; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 5px 20px rgba(24,79,49,.045); }
.metric-top { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.metric-label { color: var(--muted); font-size: .82rem; font-weight: 650; }
.metric-icon { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 10px; display: grid; place-items: center; background: var(--mint); color: var(--forest); }
.metric-icon .icon { width: 18px; height: 18px; }
.metric-value { display: block; margin-top: 12px; font-size: 1.62rem; font-weight: 800; letter-spacing: -.03em; }
.metric-foot { margin-top: 3px; color: var(--muted); font-size: .77rem; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; }
.panel-head { min-height: 84px; padding: 14px 17px; display: flex; justify-content: space-between; align-items: center; gap: 14px; border-bottom: 1px solid var(--line); }
.panel-head h2 { margin: 0; font-size: 1rem; }
.legend { display: flex; gap: 10px; flex-wrap: wrap; color: var(--muted); font-size: .74rem; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; }
.green { background: var(--green); }
.amber { background: var(--amber); }
.red { background: var(--red); }
.report-tools { display: flex; align-items: flex-end; flex-direction: column; gap: 10px; }
.report-switch { display: inline-flex; padding: 3px; border: 1px solid #c8d5cb; border-radius: 10px; background: #f3f7f4; }
.report-mode { min-height: 34px; padding: 7px 12px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: .78rem; font-weight: 800; }
.report-mode.active { color: #fff; background: var(--forest); }
.table-wrap { overflow: auto; max-height: 560px; }
.table-wrap:focus-visible { outline-offset: -3px; }
#salesTable { width: 100%; min-width: 2845px; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
th { padding: 14px 10px; border-bottom: 1px solid #c4d2c7; border-right: 1px solid #c4d2c7; background: #eef4ef; color: #3b4a40; font-size: .71rem; line-height: 1.25; text-transform: uppercase; letter-spacing: .025em; text-align: center; }
th:first-child[rowspan] { position: sticky; left: 0; width: 236px; min-width: 236px; text-align: left; background: #bad8c1; }
th.group { color: #244c32; }
.orders { background: #bad8c1; }
.orders-light { background: #dcecdf; }
.income { background: #e7c477; }
.income-light { background: #fff4dc; }
.dynamic { background: #a9c7df; }
.dynamic-light { background: #eef5fb; }
.income-change { background: #ddd5cb; }
.change-light { background: #f6f2ee; }
.stock { background: #9fc9ae; }
.stock-light { background: #ebf6ee; }
.status { background: #c4bdd9; }
.tasks { background: #b8c9d4; }
.empty-state { padding: 42px 24px 48px; text-align: center; }
.empty-icon { width: 48px; height: 48px; border-radius: 14px; background: var(--mint); color: var(--forest); display: grid; place-items: center; margin: 0 auto 14px; }
.empty-icon .icon { width: 25px; height: 25px; }
.empty-state h3 { margin: 0 0 8px; font-size: 1rem; }
.empty-state h2 { margin: 0 0 8px; font-size: 1rem; }
.empty-state p { color: var(--muted); font-size: .87rem; line-height: 1.65; margin: 0; }
.section-mobilebar { display: none; }
.view-heading { display: flex; justify-content: space-between; gap: 18px; align-items: flex-end; margin-bottom: 18px; }
.view-heading h1 { font-size: 1.3rem; line-height: 1.45; }
.view-heading p { margin: 5px 0 0; color: var(--muted); font-size: .9rem; }
.view-heading > .btn { flex-shrink: 0; }
.filters.properties-filters { grid-template-columns: minmax(0,1.1fr) minmax(0,1fr) auto; align-items: end; }
.properties-table, .journal-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.properties-table { min-width: 1495px; table-layout: fixed; border: 2px solid #96998e; }
.properties-table th { white-space: normal; vertical-align: top; line-height: 1.5; padding: 14px; background: #f3e7be; color: #493f25; border-right: 1px solid #b0b3a8; border-bottom: 2px solid #a49f87; }
.properties-table th:last-child { border-right: 0; }
.properties-table thead th { position: sticky; top: 0; z-index: 2; }
.properties-table thead th:first-child { left: 0; z-index: 4; text-align: left; }
.properties-table tbody td:first-child { position: sticky; left: 0; z-index: 1; background: #fff; box-shadow: 3px 0 5px rgba(24,79,49,.07); }
.properties-table td { padding: 14px; vertical-align: top; line-height: 1.5; font-size: .82rem; border-right: 1px solid #b0b3a8; border-bottom: 1px solid #b0b3a8; overflow-wrap: anywhere; }
.properties-table td:last-child { border-right: 0; }
.properties-table tbody tr:last-child td { border-bottom: 0; }
.properties-table tbody tr:hover { background: var(--mint-2); }
.properties-table tbody tr:hover td:first-child { background: var(--mint-2); }
.cell-note { display: block; margin: 5px 0 0; color: var(--muted); font-size: .76rem; line-height: 1.5; font-weight: 400; }
.row-action { display: inline-block; padding: 5px 8px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--forest); font-size: .78rem; font-weight: 650; text-decoration: none; white-space: nowrap; }
.row-action:hover { background: var(--mint); border-color: #bdcbbf; }
.save-result { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 15px; margin: 0 0 16px; border: 1px solid #bdd9c4; border-radius: 12px; background: #e8f3ec; color: var(--forest); font-size: .88rem; }
.pagination { display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap; padding: 18px 0 0; font-size: .82rem; color: var(--muted); }
.property-dialog { width: min(860px,94vw); max-height: 90dvh; overflow: auto; padding: 24px; border: 1px solid var(--line); border-radius: 16px; color: var(--ink); background: #fff; box-shadow: 0 24px 80px rgba(15,30,20,.2); }
.property-dialog::backdrop { background: rgba(15,30,20,.4); }
body:has(.property-dialog[open]) { overflow: hidden; }
.dialog-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 16px; }
.dialog-heading h2 { margin: 0; font-size: 1.15rem; }
.dialog-heading p { margin: 5px 0 0; font-size: .9rem; color: var(--muted); }
.dialog-close { display: grid; place-items: center; width: 32px; height: 32px; flex-shrink: 0; border-radius: 8px; color: var(--muted); }
.dialog-close:hover { background: var(--mint); }
.properties-editor-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 16px; }
.property-dialog fieldset { min-width: 0; margin: 0; border: 1px solid #d9e3da; border-radius: 10px; padding: 14px; }
.property-dialog legend { font-weight: 700; color: #31533b; padding: 0 6px; }
.property-field { margin-top: 10px; min-width: 0; }
.property-field > label { display: block; font-size: .82rem; }
.property-field .control { margin-top: 5px; }
.property-dialog textarea.control { height: auto; min-height: 70px; resize: vertical; }
.required-mark { color: var(--red); }
.dialog-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.property-dialog .form-error { margin: 10px 0; }
.form-error ul { margin: 0; padding-left: 18px; }
.property-field .control[aria-invalid="true"] { border-color: var(--red); }
.inheritance-notice { padding: 10px 12px; border-radius: 9px; background: var(--mint); color: var(--forest); font-size: .82rem; }
.conflict-values { padding: 12px; margin-top: 14px; border: 1px solid #e8cda5; border-radius: 10px; background: #fff9ef; font-size: .82rem; }
.conflict-values summary { font-weight: 650; cursor: pointer; }
.conflict-values dl { margin: 12px 0 0; }
.conflict-values dl > div { margin-top: 8px; }
.conflict-values dt { color: var(--muted); }
.conflict-values dd { margin: 0; overflow-wrap: anywhere; }
.properties-table th:nth-child(1) { width: 200px; }
.properties-table th:nth-child(2) { width: 135px; }
.properties-table th:nth-child(3) { width: 100px; }
.properties-table th:nth-child(4) { width: 105px; }
.properties-table th:nth-child(5) { width: 200px; }
.properties-table th:nth-child(6) { width: 190px; }
.properties-table th:nth-child(7) { width: 330px; }
.properties-table th:nth-child(8) { width: 145px; }
.properties-table th:nth-child(9) { width: 8rem; }
.journal-head { align-items: flex-start; flex-wrap: wrap; }
.journal-filter { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; width: 100%; }
.journal-filter .field { flex: 1 1 136px; min-width: 118px; }
.journal-filter .control { min-height: 36px; padding: 6px 9px; font-size: .8rem; }
.journal-filter .btn { min-height: 36px; padding: 7px 11px; font-size: .8rem; }
.journal-date-range { display: flex; align-items: flex-end; gap: 8px; flex: 2 1 280px; min-width: 0; }
.journal-table { min-width: 1820px; }
.journal-table th { text-align: left; min-width: 150px; padding: 11px 10px; }
.journal-table th:nth-child(2) { min-width: 110px; }
.journal-table th:nth-child(3) { min-width: 190px; }
.journal-table th:nth-child(5) { min-width: 120px; }
.journal-table th:nth-child(6) { min-width: 160px; }
.journal-table th:nth-child(9) { min-width: 220px; }
.journal-table th:nth-child(11) { min-width: 170px; }
.journal-table td { padding: 11px 10px; font-size: .8rem; vertical-align: top; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.journal-table td:nth-child(7), .journal-table td:nth-child(8) { min-width: 220px; max-width: 300px; }
.journal-table td:nth-child(9) { min-width: 200px; overflow-wrap: anywhere; }
.change-values { margin: 0; }
.change-values > div + div { margin-top: 12px; }
.change-values dt { font-size: .72rem; color: var(--muted); }
.change-values dd { margin: 3px 0 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.sources-grid { display: grid; gap: 12px; }
.source-card { display: grid; grid-template-columns: 56px minmax(180px,1fr) 1.2fr 150px 140px; gap: 16px; align-items: center; padding: 17px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.source-logo { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--mint); color: var(--forest); font-weight: 900; }
.source-card h2 { margin: 0; font-size: .93rem; }
.source-card p { margin: 3px 0 0; color: var(--muted); font-size: .77rem; }
.source-note { color: #4d5a52; font-size: .82rem; }
.source-time { color: var(--muted); font-size: .76rem; }
.source-time strong { display: block; color: var(--ink); font-size: .82rem; }
.source-status { justify-self: start; display: inline-flex; padding: 5px 8px; border-radius: 999px; font-size: .72rem; font-weight: 800; }
.source-status.is-waiting { color: var(--amber); background: #fff1df; }
.source-status.is-manual { color: #2c629c; background: #eaf2fb; }
.unmatched-list { overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 16px; }
.login-page { background: radial-gradient(ellipse at 50% 12%, #e6eee5 0, transparent 62%), var(--canvas); }
.login-main { min-height: 100dvh; display: grid; align-content: center; justify-items: center; gap: 28px; padding: 48px 24px; }
.login-brand .brand { padding: 0; gap: 12px; }
.login-brand .brand-mark { width: 44px; height: 44px; flex-basis: 44px; background: #fff; border: 0; border-radius: 14px; box-shadow: 0 5px 12px rgba(24,79,49,.1); }
.login-brand .brand strong { color: var(--forest); font-size: 1.2rem; font-weight: 700; letter-spacing: -.025em; line-height: 1.3; }
.login-brand .brand small { display: block; margin-top: 2px; color: var(--muted); font-size: .75rem; }
.login-card { width: 100%; max-width: 432px; padding: 32px; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.login-page .login-card { max-width: 416px; padding: 32px; border-color: #dfe7df; border-radius: 22px; box-shadow: 0 16px 48px rgba(27,58,34,.065), 0 2px 6px rgba(27,58,34,.025); }
.login-heading { margin-bottom: 26px; }
.login-heading h1 { margin: 0; font-size: 1.5rem; font-weight: 650; line-height: 1.3; letter-spacing: -.035em; }
.login-form { display: grid; gap: 20px; }
.login-form .field label { margin-bottom: 8px; color: #394b3e; font-size: .8125rem; font-weight: 550; }
.login-form .control { height: 48px; padding: 11px 13px; border-color: #d7e0d9; border-radius: 11px; background: #fbfcfa; font-size: 1rem; transition: border-color .15s, box-shadow .15s, background .15s; }
.login-form .control:hover { border-color: #b6c8bb; }
.login-form .control:focus { outline: none; border-color: var(--leaf); background: #fff; box-shadow: 0 0 0 4px rgba(59,139,87,.1); }
.login-form .control:focus-visible { outline: 2px solid var(--leaf); outline-offset: 2px; box-shadow: none; }
.login-form .control[aria-invalid="true"] { border-color: #c97c73; }
.password-field { position: relative; }
.password-field .control { padding-right: 50px; }
.password-toggle { position: absolute; top: 2px; right: 2px; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 9px; background: transparent; color: #728177; }
.password-toggle:hover { background: var(--mint); color: var(--forest); }
.password-toggle .icon { width: 18px; height: 18px; stroke-width: 1.7; }
.login-submit { width: 100%; min-height: 48px; margin-top: 4px; padding: 12px 18px; border-radius: 11px; font-size: .9375rem; font-weight: 650; box-shadow: 0 4px 12px rgba(24,79,49,.13); transition: background .15s, box-shadow .15s; }
.login-submit .icon { width: 17px; height: 17px; margin-left: 4px; transition: transform .15s; }
.login-submit:hover .icon { transform: translateX(2px); }
.login-submit:active { box-shadow: 0 1px 4px rgba(24,79,49,.1); }
.form-error { padding: 11px 13px; background: #fff0ee; border: 1px solid #f2ccc8; color: #97382f; border-radius: 9px; font-size: .85rem; }
.login-form .form-error { font-size: .8125rem; line-height: 1.5; }
.field-error { color: #97382f; margin-top: 6px; font-size: .8rem; }
.error-main { min-height: 100dvh; padding: 24px; display: grid; place-items: center; }
.error-main p { color: var(--muted); }
.skip-link { position: fixed; top: 8px; left: 280px; transform: translateY(-200%); z-index: 60; background: #fff; padding: 8px 16px; border-radius: 8px; }
.skip-link:focus { transform: none; }
@media (max-width: 1300px) {
  .filters { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .top-status { display: none; }
  .source-strip { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .source-card { grid-template-columns: 50px 1fr 1fr; }
}
@media (max-width: 1000px) {
  .metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .panel-head { align-items: flex-start; flex-direction: column; }
  .report-tools { align-items: flex-start; }
}
@media (max-width: 840px) {
  .app { grid-template-columns: minmax(0,1fr); }
  .sidebar { position: fixed; inset: 0 auto 0 0; transform: translateX(-105%); width: 280px; min-height: 0; box-shadow: 20px 0 45px rgba(0,0,0,.22); visibility: hidden; }
  .sidebar.open { transform: none; visibility: visible; }
  .menu-btn, .menu-close { display: inline-grid; place-items: center; width: 42px; padding: 8px; }
  .menu-close { margin-bottom: 16px; color: #fff; border-color: rgba(255,255,255,.2); background: transparent; }
  .menu-backdrop { position: fixed; inset: 0; border: 0; background: rgba(10,30,18,.45); z-index: 25; }
  .topbar { padding: 11px 16px; flex-wrap: wrap; gap: 12px; }
  .content { padding: 18px 15px 34px; }
  .source-strip { display: flex; overflow: auto; padding-bottom: 3px; }
  .source-pill { min-width: 195px; }
  .skip-link { left: 16px; }
  .section-mobilebar { position: sticky; top: 0; z-index: 20; display: flex; padding: 11px 16px; background: rgba(255,255,255,.92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
}
@media (max-width: 700px) {
  .properties-editor-grid { grid-template-columns: minmax(0,1fr); }
  .property-dialog { padding: 18px; }
}
@media (max-width: 600px) {
  .filters { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .period-context { grid-template-columns: minmax(0,1fr); }
  .top-actions { width: 100%; flex-wrap: wrap; }
  .top-actions .btn-primary { flex: 1; }
  .metrics { gap: 10px; }
  .metric { padding: 13px; }
  .metric-top { gap: 6px; }
  .metric-icon { width: 28px; height: 28px; flex-basis: 28px; }
  .login-main { padding: 32px 20px; gap: 24px; }
  .login-page .login-card { padding: 28px 24px; border-radius: 20px; }
  .login-heading h1 { font-size: 1.375rem; }
  .view-heading { align-items: flex-start; flex-direction: column; }
  .filters.properties-filters { grid-template-columns: minmax(0,1fr); }
  .properties-table th:first-child { width: clamp(8rem,40vw,9rem); }
  .source-card { grid-template-columns: 46px minmax(0,1fr); }
  .source-card > :nth-child(n+3) { grid-column: 1 / -1; }
  .journal-filter, .journal-date-range { display: grid; grid-template-columns: minmax(0,1fr); width: 100%; }
  .journal-filter .field { min-width: 0; }
}
@media (max-width: 380px) {
  #salesFilters { grid-template-columns: minmax(0,1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
