:root {
  --ink: #17221c;
  --muted: #6f7872;
  --line: #dde3de;
  --line-soft: #edf0ed;
  --paper: #ffffff;
  --canvas: #f3f5f2;
  --forest: #172a21;
  --forest-2: #21382c;
  --acid: #ddff65;
  --acid-dark: #a3c527;
  --blue: #315fdb;
  --amber: #d9871a;
  --red: #bf3e46;
  --green: #2d7e54;
  --shadow: 0 18px 50px rgba(21, 34, 26, .09);
  --radius: 16px;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
button, input, textarea { font: inherit; }
button { color: inherit; }
[hidden] { display: none !important; }

.panel-page { min-width: 320px; background: var(--canvas); overflow: hidden; }
.app-shell { display: grid; grid-template-columns: 238px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: relative; z-index: 2; display: flex; flex-direction: column; min-height: 100vh;
  padding: 26px 18px 20px; color: #f6f8f5; background:
    radial-gradient(circle at 50% 0, rgba(221,255,101,.08), transparent 35%), var(--forest);
}
.brand-lockup { display: flex; align-items: center; gap: 12px; padding: 0 9px 28px; }
.brand-lockup--large { padding: 0; }
.brand-mark {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px;
  color: var(--forest); background: var(--acid); font-weight: 800; letter-spacing: -.08em;
  box-shadow: inset 0 -3px 0 rgba(23,42,33,.14);
}
.brand-lockup strong { display: block; font-size: 19px; line-height: 1.1; letter-spacing: -.03em; }
.brand-lockup small { display: block; margin-top: 3px; color: #92a099; font-size: 10px; text-transform: uppercase; letter-spacing: .11em; }
.main-nav { display: grid; gap: 7px; }
.nav-item {
  position: relative; display: grid; grid-template-columns: 30px 1fr auto; align-items: center;
  width: 100%; min-height: 47px; padding: 6px 11px; border: 0; border-radius: 12px;
  color: #aab5af; background: transparent; cursor: pointer; text-align: left; transition: .18s ease;
}
.nav-item:hover { color: #fff; background: rgba(255,255,255,.055); }
.nav-item.active { color: #fff; background: rgba(255,255,255,.09); }
.nav-item.active::before { content: ""; position: absolute; left: -18px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--acid); }
.nav-icon { display: grid; place-items: center; width: 25px; height: 25px; border: 1px solid rgba(255,255,255,.14); border-radius: 8px; font-weight: 700; }
.nav-item b { min-width: 22px; padding: 3px 7px; border-radius: 20px; color: var(--forest); background: var(--acid); font-size: 11px; text-align: center; }
.sidebar-bottom { margin-top: auto; }
.service-status { display: flex; align-items: center; gap: 10px; padding: 16px 10px; border-top: 1px solid rgba(255,255,255,.08); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--acid); box-shadow: 0 0 0 5px rgba(221,255,101,.08); }
.service-status strong, .service-status small { display: block; }
.service-status strong { font-size: 12px; }
.service-status small { max-width: 155px; margin-top: 3px; color: #86958e; font-size: 10px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.logout-btn { display: flex; justify-content: space-between; width: 100%; padding: 11px 12px; border: 0; color: #87958e; background: transparent; cursor: pointer; }
.logout-btn:hover { color: #fff; }

.workspace { min-width: 0; height: 100vh; overflow: auto; }
.topbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; min-height: 108px; padding: 24px 34px 19px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.84); backdrop-filter: blur(12px); }
.eyebrow { display: block; margin-bottom: 6px; color: #829088; font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.topbar h1 { margin: 0; font-size: 30px; letter-spacing: -.045em; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.mode-badge { display: inline-flex; align-items: center; gap: 7px; padding: 8px 11px; border-radius: 30px; font-size: 11px; font-weight: 700; }
.mode-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; }
.mode-badge.test { color: #8a5b13; background: #fff4d9; }
.mode-badge.test::before { background: #edae39; }
.mode-badge.live { color: #1f7048; background: #e4f5ea; }
.mode-badge.live::before { background: #35a368; }
.sync-btn { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border: 1px solid #d5ddd7; border-radius: 10px; background: #fff; cursor: pointer; box-shadow: 0 2px 6px rgba(21,34,26,.03); }
.sync-btn:hover { border-color: #aab6ad; }
.sync-btn:disabled { opacity: .6; cursor: wait; }
.sync-btn.spinning span { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.inbox-view { padding: 20px 34px 30px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.search-field { display: flex; align-items: center; gap: 9px; width: min(430px, 44vw); height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.search-field span { color: #8b968f; font-size: 20px; transform: rotate(-15deg); }
.search-field input { width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 12px; }
.search-field:focus-within { border-color: #9aaa9f; box-shadow: 0 0 0 3px rgba(49,95,219,.07); }
.filter-group { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: #e9ede9; }
.filter { display: flex; align-items: center; gap: 5px; height: 31px; padding: 0 10px; border: 0; border-radius: 8px; color: #6d7771; background: transparent; font-size: 11px; cursor: pointer; }
.filter:hover { color: var(--ink); }
.filter.active { color: var(--ink); background: #fff; box-shadow: 0 2px 7px rgba(23,34,28,.08); font-weight: 650; }
.filter span { display: grid; place-items: center; min-width: 17px; height: 17px; border-radius: 8px; color: #fff; background: #ad7940; font-size: 9px; }

.desk { display: grid; grid-template-columns: minmax(300px, 38%) minmax(460px, 1fr); min-height: calc(100vh - 205px); border: 1px solid var(--line); border-radius: 17px; overflow: hidden; background: #fff; box-shadow: var(--shadow); }
.inquiry-list { min-width: 0; border-right: 1px solid var(--line); background: #f8faf8; }
.list-summary { display: flex; justify-content: space-between; align-items: center; height: 46px; padding: 0 16px; border-bottom: 1px solid var(--line-soft); color: #77837b; font-size: 11px; }
.list-summary span { color: var(--ink); font-weight: 650; }
.items-list { max-height: calc(100vh - 253px); overflow-y: auto; transition: opacity .18s; }
.items-list.loading { opacity: .45; }
.item-card { display: block; width: 100%; padding: 15px 17px 14px; border: 0; border-bottom: 1px solid #e6ebe7; background: transparent; cursor: pointer; text-align: left; transition: .16s; }
.item-card:hover { background: #fff; }
.item-card.selected { position: relative; background: #fff; box-shadow: 0 9px 25px rgba(22,36,27,.06); }
.item-card.selected::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--acid-dark); }
.item-card__top, .item-card__foot, .item-card__meta { display: flex; align-items: center; }
.item-card__top { justify-content: space-between; margin-bottom: 9px; }
.item-card time { color: #949d97; font-size: 10px; }
.kind-pill { padding: 4px 7px; border-radius: 6px; font-size: 9px; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; }
.kind-pill.question { color: #315a4b; background: #e1eee7; }
.kind-pill.feedback { color: #624f19; background: #f5eccf; }
.item-card h3 { margin: 0 0 7px; overflow: hidden; font-size: 13px; font-weight: 720; letter-spacing: -.01em; white-space: nowrap; text-overflow: ellipsis; }
.item-card__meta { flex-wrap: wrap; gap: 11px; margin-bottom: 9px; color: #818b85; font-size: 10px; }
.item-card__text { display: -webkit-box; margin: 0 0 11px; overflow: hidden; color: #4d5851; font-size: 12px; line-height: 1.45; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.item-card__foot { justify-content: space-between; gap: 8px; }
.status-badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; border-radius: 7px; font-size: 9px; font-weight: 700; }
.status-badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; }
.status-badge.new { color: #27538d; background: #e8f1ff; }.status-badge.new::before { background: #4a82cf; }
.status-badge.draft { color: #765d1f; background: #fbf0d1; }.status-badge.draft::before { background: #cea43b; }
.status-badge.review { color: #894249; background: #fbe7e8; }.status-badge.review::before { background: #ca5963; }
.status-badge.published { color: #2b704d; background: #e2f3e9; }.status-badge.published::before { background: #459569; }
.review-flag { color: #9b5960; font-size: 9px; font-weight: 650; }
.stars { display: inline-flex; gap: 1px; color: #d6d9d6; }
.stars i { font-style: normal; font-size: 10px; }.stars i.filled { color: #e1a52e; }

.editor { min-width: 0; padding: 24px 28px 28px; overflow-y: auto; max-height: calc(100vh - 205px); background: #fff; }
.empty-editor { display: grid; place-items: center; background: linear-gradient(135deg, #fcfdfc, #f6f8f6); }
.editor-placeholder { max-width: 270px; color: #9ca59f; text-align: center; }
.editor-placeholder span { display: grid; place-items: center; width: 46px; height: 46px; margin: auto auto 14px; border: 1px dashed #ccd3ce; border-radius: 50%; font-size: 22px; }
.editor-placeholder h2 { margin: 0 0 7px; color: #59655d; font-size: 16px; }.editor-placeholder p { margin: 0; font-size: 12px; line-height: 1.5; }
.editor-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 17px; }
.editor-head h2 { margin: 0; font-size: 21px; letter-spacing: -.035em; }
.product-meta { display: flex; flex-wrap: wrap; gap: 0; margin-bottom: 19px; padding: 11px 0; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.meta-cell { min-width: 120px; padding: 0 20px; border-right: 1px solid var(--line-soft); }
.meta-cell:first-child { padding-left: 0; }.meta-cell:last-child { border-right: 0; }
.meta-cell > span:first-child { display: block; margin-bottom: 4px; color: #919a94; font-size: 9px; text-transform: uppercase; letter-spacing: .07em; }
.meta-cell strong { font-size: 11px; font-weight: 680; }
.customer-message { position: relative; padding: 15px 18px 15px 34px; border: 1px solid #dfe6e1; border-radius: 13px; background: #f8faf8; }
.quote-mark { position: absolute; left: 13px; top: 10px; color: #9db0a3; font-family: Georgia, serif; font-size: 27px; }
.customer-message p { margin: 0; color: #344139; font-size: 13px; line-height: 1.55; white-space: pre-wrap; }
.response-block { margin-top: 22px; }
.response-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.response-title > div { display: flex; align-items: center; gap: 7px; }.response-title h3 { margin: 0; font-size: 13px; }
.ai-spark { display: grid; place-items: center; width: 21px; height: 21px; border-radius: 7px; color: var(--forest); background: var(--acid); font-size: 11px; }
.char-count { color: #929b95; font-size: 10px; }
.warning-box { margin-bottom: 10px; padding: 10px 12px; border: 1px solid #f1d6b1; border-radius: 10px; background: #fff8ea; }
.warning-box strong { color: #85591b; font-size: 11px; }.warning-box p { margin: 3px 0 0; color: #926e39; font-size: 10px; line-height: 1.4; }
.response-textarea { display: block; width: 100%; min-height: 150px; resize: vertical; padding: 14px; border: 1px solid #cfd8d1; border-radius: 12px; outline: 0; color: #2d3831; background: #fff; font-size: 13px; line-height: 1.55; }
.response-textarea:focus { border-color: #8ca093; box-shadow: 0 0 0 3px rgba(87,115,97,.08); }
.response-textarea.limit-near { border-color: #dc9b44; }
.ai-tools { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.tool-btn, .primary-mini { height: 30px; padding: 0 10px; border: 1px solid #d6ded8; border-radius: 8px; background: #fff; color: #536058; font-size: 10px; cursor: pointer; }
.tool-btn:hover { border-color: #9baa9f; color: var(--ink); }
.primary-mini { border-color: var(--forest); color: #fff; background: var(--forest); }.primary-mini:hover { background: #294035; }
.manual-only { padding: 8px 10px; border-radius: 8px; color: #8a575b; background: #f9e9ea; font-size: 10px; font-weight: 650; }
.manual-row { display: inline-flex; align-items: center; gap: 8px; margin-top: 13px; color: #66716a; font-size: 10px; cursor: pointer; }
.manual-row input { position: absolute; opacity: 0; }
.checkmark { display: grid; place-items: center; width: 16px; height: 16px; border: 1px solid #c5cec7; border-radius: 5px; background: #fff; }
.manual-row input:checked + .checkmark { border-color: var(--forest); background: var(--forest); }.manual-row input:checked + .checkmark::after { content: "✓"; color: #fff; font-size: 10px; }
.editor-footer { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; padding-top: 15px; border-top: 1px solid var(--line-soft); }
.secondary-btn, .publish-btn, .primary-btn { height: 38px; padding: 0 15px; border-radius: 10px; font-weight: 680; font-size: 11px; cursor: pointer; }
.secondary-btn { border: 1px solid #ccd5cf; background: #fff; }.secondary-btn:hover { background: #f7f9f7; }
.publish-btn, .primary-btn { border: 1px solid var(--forest); color: #fff; background: var(--forest); box-shadow: 0 4px 12px rgba(23,42,33,.15); }
.publish-btn:hover, .primary-btn:hover { background: var(--forest-2); }.publish-btn:disabled { opacity: .5; cursor: default; }

.empty-state { padding: 70px 20px; color: #8c9690; text-align: center; }
.empty-state div { display: grid; place-items: center; width: 42px; height: 42px; margin: auto auto 12px; border-radius: 50%; color: #5f7567; background: #eaf0ec; }
.empty-state h3 { margin: 0 0 5px; color: #58645d; font-size: 14px; }.empty-state p { margin: 0; font-size: 11px; }

.history-view { padding: 24px 34px; }
.history-head { display: flex; justify-content: space-between; margin-bottom: 16px; }.history-head h2 { margin: 0 0 4px; font-size: 17px; }.history-head p { margin: 0; color: var(--muted); font-size: 11px; }
.history-table-wrap { border: 1px solid var(--line); border-radius: 15px; overflow: hidden; background: #fff; box-shadow: var(--shadow); }
.history-table { width: 100%; border-collapse: collapse; }
.history-table th { padding: 12px 14px; color: #849087; background: #f7f9f7; font-size: 9px; letter-spacing: .08em; text-align: left; text-transform: uppercase; }
.history-table td { max-width: 330px; padding: 14px; border-top: 1px solid var(--line-soft); color: #48544c; font-size: 11px; vertical-align: top; }
.history-product strong, .history-product span { display: block; }.history-product span { margin-top: 4px; color: #8a948e; font-size: 9px; }
.history-response { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-badge { padding: 5px 7px; border-radius: 7px; font-size: 9px; font-weight: 700; }
.result-badge.published { color: #2b704d; background: #e2f3e9; }.result-badge.blocked_test_mode { color: #80601d; background: #f9efd2; }.result-badge.blocked_safety, .result-badge.wb_error { color: #8a4148; background: #f8e5e7; }

.toast { position: fixed; right: 24px; bottom: 24px; z-index: 10; max-width: min(420px, calc(100vw - 48px)); padding: 13px 16px; border-radius: 11px; color: #fff; background: #28342d; box-shadow: 0 15px 40px rgba(20,31,24,.25); font-size: 12px; animation: toast-in .25s ease both; }
.toast.success { background: #27734d; }.toast.error { background: #a53e47; }.toast.info { color: #5f4718; background: #ffe9af; }
@keyframes toast-in { from { transform: translateY(10px); opacity: 0; } }

.login-page { min-height: 100vh; color: #fff; background: var(--forest); }
.login-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(420px, 42%); min-height: 100vh; }
.login-brand { position: relative; display: flex; flex-direction: column; justify-content: space-between; min-height: 100vh; padding: 46px 6vw 40px; overflow: hidden; background:
  radial-gradient(circle at 75% 35%, rgba(221,255,101,.13), transparent 28%),
  linear-gradient(145deg, #16271f 15%, #1e3529 100%); }
.login-brand::before { content: ""; position: absolute; width: 540px; height: 540px; right: -250px; top: calc(50% - 270px); border: 1px solid rgba(221,255,101,.10); border-radius: 50%; box-shadow: 0 0 0 70px rgba(221,255,101,.025), 0 0 0 140px rgba(221,255,101,.018); }
.login-copy { position: relative; z-index: 1; max-width: 620px; padding: 70px 0; }
.login-copy .eyebrow { color: var(--acid); }.login-copy h1 { max-width: 580px; margin: 0 0 20px; font-size: clamp(42px, 5.2vw, 76px); line-height: .98; letter-spacing: -.06em; }
.login-copy p { max-width: 480px; margin: 0; color: #b4c0b9; font-size: 16px; line-height: 1.55; }
.login-trust { position: relative; z-index: 1; display: flex; align-items: center; gap: 9px; color: #86988d; font-size: 11px; }.login-trust span { width: 8px; height: 8px; border-radius: 50%; background: var(--acid); }
.login-card { display: grid; place-items: center; min-height: 100vh; padding: 34px; color: var(--ink); background: #f4f6f3; }
.login-card form { width: min(390px, 100%); padding: 34px; border: 1px solid #dfe5e0; border-radius: 20px; background: #fff; box-shadow: 0 24px 70px rgba(16,31,21,.12); }
.login-card__head { display: flex; align-items: center; gap: 13px; margin-bottom: 28px; }.login-card__head h2 { margin: 0 0 4px; font-size: 21px; letter-spacing: -.035em; }.login-card__head p { margin: 0; color: var(--muted); font-size: 11px; }
.secure-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; color: var(--forest); background: var(--acid); font-size: 22px; font-weight: 700; }
.login-card label { display: block; margin-bottom: 7px; color: #5f6b63; font-size: 10px; font-weight: 700; }
.password-field { display: flex; height: 45px; border: 1px solid #cad4cc; border-radius: 11px; overflow: hidden; }.password-field:focus-within { border-color: #7c9584; box-shadow: 0 0 0 3px rgba(73,110,86,.08); }
.password-field input { min-width: 0; flex: 1; padding: 0 12px; border: 0; outline: 0; letter-spacing: .08em; }.password-field button { padding: 0 12px; border: 0; color: #657269; background: #f5f7f5; font-size: 10px; cursor: pointer; }
.form-error { margin: 9px 0 0; color: var(--red); font-size: 10px; }
.login-submit { display: flex; align-items: center; justify-content: space-between; width: 100%; height: 45px; margin-top: 15px; padding: 0 16px; }
.login-submit:disabled { opacity: .7; cursor: wait; }
.login-note { margin: 14px 0 0; color: #909a94; font-size: 9px; text-align: center; }

@media (max-width: 980px) {
  .app-shell { grid-template-columns: 76px minmax(0,1fr); }
  .sidebar { padding-inline: 11px; }.brand-lockup { padding-inline: 6px; }.brand-lockup > div, .nav-item > span:nth-child(2), .nav-item b, .service-status div, .logout-btn { display: none; }
  .nav-item { display: grid; grid-template-columns: 1fr; place-items: center; padding: 6px; }.nav-item.active::before { left: -11px; }
  .service-status { justify-content: center; }.topbar, .inbox-view, .history-view { padding-left: 22px; padding-right: 22px; }
  .desk { grid-template-columns: minmax(260px, 39%) minmax(390px,1fr); }
}

@media (max-width: 760px) {
  .panel-page { overflow: auto; }.app-shell { display: block; }.sidebar { position: sticky; top: 0; z-index: 5; flex-direction: row; align-items: center; min-height: auto; height: 64px; padding: 9px 14px; }
  .brand-lockup { padding: 0; }.brand-lockup .brand-mark { width: 38px; height: 38px; }.main-nav { display: flex; margin-left: auto; }.nav-item { width: 44px; min-height: 42px; }.nav-item.active::before { inset: auto 9px -9px; width: auto; height: 3px; }
  .sidebar-bottom { display: none; }.workspace { height: auto; overflow: visible; }.topbar { min-height: 92px; padding: 17px 16px; }.topbar h1 { font-size: 25px; }.mode-badge { display: none; }.sync-btn { width: 39px; padding: 0; justify-content: center; font-size: 0; }.sync-btn span { font-size: 17px; }
  .inbox-view, .history-view { padding: 14px 12px 24px; }.toolbar { align-items: stretch; flex-direction: column; gap: 9px; }.search-field { width: 100%; }.filter-group { overflow-x: auto; }.filter { flex: 0 0 auto; }
  .desk { display: block; min-height: 0; overflow: visible; }.inquiry-list { border-right: 0; }.items-list { max-height: 360px; }.editor { max-height: none; padding: 21px 17px; border-top: 1px solid var(--line); }.empty-editor { min-height: 300px; }
  .editor-footer { position: sticky; bottom: 0; margin: 15px -17px -21px; padding: 12px 17px; background: rgba(255,255,255,.95); }.editor-footer > * { flex: 1; }
  .history-table { min-width: 760px; }.history-table-wrap { overflow-x: auto; }
  .login-wrap { display: block; }.login-brand { display: none; }.login-card { min-height: 100vh; padding: 20px; }.login-card form { padding: 26px 22px; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* v2 — крупная рабочая панель */
body { font-size: 15px; }
.app-shell { grid-template-columns: 260px minmax(0, 1fr); }
.sidebar { padding: 30px 20px 22px; }
.brand-mark { width: 48px; height: 48px; border-radius: 14px; font-size: 18px; }
.brand-lockup strong { font-size: 22px; }
.brand-lockup small { font-size: 11px; }
.main-nav { gap: 9px; }
.nav-item { min-height: 54px; padding: 8px 13px; border-radius: 14px; font-size: 14px; font-weight: 620; }
.nav-icon { width: 30px; height: 30px; font-size: 14px; }
.nav-item b { min-width: 26px; padding: 4px 8px; font-size: 12px; }
.nav-item--negative { color: #e8b1b5; }
.nav-item--negative .nav-icon { border-color: rgba(255,137,145,.28); color: #ff9ca3; }
.nav-item--negative b { color: #fff; background: #c84852; }
.nav-item--negative.active { background: rgba(200,72,82,.18); }
.nav-item--negative.active::before { background: #ff7d86; }
.service-status strong { font-size: 13px; }.service-status small { font-size: 11px; }

.topbar { min-height: 122px; padding: 27px 38px 23px; }
.eyebrow { margin-bottom: 8px; font-size: 11px; }
.topbar h1 { font-size: 36px; }
.topbar-actions { gap: 12px; }
.store-switcher { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 9px 0 14px; border: 1px solid #d3dcd5; border-radius: 13px; background: #fff; box-shadow: 0 4px 14px rgba(21,34,26,.05); }
.store-switcher span { color: #7c8880; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; }
.store-switcher select { min-width: 140px; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 14px; font-weight: 720; cursor: pointer; }
.mode-badge { padding: 10px 13px; font-size: 12px; }
.sync-btn { height: 46px; padding: 0 17px; border-radius: 13px; font-size: 13px; font-weight: 650; }

.inbox-view { padding: 24px 38px 36px; }
.toolbar { margin-bottom: 18px; }
.search-field { width: min(520px, 48vw); height: 46px; padding: 0 15px; border-radius: 13px; }
.search-field input { font-size: 14px; }
.filter-group { gap: 5px; padding: 5px; border-radius: 13px; }
.filter, .negative-filter { display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 13px; border: 0; border-radius: 9px; color: #657169; background: transparent; font-size: 12px; font-weight: 620; cursor: pointer; white-space: nowrap; }
.filter.active, .negative-filter.active { color: var(--ink); background: #fff; box-shadow: 0 3px 9px rgba(23,34,28,.09); }
.filter span, .negative-filter span { display: grid; place-items: center; min-width: 19px; height: 19px; border-radius: 10px; color: #fff; background: #b75a61; font-size: 10px; }
.negative-filters { background: #f4e4e5; border-color: #e7c8cb; }
.negative-filter { color: #8a4e54; }
.negative-alert { display: flex; align-items: center; justify-content: space-between; gap: 22px; margin: -2px 0 18px; padding: 14px 18px; border: 1px solid #edc5c8; border-radius: 13px; color: #71383e; background: linear-gradient(90deg,#fff0f1,#fff8f8); }
.negative-alert > div { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.negative-alert > div > span { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 9px; color: #fff; background: #c94d57; font-weight: 800; }
.negative-alert strong { font-size: 14px; }.negative-alert p { margin: 0; color: #8e5b60; font-size: 12px; line-height: 1.45; }

.desk { grid-template-columns: minmax(420px, 43%) minmax(520px, 1fr); min-height: calc(100vh - 230px); border-radius: 20px; }
.list-summary { height: 54px; padding: 0 20px; font-size: 13px; }
.items-list { max-height: calc(100vh - 284px); }
.item-card { display: grid; grid-template-columns: 92px minmax(0,1fr); gap: 16px; padding: 18px 20px; min-height: 150px; }
.item-thumb { display: block; width: 92px; height: 116px; overflow: hidden; border: 1px solid #e1e7e2; border-radius: 12px; background: #edf1ee; }
.item-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.item-card__body { display: block; min-width: 0; }
.item-card__top { margin-bottom: 10px; }
.card-labels { display: flex; align-items: center; gap: 6px; min-width: 0; }
.store-pill { max-width: 115px; overflow: hidden; padding: 5px 8px; border-radius: 7px; color: #5b665f; background: #edf1ee; font-size: 10px; font-weight: 720; white-space: nowrap; text-overflow: ellipsis; }
.item-card time { font-size: 11px; }
.kind-pill { padding: 5px 8px; font-size: 10px; }
.item-card h3 { margin-bottom: 8px; font-size: 16px; }
.item-card__meta { gap: 13px; margin-bottom: 10px; font-size: 12px; }
.item-card__text { margin-bottom: 12px; font-size: 14px; line-height: 1.5; }
.status-badge { padding: 5px 8px; font-size: 10px; }
.review-flag { font-size: 11px; }
.stars i { font-size: 13px; }

.editor { max-height: calc(100vh - 230px); padding: 30px 34px 34px; }
.editor-head { align-items: center; margin-bottom: 22px; }
.editor-heading { display: flex; align-items: center; gap: 18px; min-width: 0; }
.editor-product-image { flex: 0 0 auto; width: 94px; height: 118px; overflow: hidden; border: 1px solid #dfe6e1; border-radius: 15px; background: #edf1ee; box-shadow: 0 9px 24px rgba(28,43,33,.08); }
.editor-product-image img { width: 100%; height: 100%; object-fit: cover; }
.editor-heading > div:last-child { min-width: 0; }
.editor-title-meta { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; }
.editor-title-meta .eyebrow { margin: 0; }
.editor-store { padding: 5px 8px; border-radius: 7px; color: #536359; background: #e7ede9; font-size: 10px; font-weight: 750; }
.editor-head h2 { font-size: 27px; line-height: 1.12; }
.product-meta { margin-bottom: 24px; padding: 15px 0; }
.meta-cell { min-width: 145px; padding: 0 24px; }
.meta-cell > span:first-child { margin-bottom: 6px; font-size: 10px; }.meta-cell strong { font-size: 13px; }
.customer-message { padding: 20px 22px 20px 42px; border-radius: 15px; }
.customer-message p { font-size: 16px; line-height: 1.6; }
.quote-mark { left: 16px; top: 14px; font-size: 31px; }
.response-block { margin-top: 28px; }
.response-title { margin-bottom: 13px; }.response-title h3 { font-size: 16px; }
.ai-spark { width: 26px; height: 26px; font-size: 13px; }.char-count { font-size: 12px; }
.warning-box { margin-bottom: 13px; padding: 13px 15px; }.warning-box strong { font-size: 13px; }.warning-box p { margin-top: 5px; font-size: 12px; }
.response-textarea { min-height: 190px; padding: 17px; border-radius: 14px; font-size: 16px; line-height: 1.62; }
.ai-tools { gap: 9px; margin-top: 12px; }
.tool-btn, .primary-mini { height: 38px; padding: 0 13px; border-radius: 10px; font-size: 12px; }
.manual-only { padding: 10px 13px; font-size: 12px; }.manual-row { margin-top: 16px; font-size: 13px; }
.editor-footer { gap: 10px; margin-top: 24px; padding-top: 19px; }
.secondary-btn, .publish-btn, .primary-btn, .archive-btn { height: 44px; padding: 0 17px; border-radius: 12px; font-size: 13px; font-weight: 720; cursor: pointer; }
.archive-btn { margin-right: auto; border: 1px solid #d9868d; color: #9a3f47; background: #fff1f2; }
.archive-btn:hover { background: #fde4e6; }

.history-view { padding: 28px 38px; }.history-head h2 { font-size: 22px; }.history-head p { font-size: 13px; }
.history-table th { padding: 15px 17px; font-size: 10px; }.history-table td { padding: 17px; font-size: 13px; }.history-product span { font-size: 11px; }
.result-badge.archived_after_appeal { color: #6d4b1b; background: #f7e9ca; }.result-badge.restored_from_archive { color: #315b7b; background: #e2eff8; }
.toast { padding: 16px 19px; font-size: 14px; }
.login-card form { width: min(440px,100%); padding: 40px; }
.login-card__head h2 { font-size: 26px; }.login-card__head p { font-size: 14px; }
.secure-icon { width: 48px; height: 48px; font-size: 24px; }
.login-card label { margin-bottom: 9px; font-size: 13px; }
.password-field { height: 52px; }.password-field input { font-size: 16px; }.password-field button { font-size: 12px; }
.form-error { font-size: 12px; }.login-submit { height: 50px; font-size: 14px; }.login-note { font-size: 11px; }

@media (max-width: 1180px) {
  .app-shell { grid-template-columns: 90px minmax(0,1fr); }
  .sidebar { padding-inline: 14px; }.brand-lockup { padding-inline: 6px; }.brand-lockup > div, .nav-item > span:nth-child(2), .nav-item b, .service-status div, .logout-btn { display: none; }
  .nav-item { display: grid; grid-template-columns: 1fr; place-items: center; padding: 7px; }.nav-item.active::before { left: -14px; }
  .service-status { justify-content: center; }
  .desk { grid-template-columns: minmax(360px, 42%) minmax(470px,1fr); }
  .topbar, .inbox-view, .history-view { padding-left: 24px; padding-right: 24px; }
}

@media (max-width: 820px) {
  .app-shell { display: block; }.sidebar { position: sticky; top: 0; z-index: 5; flex-direction: row; min-height: auto; height: 70px; padding: 10px 15px; }
  .brand-lockup { padding: 0; }.main-nav { display: flex; margin-left: auto; }.nav-item { width: 48px; min-height: 46px; }.nav-item.active::before { inset: auto 9px -10px; width: auto; height: 3px; }
  .sidebar-bottom { display: none; }.workspace { height: auto; overflow: visible; }.topbar { align-items: center; min-height: 104px; padding: 18px 16px; }.topbar h1 { font-size: 28px; }
  .store-switcher { height: 42px; padding-left: 10px; }.store-switcher span, .mode-badge { display: none; }.store-switcher select { min-width: 105px; font-size: 12px; }
  .sync-btn { width: 42px; padding: 0; justify-content: center; font-size: 0; }.sync-btn span { font-size: 18px; }
  .inbox-view, .history-view { padding: 15px 12px 26px; }.toolbar { flex-direction: column; align-items: stretch; gap: 10px; }.search-field { width: 100%; }.filter-group { overflow-x: auto; }
  .negative-alert { align-items: flex-start; flex-direction: column; gap: 8px; }.negative-alert p { font-size: 11px; }
  .desk { display: block; min-height: 0; overflow: visible; }.inquiry-list { border-right: 0; }.items-list { max-height: 480px; }.item-card { grid-template-columns: 78px minmax(0,1fr); }.item-thumb { width: 78px; height: 100px; }
  .editor { max-height: none; padding: 24px 18px; border-top: 1px solid var(--line); }.editor-product-image { width: 76px; height: 96px; }.editor-head h2 { font-size: 21px; }
  .editor-footer { position: sticky; bottom: 0; flex-wrap: wrap; margin: 18px -18px -24px; padding: 13px 18px; background: rgba(255,255,255,.96); }.editor-footer > * { flex: 1 1 140px; }.archive-btn { margin-right: 0; }
}
