@font-face { font-family: Pretendard; src: url('/assets/PretendardRegular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: Pretendard; src: url('/assets/PretendardMedium.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: Pretendard; src: url('/assets/PretendardSemiBold.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: Pretendard; src: url('/assets/PretendardBold.woff2') format('woff2'); font-weight: 700; font-display: swap; }

:root {
  --primary: #3a5bff;
  --primary-hover: #2949e6;
  --ink: #212121;
  --secondary: #62686d;
  --muted: #6f7680;
  --line: #e3e6eb;
  --hover: #f6f7f9;
  --sidebar: #f8f8f9;
}
* { box-sizing: border-box; scrollbar-width: thin; scrollbar-color: #bdc7d2 transparent; }
html, body { margin: 0; height: 100%; }
body { color: var(--ink); background: #fff; font: 400 14px/1.5 Pretendard, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; }
button, input, select, textarea { font: inherit; color: inherit; }
button, summary { cursor: pointer; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
input:focus, select:focus, textarea:focus { outline: 2px solid #b9c5ff; outline-offset: 0; border-color: var(--primary); }
button:disabled { cursor: default; opacity: .5; }
a { color: inherit; }
svg { display: block; flex: 0 0 auto; }
strong, b { font-weight: 600; }
small { font-size: 13px; }
button { touch-action: manipulation; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.muted { color: var(--muted); }
.empty-value { color: #8c939b; }

.shell { display: grid; grid-template-columns: 192px minmax(0, 1fr); height: 100dvh; min-height: 0; }
.sidebar { display: flex; flex-direction: column; min-height: 0; padding: 22px 12px 16px; border-right: 1px solid var(--line); background: var(--sidebar); }
.brand-lockup { display: flex; align-items: center; gap: 15px; margin: 0 8px; color: var(--secondary); text-decoration: none; }
.brand-lockup img { display: block; width: 80px; height: 34px; object-fit: contain; }
.brand-product { padding-left: 13px; border-left: 1px solid #d5d9df; font-size: 13px; white-space: nowrap; }
.nav { display: grid; gap: 4px; margin-top: 30px; }
.nav-item { display: flex; align-items: center; gap: 10px; min-height: 37px; padding: 7px 10px; border: 0; border-radius: 4px; color: var(--secondary); text-decoration: none; font-size: 14px; font-weight: 500; }
.nav-item:hover { background: #eeeef1; color: var(--ink); }
.nav-item.active { background: #e9ecf2; color: var(--ink); }
.nav-item svg { color: #717882; }
.nav-item.active svg { color: var(--ink); }
.nav-item > span { flex: 1; }
.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 80px; padding: 20px 28px 16px; }
.heading-title { display: flex; align-items: baseline; gap: 10px; }
.page-heading h1 { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: -.2px; }
.heading-count { color: var(--muted); font-size: 14px; }
.page-actions { display: flex; align-items: center; gap: 8px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 34px; padding: 6px 11px; border: 1px solid #d7dce3; border-radius: 4px; color: #454a50; background: #fff; font-size: 13px; font-weight: 500; white-space: nowrap; }
.btn:hover { background: var(--hover); border-color: #bdc5cf; }
.btn-primary { color: #fff; border-color: var(--primary); background: var(--primary); }
.btn-primary:hover { color: #fff; border-color: var(--primary-hover); background: var(--primary-hover); }
.text-button { display: inline-flex; align-items: center; gap: 5px; border: 0; padding: 3px 0; color: var(--secondary); background: transparent; font-size: 13px; white-space: nowrap; }
.text-button:hover { color: var(--ink); text-decoration: underline; }
.icon-button { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 4px; background: transparent; color: var(--secondary); }
.icon-button:hover { color: var(--ink); background: #edeff2; }
.list-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 51px; margin: 0 28px; }
.toolbar-controls { display: flex; align-items: center; gap: 8px; }
.search { display: flex; align-items: center; gap: 7px; width: 235px; height: 32px; padding: 0 9px; border: 1px solid #d7dce3; border-radius: 4px; color: var(--muted); }
.search:focus-within { border-color: var(--primary); }
.search input { min-width: 0; width: 100%; border: 0; padding: 0; outline: 0; background: transparent; font-size: 13px; }
.search input::placeholder { color: var(--muted); }
.filter-select { height: 32px; max-width: 130px; padding: 0 24px 0 9px; border: 1px solid #d7dce3; border-radius: 4px; background: #fff; font-size: 13px; }
.column-picker { position: relative; }
.column-picker > summary { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 9px; border: 1px solid #d7dce3; border-radius: 4px; color: var(--secondary); font-size: 13px; list-style: none; white-space: nowrap; }
.column-picker > summary::-webkit-details-marker { display: none; }
.column-picker > summary:hover { background: var(--hover); }
.column-menu { position: absolute; z-index: 15; top: 37px; right: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; width: 370px; max-height: 430px; padding: 10px; overflow: auto; border: 1px solid #d7dce3; border-radius: 5px; background: #fff; box-shadow: 0 4px 14px #21212114; }
.column-menu label { display: flex; align-items: center; gap: 7px; min-height: 34px; padding: 5px; font-size: 13px; cursor: pointer; }
.column-menu label:hover { background: var(--hover); }
input[type=checkbox], input[type=radio] { width: 15px; height: 15px; margin: 0; accent-color: var(--primary); }
.workspace { display: flex; flex: 1; min-width: 0; min-height: 0; border-top: 1px solid var(--line); }
.collection { display: flex; flex-direction: column; flex: 1; min-width: 0; min-height: 0; }
.table-scroll { flex: 1; width: 100%; min-width: 0; min-height: 0; overflow-x: auto; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: auto; scrollbar-color: auto; }
.table-scroll::-webkit-scrollbar { width: 12px; height: 0; }
.table-scroll::-webkit-scrollbar-track { background: #eef1f4; }
.table-scroll::-webkit-scrollbar-thumb { border: 3px solid #eef1f4; border-radius: 8px; background: #9da8b4; }
.table-scroll::-webkit-scrollbar-thumb:hover { background: #748391; }
.data-table { width: var(--table-width); table-layout: fixed; border-spacing: 0; border-collapse: separate; text-align: left; }
.data-table th { position: sticky; top: 0; z-index: 2; height: 38px; padding: 8px 14px; border-bottom: 1px solid var(--line); background: #fafafb; color: var(--secondary); font-size: 13px; font-weight: 500; white-space: nowrap; }
.data-table td { height: 68px; padding: 10px 14px; border-right: 1px solid #eff0f2; border-bottom: 1px solid #eceef1; background: #fff; vertical-align: middle; font-size: 14px; }
.data-table td[data-order-cell="customer"], .data-table td:has([data-order-field]) { cursor: pointer; }
.data-table td:has([data-order-text]) { cursor: text; }
.data-table td[data-order-cell="customer"]:hover, .data-table td:has([data-order-field]):hover, .data-table td:has([data-order-field][aria-expanded="true"]) { background: var(--hover); }
.data-table td:first-child, .data-table th:first-child { position: sticky; left: 0; border-right: 1px solid var(--line); }
.data-table td:first-child { z-index: 1; }
.data-table th:first-child { z-index: 3; }
.cell-primary { display: block; min-width: 0; text-decoration: none; }
.cell-primary strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 500; }
.cell-primary:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.cell-primary small { display: block; overflow: hidden; margin-top: 2px; color: var(--secondary); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.cell-text { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.date-value { white-space: nowrap; }
.date-value.today { color: #9c6a20; }
.cell-link { color: #466392; text-underline-offset: 3px; overflow-wrap: anywhere; }
.chip, .temp { display: inline-flex; align-items: center; gap: 5px; min-height: 23px; max-width: 100%; padding: 1px 6px; border-radius: 3px; font-size: 13px; font-weight: 400; white-space: nowrap; }
.chip-blue { color: #41628c; background: #eaf0f8; }
.chip-purple { color: #725a89; background: #f0eaf5; }
.chip-amber { color: #896322; background: #f8efd9; }
.chip-green { color: #357257; background: #e6f0e9; }
.chip-gray { color: #646b73; background: #edeef0; }
.chip-brown { color: #715646; background: #eee5df; }
.chip-orange { color: #8c572f; background: #f8e4d5; }
.chip-pink { color: #884c69; background: #f5e1eb; }
.chip-red { color: #984e46; background: #f9e2df; }
.temp-hot { color: #9b5364; background: #f7e8ed; }
.temp-warm { color: #476996; background: #e8eff9; }
.temp-cold { color: #68717b; background: #edf0f2; }
.property-select { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-height: 31px; margin-left: -4px; padding: 3px; border: 1px solid transparent; border-radius: 6px; background: transparent; text-align: left; vertical-align: middle; }
.property-select[data-order-field="temp"] { min-width: max-content; }
.property-select[data-order-field="temp"] .property-tags { flex-shrink: 0; }
.property-select:hover, .property-select[aria-expanded="true"] { border-color: #dce0e5; background: #fff; }
.property-select > svg { flex-shrink: 0; margin-right: 1px; color: #89919b; }
.property-select[aria-expanded="true"] > svg { color: var(--ink); transform: rotate(180deg); }
.property-tags { display: flex; align-items: center; gap: 4px; min-width: 0; }
.is-multiple .property-tags { flex-wrap: wrap; }
.property-placeholder { padding: 1px 4px; color: var(--muted); font-size: 13px; white-space: nowrap; }
.property-value { display: inline-flex; align-items: center; gap: 5px; min-width: 0; max-width: 100%; min-height: 23px; padding: 1px 7px; border-radius: 4px; font-size: 13px; font-weight: 400; line-height: 21px; }
.property-value > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status-value { border-radius: 12px; }
.status-value::before { content: ""; flex: 0 0 6px; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.property-menu { position: fixed; z-index: 25; width: 184px; max-width: calc(100vw - 16px); max-height: min(420px, calc(100dvh - 16px)); padding: 5px; overflow-y: auto; overscroll-behavior: contain; border: 1px solid #dfe3e8; border-radius: 8px; background: #fff; box-shadow: 0 6px 20px #1e293b14, 0 2px 4px #1e293b08; }
.property-menu-wide { width: 236px; }
.property-group-title { padding: 8px 8px 4px; color: var(--secondary); font-size: 12px; }
.property-menu [role=group] + [role=group] { margin-top: 5px; padding-top: 4px; border-top: 1px solid var(--line); }
.property-option { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 35px; padding: 5px 8px; border: 0; border-radius: 4px; background: transparent; text-align: left; }
.property-option:hover, .property-option:focus { outline: none; background: #f1f3f5; }
.property-option > svg { flex-shrink: 0; color: #536071; }
.property-clear { margin-top: 5px; border-top: 1px solid var(--line); border-radius: 0 0 4px 4px; color: var(--secondary); font-size: 13px; }
.cell-input { width: 100%; min-width: 0; height: 32px; padding: 5px 8px; border: 1px solid #dce0e5; border-radius: 4px; background: #fff; font-size: 14px; }
.cell-input:hover { border-color: #bbc3cd; }
.cell-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 2px #3a5bff12; }
.reminder-select { display: inline-flex; align-items: center; gap: 7px; max-width: 100%; min-height: 32px; padding: 5px 8px; border: 1px solid #dce0e5; border-radius: 4px; background: #fff; font-size: 13px; white-space: nowrap; }
.reminder-select > svg { flex-shrink: 0; color: var(--secondary); }
.reminder-select.is-empty { color: var(--muted); }
.reminder-select:hover, .reminder-select[aria-expanded="true"] { border-color: #bbc3cd; background: #fafbfc; }
.calendar-menu { width: 272px; padding: 10px; }
.calendar-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.calendar-heading strong { font-size: 14px; font-weight: 500; }
.calendar-weekdays, .calendar-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.calendar-weekdays span { padding: 4px 0 8px; color: var(--secondary); text-align: center; font-size: 12px; }
.calendar-day { display: grid; place-items: center; height: 32px; padding: 0; border: 1px solid transparent; border-radius: 4px; background: #fff; font-size: 13px; font-variant-numeric: tabular-nums; }
.calendar-day.outside-month { color: #a5aab1; }
.calendar-day.is-today { border-color: #c8cfdb; }
.calendar-day:hover { background: #f0f2f5; }
.calendar-day[aria-pressed="true"] { border-color: var(--primary); color: #fff; background: var(--primary); }
.calendar-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.calendar-footer button { padding: 4px 7px; border: 0; border-radius: 4px; color: var(--secondary); background: transparent; font-size: 13px; }
.calendar-footer button:hover:not(:disabled) { color: var(--ink); background: #f0f2f5; }
.calendar-footer button:disabled { color: #b2b7bf; cursor: default; }
.bant-list { display: flex; flex-wrap: wrap; gap: 4px; }
.bant-list span { padding: 1px 5px; border-radius: 3px; color: #606770; background: #eef0f3; font-size: 13px; }
.collection-footer { display: flex; align-items: center; flex-shrink: 0; gap: 16px; min-height: 35px; padding: 5px 15px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.collection-footer > span { flex-shrink: 0; }
.table-scroll-controls { display: flex; flex: 1; align-items: center; gap: 6px; min-width: 0; }
.table-scroll-controls .icon-button { flex: 0 0 24px; width: 24px; height: 24px; }
#table-scroll-position { appearance: none; flex: 1; width: 100%; min-width: 0; height: 20px; margin: 0; padding: 0; border: 0; background: transparent; cursor: ew-resize; }
#table-scroll-position::-webkit-slider-runnable-track { height: 7px; border-radius: 4px; background: #edf0f3; }
#table-scroll-position::-webkit-slider-thumb { appearance: none; width: 44px; height: 11px; margin-top: -2px; border: 0; border-radius: 6px; background: #929daa; }
#table-scroll-position::-moz-range-track { height: 7px; border-radius: 4px; background: #edf0f3; }
#table-scroll-position::-moz-range-thumb { width: 44px; height: 11px; border: 0; border-radius: 6px; background: #929daa; }
#table-scroll-position:disabled { cursor: default; opacity: .45; }
#table-scroll-position:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
.empty-state { padding: 50px 20px; color: var(--secondary); text-align: center; }

.order-page { flex: 1; min-height: 0; overflow-y: auto; scrollbar-gutter: stable; overscroll-behavior: contain; padding: 26px 32px 56px; }
.order-page-content { width: 100%; max-width: 1440px; margin: 0 auto; }
.order-page-history { display: flex; overflow: hidden; padding-bottom: 20px; }
.order-page-history > .order-page-content { display: flex; flex-direction: column; min-height: 0; }
.order-page-history .order-breadcrumb, .order-page-history .order-heading, .order-page-history .detail-tabs { flex-shrink: 0; }
.order-breadcrumb { margin-bottom: 24px; }
.back-link { display: inline-flex; align-items: center; gap: 7px; color: var(--secondary); text-decoration: none; font-size: 13px; }
.back-link:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.order-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.order-heading h1, .order-page h1 { margin: 0; font-size: 18px; line-height: 1.5; font-weight: 600; letter-spacing: -.2px; overflow-wrap: anywhere; }
.order-heading p { margin: 5px 0 0; color: var(--secondary); font-size: 14px; }
.detail-tabs { display: flex; gap: 24px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.detail-tabs a { display: block; margin-bottom: -1px; padding: 10px 1px; border-bottom: 2px solid transparent; color: var(--secondary); font-size: 14px; text-decoration: none; }
.detail-tabs a:hover { color: var(--ink); }
.detail-tabs a[aria-current="page"] { border-bottom-color: var(--ink); color: var(--ink); font-weight: 500; }
.order-properties { padding-bottom: 23px; }
.property-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 36px; }
.properties { display: grid; grid-template-columns: minmax(110px, max-content) minmax(0, 1fr); align-content: start; gap: 12px 16px; margin: 0; }
.properties dt { color: var(--secondary); font-size: 13px; padding-top: 1px; white-space: nowrap; }
.properties dd { min-width: 0; margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; font-size: 14px; }
.properties dd:has(.property-select, .cell-input, .reminder-select) { white-space: normal; }
.deal-history { display: flex; flex: 1; flex-direction: column; gap: 20px; min-width: 0; min-height: 0; }
.deal-history > .j-journey { flex-shrink: 0; }
.deal-history > .history-section { flex: 1; min-height: 0; overflow-y: auto; scrollbar-gutter: stable; overscroll-behavior: contain; padding-bottom: 20px; }
.history-section:focus-visible { outline-offset: -2px; }
.history-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 28px; }
.history-count { display: flex; gap: 16px; color: var(--secondary); font-size: 14px; }
.history-count strong { margin-left: 4px; color: var(--ink); font-weight: 500; }
.history-group + .history-group { margin-top: 28px; }
.history-group h2 { display: flex; align-items: baseline; gap: 8px; margin: 0 0 10px; font-size: 14px; font-weight: 600; }
.history-group h2 > span { color: var(--secondary); font-weight: 400; }
.history-list { margin: 0; padding: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); list-style: none; }
.history-list > li + li { border-top: 1px solid #eceef1; }
.history-record { scroll-margin-block: 24px; }
.history-record:focus-visible { outline-offset: -2px; }
.history-record.is-highlighted { background: #eff3ff; box-shadow: inset 3px 0 var(--primary); }
.history-record-row { display: flex; align-items: stretch; }
.history-record-row > .history-call, .history-record-row > .history-note { flex: 1; min-width: 0; }
.history-record-edit { align-self: flex-start; flex-shrink: 0; margin: 16px 12px 0 4px; }
.history-record.is-highlighted .history-call:hover { background: #e9efff; }
.history-record.is-highlighted .history-preview { display: block; -webkit-line-clamp: unset; white-space: pre-wrap; }
.history-call, .history-note { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: start; gap: 14px; padding: 18px 12px; }
.history-call { width: 100%; border: 0; background: transparent; text-align: left; }
.history-call:hover { background: #f8f9fb; }
.history-call[aria-expanded="true"] { background: #eff3ff; box-shadow: inset 3px 0 var(--primary); }
.history-call:focus-visible { outline-offset: -2px; }
.history-note { grid-template-columns: 32px minmax(0, 1fr); }
.history-icon { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: #626b76; }
.history-entry-content { min-width: 0; }
.history-entry-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; min-height: 23px; font-size: 14px; }
.history-entry-heading > strong { font-weight: 500; }
.history-entry-heading > time, .history-entry-heading > span { color: var(--secondary); }
.history-preview, .history-note-text { margin: 6px 0 0; font-size: 15px; line-height: 1.65; overflow-wrap: anywhere; }
.history-preview { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.history-note-text { white-space: pre-wrap; }
.history-phone { display: block; margin-top: 7px; color: var(--secondary); font-size: 13px; }
.history-open { display: flex; align-items: center; align-self: center; gap: 6px; padding-left: 14px; color: var(--secondary); font-size: 13px; white-space: nowrap; }
.history-call:hover .history-open, .history-call:focus-visible .history-open { color: var(--primary); }
.history-empty { margin: 0; padding: 48px 0; border-top: 1px solid var(--line); color: var(--secondary); text-align: center; }
.legacy-history { margin: 0 0 28px; padding: 0 0 24px; border-bottom: 1px solid var(--line); font-size: 15px; white-space: pre-wrap; line-height: 1.7; overflow-wrap: anywhere; }

.call-order-context { margin: 0 0 12px; color: var(--secondary); font-size: 13px; overflow-wrap: anywhere; }
.call-participant { margin: 0; font-size: 15px; font-weight: 500; overflow-wrap: anywhere; }
.call-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 6px; color: var(--secondary); font-size: 13px; }
.call-summary { margin: 24px 0; }
.call-summary h3 { margin: 0; font-size: 14px; font-weight: 500; }
.call-summary p { margin: 8px 0 0; font-size: 15px; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; }
.call-transcript h3 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 15px; font-weight: 500; }
.conversation { display: flex; flex-direction: column; gap: 22px; margin: 0; padding: 24px 0 12px; list-style: none; }
.message { display: flex; flex-direction: column; align-items: flex-start; align-self: flex-start; gap: 7px; max-width: 86%; min-width: 0; }
.message.brandboost { align-self: flex-end; align-items: flex-end; }
.message.unknown { align-self: flex-start; }
.speaker { color: var(--secondary); font-size: 13px; font-weight: 500; }
.message-bubble { margin: 0; padding: 12px 16px; border-radius: 3px 10px 10px 10px; background: #f1f3f5; color: var(--ink); font-size: 15px; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; }
.message.brandboost .message-bubble { border-radius: 10px 3px 10px 10px; background: #eef2ff; }
.message.unknown .message-bubble { background: #f5f5f5; }
.call-empty { color: var(--secondary); font-size: 14px; }

#overlay:empty { display: none; }
#overlay { position: fixed; z-index: 30; inset: 0; display: grid; place-items: center; padding: 24px; }
#overlay.call-overlay { display: block; padding: 0; overflow: hidden; pointer-events: none; }
.call-drawer { position: absolute; inset: 0 0 0 auto; display: flex; flex-direction: column; width: min(520px, 100vw); border-left: 1px solid var(--line); background: #fff; box-shadow: -12px 0 32px #1e293b14; pointer-events: auto; }
.call-drawer.entering { animation: call-drawer-enter 180ms cubic-bezier(.2, .7, .3, 1); }
.call-drawer-head { display: flex; flex-shrink: 0; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; padding: 14px 20px 14px 24px; border-bottom: 1px solid var(--line); }
.call-drawer-head > div { display: flex; align-items: center; gap: 10px; min-width: 0; }
.call-drawer-head svg { color: var(--secondary); }
.call-drawer-head h2 { margin: 0; font-size: 16px; font-weight: 600; }
.call-drawer-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 22px 24px 32px; }
@keyframes call-drawer-enter { from { transform: translateX(100%); } to { transform: translateX(0); } }
.overlay-backdrop { position: absolute; inset: 0; background: #161b2340; }
.modal { position: relative; display: flex; flex-direction: column; width: min(600px, 100%); max-height: calc(100dvh - 48px); border: 1px solid #d7dce3; border-radius: 6px; background: #fff; box-shadow: 0 15px 60px #161b2326; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 22px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-size: 16px; font-weight: 600; }
.modal-form { overflow-y: auto; padding: 22px; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px 16px; }
.field-full { grid-column: 1 / -1; }
.field { display: grid; align-content: start; gap: 6px; min-width: 0; margin: 0; padding: 0; border: 0; color: var(--secondary); font-size: 13px; }
.field > label { display: block; }
.field > span b { color: #b1524b; font-weight: 400; }
.field input:not([type=checkbox]):not([type=radio]), .field select, .field textarea { width: 100%; min-height: 36px; padding: 7px 9px; border: 1px solid #cfd5dd; border-radius: 4px; color: var(--ink); background: #fff; font-size: 14px; }
.field textarea { resize: vertical; min-height: 74px; line-height: 1.6; }
.field input::placeholder, .field textarea::placeholder { color: #8b929b; }
.check-options { display: flex; flex-wrap: wrap; gap: 9px 15px; }
.check-options label { display: flex; align-items: center; gap: 6px; min-height: 28px; color: var(--ink); font-size: 13px; }
.modal-actions { display: flex; flex: 0 0 auto; justify-content: flex-end; gap: 8px; padding: 13px 22px; border-top: 1px solid var(--line); }
[hidden] { display: none !important; }
.toast { position: fixed; z-index: 40; left: 50%; bottom: 25px; max-width: calc(100vw - 32px); padding: 10px 15px; border-radius: 4px; color: #fff; background: #343940; font-size: 14px; opacity: 0; pointer-events: none; transform: translateX(-50%); transition: opacity .15s; }
.toast.show { opacity: 1; }
.toast.error { background: #954841; }

@media (max-width: 1200px) {
  .shell { grid-template-columns: 166px minmax(0, 1fr); }
  .brand-lockup { gap: 9px; margin: 0 4px; }
  .brand-lockup img { width: 68px; }
  .brand-product { padding-left: 9px; }
  .page-heading { padding-left: 20px; padding-right: 20px; }
  .list-toolbar { margin: 0 20px; flex-wrap: wrap; gap: 0 12px; }
  .toolbar-controls { flex-wrap: wrap; }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 148px minmax(0, 1fr); }
  .brand-lockup { align-items: flex-start; flex-direction: column; gap: 7px; }
  .brand-lockup img { width: 78px; }
  .brand-product { border: 0; padding: 0; }
  .toolbar-controls { width: 100%; padding: 8px 0 11px; }
  .search { flex: 1; width: auto; }
}
@media (max-width: 640px) {
  .shell { display: flex; flex-direction: column; }
  .sidebar { flex-direction: row; align-items: center; flex: 0 0 56px; padding: 0 14px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand-lockup { margin: 0; }
  .brand-lockup img { width: 67px; height: 30px; }
  .brand-product { display: none; }
  .nav { display: flex; gap: 7px; margin: 0 0 0 auto; }
  .nav-item { gap: 6px; padding: 6px 9px; min-height: 34px; }
  .nav-item svg { width: 15px; height: 15px; }
  .main { flex: 1; }
  .page-heading { min-height: 70px; padding: 17px 16px 12px; }
  .page-actions { gap: 6px; }
  .page-actions .btn { padding: 6px 8px; }
  .page-actions .btn svg { display: none; }
  .list-toolbar { margin: 0 16px; }
  .toolbar-controls { gap: 6px; }
  .filter-select { max-width: 112px; }
  .column-menu { width: min(360px, calc(100vw - 32px)); }
  .data-table td:first-child, .data-table th:first-child { left: auto; }
  .data-table td:first-child { position: static; }
  .order-page { padding: 20px 16px 40px; }
  .order-page-history { padding-bottom: 16px; }
  .order-breadcrumb { margin-bottom: 20px; }
  .order-heading { align-items: flex-start; }
  .property-columns { grid-template-columns: 1fr; gap: 16px; }
  .properties { grid-template-columns: minmax(100px, max-content) minmax(0, 1fr); gap: 11px 12px; }
  .history-call, .history-note { gap: 10px; padding: 16px 2px; }
  .history-record.is-highlighted > .history-note, .history-record.is-highlighted .history-record-row > :first-child { padding-left: 10px; }
  .history-record-edit { margin-right: 6px; }
  .history-open { padding-left: 0; }
  .history-open > span { display: none; }
  .history-entry-heading { gap: 4px 9px; }
  .call-drawer-head { padding-left: 18px; padding-right: 14px; }
  .call-drawer-body { padding: 20px 18px 28px; }
  .message { max-width: 90%; }
  .message-bubble { padding: 10px 12px; }
  #overlay { padding: 12px; }
  .modal { max-height: calc(100dvh - 24px); }
  .modal-form { padding: 18px; }
  .modal-head, .modal-actions { padding-left: 18px; padding-right: 18px; }
  .field-grid { gap: 15px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

.modal-form [hidden] { display: none; }
.call-inbox-list { max-height: min(70vh, 600px); overflow-y: auto; }
.call-inbox-list .j-evidence { width: 100%; text-align: left; }
.call-processing, .call-match-reason { color: var(--muted); font-size: 14px; }
.call-processing-error { color: #b04c3e; font-size: 14px; white-space: pre-wrap; }
.call-link-actions { margin-top: 24px; }
[data-original-field] .field { margin-bottom: 8px; }
input[readonly] { color: var(--muted); }
