/* StitchBook — screens, data displays, print */

/* ---------- Hero ---------- */
.hero {
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 22px;
    padding: 26px 28px;
    border-radius: 22px;
    background:
        radial-gradient(circle at 88% 12%, rgba(176, 141, 87, .28), transparent 38%),
        linear-gradient(120deg, #211c18, #372c23 58%, #49392a);
    color: #f8f4ec;
    margin-bottom: 20px;
}
.hero::after {
    content: '';
    position: absolute;
    right: -70px;
    top: -90px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    border: 1px solid rgba(216, 189, 143, .28);
    pointer-events: none;
}
.hero-copy { position: relative; z-index: 1; }
.hero .eyebrow { color: #d8bd8f; }
.hero h2 {
    font-family: var(--serif);
    font-size: 31px;
    font-weight: 500;
    letter-spacing: -.025em;
    margin-bottom: 5px;
}
.hero p { font-size: 12.5px; color: #c9bda9; max-width: 520px; }
.hero-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; position: relative; z-index: 1; }
.hero .month-pick { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .18); color: #d8cbb8; }
.hero .month-pick input { color: #f8f4ec; color-scheme: dark; }
.hero .btn-ghost { background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .18); color: #f3ece0; }
.hero .btn-ghost:hover { background: rgba(255, 255, 255, .13); }

/* ---------- Stat cards ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
    min-width: 0;
}
.stat-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--gold-soft);
    color: var(--gold-deep);
    display: grid;
    place-items: center;
    flex: none;
}
.stat-body { display: flex; flex-direction: column; min-width: 0; }
.stat-label { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.stat-value {
    font-family: var(--serif);
    font-size: 21px;
    font-weight: 600;
    letter-spacing: -.02em;
    line-height: 1.25;
    overflow-wrap: anywhere;
}
.stat-sub { font-size: 10.5px; color: var(--muted); margin-top: 2px; line-height: 1.35; }
.tone-in .stat-icon { background: var(--green-soft); color: var(--green); }
.tone-out .stat-icon { background: var(--red-soft); color: var(--red); }
.tone-net .stat-icon { background: var(--blue-soft); color: var(--blue); }
.tone-amber .stat-icon { background: var(--amber-soft); color: var(--amber); }
.tone-red .stat-icon { background: var(--red-soft); color: var(--red); }

/* ---------- Dashboard grids ---------- */
.dash-grid { display: grid; grid-template-columns: 1.7fr 1fr; gap: 18px; margin-bottom: 18px; }
.dash-grid > .panel { margin-bottom: 0; }
.report-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.report-grid > .panel { margin-bottom: 0; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.settings-grid > .panel { margin-bottom: 0; }
.panel.wide { grid-column: 1 / -1; }

/* ---------- Chart ---------- */
.chart { display: flex; align-items: flex-end; gap: 12px; height: 172px; padding-top: 12px; }
.chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; min-width: 0; }
.chart-bars { flex: 1; display: flex; align-items: flex-end; justify-content: center; gap: 4px; width: 100%; }
.bar { width: 13px; max-width: 34%; min-height: 3px; border-radius: 4px 4px 0 0; transition: opacity .15s; }
.bar:hover { opacity: .75; }
.bar.in { background: var(--green); }
.bar.out { background: #c98270; }
.chart-month { font-size: 10px; color: var(--muted); font-weight: 650; }
.legend { display: flex; gap: 18px; font-size: 11px; color: var(--muted); margin-top: 8px; }
.legend span, .split-legend span { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot.in { background: var(--green); }
.dot.out { background: #c98270; }
.dot.cost { background: #c98270; }
.dot.profit { background: var(--green); }

/* ---------- Lists ---------- */
.list { display: flex; flex-direction: column; }
.list-row {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 0;
    border-bottom: 1px solid var(--line);
    text-decoration: none;
    color: inherit;
    min-width: 0;
}
.list-row:last-child { border-bottom: 0; }
.list-row:hover .row-main strong { color: var(--gold-deep); }
.row-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--cream);
    color: var(--gold-deep);
    display: grid;
    place-items: center;
    flex: none;
}
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row-main strong { font-size: 13px; font-weight: 650; transition: color .15s; }
.row-main > span { font-size: 11px; color: var(--muted); }
.row-main em { font-style: normal; }
.row-main em.overdue { color: var(--red); font-weight: 650; }
.list-money { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; font-weight: 700; font-size: 12.5px; flex: none; }
.rank {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--gold-soft);
    color: var(--gold-deep);
    display: grid;
    place-items: center;
    font-size: 11px;
    font-weight: 700;
    flex: none;
}

/* ---------- Activity ---------- */
.activity { display: flex; flex-direction: column; }
.activity-row { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.activity-row:last-child { border-bottom: 0; }
.activity-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--gold-soft);
    color: var(--gold-deep);
    display: grid;
    place-items: center;
    flex: none;
}
.activity-dot.payment { background: var(--green-soft); color: var(--green); }
.activity-dot.expense { background: var(--red-soft); color: var(--red); }
.activity-dot.job { background: var(--blue-soft); color: var(--blue); }
.activity-row strong { display: block; font-size: 12px; font-weight: 600; line-height: 1.4; }
.activity-row span { display: block; font-size: 10.5px; color: var(--muted); margin-top: 1px; }

/* ---------- Profit ---------- */
.profit-figure { display: flex; align-items: baseline; gap: 8px; margin: 2px 0 14px; }
.profit-figure strong { font-family: var(--serif); font-size: 31px; font-weight: 600; letter-spacing: -.02em; }
.profit-figure span { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .09em; font-weight: 700; }
.profit-rows > div { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 12.5px; border-bottom: 1px dashed var(--line); }
.profit-rows span { color: var(--muted); }
.split-bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; margin-top: 16px; background: var(--line); }
.split-bar .cost { background: #c98270; }
.split-bar .profit { background: var(--green); }
.split-legend { display: flex; gap: 16px; font-size: 10.5px; color: var(--muted); margin-top: 6px; }

/* ---------- Toolbar / chips ---------- */
.toolbar { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0 12px;
    min-width: 220px;
    flex: 1;
    max-width: 430px;
    color: var(--muted);
}
.search-box input { border: 0; background: transparent; padding: 10px 0; width: 100%; font-size: 13px; outline: none; }
.month-pick {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 650;
    color: var(--muted);
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 4px 8px 4px 12px;
    white-space: nowrap;
}
.month-pick input { border: 0; background: transparent; font-size: 12px; color: var(--ink); padding: 5px 0; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--line);
    background: var(--paper);
    border-radius: 999px;
    padding: 6px 11px;
    font-size: 11.5px;
    font-weight: 650;
    color: var(--muted);
    transition: background .15s, color .15s, border-color .15s;
}
.chip span { background: var(--cream); border-radius: 999px; padding: 1px 6px; font-size: 10px; }
.chip:hover { border-color: #d8c7a8; color: var(--ink); }
.chip.active { background: var(--ink); color: #fdfaf5; border-color: var(--ink); }
.chip.active span { background: rgba(255, 255, 255, .16); color: #fdfaf5; }

/* ---------- Job cards ---------- */
.card-list { display: flex; flex-direction: column; }
.job-card {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 16px;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow);
    margin-bottom: 10px;
    transition: border-color .18s, transform .18s, box-shadow .18s;
}
.job-card:hover { border-color: #d8c7a8; transform: translateY(-1px); box-shadow: 0 12px 34px rgba(28, 25, 23, .08); }
.job-card-main { min-width: 0; }
.job-card-top { display: flex; gap: 8px; align-items: center; margin-bottom: 4px; flex-wrap: wrap; }
.job-number { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-deep); font-weight: 700; }
.job-card h3 { font-family: var(--serif); font-size: 17px; font-weight: 600; margin-bottom: 2px; }
.job-card p { font-size: 12px; margin-bottom: 6px; }
.job-card-meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 10.5px; color: var(--muted); }
.job-card-meta span { display: inline-flex; align-items: center; gap: 4px; }
.job-card-side { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 6px; flex: none; }
.job-amount { font-family: var(--serif); font-size: 18px; font-weight: 600; }
.chev { color: #b9ac99; }

/* ---------- Customer cards ---------- */
.customer-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); gap: 14px; }
.customer-card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 16px;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow);
    transition: border-color .18s, transform .18s;
}
.customer-card:hover { border-color: #d8c7a8; transform: translateY(-1px); }
.customer-top { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; min-width: 0; }
.customer-top > div { min-width: 0; }
.customer-top h3 { font-family: var(--serif); font-size: 16px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.customer-top span { font-size: 11px; color: var(--muted); }
.customer-stats { display: flex; gap: 18px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 10px 0; margin-bottom: 10px; }
.customer-stats div { display: flex; flex-direction: column; min-width: 0; }
.customer-stats strong { font-family: var(--serif); font-size: 16px; font-weight: 600; }
.customer-stats span { font-size: 9.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.customer-foot { font-size: 10.5px; color: var(--muted); display: flex; gap: 5px; align-items: center; }

/* ---------- Detail pages ---------- */
.detail-grid { display: grid; grid-template-columns: 1.65fr 1fr; gap: 18px; align-items: start; }
.detail-main .panel:last-child, .detail-side .panel:last-child { margin-bottom: 0; }
.detail-rows > div { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 12px; }
.detail-rows > div:last-child { border-bottom: 0; }
.detail-rows span { color: var(--muted); }
.detail-rows strong { text-align: right; font-weight: 600; overflow-wrap: anywhere; }
.detail-rows a { color: var(--ink); text-decoration: none; }
.person-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.person-row strong { display: block; font-size: 13px; }
.person-row span { font-size: 11px; color: var(--muted); }

/* ---------- Summary card ---------- */
.summary-card {
    background:
        radial-gradient(circle at 90% 0%, rgba(176, 141, 87, .3), transparent 42%),
        linear-gradient(160deg, #211c18, #3a2e24);
    color: #f7f1e7;
    border: 0;
}
.summary-card h3 { color: #f7f1e7; }
.summary-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 14px; }
.summary-top > span { font-size: 9.5px; text-transform: uppercase; letter-spacing: .11em; color: #cbb894; font-weight: 700; padding-top: 5px; }
.summary-top > strong { font-family: var(--serif); font-size: 28px; font-weight: 600; color: #f3d9a8; text-align: right; letter-spacing: -.02em; }
.summary-card .summary-top > strong.positive { color: #a8d5bd; }
.summary-rows > div { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; font-size: 12px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.summary-rows > div:last-child { border-bottom: 0; }
.summary-rows span { color: #c9bda9; }
.summary-card .positive { color: #a8d5bd; }
.summary-card .negative { color: #e8b1a6; }
.summary-card .note { color: #b7a992; }
.summary-card .progress { background: rgba(255, 255, 255, .14); }
.summary-card .progress span { background: var(--gold); }
.summary-card .btn-primary { background: var(--gold); color: #221d19; }
.summary-card .btn-primary:hover { background: #c9a878; }
.summary-card .btn-ghost { background: transparent; border-color: rgba(255, 255, 255, .22); color: #f7f1e7; }
.summary-card .btn-ghost:hover { background: rgba(255, 255, 255, .1); }

.progress { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; margin-top: 12px; }
.progress span { display: block; height: 100%; border-radius: 999px; background: var(--green); transition: width .3s; }
.progress.green span { background: var(--green); }

/* ---------- Measurements ---------- */
.measure-group { margin-bottom: 14px; }
.measure-group:last-child { margin-bottom: 0; }
.measure-group h4 { font-size: 9.5px; text-transform: uppercase; letter-spacing: .09em; color: var(--gold-deep); margin-bottom: 6px; }
.measure-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(116px, 1fr)); gap: 7px; }
.measure-item { background: #fbf8f2; border: 1px solid var(--line); border-radius: 9px; padding: 7px 10px; display: flex; flex-direction: column; min-width: 0; }
.measure-item span { font-size: 9.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.measure-item strong { font-size: 13px; font-weight: 650; }
.measure-grid.compact { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.measure-grid.compact .measure-item { padding: 6px 8px; }
.measure-grid.compact .measure-item strong { font-size: 12px; }

.measure-form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px; }
.measure-field { display: flex; flex-direction: column; gap: 4px; }
.measure-field label { font-size: 10.5px; font-weight: 650; color: var(--ink-3); }
.unit-input { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; background: #fffdfa; overflow: hidden; }
.unit-input:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(176, 141, 87, .13); }
.unit-input input { border: 0; background: transparent; width: 100%; padding: 8px 9px; font-size: 13px; min-width: 0; }
.unit-input input:focus { outline: none; }
.unit-input span { font-size: 9.5px; color: var(--muted); padding-right: 8px; }

.inline-note {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    background: #fbf7ef;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 11.5px;
    color: var(--muted);
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.inline-note strong { color: var(--ink); }

.history-list { display: flex; flex-direction: column; gap: 8px; }
.history-item { border: 1px solid var(--line); border-radius: 10px; background: #fcfaf6; overflow: hidden; }
.history-item summary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 650;
    list-style: none;
}
.history-item summary::-webkit-details-marker { display: none; }
.history-item summary span:first-child { flex: 1; }
.history-body { padding: 0 12px 12px; }

/* ---------- Tabs / P&L ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.tab {
    background: none;
    border: 0;
    padding: 9px 12px;
    font-size: 12.5px;
    font-weight: 650;
    color: var(--muted);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}
.tab.active { color: var(--ink); border-bottom-color: var(--gold); }
.tab span { background: var(--cream); border-radius: 999px; padding: 1px 6px; font-size: 10px; margin-left: 4px; }
.tab.active span { background: var(--gold-soft); color: var(--gold-deep); }

.pnl-rows > div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 12.5px; }
.pnl-rows > div:last-child { border-bottom: 0; }
.pnl-rows span { color: var(--muted); }
.pnl-rows .subtotal { border-top: 1px solid var(--line); font-weight: 650; }
.pnl-rows .grand-total { border-bottom: 0; padding-top: 12px; font-size: 14px; }
.pnl-rows .grand-total strong { font-family: var(--serif); font-size: 22px; font-weight: 600; }
.report-facts { display: flex; gap: 18px; margin-top: 16px; flex-wrap: wrap; }
.report-facts div { display: flex; flex-direction: column; }
.report-facts strong { font-family: var(--serif); font-size: 18px; font-weight: 600; }
.report-facts span { font-size: 9.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }

.category-list { display: flex; flex-direction: column; gap: 13px; }
.category-row { display: flex; flex-direction: column; gap: 4px; }
.category-label { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; }
.category-label span { color: var(--ink-3); }
.category-label strong { font-weight: 650; }
.category-bar { height: 7px; border-radius: 999px; background: var(--cream); overflow: hidden; }
.category-bar span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--gold), #d8b57e); }

/* ---------- Settings ---------- */
.staff-list { display: flex; flex-direction: column; }
.staff-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.staff-row:last-child { border-bottom: 0; }
.staff-row .row-main strong { font-size: 12.5px; }

.data-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.data-card { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: #fcfaf6; display: flex; flex-direction: column; gap: 5px; }
.data-card > strong { font-size: 13px; }
.data-card > span { font-size: 11px; color: var(--muted); }
.data-card .button-row { margin-top: 8px; }
.file-label { position: relative; overflow: hidden; }

.field-groups { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
.field-group h4 { font-size: 9.5px; text-transform: uppercase; letter-spacing: .09em; color: var(--gold-deep); margin-bottom: 6px; }
.field-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.field-chip {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: #fbf7ef;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 4px 5px 4px 10px;
    font-size: 11.5px;
}
.chip-x { border: 0; background: transparent; color: var(--muted); display: grid; place-items: center; padding: 2px; border-radius: 50%; }
.chip-x:hover { background: var(--red-soft); color: var(--red); }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inline-form input, .inline-form select {
    border: 1px solid var(--line);
    background: #fffdfa;
    border-radius: 9px;
    padding: 8px 10px;
    font-size: 12.5px;
    min-width: 0;
}
.inline-form input { flex: 1; min-width: 160px; }
.inline-form input:focus, .inline-form select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(176, 141, 87, .13); }

.about-card { display: flex; gap: 14px; align-items: flex-start; }
.about-mark { width: 46px; height: 46px; border-radius: 12px; background: var(--gold-soft); color: var(--gold-deep); display: grid; place-items: center; flex: none; }
.about-card strong { font-family: var(--serif); font-size: 16px; }
.about-card p { font-size: 11.5px; color: var(--muted); line-height: 1.6; margin-top: 6px; }

/* ---------- Quick actions ---------- */
.quick-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.quick-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fcfaf6;
    text-decoration: none;
    color: inherit;
    text-align: left;
    transition: border-color .16s, background .16s;
}
.quick-card:hover { border-color: #d8c7a8; background: #fbf6ec; }
.quick-card .icon { color: var(--gold-deep); margin-bottom: 4px; }
.quick-card strong { font-size: 12.5px; }
.quick-card span { font-size: 10.5px; color: var(--muted); line-height: 1.4; }

/* ---------- Design editor ---------- */
.design-editor { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin: 6px 0 14px; background: #fcfaf6; }
.design-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.design-head strong { display: block; font-size: 12.5px; }
.design-head span { display: block; font-size: 10.5px; color: var(--muted); }
.design-columns { display: grid; grid-template-columns: 1fr 70px 110px 32px; gap: 8px; padding: 0 2px 4px; font-size: 9px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 700; }
.design-columns.staff { grid-template-columns: 1fr 70px 32px; }
.design-row { display: grid; grid-template-columns: 1fr 70px 110px 32px; gap: 8px; margin-bottom: 8px; align-items: center; }
.design-row.staff { grid-template-columns: 1fr 70px 32px; }
.design-row input {
    width: 100%;
    border: 1px solid var(--line);
    background: var(--paper);
    border-radius: 8px;
    padding: 8px 9px;
    font-size: 12.5px;
    min-width: 0;
}
.design-row input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(176, 141, 87, .13); }
.design-total { display: flex; justify-content: space-between; align-items: center; border-top: 1px dashed var(--line); padding-top: 9px; font-size: 12px; }
.design-total strong { font-family: var(--serif); font-size: 18px; font-weight: 600; }

/* ---------- Responsive screens ---------- */
@media (max-width: 1180px) {
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stat-grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1023px) {
    .dash-grid { grid-template-columns: 1fr; }
    .detail-grid { grid-template-columns: 1fr; }
    .report-grid { grid-template-columns: 1fr; }
    .settings-grid { grid-template-columns: 1fr; }
    .detail-side { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
    .detail-side .panel { margin-bottom: 0; }
}

@media (max-width: 760px) {
    .hero { flex-direction: column; align-items: flex-start; padding: 22px; }
    .hero h2 { font-size: 26px; }
    .hero-actions { width: 100%; }
    .hero-actions .month-pick { flex: 1; }
    .stat-grid, .stat-grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .stat { padding: 13px; gap: 9px; }
    .stat-icon { width: 34px; height: 34px; }
    .stat-value { font-size: 18px; }
    .job-card { flex-direction: column; gap: 10px; }
    .job-card-side { flex-direction: row; align-items: center; justify-content: space-between; width: 100%; border-top: 1px solid var(--line); padding-top: 8px; }
    .job-card-side .chev { display: none; }
    .detail-side { grid-template-columns: 1fr; }
    .chart { height: 150px; }
    .panel { padding: 16px; }
    .panel-head { flex-wrap: wrap; }
    .toolbar { align-items: stretch; }
    .search-box { max-width: none; }
    .toolbar > .btn { justify-content: center; }
    .customer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
    .stat-grid, .stat-grid.three { grid-template-columns: 1fr; }
    .hero-actions .btn { flex: 1; }
    .hero-actions .month-pick { flex-basis: 100%; }
    .design-columns { grid-template-columns: 1fr 54px 84px 28px; gap: 5px; }
    .design-row { grid-template-columns: 1fr 54px 84px 28px; gap: 5px; }
    .design-columns.staff { grid-template-columns: 1fr 54px 28px; }
    .design-row.staff { grid-template-columns: 1fr 54px 28px; }
    .tabs { overflow-x: auto; }
    .tab { white-space: nowrap; }
}

/* ---------- Print ---------- */
#printRoot { display: none; }

@media print {
    body.printing { background: #fff !important; padding: 0 !important; }
    body.printing > #app,
    body.printing > #overlayRoot,
    body.printing > #toastRoot { display: none !important; }
    body.printing #printRoot { display: block !important; }
    .print-sheet { font-family: Arial, Helvetica, sans-serif; color: #111; font-size: 11px; line-height: 1.45; }
    .print-head { display: flex; justify-content: space-between; gap: 24px; border-bottom: 2px solid #111; padding-bottom: 12px; margin-bottom: 16px; }
    .print-brand { font-size: 22px; font-weight: 800; letter-spacing: .02em; margin-bottom: 3px; }
    .print-brand-block div { font-size: 10.5px; color: #444; }
    .print-doc { text-align: right; }
    .print-doc h1 { font-size: 24px; letter-spacing: .12em; margin-bottom: 4px; }
    .print-doc div { font-size: 11px; }
    .print-meta { display: flex; justify-content: space-between; gap: 24px; margin-bottom: 18px; }
    .print-meta h3 { font-size: 9px; text-transform: uppercase; letter-spacing: .1em; color: #666; margin-bottom: 3px; }
    .print-meta strong { font-size: 12px; }
    .print-meta div div { font-size: 10.5px; color: #333; }
    .print-table { width: 100%; border-collapse: collapse; margin-bottom: 12px; }
    .print-table th, .print-table td { border: 1px solid #ccc; padding: 5px 7px; font-size: 10.5px; text-align: left; vertical-align: top; }
    .print-table th { background: #f2f2f2; font-size: 9px; text-transform: uppercase; letter-spacing: .05em; }
    .print-table .right { text-align: right; }
    .print-table tfoot td { font-weight: 700; background: #fafafa; }
    .print-table tr.strong td { font-weight: 800; background: #f0f0f0; }
    .print-section { font-size: 12px; margin: 14px 0 6px; text-transform: uppercase; letter-spacing: .08em; }
    .print-note { font-size: 10px; color: #444; margin: 10px 0; line-height: 1.5; }
    .print-sign { display: flex; justify-content: space-between; gap: 40px; margin-top: 40px; font-size: 10px; }
    .print-sign div { flex: 1; border-top: 1px solid #111; padding-top: 5px; }
    @page { size: A4; margin: 14mm; }
}
