:root {
  color-scheme: light;
  --ink: #392923;
  --muted: #6f5b51;
  --faint: #6f5b51;
  --line: #e7dcd1;
  --paper: #fbf7f0;
  --card: #fffefa;
  --cream: #f3eadc;
  --coral: #a34432;
  --coral-dark: #843524;
  --coral-soft: #f8e8e1;
  --sage: #42644c;
  --sage-soft: #e8f0e8;
  --gold: #79521d;
  --gold-soft: #fbf0d9;
  --da-border: #9f8b7f;
  --da-title: "Lora", Georgia, "Times New Roman", serif;
  --da-body: "Manrope", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --shadow: 0 16px 42px rgba(74, 47, 35, .08);
  font-family: var(--da-body);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}
@font-face { font-family: "Lora"; src: url("/fonts/Lora.ttf") format("truetype"); font-style: normal; font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("/fonts/Manrope.ttf") format("truetype"); font-style: normal; font-weight: 200 800; font-display: swap; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); min-width: 320px; font-size: 15px; line-height: 1.6; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid #42644c; outline-offset: 3px; }
.app-shell { width: min(1180px, 100%); margin: 0 auto; padding: 0 22px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 23px 0 18px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex: 0 0 auto; }
.brand img { display: block; width: 185px; height: auto; max-height: 48px; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.connection { color: var(--muted); display: inline-flex; align-items: center; gap: 7px; font-size: 11px; white-space: nowrap; }
.connection-dot { width: 7px; height: 7px; border-radius: 50%; background: #d7a94e; }
.connection.is-online .connection-dot { background: #6a9871; }
.connection.is-error .connection-dot { background: var(--coral); }
.icon-button { color: var(--muted); border: 0; background: transparent; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border-radius: 10px; min-height: 38px; padding: 6px 9px; }
.icon-button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.export-button { font-size: 12px; }
.button { min-height: 44px; border-radius: 11px; padding: 0 17px; border: 1px solid transparent; font-weight: 650; letter-spacing: -.1px; transition: background .15s ease, transform .15s ease; }
.button-primary { background: var(--coral); color: white; box-shadow: 0 5px 14px rgba(203,104,88,.15); }
.button-primary:disabled, .button:disabled { opacity: .58; cursor: wait; transform: none; }
.button-quiet { background: transparent; color: var(--muted); border-color: var(--line); }
.button-small { min-height: 44px; padding: 0 12px; background: #fff; border: 1px solid #e5c8bf; color: var(--coral-dark); font-size: 12px; }
.header-add { min-height: 39px; padding: 0 14px; font-size: 12px; }
.header-add span { margin-right: 3px; font-size: 17px; vertical-align: -1px; }
.main-nav { display: flex; align-items: center; gap: 7px; margin: 16px 0 26px; border-bottom: 1px solid var(--line); }
.nav-item { display: inline-flex; align-items: center; gap: 8px; position: relative; border: 0; background: transparent; color: var(--muted); padding: 10px 14px 14px; font-size: 13px; font-weight: 600; }
.nav-item.active { color: var(--coral-dark); }
.nav-item.active::after { content: ""; height: 2px; position: absolute; bottom: -1px; left: 12px; right: 12px; background: var(--coral); border-radius: 4px 4px 0 0; }
.nav-icon { font-size: 17px; font-weight: 400; }
.nav-count { border-radius: 999px; min-width: 20px; padding: 2px 6px; text-align: center; background: var(--cream); color: var(--muted); font-size: 10px; }
main { min-height: calc(100vh - 190px); }
.view-panel { animation: none; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 0 0 22px; }
.page-heading h1 { margin: 3px 0 5px; font-family: var(--da-title); letter-spacing: -.8px; font-size: clamp(28px, 4vw, 37px); line-height: 1.1; }
.page-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.eyebrow { color: var(--coral); font-size: 10px; font-weight: 750; letter-spacing: 1.45px; }
.date-label { color: var(--muted); font-size: 12px; font-weight: 600; white-space: nowrap; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 25px; }
.info-banner { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; padding: 10px 12px; border: 1px solid #efe3d6; border-radius: 11px; background: #faf3e8; color: #786958; font-size: 10px; line-height: 1.45; }
.info-banner > span:first-child { display: grid; place-items: center; width: 23px; height: 23px; flex: 0 0 auto; border-radius: 8px; color: var(--coral-dark); background: white; font-size: 14px; }
.info-banner .text-link { flex: 0 0 auto; margin-left: auto; font-size: 10px; }
.stat-card { min-height: 101px; border: 1px solid var(--line); border-radius: 15px; background: var(--card); padding: 17px 18px; box-shadow: 0 4px 16px rgba(74, 47, 35, .035); }
.stat-top { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 11px; font-weight: 600; }
.stat-symbol { display: grid; place-items: center; width: 25px; height: 25px; background: var(--cream); border-radius: 8px; color: var(--coral); font-size: 14px; }
.stat-value { margin-top: 9px; font-family: var(--da-body); font-size: 26px; line-height: 1.1; font-variant-numeric: lining-nums tabular-nums; }
.stat-note { margin-top: 5px; color: var(--faint); font-size: 10px; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(250px, .9fr); gap: 17px; align-items: start; }
.surface { background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 5px 20px rgba(74, 47, 35, .035); }
.section-card { padding: 19px 20px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 14px; }
.section-head h2 { margin: 0; font-family: var(--da-title); font-size: 20px; letter-spacing: -.3px; }
.text-link { color: var(--coral-dark); border: 0; background: none; font-size: 11px; font-weight: 700; padding: 5px 0; }
.order-list { display: grid; gap: 9px; }
.order-row { display: grid; grid-template-columns: 5px minmax(0, 1fr) auto; gap: 12px; align-items: stretch; min-height: 80px; padding: 12px; border: 1px solid #f0e9e2; border-radius: 12px; background: #fffefa; cursor: pointer; transition: border .15s, box-shadow .15s, transform .15s; }
.row-accent { border-radius: 99px; background: var(--coral); }
.row-accent.status-confirmed { background: var(--sage); }
.row-accent.status-ready { background: #7381a0; }
.row-accent.status-cancelled { background: #c4b8af; }
.row-main { min-width: 0; }
.row-title-line { display: flex; align-items: center; gap: 7px; min-width: 0; }
.row-client { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 700; }
.row-product { margin-top: 3px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.row-meta { display: flex; flex-wrap: wrap; gap: 5px 11px; margin-top: 8px; color: var(--muted); font-size: 10px; }
.row-meta span { display: inline-flex; gap: 4px; align-items: center; }
.row-side { min-width: 90px; display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 6px; text-align: right; }
.row-total { color: var(--ink); font-family: var(--da-body); font-size: 14px; font-weight: 700; font-variant-numeric: lining-nums tabular-nums; white-space: nowrap; }
.status-pill { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; background: var(--gold-soft); color: #866126; padding: 4px 8px; font-size: 9px; font-weight: 700; white-space: nowrap; }
.status-pill::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-confirmed-pill, .status-entregue-pill { background: var(--sage-soft); color: #4c7157; }
.status-production-pill, .status-ready-pill { background: #edf0f6; color: #626e8c; }
.status-cancelled-pill { background: #f0ece9; color: #81766e; }
.status-quote-pill { background: #f3ece4; color: #887362; }
.mini-card { padding: 18px; }
.mini-card + .mini-card { margin-top: 13px; }
.next-action-copy { color: var(--muted); font-size: 12px; line-height: 1.55; }
.next-action-copy strong { display: block; margin-bottom: 4px; color: var(--ink); font-size: 13px; }
.mini-link { display: inline-block; margin-top: 13px; }
.tip-card { background: var(--cream); border: 1px solid #efe4d8; }
.tip-mark { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; background: #fff; color: var(--coral); margin-bottom: 10px; }
.tip-card h3 { margin: 0 0 5px; font-family: Georgia, "Times New Roman", serif; font-size: 17px; }
.tip-card p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.pending-banner { padding: 10px 12px; border-radius: 10px; background: var(--gold-soft); color: #735a31; font-size: 11px; line-height: 1.45; margin-top: 9px; }
.pending-banner strong { color: #634718; }
.pending-card { margin-top: 16px; padding: 17px 19px; }
.pending-count { display: grid; place-items: center; min-width: 23px; height: 23px; padding: 0 6px; border-radius: 99px; background: var(--gold-soft); color: #866126; font-size: 10px; font-weight: 700; }
.pending-list { display: grid; gap: 8px; }
.pending-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 0 10px; padding: 10px 12px; text-align: left; border: 1px solid #eee5dc; background: #fffefa; border-radius: 10px; color: var(--ink); }
.pending-row strong, .pending-row small { display: block; }
.pending-row strong { font-size: 11px; }
.pending-row small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.pending-row .pending-banner { grid-column: 1/-1; }
.pending-chevron { color: var(--coral); font-size: 16px; }
.coming-soon { margin-top: 22px; }
.sample-tag, .demo-label { display: inline-flex; width: fit-content; align-items: center; border-radius: 99px; padding: 3px 7px; background: #f3eee4; color: #89765d; font-size: 11px; font-weight: 700; white-space: nowrap; }
.demo-label { margin-top: 12px; }
.empty-state { padding: 35px 15px; text-align: center; border: 1px dashed #e8d9cf; border-radius: 13px; background: #fffdfa; }
.empty-illustration { width: 47px; height: 47px; display: grid; place-items: center; margin: 0 auto 11px; color: var(--coral); background: var(--coral-soft); border-radius: 16px; font-size: 21px; }
.empty-state h3 { margin: 0 0 5px; font-family: Georgia, "Times New Roman", serif; font-size: 18px; }
.empty-state p { max-width: 310px; margin: 0 auto 14px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; }
.search-wrap { flex: 1; position: relative; min-width: 160px; }
.search-wrap svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; fill: none; stroke: #998981; stroke-width: 1.8; }
.search-input, .filter-select { min-height: 44px; color: var(--ink); border: 1px solid var(--line); background: var(--card); border-radius: 10px; }
.search-input { width: 100%; padding: 0 13px 0 37px; font-size: 12px; }
.search-input::placeholder { color: #a99b93; }
.filter-select { padding: 0 30px 0 11px; font-size: 11px; }
.order-results { color: var(--muted); margin: 0 0 9px; font-size: 11px; }
.order-results strong { color: var(--ink); }
.orders-full-list { display: grid; gap: 8px; }
.week-controls { display: flex; align-items: center; gap: 8px; }
.week-range { min-width: 145px; text-align: center; color: var(--muted); font-size: 11px; font-weight: 650; }
.week-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; margin-bottom: 20px; }
.day-button { min-width: 0; min-height: 77px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 6px 4px; border: 1px solid var(--line); border-radius: 13px; background: var(--card); color: var(--muted); }
.day-button.is-today { border-color: #e4b6a8; background: #fff8f4; }
.day-button.is-selected { background: var(--coral); border-color: var(--coral); color: white; box-shadow: 0 6px 15px rgba(163,68,50,.16); }
.day-name { font-size: 9px; text-transform: uppercase; letter-spacing: .8px; }
.day-number { font-family: Georgia, "Times New Roman", serif; font-size: 21px; line-height: 1; }
.day-count { min-height: 12px; font-size: 9px; opacity: .8; }
.week-agenda { padding: 20px; }
.agenda-date { display: flex; align-items: baseline; gap: 9px; margin: 0 0 13px; font-family: Georgia, "Times New Roman", serif; font-size: 20px; }
.agenda-date span { font-family: inherit; color: var(--muted); font-size: 12px; }
.agenda-empty { padding: 27px 14px; text-align: center; color: var(--muted); font-size: 12px; }
.agenda-empty strong { display: block; margin-bottom: 4px; color: var(--ink); font-family: Georgia, "Times New Roman", serif; font-size: 17px; }
.notice { display: flex; align-items: center; gap: 11px; padding: 12px 14px; border-radius: 12px; margin: 0 0 18px; }
.error-notice { border: 1px solid #edc8bd; background: #fff4f0; color: var(--coral-dark); }
.error-notice > div { flex: 1; display: grid; gap: 2px; }
.error-notice strong { font-size: 12px; }
.error-notice span:not(.notice-icon) { color: #93675f; font-size: 11px; }
.notice-icon { width: 22px; height: 22px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: #f3d7d0; font-weight: 800; }
.loading-state { min-height: 210px; display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--muted); font-size: 12px; }
.spinner { width: 17px; height: 17px; border: 2px solid #ecd9d1; border-top-color: var(--coral); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.app-footer { display: flex; justify-content: space-between; gap: 10px; padding: 24px 0; margin-top: 25px; border-top: 1px solid var(--line); color: #aa9b92; font-size: 10px; }
.dialog { width: min(650px, calc(100% - 26px)); max-height: min(90vh, 900px); padding: 0; overflow: auto; border: 1px solid #eaded5; border-radius: 19px; background: var(--card); color: var(--ink); box-shadow: 0 24px 80px rgba(56,37,29,.23); }
.dialog::backdrop { background: rgba(50, 36, 30, .43); backdrop-filter: blur(3px); }
.dialog form, .detail-shell { padding: 24px; }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; margin-bottom: 18px; }
.dialog-heading h2 { margin: 5px 0 0; font-family: var(--da-title); font-size: 27px; letter-spacing: -.5px; }
.close-dialog { width: 44px; height: 44px; min-width: 44px; font-size: 25px; line-height: 1; padding: 0; color: var(--faint); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 13px 14px; }
.field { display: grid; gap: 7px; margin-bottom: 15px; color: var(--ink); font-size: 14px; font-weight: 650; }
.field > span { display: flex; gap: 4px; }
.field i { color: var(--coral); font-style: normal; }
.field input, .field select, .field textarea { width: 100%; min-width: 0; border: 1px solid #e8ddd4; border-radius: 9px; background: #fff; color: var(--ink); padding: 10px 11px; font-size: 16px; font-weight: 400; }
.field input, .field select { min-height: 44px; }
.field textarea { resize: vertical; line-height: 1.45; }
.field input::placeholder, .field textarea::placeholder { color: #b4a59c; }
.field small { color: #6f5b51; font-size: 12px; font-weight: 400; line-height: 1.45; }
.field-wide { grid-column: 1 / -1; }
.form-hint { margin: 2px 0 0; padding: 12px; color: #71553b; background: #f3eadc; border-radius: 9px; font-size: 13px; line-height: 1.5; }
.form-error { margin-bottom: 14px; padding: 11px 12px; border: 1px solid #efc4b9; border-radius: 9px; background: #fff3ef; color: var(--coral-dark); font-size: 13px; line-height: 1.5; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 18px; padding-top: 15px; border-top: 1px solid var(--line); }
.payment-dialog { width: min(430px, calc(100% - 26px)); }
.detail-dialog { width: min(700px, calc(100% - 26px)); }
.detail-topline { display: flex; align-items: flex-start; gap: 12px; }
.detail-topline > div:first-child { min-width: 0; flex: 1; }
.detail-client { margin: 5px 0 2px; font-family: Georgia, "Times New Roman", serif; font-size: 27px; letter-spacing: -.5px; overflow-wrap: anywhere; }
.detail-product { margin: 0; color: var(--muted); font-size: 12px; }
.detail-top-actions { display: flex; gap: 3px; align-items: center; }
.detail-top-actions .close-dialog { flex: 0 0 auto; }
.detail-meta-line { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.detail-summary { margin-top: 18px; padding: 15px; border-radius: 12px; background: #faf5ee; color: #68574b; font-size: 12px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.detail-summary-label { margin-bottom: 6px; color: #9a8270; font-size: 9px; font-weight: 750; letter-spacing: 1px; }
.detail-split { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 11px; margin-top: 12px; }
.detail-tile { padding: 13px 14px; border: 1px solid var(--line); border-radius: 11px; }
.detail-tile-label { color: var(--muted); font-size: 10px; }
.detail-tile-value { margin-top: 5px; font-size: 13px; font-weight: 700; line-height: 1.4; overflow-wrap: anywhere; }
.detail-tile-value.large { font-family: Georgia, "Times New Roman", serif; font-size: 20px; }
.payment-section, .history-section { margin-top: 20px; }
.detail-section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 9px; }
.detail-section-title h3 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 18px; }
.payment-list { display: grid; gap: 7px; }
.payment-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 11px; border: 1px solid #f0e9e2; border-radius: 9px; }
.payment-main { min-width: 0; }
.payment-amount { font-size: 13px; font-weight: 700; font-variant-numeric: lining-nums tabular-nums; }
.payment-note { margin-top: 3px; color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }
.payment-status { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.payment-status span { color: var(--muted); font-size: 9px; }
.payment-status button { padding: 4px 7px; border-radius: 7px; border: 1px solid #d7e4d9; background: #f5faf5; color: #4c7157; font-size: 9px; font-weight: 700; }
.payment-status button:disabled { opacity: .6; cursor: default; }
.history-list { position: relative; display: grid; gap: 11px; padding-left: 14px; }
.history-list::before { content: ""; position: absolute; left: 3px; top: 5px; bottom: 5px; width: 1px; background: #e8d9cf; }
.history-item { position: relative; color: var(--muted); font-size: 10px; line-height: 1.45; }
.history-item::before { content: ""; position: absolute; left: -14px; top: 3px; width: 7px; height: 7px; border-radius: 50%; background: #d9a79a; border: 2px solid #fffefa; box-shadow: 0 0 0 1px #e7c9c0; }
.history-item strong { display: block; margin-bottom: 2px; color: var(--ink); font-size: 11px; font-weight: 600; }
.detail-empty { color: var(--muted); font-size: 11px; }
.visually-hidden { position: fixed; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-top: 21px; padding-top: 16px; border-top: 1px solid var(--line); }
.detail-actions .button { min-height: 38px; padding: 0 13px; font-size: 11px; }
.toast { position: fixed; z-index: 5; left: 50%; bottom: 22px; transform: translateX(-50%); max-width: calc(100% - 30px); padding: 11px 16px; border-radius: 10px; background: #342720; box-shadow: var(--shadow); color: white; font-size: 12px; text-align: center; }
[hidden] { display: none !important; }

@media (max-width: 760px) {
  .app-shell { padding: 0 16px; }
  .topbar { padding: 17px 0 14px; }
  .connection { display: none; }
  .brand img { width: 164px; }
  .topbar-actions { gap: 5px; }
  .export-button { width: 36px; height: 36px; padding: 7px; }
  .export-button span { display: none; }
  .header-add { min-height: 37px; padding: 0 11px; font-size: 11px; }
  .main-nav { margin: 13px -16px 22px; padding: 0 10px; overflow: auto; }
  .nav-item { flex: 1 0 auto; justify-content: center; padding: 9px 11px 13px; }
  .stats-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; margin-bottom: 17px; }
  .stat-card { min-height: 88px; padding: 13px; }
  .stat-value { font-size: 23px; }
  .content-grid { grid-template-columns: 1fr; gap: 12px; }
  .section-card { padding: 15px 13px; }
  .content-aside { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
  .mini-card { padding: 14px; }
  .mini-card + .mini-card { margin-top: 0; }
  .page-heading { align-items: flex-start; margin-bottom: 17px; }
  .page-heading h1 { font-size: 30px; }
  .date-label { padding-top: 8px; font-size: 10px; }
  .week-days { gap: 5px; }
  .day-button { min-height: 66px; border-radius: 10px; }
  .day-name { font-size: 8px; }
  .day-number { font-size: 18px; }
}
@media (max-width: 500px) {
  .app-shell { padding: 0 13px; }
  .topbar { gap: 6px; }
  .brand { gap: 7px; }
  .brand img { width: 150px; }
  .header-add { font-size: 10px; padding: 0 9px; }
  .main-nav { margin-left: -13px; margin-right: -13px; }
  .nav-item { font-size: 12px; }
  .content-aside { grid-template-columns: 1fr; }
  .toolbar { flex-wrap: wrap; }
  .search-wrap { flex-basis: 100%; }
  .filter-select { flex: 1; }
  .row-side { min-width: 79px; }
  .row-total { font-size: 13px; }
  .row-client { font-size: 12px; }
  .status-pill { font-size: 8px; padding: 4px 6px; }
  .week-controls { gap: 3px; }
  .week-range { min-width: 115px; font-size: 10px; }
  .week-days { gap: 3px; }
  .day-button { min-height: 61px; padding: 4px 2px; }
  .day-name { font-size: 7px; letter-spacing: .3px; }
  .day-number { font-size: 17px; }
  .week-agenda { padding: 15px; }
  .form-grid { grid-template-columns: 1fr; gap: 0; }
  .field-wide { grid-column: auto; }
  .dialog form, .detail-shell, .restore-dialog { padding: 18px; }
  .dialog-heading h2 { font-size: 24px; }
  .detail-client { font-size: 23px; }
  .detail-split { gap: 8px; }
  .detail-tile { padding: 11px; }
  .detail-tile-value.large { font-size: 18px; }
  .detail-actions { justify-content: stretch; }
  .detail-actions .button { flex: 1 1 auto; }
  .payment-status { flex-wrap: wrap; justify-content: flex-end; }
  .app-footer { font-size: 9px; }
  .info-banner { flex-wrap: wrap; }
  .info-banner .text-link { margin-left: 33px; }
}

/* Doce Agenda identity v2: accessible type, contrast and a consistent icon set. */
.page-heading h1, .section-head h2, .tip-card h3, .empty-state h3,
.agenda-date, .agenda-empty strong, .dialog-heading h2, .detail-client,
.detail-section-title h3 { font-family: var(--da-title); }
.stat-value, .row-total, .detail-tile-value.large {
  font-family: var(--da-body); font-variant-numeric: lining-nums tabular-nums;
}
.connection { font-size: 12px; }
.info-banner { background: #f3eadc; border-color: #e7dcd1; color: #71553b; font-size: 12px; }
.info-banner .text-link { font-size: 12px; }
.stat-top, .row-product, .text-link, .tip-card p, .pending-banner,
.pending-row strong, .empty-state p, .filter-select,
.detail-tile-label, .field small, .form-hint, .form-error { font-size: 13px; }
.stat-note, .row-meta, .pending-row small, .order-results,
.detail-summary-label, .payment-note, .app-footer { font-size: 12px; }
.stat-note { color: var(--muted); line-height: 1.4; }
.status-pill { font-size: 12px; background: #f3eadc; color: #71553b; }
.status-confirmed-pill, .status-entregue-pill { background: #e8f0e8; color: #42644c; }
.status-production-pill, .status-ready-pill { background: #e9edf2; color: #46566f; }
.status-cancelled-pill { background: #f0ece9; color: #665c55; }
.status-quote-pill { background: #f3eadc; color: #71553b; }
.pending-banner, .pending-count, .sample-tag, .demo-label { color: #71553b; background: #f3eadc; }
.pending-banner strong { color: var(--ink); }
.field { font-size: 14px; }
.field input, .field select, .field textarea { border-color: var(--da-border); font-size: 16px; }
.field input, .field select { min-height: 44px; }
.field input::placeholder, .field textarea::placeholder { color: #6f5b51; opacity: .8; }
.field small { color: #6f5b51; line-height: 1.4; }
.form-hint { color: #71553b; background: #f3eadc; }
.form-error { color: #a32e34; background: #fce9e7; }
.search-input::placeholder { color: #6f5b51; }
.search-wrap svg { stroke: #6f5b51; }
.payment-status button { min-height: 40px; color: #42644c; background: #e8f0e8; font-size: 12px; }
.button-quiet, .button-small, .search-input, .filter-select, .day-button,
.day-button.is-today, .payment-status button { border-color: #9f8b7f; }
.field input::placeholder, .field textarea::placeholder { opacity: 1; }
.order-row:focus-visible { outline: 3px solid #42644c; outline-offset: 3px; }
.nav-count, .payment-status span, .history-item, .history-item strong,
.detail-empty, .error-notice span:not(.notice-icon) { font-size: 12px; }
.detail-actions .button, .payment-status button { min-height: 44px; font-size: 12px; }
.day-name, .day-count { font-size: 12px; }
.day-name { letter-spacing: .35px; }
.nav-icon { display: inline-grid; place-items: center; width: 20px; height: 20px; font-size: 0; }
.nav-icon svg, .info-icon svg, .stat-symbol svg, .inline-icon svg {
  width: 20px; height: 20px; fill: none; stroke: currentColor;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.empty-illustration svg, .tip-mark svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tip-mark svg { width: 18px; height: 18px; }
.stat-symbol { font-family: var(--da-body); font-weight: 700; font-variant-numeric: lining-nums tabular-nums; }
.info-icon { display: grid; place-items: center; width: 23px; height: 23px; flex: 0 0 auto; border-radius: 8px; color: #843524; background: white; }
.stat-symbol { color: #a34432; }
.stat-symbol svg { width: 17px; height: 17px; }
.button-primary { background: #a34432; box-shadow: 0 5px 14px rgb(163 68 50 / 15%); }
.button, .header-add { min-height: 44px; }
.icon-button { min-width: 44px; min-height: 44px; }
.app-footer { color: #6f5b51; }
@media (max-width: 760px) {
  .header-add { min-height: 44px; font-size: 12px; }
  .stat-value { font-size: 22px; }
  .date-label { font-size: 12px; }
}
@media (max-width: 500px) {
  .header-add { font-size: 12px; }
  .status-pill { font-size: 12px; padding: 4px 6px; }
  .week-range { font-size: 12px; }
  .app-footer { font-size: 12px; flex-wrap: wrap; }
  #view-week .page-heading { flex-wrap: wrap; gap: 10px; }
  #view-week .page-heading > div:first-child { flex: 1 1 100%; min-width: 0; }
  #view-week .week-controls { width: 100%; justify-content: space-between; }
  #view-week .week-range { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
  #view-week .week-controls .icon-button { flex: 0 0 44px; }
}

/* Disclosures keep the first order entry short while retaining every field. */
.optional-fields { grid-column: 1 / -1; min-width: 0; border: 1px solid var(--line); border-radius: 12px; background: #fffdfa; }
.optional-fields > summary { min-height: 48px; display: flex; align-items: center; gap: 8px; padding: 11px 13px; color: var(--coral-dark); font-size: 13px; font-weight: 700; cursor: pointer; list-style: none; }
.optional-fields > summary::-webkit-details-marker { display: none; }
.optional-fields > summary::before { content: "+"; display: grid; place-items: center; width: 22px; height: 22px; flex: 0 0 auto; border-radius: 7px; background: var(--coral-soft); font-size: 17px; line-height: 1; }
.optional-fields[open] > summary::before { content: "−"; }
.optional-fields > summary span { color: var(--muted); font-size: 12px; font-weight: 500; }
.optional-fields-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; padding: 4px 13px 2px; border-top: 1px solid var(--line); }
.optional-fields-grid .field { margin: 12px 0; }

/* Shared surfaces used by the refreshed Today and order detail views. */
.welcome-panel { margin-bottom: 16px; padding: 18px 20px; border: 1px solid #ead9cc; border-radius: 15px; background: #f8efe5; }
.welcome-panel h2 { margin: 0 0 5px; font-family: var(--da-title); font-size: 21px; }
.welcome-panel p { margin: 0; max-width: 620px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.welcome-panel .welcome-actions, .welcome-panel .button-group { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 13px; }
.storage-note, .finance-note { color: var(--muted); font-size: 12px; line-height: 1.5; }
.storage-note { margin: 12px 0 0; }
.finance-summary { margin: 16px 0; }
.finance-summary .stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 8px; }
.finance-summary .stat-card { min-height: 84px; }
.finance-note { margin: 0; }
.stat-value.is-unknown, .detail-tile-value.is-unknown { max-width: 100%; color: var(--muted); font-size: 15px; font-weight: 600; line-height: 1.3; }
.stat-value, .row-total, .detail-tile-value.large { font-weight: 700; font-variant-numeric: lining-nums tabular-nums; }
.today-heading { margin-bottom: 15px; }
.section-head h2 .pending-count { display: inline-grid; vertical-align: middle; margin-left: 5px; }
.today-heading h1 { font-size: clamp(26px, 3.5vw, 34px); }
.history-section { border: 1px solid var(--line); border-radius: 11px; background: #fffdfa; }
.history-section summary { min-height: 44px; display: flex; align-items: center; padding: 9px 12px; color: var(--ink); font-family: var(--da-title); font-size: 17px; font-weight: 700; cursor: pointer; }
.history-section summary::after { content: "+"; margin-left: auto; }
.history-section[open] summary::after { content: "−"; }
.history-section[open] summary { border-bottom: 1px solid var(--line); }
.history-section .history-list, .history-section > .detail-empty { margin: 12px; }
.availability-settings { margin-top: 16px; padding: 15px; }
.settings-button { width: auto; min-height: 44px; flex: 0 0 auto; padding: 0 10px; font-size: 13px; font-weight: 650; }
#settings-content { min-width: 0; }
.settings-date-field { width: min(100%, 300px); margin: 0 0 14px; }
.settings-data-tools { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 16px; padding: 17px; }
.settings-data-tools h2 { margin: 0; font-family: var(--da-title); font-size: 19px; }
.settings-data-tools p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.settings-data-tools > div:last-child { display: flex; flex-wrap: wrap; gap: 8px; }
.payment-context { display: grid; gap: 3px; margin: -5px 0 18px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #faf5ee; color: var(--muted); font-size: 12px; }
.payment-context strong { color: var(--ink); font-size: 14px; }
.payment-context span:last-child { margin-top: 3px; }
.sample-examples { margin: 14px 0; padding: 12px 15px; border: 1px dashed #c9b8a6; border-radius: 12px; background: #fbf7f0; }
.sample-examples > summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; color: #71553b; font-weight: 700; }
.sample-example-list { display: flex; flex-wrap: wrap; gap: 5px 16px; padding-top: 8px; border-top: 1px solid var(--line); }
.sample-example-list .text-link { text-align: left; }
.settings-data-tools .button { min-height: 44px; }
.availability-settings > details > summary, .order-template-settings > summary { min-height: 46px; display: flex; align-items: center; cursor: pointer; color: var(--ink); font-family: var(--da-title); font-size: 18px; font-weight: 700; }
.availability-settings p, .availability-note { color: var(--muted); font-size: 12px; line-height: 1.55; }
.availability-settings form { margin: 15px 0; padding: 14px; border: 1px solid var(--line); border-radius: 12px; }
.availability-settings fieldset, .template-field { min-width: 0; margin: 0 0 13px; padding: 0; border: 0; }
.availability-settings legend, .template-field legend { margin-bottom: 8px; font-size: 13px; font-weight: 700; }
.closed-weekdays { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.closed-weekdays label, .availability-closed, .template-field > label:not(.field) { display: flex; align-items: center; gap: 7px; min-height: 36px; font-size: 12px; }
.closed-weekdays input, .availability-closed input, .template-field input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--coral); }
.availability-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.availability-warning { padding: 10px; border-radius: 9px; background: #fff3ef; color: var(--coral-dark) !important; }
.availability-settings .availability-note { margin-bottom: 0; }
.order-template-settings { margin-top: 14px; border-top: 1px solid var(--line); }
.order-template-settings > p { max-width: 750px; }
.template-field { margin: 10px 0; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: #fffdfa; }
.template-field > summary { min-height: 46px; display: flex; align-items: center; padding: 10px 12px; cursor: pointer; color: var(--ink); font-size: 14px; font-weight: 700; }
.template-field > summary::after { content: "+"; margin-left: auto; font-size: 18px; }
.template-field[open] > summary::after { content: "−"; }
.template-field fieldset { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; padding: 10px; border: 0; border-top: 1px solid var(--line); }
.template-field fieldset legend { padding: 0 4px; }
.template-field .field { margin: 3px 0; }
.cake-template-fields { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; }
.cake-order-fields[hidden] { display: none; }
.cake-model-toggle { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 650; }
.cake-model-toggle input { width: 18px; height: 18px; accent-color: var(--coral); }
.field .cake-template-fields { margin-top: 0; }
.cake-template-fields legend { grid-column: 1 / -1; padding: 0 4px; font-weight: 700; }
.cake-details { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.cake-details h3 { margin: 0 0 8px; font-size: 14px; }
.cake-details dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; margin: 0; }
.cake-details dl div { min-width: 0; }
.cake-details dt { color: var(--muted); font-size: 11px; }
.cake-details dd { margin: 2px 0 0; overflow-wrap: anywhere; font-size: 13px; font-weight: 650; }
.restore-dialog { padding: 22px; }
.restore-dialog > p { color: var(--muted); font-size: 13px; line-height: 1.6; }
.restore-file-label { display: inline-flex; align-items: center; }
.restore-preview { min-height: 44px; padding: 11px; border-radius: 9px; background: var(--paper); color: var(--ink) !important; }
.capacity-override-box .field { margin-top: 10px; }
.day-button.is-closed { border-color: #e0ada0; background: #fff3ef; }
.day-button.is-full { border-color: #e1c37d; }
.day-button.is-selected.is-closed, .day-button.is-selected.is-full { border-color: var(--coral); background: var(--coral); color: #fff; }
.day-availability { display: block; max-width: 100%; color: var(--coral-dark); font-size: 10px; line-height: 1.1; overflow-wrap: anywhere; }
.day-button.is-selected .day-availability { color: #fff; }

/* Buttons confirm taps without moving the surrounding layout. */
.button, .icon-button, .nav-item, .day-button, .pending-row, .payment-status button, .order-row { transition: transform 140ms cubic-bezier(.23, 1, .32, 1), background-color 140ms ease, border-color 140ms ease, color 140ms ease; }
.button:active, .icon-button:active, .nav-item:active, .day-button:active, .pending-row:active, .payment-status button:active { transform: scale(.97); }
.order-row:active { transform: scale(.99); }
.nav-new-order { display: none; }

@media (hover: hover) and (pointer: fine) {
  .icon-button:hover { color: var(--ink); background: var(--cream); }
  .button:hover:not(:active) { transform: translateY(-1px); }
  .button-primary:hover { background: var(--coral-dark); }
  .button-quiet:hover { background: var(--paper); }
  .nav-item:hover { color: var(--ink); }
  .text-link:hover { text-decoration: underline; }
  .order-row:hover:not(:active) { border-color: #e4c1b7; box-shadow: 0 5px 15px rgba(74,47,35,.05); transform: translateY(-1px); }
  .pending-row:hover { border-color: #e5c9ba; }
  .day-button:hover { border-color: #e3c2b8; }
}

@media (max-width: 760px) {
  body { padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
  .topbar { padding: 10px 0; }
  .brand img { width: 145px; }
  .main-nav { position: fixed; z-index: 20; right: 0; bottom: 0; left: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px; margin: 0; overflow: visible; padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px)); border: 1px solid var(--line); border-bottom: 0; border-radius: 15px 15px 0 0; background: rgb(255 254 250 / 97%); box-shadow: 0 -8px 24px rgb(74 47 35 / 8%); backdrop-filter: blur(12px); }
  .nav-item { min-width: 0; min-height: 52px; flex-direction: column; justify-content: center; gap: 2px; padding: 4px 2px; border-radius: 10px; font-size: 10px; }
  .nav-item.active::after { top: 3px; right: 25%; bottom: auto; left: 25%; height: 2px; }
  .nav-icon { width: 22px; height: 22px; }
  .nav-count { position: absolute; top: 2px; margin-left: 26px; min-width: 16px; padding: 1px 4px; font-size: 9px; }
  .nav-new-order { color: var(--coral-dark); font-weight: 750; }
  .nav-new-order { display: inline-flex; }
  .nav-new-order .nav-icon { width: 24px; height: 24px; border-radius: 8px; background: var(--coral); color: #fff; font-size: 20px; line-height: 1; }
  .nav-new-label { line-height: 1.1; }
  .header-add { min-height: 44px; }
  .field input, .field select, .field textarea { font-size: 16px; }
  .order-dialog .dialog-actions { position: sticky; bottom: 0; z-index: 1; padding: 12px 0; background: var(--card); }
  .search-input, .filter-select { font-size: 16px; }
  .toast { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
  .text-link { min-height: 44px; }
  .row-client, .row-product { display: -webkit-box; overflow: hidden; white-space: normal; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow-wrap: anywhere; }
  .row-title-line { align-items: flex-start; flex-wrap: wrap; }
  .row-meta > span:first-child { font-weight: 700; color: var(--ink); }
  .row-client { line-height: 1.35; }
  .row-product { line-height: 1.35; }
  .row-total { font-family: var(--da-body); font-weight: 700; font-variant-numeric: lining-nums tabular-nums; }
  .today-heading { margin-bottom: 12px; }
  .content-aside { grid-template-columns: 1fr; }
  .today-heading .eyebrow { display: none; }
  .today-heading h1 { margin-top: 0; font-size: 27px; }
  .today-heading p { display: none; }
  .optional-fields-grid { grid-template-columns: 1fr; gap: 0; }
  .availability-fields, .cake-template-fields, .template-field fieldset { grid-template-columns: 1fr; }
  .closed-weekdays { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cake-template-fields legend { grid-column: auto; }
  .cake-details dl { grid-template-columns: 1fr; }
  .optional-fields-grid .field-wide { grid-column: auto; }
  .finance-summary .stats-grid { grid-template-columns: 1fr; }
  .finance-summary .stat-card { min-height: 72px; }
  .welcome-panel { padding: 15px; }
  .settings-data-tools { align-items: stretch; flex-direction: column; }
  .settings-data-tools > div:last-child { display: grid; grid-template-columns: 1fr 1fr; }
}

@media (max-width: 500px) {
  .app-shell { padding-right: 13px; padding-left: 13px; }
  .main-nav { padding-right: max(8px, env(safe-area-inset-right, 0px)); padding-left: max(8px, env(safe-area-inset-left, 0px)); }
  .topbar { gap: 5px; }
  .brand img { width: 132px; }
  .header-add { display: none; }
  .date-label { padding-top: 0; }
  .row-side { min-width: 76px; }
}

@media (max-width: 380px) {
  .brand img { width: 120px; }
  .topbar-actions { gap: 3px; }
  .header-add { padding: 0 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Keep the order action label intact while the adjacent heading can wrap. */
#view-orders .page-heading > div { min-width: 0; }
#view-orders .page-heading > .button { flex-shrink: 0; white-space: nowrap; font-size: 13px; padding-inline: 14px; }
.storage-note .text-link { margin-inline-start: .35em; }

/* Today view: keep the operational surface calm, compact, and easy to scan. */
#view-today.today-redesign .content-grid.today-single { grid-template-columns: 1fr; }
#view-today.today-redesign .today-count { color: var(--muted); font-weight: 500; }
#view-today.today-redesign .today-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 20px;
  margin-bottom: 20px;
}
#view-today.today-redesign .today-heading h1 {
  margin: 0;
  font-family: var(--da-title);
  font-size: clamp(28px, 3.5vw, 34px);
  line-height: 1.15;
}
#view-today.today-redesign .today-heading .date-label {
  padding: 0;
  color: var(--muted);
  font-family: var(--da-body);
  font-size: 13px;
  font-weight: 600;
}
#view-today.today-redesign .welcome-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 3px 18px;
  margin: 0 0 20px;
  padding: 0 0 18px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
#view-today.today-redesign .welcome-panel h2,
#view-today.today-redesign .content-aside h2,
#view-today.today-redesign .finance-summary h2,
#view-today.today-redesign .coming-soon h2,
#view-today.today-redesign .pending-card h2,
#view-today.today-redesign .today-agenda h2 {
  color: var(--ink);
  font-family: var(--da-body);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
}
#view-today.today-redesign .welcome-panel h2 { grid-column: 1; margin: 0; }
#view-today.today-redesign .welcome-panel p {
  grid-column: 1;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}
#view-today.today-redesign .welcome-panel .welcome-actions,
#view-today.today-redesign .welcome-panel .button-group {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-items: center;
  gap: 8px;
  margin: 0;
}
#view-today.today-redesign .welcome-panel .button { white-space: nowrap; }

#view-today.today-redesign .today-agenda.section-card {
  min-width: 0;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
#view-today.today-redesign .today-agenda > .section-head {
  min-height: 42px;
  margin: 0 0 12px;
  padding: 0 0 10px;
  border-bottom: 1px solid var(--line);
}
#view-today.today-redesign .today-agenda .section-head h2 { margin: 0; }
#view-today.today-redesign .today-empty {
  margin: 0;
  padding: 3px 0 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  text-align: left;
}
#view-today.today-redesign .today-empty h3 {
  margin: 0 0 4px;
  color: var(--ink);
  font-family: var(--da-body);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.35;
}
#view-today.today-redesign .today-empty p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}
#view-today.today-redesign .today-empty::before,
#view-today.today-redesign .today-empty .empty-icon { display: none; }

#view-today.today-redesign .next-action-card {
  padding: 0 0 17px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
#view-today.today-redesign .next-action-card .section-head {
  min-height: 42px;
  margin: 0 0 10px;
  padding: 0 0 10px;
  border-bottom: 1px solid var(--line);
}
#view-today.today-redesign .next-action-card .section-head h2 { margin: 0; color: var(--muted); font-size: 14px; font-weight: 600; }
#view-today.today-redesign .next-action-card .stat-symbol { display: none; }
#view-today.today-redesign .next-action-copy {
  color: var(--muted);
  font-family: var(--da-body);
  font-size: 14px;
  line-height: 1.45;
}
#view-today.today-redesign .next-action-copy strong {
  display: block;
  margin: 0 0 3px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
}

#view-today.today-redesign .finance-summary {
  margin: 24px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
#view-today.today-redesign .finance-summary > .section-head {
  min-height: 34px;
  margin: 0 0 10px;
}
#view-today.today-redesign .finance-summary .stats-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 0;
}
#view-today.today-redesign .finance-summary .stat-card {
  min-width: 0;
  min-height: 0;
  padding: 3px 16px 5px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
#view-today.today-redesign .finance-summary .stat-card:first-child { padding-left: 0; }
#view-today.today-redesign .finance-summary .stat-card:last-child { padding-right: 0; border-right: 0; }
#view-today.today-redesign .finance-summary .stat-value {
  color: var(--ink);
  font-size: clamp(20px, 2.3vw, 25px);
  line-height: 1.25;
  overflow-wrap: anywhere;
}
#view-today.today-redesign .finance-summary .stat-label {
  margin-top: 3px;
  font-family: var(--da-body);
  font-size: 12px;
  line-height: 1.35;
}

@media (max-width: 760px) {
  .app-footer { display: none; }
  #view-today.today-redesign .today-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
    margin-bottom: 18px;
  }
  #view-today.today-redesign .today-heading h1 { font-size: 28px; }
  #view-today.today-redesign .today-heading .date-label { font-size: 12px; }
  #view-today.today-redesign .welcome-panel {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
    margin-bottom: 18px;
    padding-bottom: 15px;
  }
  #view-today.today-redesign .welcome-panel .welcome-actions,
  #view-today.today-redesign .welcome-panel .button-group {
    grid-column: 1;
    grid-row: auto;
    margin-top: 7px;
  }
  #view-today.today-redesign .content-grid { gap: 20px; }
  #view-today.today-redesign .content-aside { gap: 16px; }
  #view-today.today-redesign .finance-summary { margin-top: 20px; padding-top: 15px; }
  #view-today.today-redesign .finance-summary .stats-grid { grid-template-columns: 1fr; }
  #view-today.today-redesign .finance-summary .stat-card,
  #view-today.today-redesign .finance-summary .stat-card:first-child,
  #view-today.today-redesign .finance-summary .stat-card:last-child {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: baseline;
    gap: 3px 12px;
    padding: 9px 0;
    border: 0;
    border-bottom: 1px solid var(--line);
  }
  #view-today.today-redesign .finance-summary .stat-card:last-child { border-bottom: 0; }
  #view-today.today-redesign .finance-summary .stat-label { margin: 0; }
  #view-today.today-redesign .finance-summary .stat-value {
    flex: 0 1 auto;
    font-size: 20px;
    text-align: right;
  }
  #view-today.today-redesign .finance-summary .stat-note {
    grid-column: 1 / -1;
    max-width: 100%;
    margin-top: 0;
  }
}

.template-field > summary span{min-width:0}.template-field > summary small{display:block;margin-top:3px;color:var(--muted);font-size:12px;font-weight:500}.template-field fieldset > label:not(.field){display:flex;align-items:center;gap:8px;min-height:44px;font-size:13px}
