:root {
  --ink: #221e1b;
  --ink-soft: #5f5751;
  --muted: #8c827a;
  --paper: #f6f2ec;
  --surface: #fffdf9;
  --surface-2: #eee7dd;
  --line: #e7dfd5;
  --champagne: #b69173;
  --champagne-dark: #8b684f;
  --champagne-light: #d8bfa9;
  --green: #2f7259;
  --green-bg: #e8f3ed;
  --amber: #9a6820;
  --amber-bg: #fff3d8;
  --red: #a54b4b;
  --red-bg: #faeaea;
  --blue: #4f6478;
  --blue-bg: #e9eff4;
  --shadow: 0 18px 60px rgba(54, 39, 27, .08);
  --shadow-soft: 0 10px 30px rgba(54, 39, 27, .06);
  --radius: 20px;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: "Iowan Old Style", "Baskerville", "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: var(--sans); font-size: 14px; -webkit-font-smoothing: antialiased; }
a { color: var(--champagne-dark); text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
img { max-width: 100%; display: block; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 260px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 24px 16px 18px; background: #1f1b18; color: #fff; display: flex; flex-direction: column; z-index: 30; }
.brand { min-height: 80px; display: flex; align-items: center; gap: 12px; padding: 8px 10px 22px; color: #fff; border-bottom: 1px solid rgba(255,255,255,.09); }
.brand img { width: 58px; height: 58px; border-radius: 15px; object-fit: cover; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.brand strong { display: block; font-family: var(--serif); font-size: 19px; font-weight: 500; letter-spacing: .22em; }
.brand span { display: block; margin-top: 5px; font-size: 9px; letter-spacing: .22em; color: #b7aca4; }
.nav-list { display: grid; gap: 4px; padding: 24px 0; overflow-y: auto; scrollbar-width: none; }
.nav-item { position: relative; display: flex; align-items: center; gap: 12px; padding: 11px 13px; border-radius: 12px; color: #bdb4ad; transition: .18s ease; }
.nav-item i { width: 25px; font-style: normal; font-size: 17px; text-align: center; color: #a99586; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.05); }
.nav-item.active { color: #fff; background: linear-gradient(120deg, rgba(182,145,115,.30), rgba(182,145,115,.10)); box-shadow: inset 0 0 0 1px rgba(216,191,169,.20); }
.nav-item.active::before { content: ""; position: absolute; left: -16px; width: 3px; height: 22px; border-radius: 0 5px 5px 0; background: var(--champagne-light); }
.sidebar-foot { margin-top: auto; padding: 18px 8px 0; border-top: 1px solid rgba(255,255,255,.09); display: grid; gap: 12px; }
.user-chip { display: flex; align-items: center; gap: 10px; }
.user-chip > span { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: #29211c; background: linear-gradient(135deg, #ead7c4, #a67f61); font-weight: 700; }
.user-chip strong, .user-chip small { display: block; }
.user-chip strong { font-size: 12px; }
.user-chip small { color: #9d938c; margin-top: 3px; }
.link-button { border: 0; padding: 0; background: none; color: #b4aaa3; cursor: pointer; font-size: 12px; }
.link-button:hover { color: #fff; }

.main-area { min-width: 0; }
.topbar { height: 104px; padding: 0 32px; display: flex; align-items: center; justify-content: space-between; gap: 20px; background: rgba(246,242,236,.90); backdrop-filter: blur(16px); position: sticky; top: 0; z-index: 20; border-bottom: 1px solid rgba(222,212,202,.72); }
.topbar h1 { margin: 5px 0 0; font-family: var(--serif); font-weight: 500; font-size: 29px; letter-spacing: -.02em; }
.eyebrow { display: block; color: var(--champagne-dark); font-size: 9px; font-weight: 700; letter-spacing: .20em; line-height: 1.4; }
.menu-button { display: none; border: 1px solid var(--line); width: 42px; height: 42px; border-radius: 12px; background: var(--surface); }
.content { padding: 28px 32px 42px; max-width: 1540px; margin: 0 auto; }
.app-footer { margin: 0 32px; padding: 20px 0 26px; display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; border-top: 1px solid var(--line); }

.button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 18px; border: 1px solid transparent; border-radius: 12px; font-weight: 650; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
.button:hover { transform: translateY(-1px); }
.button.primary { color: #fff; background: linear-gradient(135deg, #a47d60, #73513d); box-shadow: 0 9px 24px rgba(119,80,55,.22); }
.button.ghost { color: var(--ink); border-color: var(--line); background: var(--surface); }
.button.light { color: var(--ink); background: #f8eee4; border-color: rgba(255,255,255,.35); }
.button.compact { min-height: 38px; padding: 0 13px; border-radius: 10px; font-size: 12px; }
.button:disabled { cursor: not-allowed; opacity: .45; transform: none; }
.danger-button { color: #fff; background: var(--red); }

.alert { max-width: calc(1540px - 64px); margin: 18px auto 0; padding: 13px 16px; border-radius: 12px; border: 1px solid; line-height: 1.5; }
.alert.success { color: var(--green); background: var(--green-bg); border-color: #cbe2d4; }
.alert.warning { color: var(--amber); background: var(--amber-bg); border-color: #edd9a9; }
.alert.danger { color: var(--red); background: var(--red-bg); border-color: #efcaca; }
.content > .alert { margin: 0 0 18px; }

.welcome-strip { margin-bottom: 22px; padding: 26px 28px; border-radius: var(--radius); display: flex; align-items: center; justify-content: space-between; gap: 20px; background: linear-gradient(112deg, #2c2622, #42362e); color: #fff; box-shadow: var(--shadow); overflow: hidden; position: relative; }
.welcome-strip::after { content: "NP"; position: absolute; right: 180px; top: -37px; font-family: var(--serif); font-size: 150px; color: rgba(255,255,255,.035); }
.welcome-strip h2 { margin: 7px 0 5px; font-family: var(--serif); font-size: 28px; font-weight: 500; }
.welcome-strip p { margin: 0; color: #cfc6c0; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; margin-bottom: 18px; }
.metric-grid.three { grid-template-columns: repeat(3, minmax(0,1fr)); }
.metric-card { min-height: 132px; padding: 20px; display: flex; align-items: flex-start; gap: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-soft); }
.metric-card.accent { background: linear-gradient(145deg, #fffdf9, #f1e5d8); border-color: #deccb9; }
.metric-icon { flex: 0 0 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; color: var(--champagne-dark); background: #f0e5db; font-family: var(--serif); font-size: 20px; }
.metric-card small, .metric-card strong, .metric-card div > span { display: block; }
.metric-card small { color: var(--muted); font-size: 11px; }
.metric-card strong { margin: 10px 0 7px; font-family: var(--serif); font-size: clamp(20px,2vw,29px); font-weight: 500; white-space: nowrap; }
.metric-card div > span { color: var(--muted); font-size: 10px; }
.text-danger { color: var(--red) !important; }

.action-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin-bottom: 18px; }
.action-grid > a { padding: 15px 17px; display: flex; align-items: center; gap: 13px; background: rgba(255,253,249,.68); border: 1px solid var(--line); border-radius: 15px; color: var(--ink); }
.action-grid > a:hover { background: var(--surface); box-shadow: var(--shadow-soft); }
.action-grid i { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; font-style: normal; font-size: 10px; color: var(--champagne-dark); background: var(--surface-2); }
.action-grid div { min-width: 0; flex: 1; }
.action-grid strong, .action-grid span { display: block; }
.action-grid strong { font-size: 12px; }
.action-grid span { margin-top: 4px; color: var(--muted); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.action-grid b { color: var(--champagne); }

.panel { padding: 21px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-soft); min-width: 0; }
.panel-head { min-height: 44px; margin-bottom: 18px; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.panel-head.wrap { flex-wrap: wrap; }
.panel-head h3, .panel > h3 { margin: 6px 0 0; font-family: var(--serif); font-size: 21px; font-weight: 500; }
.panel-head > a { font-size: 11px; font-weight: 650; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0,2fr) minmax(290px,.8fr); gap: 18px; }
.span-2 { grid-column: span 2; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th { padding: 11px 12px; color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .12em; text-align: left; text-transform: uppercase; border-bottom: 1px solid var(--line); }
td { padding: 14px 12px; border-bottom: 1px solid #eee8e1; vertical-align: middle; color: var(--ink-soft); font-size: 12px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fcf8f3; }
td small, td .invoice-link { display: block; }
td small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.right { text-align: right; }
.strong { color: var(--ink); font-weight: 700; }
.invoice-link { color: var(--ink); font-weight: 700; letter-spacing: .02em; }
.badge { display: inline-flex; align-items: center; min-height: 25px; padding: 3px 9px; border-radius: 999px; font-size: 9px; font-weight: 700; white-space: nowrap; }
.badge.success { color: var(--green); background: var(--green-bg); }
.badge.warning { color: var(--amber); background: var(--amber-bg); }
.badge.danger { color: var(--red); background: var(--red-bg); }
.badge.info { color: var(--blue); background: var(--blue-bg); }
.tag { display: inline-block; padding: 5px 8px; border-radius: 7px; color: var(--champagne-dark); background: #f2e9df; font-size: 9px; font-weight: 700; }
.empty-state { padding: 40px 20px; color: var(--muted); text-align: center; border: 1px dashed #ded4c9; border-radius: 14px; background: #fcfaf7; }
.empty-state.compact { padding: 22px 12px; }

.reminder-list { display: grid; gap: 2px; }
.reminder-list a { display: flex; align-items: center; gap: 11px; padding: 12px 5px; color: var(--ink); border-bottom: 1px solid #eee8e1; }
.reminder-list a:last-child { border-bottom: 0; }
.reminder-list div { min-width: 0; flex: 1; }
.reminder-list strong, .reminder-list small { display: block; }
.reminder-list strong { font-size: 11px; }
.reminder-list small { margin-top: 3px; color: var(--muted); font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reminder-list b { color: var(--muted); font-size: 9px; }
.reminder-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 4px var(--blue-bg); }
.reminder-dot.amber { background: var(--amber); box-shadow: 0 0 0 4px var(--amber-bg); }
.reminder-dot.green { background: var(--green); box-shadow: 0 0 0 4px var(--green-bg); }

.batch-spotlight { margin-top: 18px; padding: 23px 26px; display: grid; grid-template-columns: minmax(260px,1fr) auto auto auto; align-items: center; gap: 32px; border-radius: var(--radius); color: #fff; background: linear-gradient(110deg,#a67e60,#79553f); box-shadow: 0 18px 45px rgba(108,71,49,.20); }
.batch-spotlight h3 { margin: 7px 0 4px; font-family: var(--serif); font-size: 22px; font-weight: 500; }
.batch-spotlight p { margin: 0; color: #eaded5; font-size: 11px; }
.batch-spotlight .eyebrow { color: #f0d6bf; }
.batch-stat span, .batch-stat small { display: block; }
.batch-stat span { font-family: var(--serif); font-size: 20px; }
.batch-stat small { margin-top: 4px; color: #eaded5; font-size: 9px; }

.page-grid { display: grid; gap: 18px; align-items: start; }
.page-grid.form-side { grid-template-columns: minmax(300px,.72fr) minmax(0,1.55fr); }
.page-grid.equal { grid-template-columns: repeat(2,minmax(0,1fr)); margin-bottom: 18px; }
.wide-panel { min-width: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.stack-form { display: grid; gap: 14px; }
.field { min-width: 0; display: grid; gap: 7px; color: var(--ink-soft); font-size: 10px; font-weight: 650; }
.field input, .field select, .field textarea, .search-box input, .filter-bar input, .filter-bar select, .date-filter input { width: 100%; min-height: 43px; padding: 10px 12px; color: var(--ink); background: #fffdfa; border: 1px solid #ddd4cb; border-radius: 10px; outline: none; transition: border-color .15s, box-shadow .15s; }
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .search-box input:focus, .filter-bar input:focus, .filter-bar select:focus { border-color: var(--champagne); box-shadow: 0 0 0 3px rgba(182,145,115,.13); }
.field input[type=file] { padding: 8px; font-size: 10px; }
.field small { color: var(--muted); font-weight: 400; }
.field > a { font-size: 9px; }
.money-control { position: relative; width: 100%; min-width: 0; display: block; }
.money-control .money-prefix { position: absolute; top: 1px; bottom: 1px; left: 1px; min-width: 42px; padding: 0 8px; display: grid; place-items: center; border-right: 1px solid #e7ddd3; border-radius: 9px 0 0 9px; color: var(--champagne-dark); background: #f5ede5; font-size: 11px; font-weight: 750; pointer-events: none; }
.money-control input { padding-left: 52px; text-align: right; font-variant-numeric: tabular-nums; font-weight: 650; letter-spacing: .02em; }
.money-control:focus-within .money-prefix { color: #fff; background: linear-gradient(135deg,#a47d60,#79573f); border-color: transparent; }
.form-divider { position: relative; margin: 4px 0; color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .15em; text-align: center; }
.form-divider::before { content:""; position:absolute; left:0; right:0; top:50%; height:1px; background:var(--line); }
.form-divider span { position:relative; padding:0 10px; background:var(--surface); }
.check-row { display: flex; gap: 10px; align-items: flex-start; color: var(--ink-soft); font-size: 11px; line-height: 1.5; }
.check-row input { margin-top: 2px; }
.count-pill, .step-chip { padding: 6px 10px; border-radius: 999px; color: var(--champagne-dark); background: #f0e5db; font-size: 9px; font-weight: 700; }

.batch-list, .customer-list, .shipment-list, .purchase-list { display: grid; gap: 9px; }
.batch-row { padding: 13px; display: grid; grid-template-columns: 48px minmax(180px,1fr) auto auto; gap: 14px; align-items: center; border: 1px solid var(--line); border-radius: 14px; }
.batch-date { width: 48px; height: 52px; display: grid; place-content: center; text-align: center; border-radius: 11px; background: #f1e8de; }
.batch-date strong { font-family: var(--serif); font-size: 20px; line-height: 1; }
.batch-date span { margin-top: 4px; color: var(--champagne-dark); font-size: 8px; font-weight: 700; }
.batch-main { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.batch-main h4 { margin: 0 0 5px; font-size: 12px; }
.batch-main div > span { color: var(--muted); font-size: 9px; }
.batch-numbers { display: flex; gap: 24px; }
.batch-numbers div { min-width: 75px; }
.batch-numbers strong, .batch-numbers span { display: block; }
.batch-numbers strong { font-family: var(--serif); font-size: 16px; font-weight: 500; }
.batch-numbers span { margin-top: 4px; color: var(--muted); font-size: 8px; }
.icon-button { width: 34px; height: 34px; display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: var(--surface); cursor: pointer; }
.danger-icon { color: var(--red); }

.customer-row { padding: 13px; display: grid; grid-template-columns: 42px minmax(160px,1fr) auto auto auto; gap: 15px; align-items: center; border-bottom: 1px solid var(--line); }
.customer-row:last-child { border-bottom: 0; }
.avatar { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: linear-gradient(135deg,#c29c7d,#7f5b44); font-family: var(--serif); font-size: 17px; }
.customer-main strong, .customer-main span, .customer-stat strong, .customer-stat span { display: block; }
.customer-main strong { font-size: 12px; }
.customer-main span { margin-top: 4px; color: var(--muted); font-size: 9px; }
.customer-stat { min-width: 85px; }
.customer-stat strong { font-family: var(--serif); font-size: 15px; font-weight: 500; }
.customer-stat span { margin-top: 3px; color: var(--muted); font-size: 8px; }
.row-actions { display: flex; gap: 5px; }
.search-box { display: flex; min-width: 240px; }
.search-box input { border-radius: 10px 0 0 10px; }
.search-box button { width: 42px; border: 0; border-radius: 0 10px 10px 0; color: #fff; background: var(--champagne-dark); cursor: pointer; }

.summary-line { margin-bottom: 18px; display: flex; gap: 1px; border: 1px solid var(--line); border-radius: 15px; overflow: hidden; background: var(--line); }
.summary-line > div { min-width: 0; flex: 1; padding: 15px 18px; background: var(--surface); }
.summary-line span, .summary-line strong { display: block; }
.summary-line span { color: var(--muted); font-size: 9px; }
.summary-line strong { margin-top: 6px; font-family: var(--serif); font-size: 18px; font-weight: 500; }
.filter-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.filter-bar input { min-width: 210px; }
.filter-bar select { width: auto; min-width: 150px; }

.order-create-layout { display: grid; grid-template-columns: minmax(0,1fr) 320px; align-items: start; gap: 18px; }
.order-form { display: grid; gap: 16px; }
.order-summary-card { position: sticky; top: 122px; padding: 24px; color: #fff; background: linear-gradient(145deg,#302923,#1e1a17); border-radius: var(--radius); box-shadow: 0 24px 60px rgba(42,31,24,.20); }
.order-summary-card h3 { margin: 8px 0 7px; font-family: var(--serif); font-size: 24px; font-weight: 500; }
.order-summary-card > p { margin: 0 0 22px; color: #bdb3ac; font-size: 11px; line-height: 1.6; }
.order-summary-card .eyebrow { color: #d2b69e; }
.summary-calc { padding: 14px 0; border-top: 1px solid rgba(255,255,255,.12); border-bottom: 1px solid rgba(255,255,255,.12); }
.summary-calc > div { padding: 7px 0; display: flex; justify-content: space-between; gap: 15px; color: #c9c1bb; font-size: 10px; }
.summary-calc strong { color: #fff; font-size: 11px; }
.summary-calc .summary-total { margin-top: 8px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.08); color: #fff; }
.summary-calc .summary-total strong { font-family: var(--serif); font-size: 22px; font-weight: 500; }
.info-note { margin: 16px 0; padding: 13px; display: grid; gap: 5px; border-radius: 11px; background: #f3ebe3; color: var(--ink); }
.order-summary-card .info-note { color: #dfd3ca; background: rgba(255,255,255,.07); }
.info-note b { font-size: 10px; }
.info-note span { font-size: 9px; line-height: 1.5; }
.order-summary-card .button { width: 100%; margin-top: 4px; }
.item-card { margin-top: 12px; border: 1px solid var(--line); border-radius: 15px; overflow: hidden; background: #fdfaf6; }
.item-card:first-child { margin-top: 0; }
.item-card-head { padding: 10px 14px; display: flex; justify-content: space-between; align-items: center; color: var(--champagne-dark); background: #f2e9df; font-size: 9px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.item-card-head button { width: 27px; height: 27px; border: 0; border-radius: 7px; background: rgba(255,255,255,.65); cursor: pointer; }
.item-card-head button:disabled { display: none; }
.item-card .form-grid { padding: 15px; }
.mobile-submit { display: none; }

.detail-head { margin-bottom: 18px; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.detail-head h2 { margin: 7px 0 4px; font-family: var(--serif); font-size: 32px; font-weight: 500; }
.detail-head p { margin: 0; color: var(--muted); }
.back-link { display: block; margin-bottom: 16px; font-size: 10px; }
.detail-actions { display: flex; gap: 9px; }
.order-status-strip { margin-bottom: 18px; padding: 17px 20px; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.order-status-strip > div { padding-right: 15px; border-right: 1px solid var(--line); }
.order-status-strip > div:last-child { border-right: 0; }
.order-status-strip span, .order-status-strip strong { display: block; }
.order-status-strip > div > span { color: var(--muted); font-size: 9px; }
.order-status-strip > div > strong { margin-top: 7px; font-family: var(--serif); font-size: 17px; font-weight: 500; }
.detail-grid { display: grid; grid-template-columns: minmax(0,1fr) 310px; gap: 18px; align-items: start; }
.detail-main, .detail-side { display: grid; gap: 16px; }
.product-detail-list { display: grid; gap: 2px; }
.product-detail-list article { padding: 15px 4px; display: grid; grid-template-columns: 38px minmax(0,1fr) auto auto; gap: 14px; align-items: center; border-bottom: 1px solid var(--line); }
.product-index { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 9px; background: #f0e7dd; color: var(--champagne-dark); font-family: var(--serif); }
.product-info strong, .product-info span, .product-info a, .product-cost span, .product-cost strong, .product-cost small { display: block; }
.product-info strong { font-size: 12px; }
.product-info span, .product-info a, .product-cost span, .product-cost small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.product-cost { text-align: right; min-width: 150px; }
.product-cost strong { margin-top: 4px; font-family: var(--serif); font-size: 16px; font-weight: 500; }
.invoice-total { margin-top: 16px; padding: 16px; border-radius: 13px; background: #f5eee7; }
.invoice-total > div { display: flex; justify-content: space-between; gap: 15px; padding: 6px 0; color: var(--ink-soft); }
.invoice-total .grand { margin-top: 7px; padding-top: 13px; border-top: 1px solid #dfd2c6; color: var(--ink); }
.invoice-total .grand strong { font-family: var(--serif); font-size: 22px; font-weight: 500; }
.contact-list { margin-top: 16px; display: grid; gap: 12px; }
.contact-list div { padding-bottom: 11px; border-bottom: 1px solid var(--line); }
.contact-list span, .contact-list strong { display: block; }
.contact-list span { color: var(--muted); font-size: 9px; }
.contact-list strong { margin-top: 4px; font-size: 11px; line-height: 1.45; }
.tracking-number { margin: 14px 0; padding: 11px; border-radius: 10px; background: #f1e9e0; font-family: ui-monospace,monospace; font-size: 11px; }
.detail-side .button { width: 100%; margin-top: 14px; }
.note-panel p { margin: 12px 0 0; color: var(--ink-soft); font-size: 11px; line-height: 1.6; }
.timeline-list { display: grid; }
.timeline-list > div { padding: 11px 2px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.timeline-list i { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; font-style: normal; }
.timeline-list i.payment { color: var(--green); background: var(--green-bg); }
.timeline-list i.refund { color: var(--red); background: var(--red-bg); }
.timeline-list section { min-width: 0; flex: 1; }
.timeline-list strong, .timeline-list span { display: block; }
.timeline-list strong { font-size: 11px; }
.timeline-list span { margin-top: 3px; color: var(--muted); font-size: 9px; }
.timeline-list b { font-family: var(--serif); font-size: 15px; font-weight: 500; }

.purchase-list { gap: 12px; }
.purchase-card { border: 1px solid var(--line); border-radius: 15px; overflow: hidden; }
.purchase-summary { padding: 15px; display: grid; grid-template-columns: 36px minmax(0,1fr) auto; gap: 13px; align-items: center; }
.purchase-check { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: var(--amber); background: var(--amber-bg); font-weight: 800; }
.purchase-check.purchased { color: var(--green); background: var(--green-bg); }
.purchase-summary h4 { margin: 5px 0; font-size: 12px; }
.purchase-summary span, .purchase-summary small { color: var(--muted); font-size: 9px; }
.purchase-summary small { display: block; margin-top: 5px; }
.purchase-price { text-align: right; }
.purchase-price span, .purchase-price strong, .purchase-price small { display: block; }
.purchase-price strong { margin: 4px 0; font-family: var(--serif); font-size: 18px; font-weight: 500; }
.purchase-form { padding: 12px 15px; display: grid; grid-template-columns: repeat(4,minmax(110px,1fr)) auto; gap: 9px; align-items: end; background: #f8f3ed; border-top: 1px solid var(--line); }
.purchase-reset { padding: 8px 15px 11px; display: flex; justify-content: flex-end; background: #f8f3ed; }
.text-delete-button { padding: 5px 0; color: var(--red); border: 0; background: transparent; font-size: 10px; font-weight: 700; cursor: pointer; }
.text-delete-button:hover { text-decoration: underline; }

.address-card { margin-bottom: 16px; padding: 14px; border-radius: 12px; background: #f2eae1; }
.address-card span, .address-card strong { display: block; }
.address-card span { color: var(--muted); font-size: 9px; }
.address-card strong { margin: 5px 0; }
.address-card p { margin: 0; color: var(--ink-soft); font-size: 10px; line-height: 1.5; }
.shipment-select { margin-bottom: 14px; }
.shipment-row { padding: 14px 10px; display: grid; grid-template-columns: 38px minmax(150px,1fr) minmax(140px,.8fr) auto 20px; gap: 13px; align-items: center; color: var(--ink); border-bottom: 1px solid var(--line); }
.shipment-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; color: var(--champagne-dark); background: #f0e7dd; }
.shipment-row strong, .shipment-row span { display: block; }
.shipment-row strong { font-size: 11px; }
.shipment-row div > span { margin-top: 4px; color: var(--muted); font-size: 9px; }
.category-breakdown { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.category-breakdown > div { padding: 8px 0; display: flex; justify-content: space-between; color: var(--ink-soft); font-size: 10px; border-bottom: 1px solid #eee8e1; }

.report-hero { margin-bottom: 18px; padding: 25px 27px; display: flex; justify-content: space-between; align-items: center; gap: 20px; color: #fff; border-radius: var(--radius); background: linear-gradient(115deg,#29231f,#564337); }
.report-hero h2 { margin: 7px 0 5px; font-family: var(--serif); font-size: 27px; font-weight: 500; }
.report-hero p { margin: 0; color: #cfc4bd; font-size: 10px; }
.report-hero .eyebrow { color: #d5b89e; }
.date-filter { display: flex; gap: 8px; align-items: end; }
.date-filter label { display: grid; gap: 5px; color: #cabfb7; font-size: 8px; }
.date-filter input { min-width: 135px; color: var(--ink); }
.report-metrics { margin-bottom: 14px; display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 10px; }
.report-metrics article { padding: 17px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.report-metrics span, .report-metrics strong, .report-metrics small { display: block; }
.report-metrics span { color: var(--muted); font-size: 9px; }
.report-metrics strong { margin: 9px 0 6px; font-family: var(--serif); font-size: 19px; font-weight: 500; }
.report-metrics small { color: var(--muted); font-size: 8px; }
.report-metrics .profit { color: #fff; background: linear-gradient(135deg,#9b7356,#6c4935); border: 0; }
.report-metrics .profit span, .report-metrics .profit small { color: #eadcd1; }
.report-mini { margin-bottom: 18px; padding: 13px 17px; display: flex; align-items: center; gap: 25px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.report-mini > div { min-width: 120px; }
.report-mini span, .report-mini strong { display: block; }
.report-mini span { color: var(--muted); font-size: 8px; }
.report-mini strong { margin-top: 4px; font-family: var(--serif); font-size: 17px; font-weight: 500; }
.report-mini .button { margin-left: auto; }
.formula-note { margin-top: 16px; padding: 17px 20px; display: flex; gap: 20px; border: 1px solid #e2d2bf; border-radius: 14px; background: #f4eadf; }
.formula-note b { min-width: 115px; color: var(--champagne-dark); font-size: 10px; text-transform: uppercase; letter-spacing: .12em; }
.formula-note p { margin: 0; color: var(--ink-soft); font-size: 10px; line-height: 1.6; }

.activity-list { display: grid; }
.activity-list > div { padding: 10px 0; display: flex; gap: 12px; border-bottom: 1px solid var(--line); }
.activity-dot { margin-top: 5px; flex: 0 0 7px; height: 7px; border-radius: 50%; background: var(--champagne); box-shadow: 0 0 0 4px #f0e6dc; }
.activity-list strong, .activity-list small { display: block; }
.activity-list strong { font-size: 10px; }
.activity-list small { margin-top: 4px; color: var(--muted); font-size: 8px; }
.security-note { margin-top: 18px; padding: 14px; display: grid; gap: 5px; color: var(--green); background: var(--green-bg); border-radius: 12px; }
.security-note b { font-size: 10px; }
.security-note span { font-size: 9px; line-height: 1.5; }
.danger-zone { margin-top: 18px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.danger-zone h3 { margin: 6px 0; }
.danger-zone p { margin: 0; color: var(--muted); font-size: 10px; }

.delete-hero { margin-bottom: 18px; padding: 24px 27px; display: flex; justify-content: space-between; align-items: center; gap: 20px; border: 1px solid #e6d5c8; border-radius: var(--radius); background: linear-gradient(118deg,#fffdf9,#f5e8df); }
.delete-hero h2 { margin: 8px 0 5px; font-family: var(--serif); font-size: 27px; font-weight: 500; }
.delete-hero p { max-width: 680px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.delete-tabs { margin-bottom: 16px; display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 9px; }
.delete-tab { min-width: 0; padding: 12px 10px; display: grid; grid-template-columns: 26px minmax(0,1fr); grid-template-rows: auto auto; gap: 3px 7px; align-items: center; border: 1px solid var(--line); border-radius: 13px; color: var(--ink); background: var(--surface); }
.delete-tab i { grid-row: 1 / span 2; width: 25px; height: 25px; display: grid; place-items: center; border-radius: 8px; color: var(--champagne-dark); background: #f2e9df; font-style: normal; }
.delete-tab span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 9px; }
.delete-tab b { color: var(--muted); font-size: 9px; }
.delete-tab.active { border-color: #bd987c; background: linear-gradient(145deg,#fffdf9,#f2e6da); box-shadow: 0 8px 22px rgba(128,89,59,.10); }
.delete-tab.active i { color: #fff; background: linear-gradient(145deg,#ab8465,#79553f); }
.delete-notice { margin-bottom: 17px; padding: 12px 14px; border: 1px solid #ead9c8; border-radius: 11px; color: #765940; background: #faf1e7; font-size: 10px; line-height: 1.6; }
.delete-button { color: var(--red); border-color: #edcccc; background: #fff7f7; }
.delete-button:hover { color: #fff; border-color: var(--red); background: var(--red); }
.delete-button:disabled { color: #a69d98; border-color: #e6e0db; background: #f8f6f4; }

.login-body, .setup-body { min-height: 100vh; background: #ece6df; }
.login-shell, .setup-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0,1.15fr) minmax(420px,.85fr); }
.login-visual, .setup-brand { position: relative; overflow: hidden; padding: 50px clamp(40px,6vw,100px); display: flex; flex-direction: column; justify-content: space-between; color: #fff; background: linear-gradient(145deg,#171412,#3b3029); }
.login-visual::after, .setup-brand::after { content:""; position:absolute; width:480px; height:480px; right:-170px; bottom:-170px; border-radius:50%; border:1px solid rgba(216,191,169,.16); box-shadow:0 0 0 70px rgba(216,191,169,.03),0 0 0 140px rgba(216,191,169,.025); }
.login-visual img, .setup-brand img { width: 155px; height: 155px; object-fit: cover; border-radius: 30px; box-shadow: 0 25px 60px rgba(0,0,0,.25); }
.login-visual h1, .setup-brand h1 { max-width: 700px; margin: 12px 0; font-family: var(--serif); font-size: clamp(38px,4.5vw,68px); line-height: 1.05; font-weight: 400; }
.login-visual p, .setup-brand p { max-width: 600px; color: #c4bab3; font-size: 13px; line-height: 1.7; }
.login-card, .setup-card { align-self: center; width: min(480px,calc(100% - 60px)); margin: 30px auto; padding: 38px; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 30px 90px rgba(45,33,25,.14); }
.login-card h2, .setup-card h2 { margin: 8px 0; font-family: var(--serif); font-size: 30px; font-weight: 500; }
.login-card > div > p { margin: 0 0 24px; color: var(--muted); }
.login-card .button { width: 100%; }
.setup-shell { grid-template-columns: minmax(360px,.8fr) minmax(560px,1.2fr); }
.setup-card { width: min(680px,calc(100% - 60px)); }
.setup-points { display: flex; flex-wrap: wrap; gap: 9px; }
.setup-points span { padding: 8px 11px; border: 1px solid rgba(255,255,255,.13); border-radius: 999px; color: #d8cec7; font-size: 9px; }

.drawer-overlay { display: none; }
@media (max-width: 1180px) {
  .metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .report-metrics { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .page-grid.form-side { grid-template-columns: minmax(280px,.8fr) minmax(0,1.2fr); }
  .batch-row { grid-template-columns: 48px minmax(160px,1fr) auto; }
  .batch-numbers { grid-column: 2; grid-row: 2; }
  .customer-row { grid-template-columns: 42px minmax(150px,1fr) auto auto; }
  .customer-row .customer-stat:nth-of-type(2) { display: none; }
  .purchase-form { grid-template-columns: repeat(2,minmax(120px,1fr)); }
  .delete-tabs { grid-template-columns: repeat(4,minmax(0,1fr)); }
}

@media (max-width: 920px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; transform: translateX(-103%); width: 270px; transition: transform .22s ease; box-shadow: 20px 0 60px rgba(0,0,0,.22); }
  .drawer-open .sidebar { transform: translateX(0); }
  .drawer-overlay { position: fixed; inset: 0; z-index: 25; background: rgba(25,21,18,.48); backdrop-filter: blur(2px); }
  .drawer-open .drawer-overlay { display: block; }
  .menu-button { display: grid; place-items: center; }
  .topbar { height: 88px; padding: 0 20px; justify-content: flex-start; }
  .topbar > .button { margin-left: auto; }
  .content { padding: 22px 20px 35px; }
  .app-footer { margin: 0 20px; }
  .dashboard-grid, .detail-grid, .page-grid.form-side, .order-create-layout { grid-template-columns: 1fr; }
  .order-summary-card { position: static; grid-row: 1; }
  .batch-spotlight { grid-template-columns: 1fr auto auto; }
  .batch-spotlight .button { grid-column: 1 / -1; }
  .detail-side { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .login-shell, .setup-shell { grid-template-columns: 1fr; }
  .login-visual, .setup-brand { min-height: 430px; }
  .login-visual img, .setup-brand img { width: 110px; height: 110px; }
}

@media (max-width: 680px) {
  .topbar { gap: 12px; }
  .topbar h1 { font-size: 22px; }
  .topbar .eyebrow { display: none; }
  .topbar > .button { width: 42px; min-width: 42px; padding: 0; font-size: 0; }
  .topbar > .button::before { content:"+"; font-size:20px; }
  .content { padding: 16px 14px 30px; }
  .welcome-strip { padding: 22px; align-items: flex-start; flex-direction: column; }
  .welcome-strip::after { right: -20px; }
  .metric-grid, .metric-grid.three, .action-grid, .page-grid.equal, .report-metrics, .detail-side { grid-template-columns: 1fr; }
  .metric-card { min-height: 112px; }
  .form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: span 1; }
  .summary-line { overflow-x: auto; }
  .summary-line > div { min-width: 140px; }
  .panel { padding: 17px; border-radius: 16px; }
  .panel-head.wrap { display: block; }
  .filter-bar { margin-top: 14px; display: grid; grid-template-columns: 1fr; }
  .filter-bar input, .filter-bar select { width: 100%; min-width: 0; }
  .batch-row { grid-template-columns: 45px minmax(0,1fr) auto; gap: 10px; }
  .batch-main { display: block; }
  .batch-main .badge { margin-top: 7px; }
  .batch-numbers { gap: 14px; }
  .customer-row { grid-template-columns: 40px minmax(0,1fr) auto; gap: 10px; }
  .customer-row .customer-stat { display: none; }
  .search-box { min-width: 0; width: 100%; margin-top: 12px; }
  .batch-spotlight { grid-template-columns: 1fr 1fr; gap: 18px; }
  .batch-spotlight > div:first-child { grid-column: 1 / -1; }
  .detail-head { align-items: flex-start; flex-direction: column; }
  .detail-actions { width: 100%; }
  .detail-actions .button { flex: 1; }
  .order-status-strip { grid-template-columns: repeat(2,1fr); }
  .order-status-strip > div:nth-child(2) { border-right: 0; }
  .product-detail-list article { grid-template-columns: 35px minmax(0,1fr); }
  .product-cost { grid-column: 2; text-align: left; }
  .product-detail-list .badge { grid-column: 2; justify-self: start; }
  .purchase-summary { grid-template-columns: 34px minmax(0,1fr); }
  .purchase-price { grid-column: 2; text-align: left; }
  .purchase-form { grid-template-columns: 1fr; }
  .shipment-row { grid-template-columns: 38px minmax(0,1fr) auto; }
  .shipment-row > div:nth-child(3) { grid-column: 2; }
  .shipment-row .badge { grid-column: 2; justify-self: start; }
  .report-hero { align-items: flex-start; flex-direction: column; }
  .date-filter { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
  .date-filter .button { grid-column: 1 / -1; }
  .report-mini { align-items: stretch; flex-direction: column; }
  .report-mini .button { margin-left: 0; }
  .formula-note { flex-direction: column; gap: 8px; }
  .delete-hero { align-items: flex-start; flex-direction: column; }
  .delete-tabs { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .app-footer { align-items: flex-start; flex-direction: column; gap: 6px; }
  .login-visual, .setup-brand { min-height: 360px; padding: 30px 24px; }
  .login-visual h1, .setup-brand h1 { font-size: 36px; }
  .login-card, .setup-card { width: calc(100% - 28px); padding: 24px; margin: 14px auto; }
  .mobile-submit { display: block; }
  .mobile-submit .button { width: 100%; }
}

@media print {
  .sidebar, .topbar, .app-footer, .detail-actions, .detail-side, .back-link, .drawer-overlay { display: none !important; }
  .app-shell { display: block; }
  .content { max-width: none; padding: 0; }
  .panel, .order-status-strip { box-shadow: none; break-inside: avoid; }
  body { background: #fff; }
}
