:root {
  --ink: #14231f;
  --ink-soft: #56635e;
  --forest: #102f26;
  --forest-2: #174638;
  --gold: #bd9650;
  --paper: #f5f3ed;
  --card: #fffdfa;
  --line: #deddd6;
  --mint: #dcebe4;
  --sand: #eee2ce;
  --blue: #dfe8eb;
  --danger: #a33f3f;
  --success: #247052;
  --shadow: 0 16px 45px rgba(19, 37, 31, .07);
  --radius: 18px;
  --sidebar: 248px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button, .button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3, strong, b { letter-spacing: -.025em; }
h1 { margin-bottom: 7px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2rem, 3vw, 3rem); font-weight: 500; line-height: 1.08; }
h2 { margin-bottom: 4px; font-family: Georgia, "Times New Roman", serif; font-size: 1.45rem; font-weight: 500; }
p { color: var(--ink-soft); }
small { color: var(--ink-soft); }

.brand { display: inline-flex; align-items: center; gap: 11px; font-family: Georgia, serif; font-size: 1.35rem; font-weight: 600; }
.brand-mark { display: block; width: 39px; height: 39px; flex: none; border-radius: 10px; }
.sidebar { position: fixed; z-index: 20; inset: 0 auto 0 0; display: flex; width: var(--sidebar); flex-direction: column; padding: 28px 20px 20px; color: #f5f0e7; background: var(--forest); }
.sidebar .brand { padding: 0 10px; margin-bottom: 50px; }
.main-nav { display: flex; flex: 1; flex-direction: column; gap: 6px; }
.main-nav a { display: flex; align-items: center; gap: 13px; min-height: 47px; padding: 0 14px; border-radius: 11px; color: #b9c7c1; transition: .2s; }
.main-nav a span { width: 20px; color: #9bb0a8; font-size: 1.25rem; text-align: center; }
.main-nav a:hover, .main-nav a.active { color: white; background: rgba(255,255,255,.09); }
.main-nav a.active span { color: #e2c895; }
.sidebar-user { display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 10px; padding: 16px 8px 0; border-top: 1px solid rgba(255,255,255,.12); }
.sidebar-user > span:nth-child(2) { min-width: 0; }
.sidebar-user strong, .sidebar-user small { display: block; overflow: hidden; color: white; font-size: .83rem; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user small { color: #95a79f; font-size: .68rem; }
.avatar { display: inline-grid; width: 38px; height: 38px; flex: none; place-items: center; border-radius: 50%; color: var(--forest); background: #d5c092; font-weight: 700; }
.icon-button { border: 0; background: transparent; cursor: pointer; font-size: 1.2rem; }
.sidebar .icon-button { color: #9aaba4; }
.content { min-height: 100vh; padding: 48px 48px 70px; margin-left: var(--sidebar); }
.content > *:not(.flash-stack) { max-width: 1400px; margin-right: auto; margin-left: auto; }
.mobile-header, .bottom-nav { display: none; }

.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 30px; }
.page-header p { margin-bottom: 0; }
.eyebrow { display: block; margin-bottom: 10px; color: #8c7448; font-size: .68rem; font-weight: 750; letter-spacing: .18em; }
.header-actions, .button-row, .form-actions { display: flex; align-items: center; gap: 10px; }
.button { display: inline-flex; min-height: 43px; align-items: center; justify-content: center; gap: 14px; padding: 0 20px; border: 1px solid var(--forest); border-radius: 9px; color: white; background: var(--forest); cursor: pointer; font-weight: 650; transition: transform .15s, background .15s; }
.button:hover { background: var(--forest-2); transform: translateY(-1px); }
.button-large { min-height: 51px; padding: 0 25px; }
.button-secondary { border-color: #c9cbc3; color: var(--ink); background: var(--card); }
.button-secondary:hover { background: white; }
.button-ghost { border-color: transparent; color: var(--ink); background: transparent; }
.button-ghost:hover { background: rgba(20,35,31,.05); }
.button-danger { border-color: #e3c8c4; color: var(--danger); background: #fff8f6; }
.button-danger:hover { background: #fcecea; }
.button-full { width: 100%; }
.text-link, .card-head a, .usual-section > .card-head a, .auth-switch a { color: #315f50; font-weight: 700; }
.back-link { display: inline-block; margin-bottom: 25px; color: var(--ink-soft); font-size: .86rem; font-weight: 650; }

.card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.card-head > span, .card-head > a { padding-top: 4px; color: var(--ink-soft); font-size: .78rem; }
.metric-grid { display: grid; grid-template-columns: 1.35fr repeat(3, 1fr); gap: 15px; margin-bottom: 17px; }
.metric-grid.three { grid-template-columns: repeat(3, 1fr); }
.metric-card { position: relative; min-height: 170px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.metric-card.primary { color: white; border: 0; background: var(--forest); }
.metric-label { display: block; margin-bottom: 19px; color: var(--ink-soft); font-size: .74rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.metric-card.primary .metric-label, .metric-card.primary small { color: #b9cac3; }
.metric-card strong { display: block; margin-bottom: 5px; font-family: Georgia, serif; font-size: clamp(1.65rem, 2.2vw, 2.25rem); font-weight: 500; }
.metric-card small { display: block; font-size: .74rem; }
.metric-icon { position: absolute; top: 19px; right: 19px; display: grid; width: 35px; height: 35px; place-items: center; border-radius: 10px; }
.mint { background: var(--mint); }.sand { background: var(--sand); }.blue { background: var(--blue); }
.progress { height: 5px; margin: 20px 0 6px; overflow: hidden; border-radius: 9px; background: rgba(255,255,255,.13); }
.progress i { display: block; height: 100%; border-radius: inherit; background: #dabf87; }
.positive { color: var(--success) !important; }.negative { color: var(--danger) !important; }
.notice { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 15px; padding: 16px 18px; margin-bottom: 17px; border: 1px solid #dbcba9; border-radius: 13px; background: #faf4e7; }
.notice > span { font-size: 1.5rem; }.notice p, .notice strong { margin: 0; }.notice a { font-weight: 700; }
.dashboard-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 17px; margin-bottom: 17px; }
.dashboard-grid > .card, .chart-card { padding: 25px; }
.legend { display: flex; justify-content: flex-end; gap: 17px; margin: 4px 0 15px; color: var(--ink-soft); font-size: .7rem; }
.legend i { display: inline-block; width: 8px; height: 8px; margin-right: 5px; border-radius: 50%; }
.legend-income { background: #315f50; }.legend-expense { background: #cbb071; }
.bar-chart { display: flex; height: 205px; align-items: flex-end; gap: clamp(5px, 2vw, 19px); padding-top: 14px; border-bottom: 1px solid var(--line); }
.bar-chart.tall { height: 280px; }
.bar-group { display: flex; min-width: 0; height: 100%; flex: 1; flex-direction: column; justify-content: flex-end; }
.bars { display: flex; height: calc(100% - 27px); align-items: flex-end; justify-content: center; gap: 3px; }
.bars i { width: min(18px, 42%); min-height: 0; border-radius: 4px 4px 0 0; background: #315f50; transition: height .5s; }
.bars i.series-1 { background: #cbb071; }
.single .bars i { max-width: 28px; width: 55%; }
.bar-group small { overflow: hidden; height: 27px; padding-top: 8px; font-size: .62rem; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.activity-list a, .history-list > a, .history-list > div { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; min-height: 65px; border-bottom: 1px solid #e8e6e0; }
.activity-list a:last-child, .history-list > *:last-child { border-bottom: 0; }
.activity-list strong, .activity-list small, .history-list strong, .history-list small { display: block; }
.activity-list small, .history-list small { margin-top: 2px; font-size: .7rem; }
.activity-list b { font-size: .85rem; }
.activity-icon { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 10px; background: var(--mint); }
.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.quick-grid a { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.48); transition: .2s; }
.quick-grid a:hover { border-color: #b6b9b0; background: var(--card); }
.quick-grid a > span { grid-row: span 2; font-size: 1.25rem; }.quick-grid small { font-size: .7rem; }

.flash-stack { position: fixed; z-index: 100; top: 18px; right: 22px; display: grid; width: min(390px, calc(100vw - 32px)); gap: 8px; }
.flash { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 11px; background: white; box-shadow: 0 12px 35px rgba(0,0,0,.13); transition: opacity .4s; }
.flash.fade { opacity: 0; pointer-events: none; }.flash button { border: 0; background: transparent; cursor: pointer; }.flash-success { border-left: 4px solid var(--success); }.flash-error { border-left: 4px solid var(--danger); }.flash-info { border-left: 4px solid #4e7785; }

.stack-form { display: grid; gap: 19px; }.stack-form.roomy { gap: 25px; padding: 30px; }
label { display: grid; gap: 7px; color: #34413c; font-size: .77rem; font-weight: 700; }
label small { font-weight: 400; }
input, select { width: 100%; height: 47px; padding: 0 13px; border: 1px solid #cfd1ca; border-radius: 8px; outline: none; color: var(--ink); background: #fff; transition: border .15s, box-shadow .15s; }
input:focus, select:focus { border-color: #567c6e; box-shadow: 0 0 0 3px rgba(49,95,80,.1); }
input::placeholder { color: #a4aaa6; }
.input-money { position: relative; display: block; }.input-money b { position: absolute; z-index: 1; top: 13px; left: 14px; color: #6c7773; }.input-money input { padding-left: 34px; }
.checkbox { display: flex; align-items: center; gap: 9px; font-weight: 500; }.checkbox input { width: 17px; height: 17px; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.form-page { max-width: 740px !important; }.wide-form-page, .detail-page { max-width: 1200px !important; }.narrow-page { max-width: 720px !important; padding-top: 30px; }.lead { font-size: 1.05rem; }.step-mark { float: right; padding: 7px 11px; border-radius: 18px; background: var(--mint); font-size: .7rem; font-weight: 700; }
.form-section { padding: 27px; margin-bottom: 16px; }
.section-title { display: flex; gap: 14px; margin-bottom: 25px; }.section-title > span { display: grid; width: 31px; height: 31px; flex: none; place-items: center; border-radius: 50%; color: #7b6338; background: var(--sand); font-size: .7rem; font-weight: 800; }.section-title h2, .section-title p { margin: 0; }.section-title p { font-size: .76rem; }
.sticky-actions { position: sticky; z-index: 10; bottom: 14px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 13px 15px 13px 20px; border: 1px solid #cfd1ca; border-radius: 13px; background: rgba(255,253,250,.94); box-shadow: 0 15px 40px rgba(20,35,31,.13); backdrop-filter: blur(15px); }
.sticky-actions > span { color: var(--ink-soft); font-size: .77rem; }.sticky-actions > div { display: flex; gap: 8px; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0; border: 0; }.segmented legend { margin-bottom: 8px; font-size: .77rem; font-weight: 700; }.segmented label { display: block; }.segmented input { position: absolute; opacity: 0; }.segmented span { display: grid; height: 48px; place-items: center; border: 1px solid #cfd1ca; border-radius: 8px; cursor: pointer; }.segmented input:checked + span { color: white; border-color: var(--forest); background: var(--forest); }

.receipt-panel { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 21px 24px; margin-bottom: 16px; border: 1px dashed #9faea7; border-radius: var(--radius); background: #edf3ee; }
.receipt-panel > div:first-child { display: flex; align-items: center; gap: 13px; }.receipt-panel strong, .receipt-panel small, .receipt-status strong, .receipt-status small { display: block; }.receipt-panel small { margin-top: 2px; }
.receipt-icon { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 11px; background: white; font-size: 1.2rem; }.file-button input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.receipt-status { display: flex; width: 100%; align-items: center; gap: 12px; padding-top: 15px; border-top: 1px solid #d2ddd6; }.receipt-panel:has(.receipt-status:not([hidden])) { flex-wrap: wrap; }.receipt-status i { width: 20px; height: 20px; border: 2px solid #aebbb4; border-top-color: var(--forest); border-radius: 50%; animation: spin 1s linear infinite; }.receipt-status.success strong { color: var(--success); }.receipt-status.warning strong { color: #8b641d; }.receipt-status.error strong { color: var(--danger); }@keyframes spin{to{transform:rotate(360deg)}}
.line-head, .line-row { display: grid; grid-template-columns: minmax(170px,2fr) minmax(80px,.7fr) minmax(80px,.65fr) minmax(125px,1fr) minmax(145px,1fr) 34px; gap: 9px; align-items: end; }
.line-head { display: none; }.line-row { padding: 13px 0; border-top: 1px solid #ebe9e3; }.line-row label > span { display: block; }.line-row .price-field input { border-color: #9eaa9f; background: #fffef8; }.remove-line { width: 34px; height: 43px; border: 0; color: #8b7772; background: transparent; cursor: pointer; font-size: 1.25rem; }.add-line { padding: 12px 3px 2px; border: 0; color: #315f50; background: transparent; cursor: pointer; font-size: .78rem; font-weight: 750; }.meal-lines { grid-template-columns: minmax(200px,2fr) minmax(130px,1fr) minmax(95px,.65fr) 34px; }.line-estimate { grid-column: 1 / -1; display: flex; gap: 20px; padding: 9px 12px; border-radius: 7px; background: #f2f1eb; font-size: .72rem; }.line-estimate small { margin-left: auto; }
.total-check { min-height: 1em; color: var(--ink-soft); }.total-check.success { color: var(--success); }.total-check.warning { color: #8b641d; }
.estimate-result { padding: 28px; margin-bottom: 16px; border-radius: var(--radius); color: white; background: var(--forest); }.estimate-result > div { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 25px; }.estimate-result article { padding: 20px; border: 1px solid rgba(255,255,255,.13); border-radius: 12px; }.estimate-result article.highlight { border-color: #b99f68; background: rgba(255,255,255,.05); }.estimate-result small, .estimate-result p { color: #b7c7c1; }.estimate-result strong { display: block; margin: 8px 0; font-family: Georgia,serif; font-size: 2rem; }.estimate-result label { max-width: 310px; margin-top: 20px; color: white; }

.purchase-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }.purchase-card { padding: 20px; border: 1px solid var(--line); border-radius: 15px; background: var(--card); transition: .2s; }.purchase-card:hover { border-color: #acb5ae; transform: translateY(-2px); box-shadow: var(--shadow); }.purchase-card > div { display: flex; align-items: center; gap: 11px; }.purchase-card > div span:last-child { flex: 1; }.purchase-card > div strong, .purchase-card > div small { display: block; }.purchase-card > div small { margin-top: 2px; }.purchase-card > strong { display: block; margin: 24px 0 17px; font-family: Georgia,serif; font-size: 1.7rem; font-weight: 500; }.purchase-card footer { display: flex; gap: 12px; padding-top: 12px; border-top: 1px solid #e8e6df; color: var(--ink-soft); font-size: .68rem; }.purchase-card footer span:last-child { margin-left: auto; color: var(--ink); }.store-avatar { display: grid; width: 40px; height: 40px; flex: none; place-items: center; border-radius: 11px; color: #315f50; background: var(--mint); font-family: Georgia,serif; font-size: 1.15rem; }.store-avatar.large { width: 56px; height: 56px; border-radius: 15px; font-size: 1.55rem; }
.detail-header { display: flex; align-items: center; justify-content: space-between; gap: 25px; padding: 23px 0 28px; }.detail-header > div { display: flex; align-items: center; gap: 15px; }.detail-header h1, .detail-header p, .detail-header .eyebrow { margin: 0; }.detail-header > strong { font-family: Georgia,serif; font-size: 2.4rem; font-weight: 500; }.detail-grid { display: grid; grid-template-columns: 1fr 230px; gap: 17px; }.detail-aside { display: grid; align-content: start; gap: 12px; }.receipt-preview { position: relative; display: block; overflow: hidden; min-height: 240px; border: 1px solid var(--line); border-radius: 14px; background: #e9e7df; }.receipt-preview img { width: 100%; max-height: 350px; object-fit: cover; }.receipt-preview span { position: absolute; right: 8px; bottom: 8px; left: 8px; padding: 9px; border-radius: 7px; color: white; background: rgba(16,47,38,.9); font-size: .75rem; text-align: center; }
.table-card { overflow: hidden; }.table-card > .card-head { padding: 22px 24px; border-bottom: 1px solid var(--line); }.responsive-table { overflow-x: auto; }table { width: 100%; border-collapse: collapse; }th, td { padding: 15px 20px; border-bottom: 1px solid #e8e6df; font-size: .78rem; text-align: left; white-space: nowrap; }th { color: var(--ink-soft); background: #f2f0ea; font-size: .63rem; letter-spacing: .07em; text-transform: uppercase; }td a { color: #315f50; }td small { display: block; }tr:last-child td { border-bottom: 0; }tfoot td { background: #f2f0ea; font-size: .9rem; font-weight: 700; }.right { text-align: right; }.tag { padding: 5px 8px; border-radius: 12px; background: #ecebe5; font-size: .66rem; }.danger { color: var(--danger); }.summary-pair { display: flex; gap: 13px; margin-bottom: 17px; }.summary-pair article { min-width: 210px; padding: 17px 21px; border: 1px solid var(--line); border-radius: 13px; background: var(--card); }.summary-pair small, .summary-pair strong { display: block; }.summary-pair strong { margin-top: 4px; font-family: Georgia,serif; font-size: 1.45rem; font-weight: 500; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 20px; padding: 25px; font-size: .77rem; }.pagination a { font-weight: 700; }
.empty { padding: 60px 25px; text-align: center; }.empty > span { display: grid; width: 55px; height: 55px; place-items: center; margin: 0 auto 15px; border-radius: 50%; background: var(--mint); font-size: 1.5rem; }.empty p { max-width: 420px; margin-right: auto; margin-left: auto; }.empty.compact { padding: 25px; }.empty.compact > span { display: none; }.hero-empty { margin-top: 50px; }.empty-row { display: flex; align-items: center; gap: 14px; padding: 22px; border: 1px dashed #b8bdb7; border-radius: 13px; }.empty-row p { flex: 1; margin: 0; }.empty-row a { font-weight: 700; }

.usual-section { margin-bottom: 28px; }.usual-section > .card-head { margin-bottom: 13px; }.template-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; }.template-grid article { position: relative; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }.template-grid article > a { display: flex; min-height: 155px; flex-direction: column; align-items: flex-start; padding: 18px; }.template-grid strong, .template-grid small { display: block; }.template-grid .text-link { margin-top: auto; font-size: .75rem; }.meal-symbol { display: grid; width: 34px; height: 34px; place-items: center; margin-bottom: 10px; border-radius: 9px; background: var(--sand); }.template-grid form { position: absolute; top: 7px; right: 7px; }.history-card { overflow: hidden; }.history-card > .card-head { align-items: center; padding: 22px 24px; border-bottom: 1px solid var(--line); }.history-card > .card-head > span { flex: none; padding: 0; white-space: nowrap; }.history-list { padding: 0 24px; }.history-list > a, .history-list > div { grid-template-columns: auto 1fr auto auto; min-height: 74px; }.history-cost { min-width: 100px; text-align: right; }.history-cost b { font-size: .9rem; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 16px; }.span-2 { grid-column: span 2; }.insight-card { padding: 28px; color: white; background: var(--forest); }.insight-card p { color: #b9c7c1; }.product-table { margin-bottom: 30px; }.line-chart { padding-top: 20px; }.line-chart svg { display: block; width: 100%; height: auto; max-height: 310px; overflow: visible; }.chart-area { fill: rgba(49,95,80,.09); }.chart-line { fill: none; stroke: #315f50; stroke-width: 3; }.chart-point { fill: #fff; stroke: #315f50; stroke-width: 3; }.chart-labels { display: flex; justify-content: space-between; padding: 8px 20px 0; font-size: .65rem; color: var(--ink-soft); }.two-column { display: grid; grid-template-columns: repeat(2,1fr); gap: 16px; }.narrow-columns { max-width: 900px !important; }.two-column .card { padding: 27px; }

.public-content { min-height: 100vh; background: #f3f0e8; }
.auth-layout { display: grid; min-height: 100vh; grid-template-columns: minmax(520px, .9fr) 1.1fr; }.auth-layout-simple { display: flex; align-items: center; justify-content: center; padding: 24px; }.auth-panel { display: flex; flex-direction: column; padding: 35px 9vw 50px 5vw; background: var(--card); }.auth-layout-simple .auth-panel { width: min(100%, 520px); min-height: 0; padding: 34px 42px 42px; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }.auth-layout-simple .auth-panel > .brand { margin-bottom: 55px; }.auth-form { width: 100%; max-width: 430px; margin: auto; }.auth-form h1 { font-size: 2.8rem; }.auth-form > p { margin-bottom: 28px; }.auth-switch { margin: 25px 0 0 !important; text-align: center; font-size: .82rem; }.error-page { display: grid; min-height: 70vh; place-content: center; justify-items: center; text-align: center; }.error-page > span { color: #a08450; font-family: Georgia,serif; font-size: 4rem; }.error-page p { max-width: 480px; }

@media (max-width: 1100px) {
  :root { --sidebar: 210px; }.content { padding: 38px 28px 65px; }.metric-grid { grid-template-columns: repeat(2,1fr); }.purchase-grid { grid-template-columns: repeat(2,1fr); }.template-grid { grid-template-columns: repeat(3,1fr); }.stats-grid { grid-template-columns: repeat(2,1fr); }.stats-grid .span-2 { grid-column: span 2; }.auth-panel { padding-left: 5vw; padding-right: 5vw; }
}

@media (max-width: 860px) {
  body.app-shell { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }.sidebar { display: none; }.mobile-header { position: sticky; z-index: 30; top: 0; display: flex; height: calc(65px + env(safe-area-inset-top)); align-items: flex-end; justify-content: space-between; padding: env(safe-area-inset-top) 18px 10px; color: white; background: var(--forest); }.mobile-header .brand-mark { width: 32px; height: 32px; }.mobile-header .brand { font-size: 1.15rem; }.mobile-header .avatar { width: 33px; height: 33px; }.content { min-height: auto; padding: 26px 16px 30px; margin-left: 0; }.bottom-nav { position: fixed; z-index: 40; right: 0; bottom: 0; left: 0; display: grid; height: calc(66px + env(safe-area-inset-bottom)); grid-template-columns: repeat(5,1fr); align-items: start; padding: 8px 7px env(safe-area-inset-bottom); border-top: 1px solid #d3d4cd; background: rgba(255,253,250,.96); backdrop-filter: blur(16px); }.bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 1px; color: #718078; }.bottom-nav a > span { font-size: 1.25rem; line-height: 1.3; }.bottom-nav small { color: inherit; font-size: .57rem; }.bottom-nav a.active { color: var(--forest); }.bottom-nav .quick-add { position: relative; top: -24px; color: var(--forest); }.bottom-nav .quick-add > span { display: grid; width: 47px; height: 47px; place-items: center; border: 4px solid var(--paper); border-radius: 50%; color: white; background: var(--forest); font-size: 1.7rem; box-shadow: 0 5px 18px rgba(16,47,38,.25); }.page-header { align-items: flex-start; margin-bottom: 22px; }.page-header .header-actions { display: grid; }.page-header > .button { flex: none; padding: 0 12px; font-size: .76rem; }.page-header h1 { font-size: 2.1rem; }.metric-grid, .metric-grid.three { grid-template-columns: repeat(2,1fr); gap: 10px; }.metric-card { min-height: 145px; padding: 18px; }.metric-card.primary { grid-column: span 2; }.metric-card strong { font-size: 1.6rem; }.dashboard-grid, .detail-grid, .two-column { grid-template-columns: 1fr; }.dashboard-grid > .card, .chart-card { padding: 19px; }.quick-grid { grid-template-columns: 1fr; }.bar-chart { gap: 6px; }.bar-group small { font-size: .52rem; }.purchase-grid { grid-template-columns: 1fr; }.template-grid { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }.template-grid article { min-width: 170px; scroll-snap-align: start; }.stats-grid { grid-template-columns: 1fr; }.stats-grid .span-2 { grid-column: auto; }.form-grid { grid-template-columns: 1fr; }.form-section { padding: 20px 16px; }.receipt-panel { align-items: stretch; flex-direction: column; }.receipt-panel .button { width: 100%; }.line-row, .line-row.meal-lines { position: relative; grid-template-columns: repeat(2,1fr); gap: 11px; padding: 17px 0; }.line-row label:first-child { grid-column: span 2; }.line-row .remove-line { position: absolute; top: 14px; right: 0; }.line-row label:first-child input { padding-right: 40px; }.line-estimate { grid-column: span 2; flex-wrap: wrap; }.line-estimate small { width: 100%; margin: 0; }.sticky-actions { bottom: calc(74px + env(safe-area-inset-bottom)); align-items: stretch; flex-direction: column; padding: 10px; }.sticky-actions > span { display: none; }.sticky-actions > div { display: grid; grid-template-columns: 1fr 1fr; }.sticky-actions .button { padding: 0 10px; font-size: .72rem; }.estimate-result { padding: 21px 16px; }.estimate-result > div { grid-template-columns: 1fr; gap: 8px; }.estimate-result > div > span { display: none; }.detail-header { align-items: flex-start; }.detail-header > strong { font-size: 1.7rem; }.detail-aside { grid-row: 1; }.receipt-preview { min-height: 180px; }.summary-pair { display: grid; grid-template-columns: repeat(2,1fr); }.summary-pair article { min-width: 0; }.history-card > .card-head { padding: 18px 14px; }.history-list { padding: 0 14px; }.history-list > a,.history-list > div { grid-template-columns: auto 1fr auto; }.history-list > * > span:last-child { display: none; }.history-cost { grid-column: 2; text-align: left; }.history-list form { grid-column: 3; grid-row: 1 / span 2; }.table-card { margin-right: -16px; margin-left: -16px; border-right: 0; border-left: 0; border-radius: 0; }.product-table { margin-right: 0; margin-left: 0; border: 1px solid var(--line); border-radius: var(--radius); }.auth-layout-simple { display: flex; padding: 14px; }.auth-layout-simple .auth-panel { min-height: 0; padding: 28px 22px 34px; }.auth-layout-simple .auth-panel > .brand { margin-bottom: 48px; }
}

@media (max-width: 380px) { .metric-grid { grid-template-columns: 1fr; }.metric-card.primary { grid-column: auto; }.summary-pair { grid-template-columns: 1fr; }.hero h1 { font-size: 2.8rem; } }
