:root {
  --blue: #b85f43;
  --blue-dark: #8d422f;
  --blue-soft: #f4e2d9;
  --terracotta: #b85f43;
  --terracotta-dark: #8d422f;
  --champagne: #c9a56a;
  --cream: #fbf7f0;
  --ink: #3e2e29;
  --muted: #7d6d66;
  --line: #e8ddd2;
  --bg: #f8f2e9;
  --panel: #fffdf8;
  --danger: #b64c4c;
  --success: #687d62;
  --shadow: 0 15px 38px rgba(91, 57, 42, .09);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, .button, select { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
[hidden] { display: none !important; }

.button {
  min-height: 42px; padding: 0 18px; border: 0; border-radius: 11px;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font-weight: 700; font-size: 14px; transition: .2s;
}
.button.primary { color: #fff; background: linear-gradient(135deg, #2379f2, #1259cb); box-shadow: 0 8px 18px rgba(23,104,229,.22); }
.button.primary:hover { transform: translateY(-1px); box-shadow: 0 11px 24px rgba(23,104,229,.3); }
.button.secondary { color: #506077; border: 1px solid var(--line); background: #fff; }
.button.danger { color: #c33140; background: #fff0f1; }
.button.wide { width: 100%; min-height: 48px; margin-top: 7px; }

.boot-screen, .page-loading, .fatal { min-height: 60vh; display: grid; place-content: center; justify-items: center; color: var(--muted); }
.loader { width: 34px; height: 34px; border: 3px solid #dce8fc; border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.auth-page { min-height: 100vh; display: grid; grid-template-columns: minmax(420px, 1.05fr) minmax(430px, .95fr); background: #fff; }
.auth-visual { position: relative; overflow: hidden; padding: 48px clamp(38px, 6vw, 90px); color: #fff; background: linear-gradient(145deg, #0c4cae, #1777ec 64%, #42a7ef); }
.auth-visual::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 75% 20%, rgba(255,255,255,.18), transparent 28%), linear-gradient(35deg, transparent 40%, rgba(255,255,255,.06)); }
.auth-brand, .brand, .mobile-brand { position: relative; display: flex; align-items: center; gap: 12px; }
.brand-icon { width: 43px; height: 43px; display: grid; place-items: center; border-radius: 13px; color: #fff; background: linear-gradient(135deg, #3192ff, #0b58ce); font-size: 27px; box-shadow: 0 8px 20px rgba(7,62,144,.25); }
.auth-brand .brand-icon { background: rgba(255,255,255,.17); border: 1px solid rgba(255,255,255,.27); }
.auth-brand strong { font-size: 20px; letter-spacing: .08em; }
.auth-copy { position: relative; z-index: 1; max-width: 560px; margin-top: 24vh; }
.eyebrow { font-size: 10px; letter-spacing: .22em; font-weight: 800; opacity: .72; }
.eyebrow.blue { color: var(--blue); opacity: 1; }
.auth-copy h1 { margin: 18px 0; font-size: clamp(42px, 5vw, 70px); line-height: 1.18; letter-spacing: -.04em; }
.auth-copy p { max-width: 470px; line-height: 1.9; color: rgba(255,255,255,.78); }
.auth-orbit i { position: absolute; border: 1px solid rgba(255,255,255,.15); border-radius: 50%; }
.auth-orbit i:nth-child(1) { width: 420px; height: 420px; right: -160px; bottom: -130px; }
.auth-orbit i:nth-child(2) { width: 250px; height: 250px; right: 20px; bottom: -80px; }
.auth-orbit i:nth-child(3) { width: 12px; height: 12px; right: 160px; bottom: 170px; background: #fff; box-shadow: 0 0 25px #fff; }
.auth-panel { display: grid; place-items: center; padding: 35px; }
.auth-card { width: min(410px, 100%); }
.mobile-brand { display: none; }
.form-kicker { color: var(--blue); font-size: 12px; font-weight: 800; letter-spacing: .15em; }
.auth-card h2 { margin: 9px 0; font-size: 31px; }
.auth-card > p { color: var(--muted); margin: 0 0 32px; }
.auth-card label, .field { display: grid; gap: 8px; margin-bottom: 18px; }
.auth-card label span, .field span { color: #4a586d; font-size: 13px; font-weight: 700; }
.auth-card input, .field input, .field select, .field textarea, .toolbar select {
  width: 100%; border: 1px solid var(--line); border-radius: 10px; background: #fff;
  padding: 12px 13px; outline: none; color: var(--ink);
}
.auth-card input:focus, .field input:focus, .field select:focus, .field textarea:focus, .toolbar select:focus { border-color: #6ea6f5; box-shadow: 0 0 0 3px #e7f0ff; }
.text-link { display: block; margin: 18px auto 0; border: 0; background: none; color: var(--blue); }
.local-note { margin-top: 34px; padding: 12px; border-radius: 9px; background: #f4f7fb; color: var(--muted); font-size: 12px; text-align: center; }

.layout { min-height: 100vh; display: grid; grid-template-columns: 238px minmax(0, 1fr); }
.sidebar { position: fixed; z-index: 20; width: 238px; height: 100vh; display: flex; flex-direction: column; padding: 27px 18px; background: #fff; border-right: 1px solid var(--line); }
.brand { padding: 0 8px 34px; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 18px; }
.brand small { margin-top: 3px; font-size: 8px; letter-spacing: .18em; color: #9aa7b8; }
.sidebar nav { display: grid; gap: 7px; }
.sidebar nav a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 10px; color: #66758a; font-size: 14px; font-weight: 650; }
.sidebar nav a span { width: 26px; text-align: center; font-size: 18px; }
.sidebar nav a:hover, .sidebar nav a.active { color: var(--blue); background: var(--blue-soft); }
.sidebar-foot { margin-top: auto; padding: 14px; border-radius: 12px; background: #f6f8fb; }
.sidebar-foot > span { color: #8a98aa; font-size: 11px; }
.sidebar-foot strong { display: block; margin-top: 7px; font-size: 11px; color: #506077; }
.sidebar-foot i { display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; background: #24b47e; }
.main { grid-column: 2; min-width: 0; }
.topbar { height: 72px; display: flex; align-items: center; gap: 15px; padding: 0 clamp(20px, 3.5vw, 54px); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.92); }
.topbar-spacer { flex: 1; }
.menu-button { display: none; border: 0; background: none; font-size: 23px; }
.user-menu { display: flex; align-items: center; gap: 9px; }
.avatar { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; color: #fff; background: var(--blue); font-weight: 800; }
.user-menu small, .user-menu strong { display: block; }
.user-menu small { color: #98a4b5; font-size: 9px; }
.user-menu strong { margin-top: 2px; font-size: 12px; }
.logout-button { padding: 8px 10px; border: 0; background: none; color: #718096; }
.page { max-width: 1440px; margin: auto; padding: 34px clamp(20px, 3.5vw, 54px) 70px; }
.page-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.page-head h1 { margin: 6px 0 3px; font-size: 28px; }
.page-head p { margin: 0; color: var(--muted); font-size: 13px; }
.head-actions { display: flex; gap: 10px; }
.panel { border: 1px solid var(--line); border-radius: 16px; background: var(--panel); box-shadow: var(--shadow); }

.hero { position: relative; overflow: hidden; min-height: 164px; display: flex; align-items: center; justify-content: space-between; padding: 30px 38px; border-radius: 19px; color: #fff; background: linear-gradient(112deg, #104ca9, #1778e9 68%, #44a9ed); box-shadow: 0 16px 35px rgba(23,104,229,.19); }
.hero::after { content: ""; position: absolute; width: 290px; height: 290px; right: -50px; top: -130px; border: 1px solid rgba(255,255,255,.16); border-radius: 50%; }
.hero span { font-size: 10px; letter-spacing: .15em; opacity: .75; }
.hero h2 { margin: 9px 0; font-size: 23px; }
.hero p { margin: 0; color: rgba(255,255,255,.75); font-size: 13px; }
.hero-gem { position: relative; z-index: 1; padding-right: 60px; font-size: 85px; opacity: .55; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 18px 0; }
.metric { display: flex; align-items: center; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: 15px; background: #fff; box-shadow: 0 7px 25px rgba(24,44,79,.05); }
.metric-icon { width: 43px; height: 43px; flex: none; display: grid; place-items: center; border-radius: 12px; font-size: 20px; }
.metric span, .metric strong, .metric small { display: block; }
.metric span { color: var(--muted); font-size: 11px; }
.metric strong { margin: 4px 0 2px; font-size: 21px; }
.metric small { color: #a3adbb; font-size: 9px; }
.metric.blue .metric-icon { color: #1768e5; background: #e7f0ff; }
.metric.cyan .metric-icon { color: #0798b5; background: #e5f8fb; }
.metric.gold .metric-icon { color: #bf821c; background: #fff5df; }
.metric.red .metric-icon { color: #d94352; background: #fff0f2; }
.dashboard-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: 18px; }
.chart-panel, .warning-panel { padding: 21px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.panel-head h2 { margin: 0; font-size: 17px; }
.panel-head p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.panel-head > a { color: var(--blue); font-size: 12px; }
.bar-chart { display: grid; gap: 18px; padding: 7px 2px; }
.bar-row { display: grid; grid-template-columns: 42px 1fr 25px; gap: 12px; align-items: center; font-size: 12px; }
.bar-row > div { height: 11px; overflow: hidden; border-radius: 6px; background: #eef2f7; }
.bar-row i { display: block; height: 100%; border-radius: inherit; background: hsl(calc(215 + var(--i) * 22), 78%, 55%); }
.warning-list { display: grid; }
.warning-item { display: grid; grid-template-columns: 42px 1fr auto; gap: 11px; align-items: center; padding: 11px 0; border-top: 1px solid #eef1f5; }
.mini-image { width: 40px; height: 40px; display: grid; place-items: center; overflow: hidden; border-radius: 10px; color: #8cb5ed; background: #edf4fe; font-size: 22px; }
.mini-image img { width: 100%; height: 100%; object-fit: cover; }
.warning-item strong, .warning-item small { display: block; }
.warning-item strong { font-size: 12px; }
.warning-item small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.warning-item em { padding: 5px 8px; border-radius: 12px; color: #c48013; background: #fff4dc; font-size: 10px; font-style: normal; }
.warning-item em.out { color: #c63746; background: #ffecee; }
.empty-small { padding: 36px 10px; color: var(--muted); text-align: center; font-size: 13px; }

.toolbar { display: grid; grid-template-columns: minmax(240px, 1fr) 160px 175px; gap: 11px; padding: 12px; margin-bottom: 20px; }
.search { display: flex; align-items: center; gap: 7px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: #f8fafc; }
.search span { font-size: 21px; color: #8492a6; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; }
.toolbar select { padding: 10px; }
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; }
.product-card { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 8px 28px rgba(24,44,79,.06); transition: .2s; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(24,44,79,.11); }
.product-image { position: relative; height: 220px; display: grid; place-items: center; overflow: hidden; color: #a9c5ec; background: linear-gradient(145deg, #ecf3fc, #f8fbff); font-size: 65px; }
.product-image img { width: 100%; height: 100%; object-fit: cover; }
.product-image b { position: absolute; top: 12px; padding: 5px 9px; border-radius: 12px; font-size: 10px; backdrop-filter: blur(8px); }
.product-image .category { left: 12px; background: rgba(255,255,255,.9); }
.product-image .stock { right: 12px; color: #176d4e; background: rgba(226,249,239,.92); }
.product-image .stock.low { color: #a66d12; background: rgba(255,244,218,.94); }
.product-image .stock.out { color: #bf3544; background: rgba(255,233,236,.94); }
.product-body { padding: 16px; }
.product-body h3 { margin: 0 0 14px; font-size: 16px; }
.card-prices { display: grid; grid-template-columns: 1fr 1fr; padding: 10px; border-radius: 10px; background: #f7f9fc; }
.card-prices span { color: var(--muted); font-size: 9px; }
.card-prices strong { display: block; margin-top: 3px; color: var(--ink); font-size: 13px; }
.stock-controls { display: grid; grid-template-columns: 32px 1fr 32px auto; gap: 7px; align-items: center; margin-top: 13px; }
.stock-controls button { width: 32px; height: 32px; border: 1px solid #dbe3ed; border-radius: 8px; color: var(--blue); background: #fff; font-weight: 800; }
.stock-controls span { color: #657388; text-align: center; font-size: 11px; }
.stock-controls a { margin-left: 5px; color: var(--blue); font-size: 11px; }
.empty-state { grid-column: 1/-1; padding: 70px 20px; text-align: center; }
.empty-state > span { color: #a8c4eb; font-size: 52px; }
.empty-state h2 { margin: 12px 0 6px; }
.empty-state p { margin: 0 0 20px; color: var(--muted); }

.form-layout { display: grid; gap: 17px; max-width: 940px; }
.form-panel { padding: 24px; }
.section-title { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.section-title > span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: var(--blue); background: var(--blue-soft); font-size: 11px; font-weight: 800; }
.section-title h2 { margin: 0; font-size: 17px; }
.section-title p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.drop-zone { min-height: 230px; display: grid; place-items: center; overflow: hidden; border: 2px dashed #b9cbe3; border-radius: 13px; color: #75869d; background: #f8fbff; text-align: center; cursor: pointer; transition: .2s; }
.drop-zone.dragging { border-color: var(--blue); background: #ebf3ff; }
.drop-zone input { display: none; }
.drop-zone > div b, .drop-zone > div strong, .drop-zone > div small { display: block; }
.drop-zone > div b { margin-bottom: 7px; color: var(--blue); font-size: 32px; }
.drop-zone > div strong { font-size: 13px; }
.drop-zone > div small { margin-top: 6px; font-size: 10px; color: #9caabd; }
.drop-zone.has-image { border-style: solid; }
.drop-zone img { width: 100%; max-height: 360px; object-fit: contain; }
.text-danger { margin-top: 8px; border: 0; background: none; color: var(--danger); font-size: 11px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 16px; }
.field.wide { grid-column: 1/-1; }
.field { position: relative; }
.field textarea { resize: vertical; }
.price-field i { position: absolute; left: 13px; bottom: 14px; color: #7c8a9d; font-style: normal; }
.price-field input { padding-left: 29px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; }

.detail-grid { display: grid; grid-template-columns: minmax(300px,.8fr) minmax(500px,1.2fr); gap: 20px; }
.detail-image { min-height: 470px; display: grid; place-items: center; overflow: hidden; color: #a8c7ee; background: linear-gradient(145deg, #eaf3ff, #f8fbff); font-size: 100px; }
.detail-image img { width: 100%; height: 100%; min-height: 470px; object-fit: cover; }
.detail-info { padding: 30px; }
.detail-title > span { display: inline-block; padding: 5px 9px; border-radius: 12px; color: var(--blue); background: var(--blue-soft); font-size: 10px; }
.detail-title h2 { margin: 12px 0 8px; font-size: 27px; }
.detail-title p { min-height: 22px; color: var(--muted); line-height: 1.6; }
.price-compare { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin: 27px 0 16px; }
.price-compare > div { padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #f8fafc; }
.price-compare span, .price-compare strong, .price-compare small { display: block; }
.price-compare span { color: var(--muted); font-size: 10px; }
.price-compare strong { margin: 7px 0; font-size: 18px; }
.price-compare small { color: #a0abba; font-size: 8px; }
.price-compare .featured { color: #fff; border-color: var(--blue); background: var(--blue); }
.price-compare .featured span, .price-compare .featured small { color: rgba(255,255,255,.75); }
.profit-grid { display: grid; grid-template-columns: repeat(3,1fr); border: 1px solid var(--line); border-radius: 12px; }
.profit-grid > div { padding: 16px; border-right: 1px solid var(--line); }
.profit-grid > div:last-child { border: 0; }
.profit-grid span, .profit-grid strong { display: block; }
.profit-grid span { color: var(--muted); font-size: 10px; }
.profit-grid strong { margin-top: 6px; color: var(--success); font-size: 17px; }
.negative { color: var(--danger) !important; }
.detail-meta { display: flex; gap: 20px; margin: 22px 0; color: #9aa6b5; font-size: 9px; }
.detail-actions { padding-top: 19px; border-top: 1px solid var(--line); }

/* Warm boutique theme */
body {
  background:
    radial-gradient(circle at 92% 4%, rgba(201,165,106,.10), transparent 25%),
    linear-gradient(180deg, #fbf7f0 0%, #f7f0e6 100%);
}
h1, h2, .brand strong, .auth-brand strong {
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  letter-spacing: -.015em;
}
.button { border-radius: 999px; }
.button.primary {
  background: linear-gradient(135deg, #c16b4d, #9f4d38);
  box-shadow: 0 9px 22px rgba(159,77,56,.22);
}
.button.primary:hover { box-shadow: 0 13px 28px rgba(159,77,56,.28); }
.button.secondary { color: #6f5c54; background: #fffdf8; }
.button.danger { color: #a94646; background: #fae9e4; }
.loader { border-color: #eadbd0; border-top-color: var(--terracotta); }

.auth-page { background: var(--cream); }
.auth-visual {
  background:
    linear-gradient(180deg, rgba(48,25,20,.48) 0%, rgba(48,25,20,.10) 38%, rgba(75,34,25,.78) 100%),
    linear-gradient(90deg, rgba(58,29,23,.40), transparent 76%),
    url("/login-cover.jpg") 54% center / cover no-repeat;
}
.auth-visual::before {
  background:
    radial-gradient(circle at 14% 86%, rgba(226,190,132,.16), transparent 23%),
    linear-gradient(35deg, transparent 44%, rgba(255,255,255,.04));
}
.brand-icon {
  width: 46px; height: 46px; padding: 0; overflow: hidden; border-radius: 15px;
  background: #fbf4e9; box-shadow: 0 9px 24px rgba(90,49,37,.18);
}
.brand-icon img { display: block; width: 100%; height: 100%; }
.auth-brand { z-index: 2; }
.auth-brand .brand-icon { background: #fbf4e9; border: 1px solid rgba(255,255,255,.58); }
.auth-brand strong { font-size: 21px; letter-spacing: .06em; }
.auth-copy {
  position: absolute; z-index: 2; left: clamp(38px, 6vw, 90px); right: clamp(38px, 6vw, 90px);
  bottom: clamp(52px, 9vh, 96px); max-width: 590px; margin: 0;
}
.auth-copy h1 { font-size: clamp(38px, 4.5vw, 62px); text-shadow: 0 4px 22px rgba(35,15,12,.42); }
.auth-copy p { color: rgba(255,248,239,.82); }
.auth-orbit i { border-color: rgba(255,244,224,.18); }
.auth-orbit i:nth-child(3) { background: #e3c28a; box-shadow: 0 0 25px #e3c28a; }
.form-kicker, .eyebrow.blue, .text-link { color: var(--terracotta); }
.auth-card h2 { color: #3f2c27; }
.auth-card input, .field input, .field select, .field textarea, .toolbar select {
  border-color: #e6d8cc; border-radius: 12px; background: #fffdf9;
}
.auth-card input:focus, .field input:focus, .field select:focus, .field textarea:focus, .toolbar select:focus {
  border-color: #c77a5d; box-shadow: 0 0 0 4px rgba(184,95,67,.11);
}
.local-note { color: #7a685f; background: #f5eadf; }

.layout { grid-template-columns: 258px minmax(0, 1fr); }
.sidebar {
  width: 258px; padding: 28px 20px; border-color: #eadfd4;
  background: rgba(255,253,248,.94); backdrop-filter: blur(18px);
}
.brand { padding: 0 7px 36px; gap: 13px; }
.brand strong { color: #49332c; font-size: 17px; white-space: nowrap; }
.brand small { color: #b19582; letter-spacing: .15em; }
.sidebar nav a { color: #7b6a61; border: 1px solid transparent; border-radius: 13px; }
.sidebar nav a:hover, .sidebar nav a.active {
  color: var(--terracotta-dark); border-color: #ead3c7; background: #f5e5dc;
}
.sidebar-foot { border: 1px solid #ebddd0; background: #faf3e8; }
.sidebar-foot > span { color: #a08676; }
.sidebar-foot strong { color: #66534a; }
.sidebar-foot i { background: #7d946f; }
.main { grid-column: 2; }
.topbar {
  border-color: #e9ddd2;
  background: rgba(251,247,240,.88); backdrop-filter: blur(16px);
}
.avatar { border-radius: 50%; background: linear-gradient(135deg, #c47a5d, #9a4935); }
.logout-button { color: #89746a; }
.page { max-width: 1480px; }
.page-head h1 { color: #49342d; }
.panel { border-color: #e9ddd2; background: rgba(255,253,248,.96); }

.hero {
  min-height: 176px; border: 1px solid rgba(255,238,211,.20);
  background:
    radial-gradient(circle at 78% 15%, rgba(247,221,179,.27), transparent 22%),
    linear-gradient(112deg, #874333, #b85f43 65%, #cc9761);
  box-shadow: 0 18px 42px rgba(132,65,48,.20);
}
.hero::after { border-color: rgba(250,228,194,.20); }
.hero span { color: #f4d8b0; }
.hero p { color: rgba(255,246,235,.78); }
.hero-gem { width: 116px; padding: 0 40px 0 0; opacity: .72; }
.hero-gem img { display: block; width: 100px; filter: drop-shadow(0 12px 18px rgba(80,36,26,.20)); }

.metric {
  border-color: #eadfd4; border-radius: 17px; background: #fffdf9;
  box-shadow: 0 9px 26px rgba(91,57,42,.06);
}
.metric-icon { border-radius: 14px; }
.metric.blue .metric-icon { color: #a95039; background: #f5dfd4; }
.metric.cyan .metric-icon { color: #7f7862; background: #eee9d9; }
.metric.gold .metric-icon { color: #9e7435; background: #f5ead0; }
.metric.red .metric-icon { color: #a85150; background: #f8e2de; }
.panel-head > a { color: var(--terracotta); }
.bar-row > div { background: #f0e8df; }
.bar-row i { background: hsl(calc(17 + var(--i) * 14), 48%, calc(54% + var(--i) * 4%)); }
.warning-item { border-color: #efe5dc; }
.mini-image { color: #b56f54; background: #f6e7de; }
.warning-item em { color: #987039; background: #f8edd4; }
.warning-item em.out { color: #a94848; background: #f9e1dd; }

.toolbar { position: sticky; top: 84px; z-index: 8; border-radius: 17px; }
.search { border-color: #e7d9ce; border-radius: 12px; background: #fbf5ee; }
.search span { color: #aa8775; }
.product-card {
  border-color: #e8d9ce; border-radius: 19px; background: #fffdf9;
  box-shadow: 0 10px 30px rgba(91,57,42,.07);
}
.product-card:hover { box-shadow: 0 18px 44px rgba(91,57,42,.13); }
.product-image { color: #c38b72; background: linear-gradient(145deg, #f4e6dc, #fbf6ee); }
.product-image > span, .detail-image > span { color: #ca967b; text-shadow: 0 7px 20px rgba(125,71,52,.13); }
.product-image .category { color: #6d554b; background: rgba(255,250,243,.92); }
.product-image .stock { color: #62755c; background: rgba(235,242,226,.93); }
.product-image .stock.low { color: #986d31; background: rgba(248,237,211,.95); }
.product-image .stock.out { color: #a64545; background: rgba(250,226,221,.95); }
.card-prices { background: #faf1e9; }
.stock-controls button { border-color: #dfcfc3; color: var(--terracotta); background: #fffaf4; }
.stock-controls a { color: var(--terracotta); }
.empty-state > span { color: #c99076; }

.section-title > span { color: #9d4c37; background: #f2dfd4; }
.drop-zone { border-color: #d8b9a7; color: #806d64; background: #fcf6ef; }
.drop-zone.dragging { border-color: var(--terracotta); background: #f7e7dd; }
.drop-zone > div b { color: var(--terracotta); }
.drop-zone > div small { color: #aa9184; }
.price-field i { color: #9e7c69; }
.detail-image { color: #c28a71; background: linear-gradient(145deg, #f1dfd4, #fbf5ec); }
.detail-title > span { color: #994934; background: #f3dfd5; }
.price-compare > div { border-color: #e8d9ce; background: #fbf4ed; }
.price-compare .featured { border-color: #a7513b; background: linear-gradient(135deg, #b85f43, #934431); }
.profit-grid, .profit-grid > div { border-color: #e8d9ce; }
.toast { border-radius: 999px; background: #5c453d; }
.toast.success { background: #647a5f; }

.toast { position: fixed; z-index: 100; left: 50%; bottom: 28px; transform: translate(-50%,20px); padding: 11px 17px; border-radius: 9px; color: #fff; background: #263449; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: .2s; }
.toast.show { transform: translate(-50%,0); opacity: 1; }
.toast.error { background: #c63242; }
.toast.success { background: #16845b; }
.drawer-shade { display: none; }

@media (max-width: 1100px) {
  .metric-grid { grid-template-columns: repeat(2,1fr); }
  .product-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-image, .detail-image img { min-height: 370px; max-height: 500px; }
}

@media (max-width: 760px) {
  .auth-page { display: block; background: linear-gradient(160deg, #f4e3d8, #fffaf3 40%); }
  .auth-visual { display: none; }
  .auth-panel { min-height: 100vh; padding: 24px; }
  .mobile-brand { display: flex; margin-bottom: 45px; }
  .layout { display: block; }
  .sidebar { transform: translateX(-105%); transition: transform .25s; box-shadow: 15px 0 40px rgba(20,40,70,.16); }
  .menu-open .sidebar { transform: translateX(0); }
  .drawer-shade { position: fixed; z-index: 15; inset: 0; background: rgba(17,31,52,.45); }
  .menu-open .drawer-shade { display: block; }
  .main { min-width: 0; }
  .topbar { position: sticky; top: 0; z-index: 10; height: 62px; padding: 0 15px; }
  .menu-button { display: block; }
  .user-menu div { display: none; }
  .page { padding: 24px 14px 55px; }
  .page-head { align-items: center; }
  .page-head h1 { font-size: 23px; }
  .page-head p { display: none; }
  .hero { min-height: 155px; padding: 24px; }
  .hero h2 { max-width: 250px; font-size: 19px; line-height: 1.45; }
  .hero p { max-width: 230px; line-height: 1.5; }
  .hero-gem { position: absolute; right: -15px; padding: 0; opacity: .25; }
  .metric-grid { gap: 9px; }
  .metric { align-items: flex-start; min-height: 105px; padding: 13px; }
  .metric-icon { width: 35px; height: 35px; }
  .metric strong { font-size: 17px; }
  .toolbar { grid-template-columns: 1fr 1fr; }
  .search { grid-column: 1/-1; min-height: 43px; }
  .product-grid { grid-template-columns: 1fr; }
  .product-card { display: grid; grid-template-columns: 125px minmax(0,1fr); }
  .product-image { height: 100%; min-height: 210px; }
  .product-image b { padding: 4px 7px; font-size: 8px; }
  .product-image .stock { top: auto; right: 8px; bottom: 8px; }
  .product-image .category { left: 8px; top: 8px; }
  .card-prices { grid-template-columns: 1fr; gap: 6px; }
  .stock-controls { grid-template-columns: 30px 1fr 30px; }
  .stock-controls a { grid-column: 1/-1; margin: 3px 0 0; text-align: right; }
  .form-panel { padding: 18px; }
  .form-grid { grid-template-columns: 1fr; }
  .field.wide { grid-column: auto; }
  .drop-zone { min-height: 190px; }
  .detail-info { padding: 20px; }
  .price-compare { grid-template-columns: 1fr; }
  .price-compare > div { display: grid; grid-template-columns: 1fr auto; align-items: center; }
  .price-compare small { grid-column: 1/-1; }
  .profit-grid { grid-template-columns: 1fr; }
  .profit-grid > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .detail-meta { display: grid; gap: 6px; }
  .head-actions .secondary { display: none; }
}

@media (max-width: 390px) {
  .metric-grid { grid-template-columns: 1fr; }
  .metric { min-height: auto; align-items: center; }
  .toolbar { grid-template-columns: 1fr; }
  .search { grid-column: auto; }
  .product-card { grid-template-columns: 105px minmax(0,1fr); }
}
