:root {
  --paper: #f5f5f2;
  --white: #fff;
  --ink: #242724;
  --muted: #626960;
  --line: #e0e4dc;
  --lime: #d9edaa;
  --green: #345e43;
  --soft: #edf3e7;
  --orange: #895522;
  --red: #983e38;
  --nav: #202621;
  --radius: 15px;
  color-scheme: light;
}
* { box-sizing: border-box }
body { margin: 0; font: 16px/1.5 Inter, "Segoe UI", Arial, sans-serif; background: var(--paper); color: var(--ink) }
button, input, select, textarea { font: inherit }
button { color: inherit; cursor: pointer }
button:disabled { opacity: .47; cursor: default }
a { color: var(--green); text-decoration: none }
a:hover { text-decoration: underline }
:focus-visible { outline: 3px solid #608d52; outline-offset: 3px }
h1, h2, h3, p, dl { margin: 0 }
h1 { font-size: 2.05rem; line-height: 1.12; letter-spacing: -.045em; font-weight: 690; overflow-wrap: anywhere }
h2 { font-size: 1.17rem; letter-spacing: -.02em; line-height: 1.3 }
h3 { font-size: .95rem }
small { font-size: .79rem }
svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; width: 20px; height: 20px; flex: 0 0 auto; vertical-align: middle }
.app { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh }
.sidebar { position: sticky; top: 0; align-self: start; height: 100vh; min-height: 410px; overflow: auto; display: flex; flex-direction: column; background: var(--nav); color: #f3f5f0; padding: 32px 17px 20px }
.brand { display: inline-block; margin-inline: 10px; color: #f6f6f2; font-size: 1.75rem; font-weight: 760; letter-spacing: .115em; line-height: 1.15 }
.brand:hover { text-decoration: none }
.brand span { display: block; margin-top: 9px; color: #cbd5c6; font-size: .72rem; font-weight: 620; letter-spacing: .12em }
.workspace { border: 1px solid #444e43; border-radius: 12px; margin: 32px 0 22px; padding: 10px; display: flex; gap: 9px; align-items: center; font-weight: 600; font-size: .86rem }
.workspace small, .top-user small { display: block; font-weight: 450 }
.workspace small { color: #c5cec1; margin-top: 2px }
.mark, .avatar { display: grid; place-items: center; flex: 0 0 auto; width: 36px; height: 36px; border-radius: 10px; background: var(--lime); color: #283521; font-weight: 760 }
.sidebar nav { display: grid; gap: 5px }
.sidebar nav a { display: flex; gap: 11px; align-items: center; padding: 10px 11px; color: #e0e6dd; font-size: .91rem; border-radius: 9px; min-height: 44px }
.sidebar nav a:hover { text-decoration: none; background: #343e35 }
.sidebar nav a.selected { background: var(--lime); color: #26341f; font-weight: 660 }
.side-footer { margin-top: auto; padding: 16px 10px 0; color: #c5cec1; font-size: .82rem }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #bad893; margin-right: 6px }
.main { min-width: 0 }
.topbar { display: flex; gap: 12px; align-items: center; justify-content: space-between; height: 68px; padding: 0 34px; background: var(--white); border-bottom: 1px solid var(--line) }
.top-search { display: flex; gap: 8px; align-items: center; width: 285px; border: 1px solid var(--line); border-radius: 10px; padding: 0 10px; background: var(--paper); color: var(--muted) }
.top-search input { width: 100%; height: 39px; min-width: 0; border: 0; background: transparent; padding: 0; font-size: .91rem }
.top-user { display: flex; gap: 12px; align-items: center; text-align: right; margin-left: auto }
.user-identity { font-size: .9rem; line-height: 1.2; overflow-wrap: anywhere }
.user-identity a { color: var(--ink); font-weight: 660 }
.user-identity small { color: var(--muted); margin-top: 4px }
.topbar .menu-toggle { display: none }
.content { max-width: 1510px; margin: 0 auto; padding: 30px 34px 42px }
.heading { display: flex; justify-content: space-between; align-items: end; gap: 18px; margin-bottom: 22px }
.heading p { color: var(--muted); margin-top: 8px; font-size: .94rem }
.actions { display: flex; flex-wrap: wrap; gap: 8px; flex: 0 0 auto; justify-content: flex-end }
.btn { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 13px; border: 1px solid #dce0d7; border-radius: 9px; background: var(--white); color: var(--ink); text-decoration: none; font-weight: 620; font-size: .875rem; white-space: nowrap }
.btn:hover { background: #ecf1e8; text-decoration: none }
.btn.primary { border-color: #b9d58d; background: var(--lime); color: #27351e }
.btn.primary:hover { background: #cee896 }
.btn.quiet { border-color: transparent; background: transparent; color: var(--red) }
.btn.quiet:hover { background: #f6ebe9 }
.icon-button { width: 42px; padding: 0 }
.kpis { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin-bottom: 20px }
.kpi { min-width: 0; min-height: 125px; padding: 15px 17px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); display: flex; flex-direction: column }
.kpi.featured { background: #eef4e4; border-color: #d9e6ca }
.kpi span { color: #495448; font-size: .9rem; font-weight: 630 }
.kpi strong { font-size: clamp(1.55rem, 2.6vw, 2rem); line-height: 1.2; margin: 8px 0; letter-spacing: -.04em; overflow-wrap: anywhere }
.kpi small, .muted { color: var(--muted) }
.kpi small { margin-top: auto }
.panel { min-width: 0; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 16px }
.panel.pad { padding: 19px }
.panel.pad > h2 { margin-bottom: 14px }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px }
.in-panel { padding: 0; margin-bottom: 10px }
.table-wrap { overflow-x: auto; border-radius: inherit }
table { width: 100%; border-collapse: collapse; font-size: .91rem }
th, td { padding: 11px 14px; text-align: left; vertical-align: middle }
th { font-size: .875rem; font-weight: 650; background: #f4f6f1; color: #424b40 }
td { border-top: 1px solid #edf0e9 }
td:first-child { min-width: 145px; overflow-wrap: anywhere }
td small { display: block; margin-top: 2px; color: var(--muted) }
td .strong, .strong { color: #26382b; font-weight: 680 }
.badge { display: inline-block; padding: 4px 8px; white-space: nowrap; border-radius: 999px; background: #edf0eb; color: #424d42; font-weight: 620; font-size: .81rem }
.badge.agreement { background: #fcf0dc; color: #765021 }
.badge.planned, .badge.collecting { background: #e8eff5; color: #38566f }
.badge.done { background: #e7f0dd; color: #345e43 }
.badge.cancelled { background: #f8e9e5; color: #863e34 }
.late { color: var(--red); font-weight: 650 }
.current { color: var(--green); font-weight: 650 }
.empty { padding: 32px 20px 34px; text-align: center }
.empty > svg { color: #496550; width: 29px; height: 29px; margin-bottom: 8px }
.empty p { color: var(--muted); margin-top: 5px; font-size: .91rem }
.empty .btn { margin-top: 13px }
.filters { margin-bottom: 16px; display: flex; align-items: end; gap: 9px; flex-wrap: wrap }
.filters .field { min-width: 128px }
.filters .field:first-child input, .filters .field:first-child select { min-width: min(225px,75vw) }
.overview-filter .field:first-child input { min-width: 145px }
.field { display: grid; align-content: start; gap: 5px; min-width: 0; font-size: .875rem; font-weight: 620 }
.field label, .field span { overflow-wrap: anywhere }
.field small { color: var(--muted); font-weight: 450 }
.field input, .field select, .field textarea { width: 100%; color: var(--ink); border-radius: 8px; border: 1px solid #d8dfd3; background: #fff; font-size: .94rem; font-weight: 450; padding: 8px 10px; min-height: 40px }
.field textarea { resize: vertical }
.field select { appearance: none; padding-right: 32px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' stroke='%23465446' stroke-width='1.4' fill='none'/%3E%3C/svg%3E") no-repeat right 10px center }
.field input[type=file] { padding: 6px; overflow: hidden }
.form-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 13px }
.form-grid + .form-grid { margin-top: 13px }
.form-grid .wide { grid-column: 1 / -1 }
.form-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 15px }
.product-form { border: 1px solid var(--line); border-radius: 10px; padding: 13px; margin-top: 12px; background: #fbfcfa }
.product-head { display: flex; align-items: center; justify-content: space-between; gap: 8px }
.item-section { margin-top: 10px }
.item-section + .item-section { border-top: 1px solid var(--line); padding-top: 10px }
.item-section h3 { margin-bottom: 6px }
.creator-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px }
.creator { padding: 15px; margin: 0; display: grid; gap: 14px }
.creator-head, .creator-foot { display: flex; gap: 9px; align-items: center }
.creator-head > div { min-width: 0; overflow-wrap: anywhere }
.creator-foot { justify-content: space-between; padding-top: 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: .86rem }
.creator p { color: var(--muted); font-size: .88rem }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 9px; margin: -7px 0 13px; color: var(--muted); font-size: .86rem; overflow-wrap: anywhere }
.breadcrumbs span::before { content: "/"; margin-right: 9px; color: #7c8577 }
.detail-list { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; overflow-wrap: anywhere }
.detail-list dt { color: var(--muted); font-size: .85rem }
.detail-list dd { margin: 2px 0 0; font-weight: 620; font-size: .95rem }
.multiline { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 10px }
.notice { padding: 10px 13px; border: 1px solid; border-radius: 9px; margin-bottom: 13px; font-size: .91rem; overflow-wrap: anywhere }
.notice.error { border-color: #e5c2bd; background: #faeeea; color: #8c352e }
.notice.success, .notice.info { border-color: #cddbc3; background: #eef5e8; color: #345e43 }
.split { display: grid; grid-template-columns: minmax(0,1.1fr) minmax(0,1fr); gap: 14px; align-items: start }
.check { display: flex; gap: 7px; align-items: center; margin: 12px 0 7px; font-size: .92rem }
.check input { accent-color: var(--green); width: 17px; height: 17px }
.instructions ol { margin: 0; padding-left: 20px }
.instructions li + li { margin-top: 6px }
.preview-summary { padding: 0 18px 11px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center }
.preview-summary span { color: var(--muted); font-size: .88rem }
.import-confirm { justify-content: flex-end }
.login-grid { min-height: 100vh; display: grid; grid-template-columns: 42% 1fr }
.login-brand { background: var(--nav); color: #f3f5ef; padding: clamp(26px,7vw,105px); display: flex; flex-direction: column; justify-content: space-between; gap: 80px }
.login-brand .brand { margin: 0 }
.login-brand h1 { color: var(--lime); font-size: clamp(2.5rem,6vw,5.3rem); line-height: .98 }
.login-brand p { max-width: 340px; margin-top: 22px; color: #d2ddd0 }
.login-area { padding: 25px; display: grid; place-items: center }
.login-card { width: min(100%,390px); padding: 26px; background: white; border: 1px solid var(--line); border-radius: var(--radius); display: grid; gap: 14px }
.login-card h2 { font-size: 1.5rem }
.login-card .notice { margin: 0 }
.error-page { min-height: 85vh; display: grid; place-items: center; padding: 20px }
.error-page p { margin: 10px 0 }
@media (max-width: 1150px) {
  .app { grid-template-columns: 205px minmax(0,1fr) }
  .content, .topbar { padding-left: 24px; padding-right: 24px }
  .creator-grid { grid-template-columns: repeat(2,minmax(0,1fr)) }
  .heading { align-items: start }
  .heading .actions { flex: 0 1 auto }
}
@media (max-width: 910px) {
  .kpis, .form-grid, .detail-list { grid-template-columns: repeat(2,minmax(0,1fr)) }
  .split { grid-template-columns: 1fr }
  .heading { flex-direction: column }
  .actions { justify-content: flex-start }
}
@media (max-width: 700px) {
  .app { display: block }
  .sidebar { height: auto; min-height: auto; position: static; display: none }
  .sidebar.open { display: flex }
  .sidebar .workspace, .side-footer { display: none }
  .sidebar nav { margin-top: 12px }
  .topbar { height: auto; min-height: 58px; padding: 7px 12px }
  .topbar .menu-toggle { display: inline-flex }
  .top-search { width: auto; min-width: 0; flex: 1 1 auto }
  .user-identity { max-width: 65px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
  .user-identity small { display: none }
  .content { padding: 20px 12px 32px }
  .heading { margin-bottom: 16px }
  .login-grid { grid-template-columns: 1fr }
  .login-brand { gap: 26px; padding: 26px }
  .login-brand h1 br { display: none }
  .login-brand p { margin-top: 9px }
}
@media (max-width: 440px) {
  .creator-grid, .form-grid { grid-template-columns: 1fr }
  .panel.pad { padding: 12px }
  .kpi { min-height: 103px; padding: 11px }
  .form-grid .wide { grid-column: auto }
  .filters .field { flex: 1 1 130px }
  .filters .field:first-child input { min-width: 125px }
}
