:root {
  color-scheme: light;
  --canvas: #f7f5f0;
  --surface: #fffdf9;
  --ink: #211e19;
  --muted: #675e52;
  --border: #e8e1d7;
  --gold: #d4ae6f;
  --dark: #252018;
  --rust: #8a4936;
  --green: #3e624f;
  --serif: 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font: 15px/1.45 var(--sans);
  background: var(--canvas);
  color: var(--ink);
}
*, *::before, *::after { box-sizing: border-box }
body { margin: 0; min-height: 100dvh }
button, input, select, textarea { font: inherit }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent }
button { color: inherit; cursor: pointer }
button:disabled { cursor: default; opacity: .55 }
a { color: inherit }
:focus-visible { outline: 2px solid #9c672d; outline-offset: 3px }
[hidden] { display: none !important }
.icon { width: 20px; height: 20px; flex: 0 0 auto; vertical-align: middle }
.brand { display: inline-flex; gap: 10px; align-items: center; font: 35px/.95 var(--serif); letter-spacing: -.045em; text-decoration: none }
.brand .icon { color: #9e6c33; width: 28px; height: 28px }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 231px; border-right: 1px solid var(--border); background: #faf8f3; padding: 33px 22px 20px; display: flex; flex-direction: column; gap: 43px; z-index: 2 }
.sidebar .brand { margin-left: 12px }
.nav-list { display: grid; gap: 5px }
.nav-link { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 9px; text-decoration: none; color: var(--muted); font-weight: 520 }
.nav-link[aria-current=page] { background: #eee5d5; color: #4e371e; font-weight: 700 }
.nav-link:hover { background: #f0eae0 }
.account { border-top: 1px solid var(--border); padding: 15px 4px 0; margin-top: auto }
.account button { width: 100%; text-align: left; background: transparent; border: none; display: flex; align-items: center; gap: 10px; padding: 4px 2px }
.account button .icon:last-child { margin-left: auto }
.avatar { display: grid; place-items: center; border-radius: 50%; background: #e9dfd0; width: 34px; height: 34px; flex: 0 0 auto; color: #694927; font-weight: 700; font-size: 13px }
.mobile-header, .mobile-nav { display: none }
.content { margin-left: 231px; padding: 39px clamp(24px, 4vw, 66px) 50px; max-width: 1510px }
.page-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 26px }
.page-top h1, .login h1 { font: 56px/.99 var(--serif); font-weight: 500; margin: 0; letter-spacing: -.048em }
.page-top p { color: var(--muted); margin: 8px 0 0 }
.kicker { font-size: 11px; text-transform: uppercase; letter-spacing: .13em; font-weight: 750 }
.button, .icon-button, .tab { border: 1px solid transparent; display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; border-radius: 9px; font-weight: 650; line-height: 1.15; padding: 10px 14px; text-decoration: none }
.button.primary { background: var(--dark); color: #fff9ec }
.button.primary:hover { background: #433524 }
.button.secondary { background: var(--surface); border-color: #ded4c5 }
.button.secondary:hover, .icon-button:hover { background: #f0eae1 }
.button.danger { background: #fbf1ed; border-color: #ecd3c9; color: #843b29 }
.button.ghost { background: transparent; color: #694927 }
.button.ghost:hover { background: #f0eae1 }
.icon-button { width: 44px; padding: 0; background: transparent; flex: 0 0 auto }
.hero { display: grid; grid-template-columns: minmax(220px, .88fr) minmax(270px, 1.12fr); gap: 28px; background: #2e271e; border-radius: 17px; padding: 26px 29px 23px; color: #fff7e8; background-image: radial-gradient(ellipse at 0% 110%, #493725, transparent 71%) }
.hero-label { color: #f3d6a4; display: flex; align-items: center; gap: 9px; font-size: 14px }
.hero-label .icon { color: #e4c18a; width: 18px; height: 18px }
.hero-figure { font: clamp(38px, 4vw, 60px)/1.12 var(--serif); font-variant-numeric: lining-nums; letter-spacing: -.045em; margin: 9px 0 12px; overflow-wrap: anywhere }
.hero-detail { display: flex; gap: 9px; flex-wrap: wrap; color: #f0d9bd; font-size: 13px }
.hero-detail strong { color: #fff4e1 }
.hero-series { border-left: 1px solid #5d4c37; padding-left: 25px; min-width: 0 }
.hero-series .kicker { color: #e5c89e; margin-bottom: 4px }
.chart { display: grid; grid-template-columns: repeat(7, 1fr); gap: clamp(4px, 1.3vw, 15px); margin-top: 12px }
.chart-day { display: grid; grid-template-rows: 78px auto; justify-items: center; gap: 6px; color: #efdbbf; font-size: 10px; min-width: 0 }
.chart-bar { width: 100%; height: 100%; display: block; border: 0; border-radius: 5px; appearance: none; background: transparent; color: #ae8750 }
.chart-bar::-webkit-progress-bar { background: transparent }
.chart-bar::-webkit-progress-value { background: #ae8750 }
.chart-bar::-moz-progress-bar { background: #ae8750 }
.chart-day:last-child .chart-bar { color: #f5d49a }
.chart-day:last-child .chart-bar::-webkit-progress-value { background: #f5d49a }
.chart-day:last-child .chart-bar::-moz-progress-bar { background: #f5d49a }
.bar-slot { display: flex; justify-content: center; align-items: center; height: 78px; width: 100%; overflow: hidden }
.bar-slot > progress { flex: none; width: 78px; height: 36px; transform: rotate(-90deg); clip-path: inset(0 0 0 0 round 4px) }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 13px; margin-top: 15px }
.stat { text-decoration: none; display: block; border: 1px solid var(--border); background: var(--surface); border-radius: 13px; padding: 15px 16px }
.stat:hover { border-color: #c6a978 }
.stat-label { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 13px; margin-bottom: 5px }
.stat-label .icon { width: 17px; height: 17px; color: #916639 }
.stat strong { display: block; font: 30px/1.15 var(--serif); font-variant-numeric: lining-nums; overflow-wrap: anywhere }
.stat small { color: var(--muted); display: block; margin-top: 3px }
.section-head { display: flex; align-items: center; justify-content: space-between; margin: 25px 0 10px; gap: 10px }
.section-head h2, .login h2 { font: 28px/1 var(--serif); letter-spacing: -.035em; margin: 0 }
.section-head a .icon { width: 15px; height: 15px }
.section-head a { color: #6e4b26; text-decoration-thickness: 1px; text-underline-offset: 4px; white-space: nowrap; font-weight: 600; font-size: 13px }
.panel { border: 1px solid var(--border); background: var(--surface); border-radius: 13px; overflow: hidden }
.list-row { width: 100%; appearance: none; display: grid; grid-template-columns: 40px minmax(0, 1fr) minmax(0, auto) 17px; align-items: center; text-align: left; gap: 11px; padding: 12px 15px; border: 0; border-bottom: 1px solid var(--border); background: var(--surface) }
.list-row:last-child { border-bottom: 0 }
.list-row:hover { background: #faf4e9 }
.row-icon { display: grid; place-items: center; background: #f1e9dc; color: #876037; width: 36px; height: 36px; border-radius: 9px }
.row-icon .icon { width: 18px; height: 18px }
.list-row .chev { color: #8b7f71; width: 16px; height: 16px }
.row-title, .row-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block }
.row-title { font-weight: 700 }
.row-sub { color: var(--muted); font-size: 13px; margin-top: 2px }
.row-end { text-align: right; font-weight: 700; overflow-wrap: anywhere }
.row-end small { display: block; font-weight: 550; color: var(--muted); font-size: 11px }
.empty { padding: 30px 16px; text-align: center; color: var(--muted) }
.filters { display: flex; flex-wrap: wrap; align-items: end; gap: 9px; margin-bottom: 12px }
.filters .search { flex: 1 1 220px }
.controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center }
.tabs { display: inline-flex; gap: 3px; padding: 3px; border: 1px solid var(--border); background: #efeae1; border-radius: 10px; margin: 0 0 13px; max-width: 100% }
.tab { min-height: 36px; border: 0; padding: 8px 12px; background: transparent; color: var(--muted); font-size: 13px; white-space: nowrap }
.tab[aria-pressed=true] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px #3324101c }
.search { position: relative }
.search .icon { position: absolute; left: 12px; top: 12px; color: var(--muted); width: 18px; height: 18px }
.search input { padding-left: 39px }
label, .field { display: grid; gap: 5px; min-width: 0; font-weight: 630; font-size: 13px }
input, select, textarea { color: var(--ink); background: var(--surface); border: 1px solid #ded4c5; border-radius: 8px; padding: 9px 10px; min-height: 43px; width: 100%; font-size: 16px; font-weight: 450 }
textarea { min-height: 76px; resize: vertical }
input[type=date] { appearance: none; width: 100%; min-width: 0 }
.filter-date { flex: 1 1 124px; max-width: 175px }
.filters select { width: auto; max-width: 100%; min-width: 130px }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 11px }
.sheet { border: 1px solid var(--border); border-radius: 17px; color: var(--ink); background: var(--surface); padding: 0; width: min(560px, calc(100vw - 26px)); max-height: min(90dvh, 810px); overscroll-behavior: contain; box-shadow: 0 18px 60px #231b1640 }
.sheet::backdrop { background: #29201777 }
.sheet-header { background: var(--surface); display: flex; align-items: center; justify-content: space-between; gap: 8px; position: sticky; z-index: 1; top: 0; border-bottom: 1px solid var(--border); padding: 12px 15px 12px 19px }
.sheet-header h2 { font: 29px/1.1 var(--serif); letter-spacing: -.045em; margin: 0 }
.sheet-body { padding: 17px 19px 20px; display: grid; gap: 13px }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px }
.form { display: grid; gap: 12px }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap }
.form-actions .primary { flex: none }
.form-error { color: #872e1b; margin: 0; overflow-wrap: anywhere; font-size: 13px }
.form-error:empty { display: none }
.muted { color: var(--muted) }
.notice { padding: 10px 13px; border: 1px solid #ded1bb; background: #f7ecd8; border-radius: 9px; color: #604826; font-size: 13px }
.subheading { margin: 4px 0 0; font-size: 15px }
.status { display: inline-flex; border-radius: 6px; font-size: 11px; line-height: 1.2; padding: 4px 6px; color: #6e502b; background: #f3e6d2; font-weight: 700 }
.status.good { background: #e5eee5; color: #395642 }
.status.bad { background: #fae9e1; color: #853d2a }
.detail-total { font: 40px/1.12 var(--serif); letter-spacing: -.045em; margin: 0; overflow-wrap: anywhere; font-variant-numeric: lining-nums }
dl.info { display: grid; grid-template-columns: minmax(85px, auto) minmax(0, 1fr); padding: 0; gap: 7px 13px; margin: 0; font-size: 14px }
.info dt { color: var(--muted) }
.info dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere }
.mini-row { display: flex; align-items: center; gap: 10px; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--border) }
.mini-row:last-child { border-bottom: none }
.mini-row > span:first-child { overflow-wrap: anywhere; min-width: 0 }
.mini-row small { color: var(--muted); display: block }
.mini-row strong { text-align: right }
.lines { display: grid; gap: 9px }
.line { padding: 10px; border: 1px solid var(--border); border-radius: 9px; background: #fbf8f2; display: grid; gap: 7px }
.line-head, .total-row { display: flex; justify-content: space-between; align-items: center; gap: 8px }
.line-head span { font-weight: 700; overflow-wrap: anywhere }
.line-head .icon-button { min-height: 40px; width: 40px }
.total-row { padding: 6px 0; overflow-wrap: anywhere }
.total-row strong { font-size: 20px }
.login { min-height: 100dvh; padding: 23px; display: grid; place-items: center; background: radial-gradient(ellipse at 30% 100%, #e8dbc5, transparent 71%), var(--canvas) }
.login-card { width: min(100%, 440px); padding: 31px; display: grid; gap: 21px; background: var(--surface); border: 1px solid var(--border); border-radius: 17px }
.login-card > p { margin: -12px 0 0; color: var(--muted) }
.login-card h1 { font-size: 46px }
.login-card .brand { margin-bottom: 6px }
.boot { padding: 30px; color: var(--muted) }
.notices { position: fixed; z-index: 10; bottom: 20px; right: 20px; left: 20px; pointer-events: none; display: grid; justify-items: end }
.notices span { color: #fff8e9; background: #33291f; max-width: 390px; padding: 10px 15px; border-radius: 9px; box-shadow: 0 4px 22px #30231344 }
.offline { position: sticky; top: 0; z-index: 3; padding: 9px 12px; background: #f3e6d2; color: #5e4424; border-radius: 8px; margin-bottom: 10px }
@media (max-width: 960px) {
  .sidebar { width: 187px; padding-inline: 14px }
  .content { margin-left: 187px; padding-inline: 22px }
}
@media (max-width: 760px) {
  .sidebar { display: none }
  .mobile-header { display: flex; align-items: center; justify-content: space-between; padding: calc(9px + env(safe-area-inset-top)) 16px 9px; border-bottom: 1px solid var(--border); background: #faf8f3 }
  .mobile-header .brand { font-size: 29px }
  .mobile-header .brand .icon { width: 24px; height: 24px }
  .mobile-header button { background: transparent; border: 0; min-width: 44px; min-height: 44px; display: grid; place-items: center }
  .mobile-nav { display: grid; position: fixed; inset: auto 0 0; z-index: 3; grid-template-columns: repeat(5, 1fr); background: #fffdf9; border-top: 1px solid var(--border); padding: 4px max(4px, env(safe-area-inset-left)) calc(5px + env(safe-area-inset-bottom)) max(4px, env(safe-area-inset-right)) }
  .mobile-nav .nav-link { flex-direction: column; gap: 3px; font-size: 10px; padding: 5px 1px; border-radius: 8px; min-height: 45px }
  .mobile-nav .nav-link .icon { width: 18px; height: 18px }
  .content { margin: 0; padding: 20px max(13px, env(safe-area-inset-right)) calc(79px + env(safe-area-inset-bottom)) max(13px, env(safe-area-inset-left)) }
  .page-top { align-items: center; margin-bottom: 15px; gap: 8px }
  .page-top h1 { font-size: 43px }
  .page-top p { margin-top: 4px; font-size: 13px }
  .page-top .button { font-size: 13px; padding-inline: 9px; min-width: max-content }
  .hero { grid-template-columns: 1fr; gap: 14px; padding: 17px 16px 15px; border-radius: 13px }
  .hero-label { font-size: 13px }
  .hero-figure { margin: 5px 0 6px; font-size: 45px }
  .hero-series { border-left: 0; border-top: 1px solid #5d4c37; padding: 10px 0 0 }
  .chart { margin-top: 7px; gap: 6px }
  .chart-day { grid-template-rows: 51px auto; gap: 3px }
  .bar-slot { height: 51px }
  .bar-slot > progress { width: 51px; height: 26px }
  .stats { gap: 6px; margin-top: 9px }
  .stat { padding: 8px 7px; border-radius: 9px }
  .stat-label { font-size: 11px; gap: 4px; min-height: 26px; line-height: 1.1 }
  .stat-label .icon { width: 13px; height: 13px }
  .stat strong { font-size: clamp(16px, 5vw, 25px) }
  .stat small { font-size: 10px }
  .section-head { margin-top: 18px }
  .section-head h2 { font-size: 24px }
  .list-row { padding: 10px 8px; grid-template-columns: 33px minmax(0,1fr) minmax(0,auto) 13px; gap: 7px }
  .row-icon { width: 31px; height: 31px }
  .row-title, .row-end { font-size: 13px }
  .row-sub { font-size: 11px }
  .notices { bottom: calc(70px + env(safe-area-inset-bottom)) }
  .sheet { margin: auto auto 0; width: 100%; max-width: 100%; max-height: min(92dvh, 840px); border-radius: 16px 16px 0 0; border-bottom: 0 }
  .sheet-body { padding: 14px 14px calc(18px + env(safe-area-inset-bottom)) }
  .sheet-header { padding: 8px 10px 8px 14px }
  .sheet-header h2 { font-size: 25px }
}
@media (max-width: 360px) {
  .page-top h1 { font-size: 36px }
  .page-top .button { min-width: 0 }
  .stat-label .icon { display: none }
  .filter-date { flex-basis: 45% }
  .login-card { padding: 21px }
}

.brand { font-size: 27px; font-weight: 560; letter-spacing: -.055em; gap: 8px; white-space: nowrap }
.brand img { width: 36px; height: 36px; border-radius: 8px; display: block; flex: none; border: 1px solid #59432c }
.sidebar .brand { margin-left: 3px }
.login {
  background: radial-gradient(ellipse at 50% 0%, #34261d, transparent 65%), #131211;
  color: #f8efe3;
  padding: max(20px, env(safe-area-inset-top)) 18px max(20px, env(safe-area-inset-bottom));
}
.login-card { background: #211b17; border-color: #594532; padding: 24px; gap: 20px }
.login-logo { display: block; max-width: min(100%, 270px); width: 100%; height: auto; margin: 0 auto; border-radius: 12px; border: 1px solid #5b4733 }
.login h1 { text-align: center; font-size: 35px }
.login input, .login select { background: #141211; border-color: #7a6045; color: #fff5e4 }
.login .form-error { color: #ffc3af }
.login .button.primary { color: #2a1e13; background: #e5ba78; border-color: #e5ba78 }
.login .button.primary:hover { background: #f0cb97 }
@media (max-width: 760px) {
  .mobile-header .brand { font-size: 27px }
  .mobile-header .brand img { width: 32px; height: 32px }
  .login-card { padding: 19px }
  .login-logo { max-width: min(100%, 236px) }
}
.login .notice { margin: 0 }
