:root {
  --ink: #24201e;
  --muted: #746b66;
  --paper: #fffdf9;
  --surface: #f7f0e8;
  --line: #e7dcd1;
  --accent: #b55337;
  --accent-dark: #8c3d28;
  --success: #27734c;
  --shadow: 0 16px 45px rgba(70, 44, 32, .09);
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: Inter, "Segoe UI", sans-serif; line-height: 1.5; }
a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
.site-header { min-height: 70px; padding: 14px max(24px, calc((100vw - 1180px) / 2)); display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); background: rgba(255,253,249,.96); position: sticky; top: 0; z-index: 5; }
.brand { color: var(--ink); font-family: Georgia, serif; font-weight: 700; font-size: 25px; }
.site-header nav { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
.container { width: min(1180px, calc(100% - 32px)); margin: 42px auto 80px; }
.site-footer { padding: 24px max(24px, calc((100vw - 1180px) / 2)); color: var(--muted); border-top: 1px solid var(--line); font-size: 14px; }
.site-footer p { margin: 4px 0; }
h1, h2 { font-family: Georgia, serif; line-height: 1.14; }
h1 { font-size: clamp(34px, 5vw, 56px); margin: 4px 0 14px; letter-spacing: -.035em; }
h2 { font-size: 24px; margin-top: 0; }
.eyebrow { margin: 0; color: var(--accent); font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.muted, small { color: var(--muted); }
.micro { font-size: 12px; }
.auth-card { width: min(520px, 100%); margin: 70px auto; padding: 38px; border: 1px solid var(--line); border-radius: 24px; background: white; box-shadow: var(--shadow); }
.auth-card.wide { width: min(650px, 100%); }
.auth-card .price { color: var(--accent-dark); font: 700 30px Georgia, serif; }
.field { margin: 18px 0; }
.field > label:not(.checkbox) { display: block; margin-bottom: 7px; font-weight: 700; }
input, textarea, select { width: 100%; padding: 12px 14px; border: 1px solid #cfc1b6; border-radius: 10px; background: white; color: var(--ink); font: inherit; }
input:focus, textarea:focus, select:focus { outline: 3px solid rgba(181,83,55,.18); border-color: var(--accent); }
.checkbox { display: flex; align-items: flex-start; gap: 10px; }
.checkbox input { width: 18px; height: 18px; margin-top: 3px; flex: 0 0 auto; }
.error { color: #a22121; font-size: 14px; margin: 5px 0; }
.button { display: inline-flex; min-height: 44px; padding: 10px 18px; align-items: center; justify-content: center; border-radius: 11px; border: 1px solid transparent; font: inherit; font-weight: 800; cursor: pointer; }
.button:hover { text-decoration: none; }
.button.primary { color: white; background: var(--accent); }
.button.primary:hover { background: var(--accent-dark); }
.button.quiet { color: var(--ink); background: white; border-color: var(--line); }
.button.disabled { color: #877d77; background: #eee9e4; cursor: not-allowed; }
.button.full { width: 100%; }
.inline { display: inline; }
.link-button { border: 0; padding: 0; background: none; color: var(--accent-dark); font: inherit; cursor: pointer; }
.after-form { margin-top: 22px; }
.notice { max-width: 800px; margin: 0 auto 20px; padding: 13px 16px; border-radius: 10px; background: #f0e8da; }
.notice.success { color: var(--success); background: #e6f4ec; }
.notice.error { color: #8e2020; background: #f9e7e7; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 28px; }
.panel, .summary-card { border: 1px solid var(--line); border-radius: 20px; background: white; box-shadow: var(--shadow); }
.panel { padding: 26px; }
.summary-card { padding: 24px; }
.cart-layout, .two-columns { display: grid; grid-template-columns: minmax(0, 1fr) 340px; align-items: start; gap: 24px; }
.cart-row { display: flex; align-items: center; gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.cart-row:last-child { border-bottom: 0; }
.cart-row img { width: 88px; height: 88px; object-fit: cover; border-radius: 14px; background: var(--surface); }
.grow { flex: 1; }
.item-title { color: var(--ink); font-weight: 800; }
.quantity { width: 130px; }
.quantity label { display: block; font-size: 12px; color: var(--muted); }
.quantity input { padding: 7px; margin: 4px 0; }
.quantity .button { min-height: 30px; padding: 4px 8px; font-size: 12px; }
.summary-card > strong, .summary-card .price { display: block; margin: 8px 0 18px; font: 700 30px Georgia, serif; }
.empty-state { padding: 70px 25px; text-align: center; border: 1px dashed #cdbdb0; border-radius: 20px; background: var(--surface); }
.empty-state.compact { padding: 35px; }
.line-item { display: flex; justify-content: space-between; gap: 20px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.note { padding: 14px; background: var(--surface); border-radius: 12px; }
.order-list { padding: 0; overflow: hidden; }
.order-row { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 20px 24px; color: var(--ink); border-bottom: 1px solid var(--line); }
.order-row:last-child { border: 0; }
.order-row:hover { background: var(--surface); text-decoration: none; }
.order-row small { display: block; margin-top: 3px; }
.status { padding: 7px 11px; border-radius: 999px; background: #f2e8dc; font-size: 13px; font-weight: 800; }
.order-grid { display: grid; grid-template-columns: minmax(0, 1fr) 370px; gap: 24px; align-items: start; }
.order-grid section { margin-bottom: 24px; }
.messages { max-height: 520px; overflow: auto; padding: 8px; margin: 0 -8px 20px; }
.chat-message { max-width: 80%; margin: 12px 0; padding: 12px 15px; border-radius: 4px 16px 16px; background: var(--surface); }
.chat-message.mine { margin-left: auto; border-radius: 16px 4px 16px 16px; background: #f4dfd5; }
.chat-message div { display: flex; justify-content: space-between; gap: 16px; font-size: 13px; }
.chat-message time { color: var(--muted); }
.chat-message p { margin: 7px 0 0; }
.manager-tools form + hr, .manager-tools hr { margin: 25px 0; border: 0; border-top: 1px solid var(--line); }
.success-text { color: var(--success); font-weight: 800; }
.timeline > div { display: grid; grid-template-columns: 12px 1fr; gap: 10px; }
.timeline > div > span { width: 10px; height: 10px; margin-top: 7px; border-radius: 50%; background: var(--accent); }
.timeline p { margin: 0 0 16px; }
.timeline small { display: block; }
.metrics { display: flex; gap: 18px; margin-bottom: 22px; }
.metrics div { min-width: 160px; padding: 20px; border-radius: 16px; color: white; background: var(--accent-dark); }
.metrics strong { display: block; font: 700 32px Georgia, serif; }
@media (max-width: 800px) {
  .site-header, .page-heading { align-items: flex-start; flex-direction: column; }
  .site-header { position: static; }
  .cart-layout, .two-columns, .order-grid { grid-template-columns: 1fr; }
  .cart-row { align-items: flex-start; flex-wrap: wrap; }
  .cart-row .grow { min-width: calc(100% - 110px); }
  .quantity { width: 100%; }
  .auth-card { padding: 26px 20px; margin: 30px auto; }
  .order-row { align-items: flex-start; flex-direction: column; }
}
