/* DAEHO's working interface. Load after the legacy styles; business markup remains compatible. */
@font-face {
  font-family:'DAEHO Pretendard';font-style:normal;font-weight:45 920;font-display:swap;
  src:url('/fonts/PretendardVariable.woff2') format('woff2');
}
:root {
  --ink:#202936; --muted:#5b6575; --line:#dde3eb; --ground:#f5f7fa;
  --paper:#fff; --blue:#2454a4; --pale:#eaf0fb; --good:#216548;
  --bad:#a82e39; --warn:#805514; --radius:12px;
  --font:'DAEHO Pretendard','Pretendard','Apple SD Gothic Neo','Malgun Gothic',system-ui,sans-serif;
}
body {font:14px/1.65 var(--font);color:var(--ink);background:var(--ground);letter-spacing:-.015em;}
button,input,select,textarea {font:inherit;letter-spacing:inherit;border-radius:7px;min-height:40px;}
button {padding:8px 14px;font-weight:600;border:1px solid #cbd3df;background:white;color:var(--ink);transition:background-color 150ms ease-out,border-color 150ms ease-out;}
button:hover {background:#f0f4fb;border-color:#aab9ce;}
button:active {background:#e7edf7;}
button:disabled {opacity:.55;cursor:not-allowed;}
button.primary,button.purple {background:var(--blue);border-color:var(--blue);color:white;}
button.primary:hover,button.purple:hover {background:#1c4485;border-color:#1c4485;}
button.quiet {border-color:transparent;color:var(--muted);background:transparent;}
button.quiet:hover {background:#eef2f7;color:var(--ink);}
button.orange,button.red,.outline-purple,.outline-blue,.outline-orange,.outline-teal {
  background:white;color:var(--ink);border-color:#cbd3df;
}
button.orange:hover,button.red:hover {background:#f0f4fb;color:var(--ink);border-color:#aab9ce;}
.outline-red,button.danger {color:var(--bad);border-color:#dfb7bc;background:white;}
button.danger:hover {background:#fff0f1;border-color:#bb6a75;}
input,select,textarea {border:1px solid #b8c3d2;padding:9px 11px;background:white;color:var(--ink);max-width:100%;}
input:hover,select:hover,textarea:hover {border-color:#8597b1;}
input[type=checkbox],input[type=radio] {width:16px;height:16px;min-height:16px;accent-color:var(--blue);flex-shrink:0;}
input::placeholder,textarea::placeholder {color:#69758a;opacity:1;}
input,textarea {caret-color:var(--blue);}
::selection {background:#dce7ff;color:#173769;}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible,[tabindex="0"]:focus-visible {
  outline:3px solid #446bc1;outline-offset:3px;
}
[hidden] {display:none!important;}
a {color:var(--blue);text-underline-offset:3px;}
h1,h2,h3 {color:var(--ink);letter-spacing:-.025em;font-weight:700;}
h1 {font-size:24px;line-height:1.35;}
h2 {font-size:18px;line-height:1.5;}
h3 {font-size:16px;}
.subtle,.scope {font-size:13px;color:var(--muted);line-height:1.7;}
.skip {z-index:100;}
.modern-shell {display:block;padding-top:76px;}
.modern-shell .topbar {
  height:76px;padding:0 28px 0 18px;gap:14px;box-shadow:none;border-bottom:1px solid var(--line);
}
.topbar #menu-toggle {padding:8px;width:40px;display:grid;place-items:center;}
.topbar svg {stroke:currentColor;width:20px;height:20px;}
.modern-shell .top-brand {display:flex;gap:16px;align-items:center;margin:0 auto 0 0;color:var(--ink);}
.company-logo {width:145px;height:50px;object-fit:contain;}
.brand-product {font-size:14px;font-weight:650;color:var(--muted);border-left:1px solid var(--line);padding-left:16px;}
.modern-shell .identity {font-size:13px;gap:20px;}
.identity a {color:var(--muted);}
.identity a:hover {color:var(--blue);text-decoration:underline;}
.identity-name {font-weight:650;max-width:120px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.modern-shell .sidebar {
  top:76px;height:calc(100dvh - 76px);width:72px;padding:20px 10px 16px;
  background:#f9fafc;border-right:1px solid var(--line);display:flex;flex-direction:column;gap:12px;
  scrollbar-width:thin;scrollbar-color:#bac6d7 transparent;
}
.modern-shell.expanded .sidebar {width:232px;}
.modern-shell .nav {display:block;overflow:visible;}
.nav-section {padding-bottom:16px;margin-bottom:12px;border-bottom:1px solid #e5eaf1;}
.nav-section h2 {margin:0 12px 7px;font-size:12px;color:var(--muted);font-weight:600;letter-spacing:0;}
.modern-shell:not(.expanded) .nav-section h2 {display:none;}
.modern-shell .nav a,.modern-shell .nav summary {
  height:auto;min-height:42px;padding:10px 13px;margin:3px 0;gap:11px;border-radius:8px;
  color:#515d70;font-size:14px;line-height:1.45;font-weight:500;white-space:normal;
}
.modern-shell .nav a:hover,.modern-shell .nav summary:hover {background:#edf1f7;color:var(--ink);}
.modern-shell .nav a.active {background:#e4ecfb;color:#204e9b;font-weight:700;}
.modern-shell .nav svg {width:19px;height:19px;min-width:19px;stroke-width:1.7;}
.modern-shell .nav a>span,.modern-shell .nav summary>span {display:none;}
.modern-shell.expanded .nav a>span,.modern-shell.expanded .nav summary>span {display:inline;}
.modern-shell .nav summary::-webkit-details-marker {display:none;}
.modern-shell .nav summary .nav-chevron {display:none;margin-left:auto;width:13px;min-width:13px;}
.modern-shell.expanded .nav summary .nav-chevron {display:block;}
.nav-group[open] .nav-chevron {transform:rotate(90deg);}
.modern-shell.expanded .nav-group>a {padding-left:22px;font-size:13px;}
.modern-shell .sidebar-foot {display:none;margin-top:auto;padding:12px 12px 0;border-top:1px solid var(--line);color:var(--muted);}
.modern-shell.expanded .sidebar-foot {display:grid;gap:2px;font-size:12px;}
.sidebar-foot small {font-size:11px;}
.modern-shell .main {margin-left:72px;min-width:0;}
.modern-shell.expanded .main {margin-left:232px;}
.modern-shell .demo {height:auto;min-height:30px;background:#edf1f7;color:#586478;padding:6px 32px;font-size:11px;text-align:right;border:0;}
.modern-shell .content {padding:30px 32px 40px;max-width:1800px;margin:0 auto;}
.modern-shell .page-head {margin:0 0 24px;padding:0;background:none;border:0;box-shadow:none;min-height:0;align-items:center;}
.page-head>div:first-child {display:flex;flex-direction:column;align-items:flex-start;gap:7px;min-width:0;}
.page-head h1 {font-size:24px;font-weight:700;color:var(--ink);}
.page-head .page-note {font-size:13px;color:var(--muted);line-height:1.6;}
.page-head .breadcrumbs {display:none;}
.page-head .actions {margin-left:auto;}
.modern-shell .main footer {background:transparent;padding:20px 32px;font-size:12px;color:var(--muted);}
.legacy-card {background:white;border:1px solid var(--line);border-radius:12px;padding:0;box-shadow:none;overflow:visible;}
.legacy-filters[data-refined] {display:flex;flex-direction:column;border:0;padding:22px 24px 0;gap:18px;}
.customer-search {display:grid;grid-template-columns:minmax(140px,1.25fr) minmax(160px,1.25fr) minmax(110px,1fr) auto auto;align-items:end;gap:12px;}
.customer-search label {font-size:12px;font-weight:600;min-width:0;gap:7px;}
.customer-search input,.customer-search select {width:100%;min-width:0;}
.customer-search button {white-space:nowrap;}
.advanced-filters {border-top:1px solid #e5eaf1;}
.advanced-filters summary {padding:13px 0;color:var(--muted);cursor:pointer;font-size:13px;line-height:1.6;}
.advanced-filters summary:hover {color:var(--blue);}
.advanced-filter-grid {display:grid;grid-template-columns:1fr 1fr;gap:20px;padding:7px 0 18px;}
.advanced-filter-grid .filter-column {display:flex;flex-direction:column;gap:10px;}
.advanced-filter-grid .filter-column:last-child {grid-column:1/-1;flex-direction:row;flex-wrap:wrap;}
.advanced-filter-grid .filter-row {margin:0;gap:12px;align-items:end;}
.advanced-filter-grid .filter-row:empty {display:none;}
.advanced-filter-grid label {font-size:13px;}
.advanced-filter-grid .checks {margin:0;gap:8px;}
.advanced-filter-grid .checks strong {width:100%;font-size:12px;}
.advanced-filter-grid .inline-check {gap:5px;font-size:13px;line-height:1.6;min-height:30px;}
.advanced-filter-grid .filter-row input:not([type=checkbox]) {width:160px;}
.advanced-filter-grid .date-range {gap:7px;margin:0;display:grid;grid-template-columns:76px minmax(0,1fr) auto minmax(0,1fr);align-items:center;}
.advanced-filter-grid .date-range input {width:100%;min-width:0;font-size:12px;min-height:40px;}
.advanced-filter-grid .date-range>span:first-child {width:auto;font-size:12px;}
.search-guidance {margin:0;padding:0 24px 18px;color:var(--muted);font-size:12px;}
.customer-list-heading {display:flex;align-items:center;justify-content:space-between;gap:16px;padding:20px 24px;border-top:1px solid var(--line);}
.customer-list-heading h2 {font-size:17px;margin:0;display:flex;align-items:center;gap:10px;white-space:nowrap;}
.result-count {font-size:13px;font-weight:600;color:var(--muted);}
.list-actions {display:flex;align-items:center;gap:8px;flex-wrap:wrap;}
.list-actions button,.list-more summary {font-size:13px;}
.list-more {position:relative;}
.list-more>summary {border:1px solid #cbd3df;border-radius:7px;padding:8px 12px;min-height:40px;cursor:pointer;list-style-position:inside;}
.list-more[open] {position:static;}
.list-more-body {display:flex;align-items:center;flex-wrap:wrap;gap:8px;padding-top:12px;}
.list-more:not([open]) .list-more-body {display:none;}
.list-more[open] {flex-basis:100%;}
.list-actions:has(.list-more[open]) {max-width:100%;}
.customer-list-heading:has(.list-more[open]) {flex-wrap:wrap;}
.selection-toolbar {padding:12px 24px;background:#edf3ff;border-top:1px solid #d4e0f6;border-bottom:1px solid #d4e0f6;}
.selection-toolbar .actions {display:flex;align-items:center;gap:8px;min-width:0;flex-wrap:wrap;}
.selection-toolbar button {min-height:36px;padding:6px 10px;font-size:12px;}
#selection-count {order:-1;font-size:13px;color:#204e9b;font-weight:700;margin-right:6px;}
.table-view-controls {padding:0 24px 12px;display:flex;align-items:center;justify-content:space-between;gap:12px;color:var(--muted);font-size:12px;}
.table-view-controls button {border:0;min-height:32px;padding:4px 8px;color:var(--blue);font-size:12px;}
.table-wrap {max-width:100%;overflow:auto;scrollbar-color:#bbc7d8 #f4f6f9;scrollbar-width:thin;}
.table-wrap table {font-variant-numeric:tabular-nums;}
.legacy-table {min-width:760px;white-space:normal;text-align:left;font-size:13px;}
.legacy-table.all-columns {min-width:1120px;}
.legacy-table.working-columns .extra-column {display:none;}
.legacy-table th,.legacy-table td,.panel th,.panel td {border:0;border-bottom:1px solid #e9edf3;}
.legacy-table th {background:#f7f9fc;color:#59677a;font-size:12px;text-align:left;padding:13px 16px;font-weight:600;white-space:nowrap;}
.legacy-table td {padding:17px 16px;line-height:1.65;font-size:13px;min-width:0;background:white;}
.legacy-table td:first-child,.legacy-table th:first-child {padding-left:24px;min-width:44px;width:44px;}
.legacy-table td:nth-child(2) {min-width:110px;}
.legacy-table td:nth-child(3) {min-width:125px;white-space:nowrap;color:var(--muted);}
.legacy-table tr:hover td {background:#f7faff;}
.legacy-table tr:has(input[data-select]:checked) td {background:#edf3ff;}
.legacy-table td small {font-size:12px;color:var(--muted);}
.legacy-table .name-button {font-weight:700;color:var(--ink);font-size:14px;text-decoration:none;padding:4px 0;min-height:32px;}
.legacy-table .name-button:hover {color:var(--blue);text-decoration:underline;background:transparent;}
.legacy-table .pill {border:0;background:#edf1f7;color:#49586d;padding:4px 8px;border-radius:6px;font-size:11px;min-height:28px;white-space:nowrap;}
.legacy-table .pill:hover {background:#dce7fa;color:#204e9b;}
.row-prospect [data-status] {color:#216548;background:#e8f4ec;}
.row-blocked [data-status] {color:#a82e39;background:#fbecee;}
.row-vip [data-service] {color:#674593;background:#f1ebf8;}
.legacy-table .text-button {font-size:12px;color:var(--blue);padding:4px 0;min-height:30px;white-space:nowrap;}
.pager {padding:16px 24px;font-size:13px;border:0;}
.pager button {font-size:12px;min-height:36px;color:var(--muted);padding:6px 10px;}
.pager input {width:64px;min-height:36px;padding:6px 8px;}
.pager .actions {align-items:center;}
.empty {padding:44px 20px!important;color:var(--muted);font-size:14px!important;}
.panel {border:1px solid var(--line);border-radius:12px;box-shadow:none;}
.panel-body {padding:24px;}
.panel h2 {font-size:17px;}
.panel table th {background:#f7f9fc;color:var(--muted);font-size:12px;padding:13px 16px;}
.panel table td {padding:14px 16px;font-size:13px;line-height:1.6;}
.panel .panel {border-radius:0;border:0;}
.filters {padding:20px 24px;background:white;gap:12px;}
.filters label {font-size:12px;}
.notice {padding:14px 18px;background:#eef3fb;border:1px solid #d9e4f4;color:#415775;border-radius:8px;font-size:13px;line-height:1.7;}
.loading {padding:64px 24px;color:var(--muted);}
.error {padding:18px;color:#a82e39;background:#fff2f3;border:1px solid #e6bec4;}
.detail-backdrop {background:rgba(28,40,59,.28);z-index:39;}
body:has(.detail),body:has(.modern-shell.expanded .nav-backdrop:not([hidden])) {overflow:hidden;}
.detail {
  position:fixed;left:auto;right:0;top:0;bottom:0;transform:none;width:min(880px,94vw);max-height:100dvh;
  border:0;border-radius:0;padding:0 28px 28px;box-shadow:-10px 0 40px rgba(27,42,64,.13);z-index:40;overflow:auto;
}
.detail-top {position:sticky;top:0;z-index:2;background:white;padding:22px 0 16px;align-items:center;margin:0;border-bottom:1px solid var(--line);}
.detail h2 {font-size:21px;line-height:1.4;}
.detail-draft-status {font-size:12px;color:var(--muted);padding:12px 0;margin:0;}
.detail-layout {grid-template-columns:minmax(0,1fr) minmax(0,1.1fr);gap:28px;}
.detail-layout>div,.detail form,.detail fieldset,.detail .row,.detail .profile-grid {min-width:0;min-inline-size:0;}
.detail input:not([type=checkbox]):not([type=radio]),.detail select,.detail textarea {width:100%;min-width:0;}
.detail .table-wrap {max-width:100%;overflow:auto;}
.detail dl {grid-template-columns:76px minmax(0,1fr);background:#f6f8fb;border:0;border-radius:10px;padding:18px;gap:9px 12px;font-size:13px;margin-top:0;}
.detail dt {color:var(--muted);font-size:12px;}
.detail dd {min-width:0;overflow-wrap:anywhere;}
.detail fieldset {border:1px solid var(--line);border-radius:9px;padding:16px;margin-bottom:20px;}
.detail legend {font-size:14px;font-weight:700;padding:0 5px;}
.detail label {font-size:12px;font-weight:600;}
.detail button {font-size:12px;}
.detail .profile-grid {gap:14px;}
.detail .note-list {max-height:42vh;background:#f7f9fc;border-radius:9px;padding:0 14px;}
.detail .note,.detail .note:nth-child(even) {background:none;padding:16px 0;}
.detail .note p {font-size:14px;line-height:1.8;}
.detail #note-form {padding-top:16px;}
.detail #note-form textarea {min-height:145px;}
.detail #note-form button {background:var(--blue);border-color:var(--blue);color:white;}
.detail #customer-attachments {font-size:12px;line-height:1.7;}
.detail #customer-attachments ul {padding-left:18px;overflow-wrap:anywhere;}
.detail #customer-attachments li {padding:8px 0;}
.detail section {padding-top:20px;margin-top:24px;}
.legacy-source summary {cursor:pointer;padding:12px 0;font-weight:600;}
dialog,.contract-readonly-dialog {border:0;border-radius:14px;padding:28px;box-shadow:0 18px 56px rgba(27,42,64,.22);width:min(620px,calc(100% - 32px));max-height:90dvh;}
dialog::backdrop {background:rgba(28,40,59,.35);}
dialog h2 {font-size:21px;font-weight:700;padding-bottom:16px;margin-bottom:20px;}
dialog p {font-size:13px;line-height:1.7;}
dialog label {font-size:13px;}
dialog .row {gap:12px;}
#toast {border-radius:9px;box-shadow:0 8px 26px rgba(27,42,64,.18);font-size:14px;}
.aux-dash-top {grid-template-columns:1.6fr 1fr;gap:20px;margin-bottom:20px;}
.aux-dash-stats {gap:20px;margin-bottom:20px;}
.aux-revenue {gap:22px;}
.aux-comparisons span,.aux-mode-chart p {font-size:13px;color:var(--muted);}
.aux-comparisons strong {font-size:17px;}
.aux-stat-number {font-size:28px;font-weight:700;}
.aux-rank {margin:0;}
.aux-day-heading {background:#f7f9fc;color:var(--muted);padding:12px 6px;font-size:12px;}
.aux-day {min-height:120px;padding:7px;background:white;}
.aux-today {background:#f0f5ff;}
.aux-other-month {background:#f9fafc;color:#69758a;}
.aux-event {border-radius:5px;padding:6px 8px;min-height:32px;background:#e7effb;color:#204e9b;font-size:12px;}
.aux-event.contract-event {border:0;background:#e8f3ed;color:#216548;white-space:normal;}
.aux-event:hover {background:#d9e7fa;color:#173769;}
.aux-toolbar h2 {font-size:20px;}
.cloud-login {background:#f3f5f9;padding:32px;min-height:100dvh;}
.cloud-login-panel {width:min(100%,460px);padding:36px 40px;background:white;border:1px solid var(--line);border-radius:16px;}
.cloud-login h1 {display:flex;align-items:center;gap:18px;margin:0 0 32px;color:var(--ink);font-size:16px;}
.cloud-login h1 img {width:166px;height:57px;}
.cloud-login h1 span {padding-left:18px;border-left:1px solid var(--line);color:var(--muted);font-size:15px;font-weight:600;}
.cloud-login h2 {font-size:23px;margin-bottom:10px;}
.cloud-login p {font-size:14px;color:var(--muted);line-height:1.75;}
.cloud-login label {font-size:13px;font-weight:600;margin:20px 0;gap:8px;}
.cloud-login input {min-height:46px;}
.cloud-login form>button.primary {width:100%;margin-top:4px;min-height:46px;}
.cloud-login [role=alert] {color:var(--bad);}
.cloud-login [role=alert]:empty {margin:0;}
.content>.panel+.panel {margin-top:20px;}
.content>.panel>p {max-width:75ch;}
.nav-backdrop {position:fixed;inset:76px 0 0;background:rgba(28,40,59,.28);z-index:14;border:0;border-radius:0;}
@media(min-width:1500px) {
  .modern-shell .content {padding:36px 42px 48px;}
  .customer-search {grid-template-columns:minmax(180px,1fr) minmax(180px,1fr) minmax(150px,.7fr) auto auto;}
}
@media(max-width:1099px) {
  .modern-shell .sidebar {width:232px;visibility:hidden;box-shadow:none;}
  .modern-shell.expanded .sidebar {visibility:visible;box-shadow:12px 0 24px rgba(27,42,64,.12);}
  .modern-shell .main,.modern-shell.expanded .main {margin-left:0;}
  .modern-shell .content {padding:24px;}
  .modern-shell .demo {padding:6px 24px;}
  .modern-shell .identity {gap:14px;}
}
@media(max-width:760px) {
  .modern-shell {padding-top:66px;}
  .modern-shell .topbar {height:66px;padding:0 14px;gap:10px;}
  .company-logo {width:118px;height:41px;}
  .brand-product {font-size:12px;padding-left:10px;}
  .modern-shell .top-brand {gap:10px;}
  .modern-shell .identity>a {display:none;}
  .modern-shell .identity {gap:6px;}
  .identity-name {display:none;}
  .modern-shell .identity button {font-size:12px;padding:6px 8px;}
  .modern-shell .sidebar {top:66px;height:calc(100dvh - 66px);}
  .nav-backdrop {top:66px;}
  .modern-shell .demo {padding:7px 16px;text-align:left;font-size:10px;}
  .modern-shell .content {padding:22px 16px 32px;}
  .modern-shell .page-head {margin-bottom:20px;align-items:flex-start;}
  .page-head h1 {font-size:22px;}
  .page-head .actions {margin-left:0;}
  .legacy-filters[data-refined] {padding:18px 18px 0;gap:16px;}
  .customer-search {grid-template-columns:1fr 1fr;gap:12px;}
  .customer-search>label:nth-child(3) {grid-column:1/-1;}
  .customer-search>button {width:100%;}
  .advanced-filter-grid {grid-template-columns:1fr;gap:16px;}
  .advanced-filter-grid .filter-column:last-child {grid-column:auto;}
  .advanced-filter-grid .date-range {grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);}
  .advanced-filter-grid .date-range>span:first-child {grid-column:1/-1;}
  .search-guidance {padding:0 18px 18px;}
  .customer-list-heading {padding:18px;align-items:flex-start;flex-direction:column;}
  .customer-list-heading .list-actions {gap:7px;width:100%;}
  .customer-list-heading button,.list-more>summary {font-size:12px;padding:7px 10px;}
  .table-view-controls {padding:0 18px 12px;}
  .table-view-controls>span {font-size:11px;max-width:24ch;}
  .table-security-hint::after {content:' · 표를 좌우로 이동';}
  .legacy-table td,.legacy-table th {white-space:nowrap;}
  .legacy-table td:nth-child(2),.legacy-table th:nth-child(2) {position:sticky;left:0;z-index:1;}
  .legacy-table th:nth-child(2) {background:#f7f9fc;}
  .selection-toolbar {padding:12px 18px;}
  .pager {padding:16px 18px;align-items:flex-start;flex-wrap:wrap;gap:12px;}
  .pager .actions {gap:5px;}
  .detail {width:100%;max-width:100%;padding:0 20px 24px;top:0;}
  .detail-layout {grid-template-columns:minmax(0,1fr);}
  .detail-layout>div:nth-child(2) {order:-1;}
  .detail #memo-filter .row {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);}
  .detail #memo-filter label {grid-column:1/-1;}
  .detail-top {padding:18px 0 14px;}
  .detail .profile-grid {grid-template-columns:minmax(0,1fr);}
  .detail h2 {font-size:20px;}
  .detail .note-list {max-height:340px;}
  .aux-dash-top,.aux-dash-stats,.two {grid-template-columns:1fr;gap:16px;}
  .panel-body {padding:20px;}
  .aux-toolbar {flex-wrap:wrap;}
  .aux-toolbar h2 {order:-1;width:100%;text-align:left;}
  .aux-toolbar .actions {flex-wrap:wrap;}
  .aux-calendar {min-width:600px;}
  .panel-body:has(>.aux-calendar) {overflow:auto;}
  .aux-calendar-day {min-width:0;}
  .cloud-login {padding:20px;}
  .cloud-login-panel {padding:28px 24px;border-radius:12px;}
  .cloud-login p {font-size:14px;}
}
@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after {transition:none!important;scroll-behavior:auto!important;}
}

/* Consultation workspace: the record list, not the search form, owns the first viewport. */
body {line-height:1.5;letter-spacing:-.012em;}
.modern-shell {padding-top:60px;}
.modern-shell .topbar {height:60px;padding:0 24px 0 16px;gap:14px;}
.company-logo {width:132px;height:46px;}
.brand-product {font-size:12px;}
.modern-shell .top-brand {gap:12px;}
.workspace-location {padding-left:20px;border-left:1px solid var(--line);font-weight:600;color:#4b5769;font-size:13px;}
.header-search {display:flex;align-items:center;gap:9px;margin-left:auto;color:#59677a;background:#f4f6f9;border:1px solid #e1e6ed;border-radius:6px;padding:7px 10px;min-width:210px;font-size:13px;text-decoration:none;}
.header-search svg {width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.7;}
.header-search kbd {margin-left:auto;font:11px var(--font);border:1px solid #d8dee8;border-radius:3px;padding:1px 4px;color:#5b6575;background:white;}
.modern-shell .identity {margin-left:12px;gap:16px;font-size:12px;}
.modern-shell .sidebar {top:60px;width:64px;height:calc(100dvh - 60px);background:#f8fafc;padding:18px 10px 12px;}
.modern-shell.expanded .sidebar {width:212px;}
.modern-shell .main {margin-left:64px;}
.modern-shell.expanded .main {margin-left:212px;}
.modern-shell .nav a,.modern-shell .nav summary {min-height:38px;padding:8px 11px;margin:2px 0;font-size:13px;gap:10px;border-radius:6px;}
.modern-shell .nav a.active {background:#e9eff9;color:#204e9b;}
.modern-shell .nav-section {margin-bottom:16px;padding-bottom:12px;}
.modern-shell .nav-section h2 {font-size:11px;padding-left:11px;margin-bottom:7px;}
.modern-shell .sidebar-foot {font-size:11px;}
.modern-shell .demo {font-size:10px;line-height:1.4;min-height:24px;padding:5px 28px;background:#f0f3f8;color:#5b6575;}
.modern-shell .content {padding:24px 28px 32px;}
.modern-shell .page-head {margin-bottom:20px;gap:16px;}
.page-head>div:first-child {gap:5px;}
.page-head h1 {display:flex;align-items:center;gap:12px;font-size:24px;line-height:1.4;letter-spacing:-.025em;}
.page-head .page-note {font-size:12px;color:#5b6575;}
.workspace-total {display:inline-flex;align-items:center;font-size:13px;line-height:1.2;font-weight:600;color:#52637c;background:#eaf0f7;border:1px solid #dce4ef;border-radius:5px;padding:5px 8px;letter-spacing:0;}
.page-head .actions {gap:8px;}
.page-head .actions button {min-height:36px;padding:7px 12px;font-size:13px;display:inline-flex;align-items:center;gap:7px;}
.customer-workspace {background:white;border:1px solid #dce3ed;border-radius:10px;overflow:visible;}
.customer-workspace svg,.record-workspace button svg {width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0;}
.page-head button svg {width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;}
.workspace-views {display:flex;align-items:stretch;gap:20px;padding:0 20px;border-bottom:1px solid var(--line);overflow-x:auto;scrollbar-width:thin;}
.view-tab {position:relative;border:0;border-radius:0;background:none;min-height:48px;padding:12px 0;color:#59677a;font-weight:500;font-size:13px;white-space:nowrap;}
.view-tab[aria-pressed=true] {color:#204e9b;font-weight:700;box-shadow:inset 0 -2px #2454a4;}
.view-tab:hover {background:none;color:#204e9b;}
.legacy-filters[data-refined] {display:block;padding:16px 20px 0;gap:0;}
.workspace-search {display:flex;align-items:end;gap:8px;}
.workspace-search>label {position:relative;margin:0;gap:5px;font-size:11px;font-weight:600;color:#59677a;min-width:0;flex:1;}
.workspace-search>label:nth-child(3) {max-width:180px;}
.workspace-search input,.workspace-search select {width:100%;min-width:0;min-height:36px;height:36px;font-size:13px;padding:7px 10px;border-color:#cdd6e2;border-radius:6px;}
.workspace-search button,.workspace-search summary {min-height:36px;font-size:12px;display:inline-flex;align-items:center;gap:6px;padding:7px 11px;border-radius:6px;white-space:nowrap;}
.workspace-search>button.primary {background:#fff;color:#2454a4;border-color:#becde2;}
.workspace-search>button.primary:hover {background:#f0f5ff;}
.workspace-filters {position:relative;flex-shrink:0;margin-left:auto;}
.workspace-filters>summary {cursor:pointer;list-style:none;border:1px solid #cdd6e2;background:white;}
.workspace-filters summary::-webkit-details-marker {display:none;}
.workspace-filter-body {position:absolute;right:0;top:44px;z-index:8;width:min(650px,calc(100vw - 80px));max-height:65vh;overflow:auto;background:white;border-radius:10px;padding:20px;box-shadow:0 10px 40px rgba(24,39,63,.18);}
.filter-panel-heading {display:flex;align-items:center;justify-content:space-between;margin-bottom:14px;}
.filter-panel-heading strong {font-size:16px;}
.workspace-filter-body>.primary {width:100%;margin-top:16px;}
.workspace-filter-body .advanced-filter-grid {padding:0;gap:20px;}
.workspace-filter-body .filter-column {min-width:0;}
.workspace-filter-body .filter-row {flex-wrap:wrap;gap:10px;}
.workspace-filter-body .filter-row input {width:100%;min-width:0;}
.workspace-filter-body .filter-row label {flex:1;min-width:110px;}
.workspace-filter-body .date-range {grid-template-columns:72px minmax(0,1fr) auto minmax(0,1fr);}
.workspace-filter-body .inline-check {flex:initial!important;min-width:0!important;font-size:12px;}
.workspace-filter-body .checks {display:flex;flex-wrap:wrap;gap:6px 12px;min-width:0;max-width:100%;}
.workspace-filter-body .checks .inline-check {min-height:32px;gap:6px;}
.workspace-filter-body input[type=checkbox] {width:18px;height:18px;min-width:18px;min-height:18px;padding:0;flex:0 0 18px;}
.workspace-tools {display:flex;align-items:center;justify-content:space-between;gap:10px;padding:14px 20px 12px;}
.workspace-result {display:flex;align-items:center;gap:10px;font-size:12px;white-space:nowrap;color:#657286;}
.workspace-result strong {font-size:13px;color:var(--ink);}
.workspace-table-actions {display:flex;align-items:center;gap:4px;flex-wrap:wrap;justify-content:flex-end;}
.workspace-table-actions button,.workspace-more>summary {min-height:30px;padding:5px 8px;font-size:12px;display:inline-flex;align-items:center;gap:6px;white-space:nowrap;}
.workspace-more {position:relative;}
.workspace-more>summary {border:0;cursor:pointer;color:#52637c;list-style:none;}
.workspace-more-body {position:absolute;right:0;top:34px;z-index:8;display:grid;gap:4px;background:white;border-radius:8px;padding:8px;min-width:180px;box-shadow:0 8px 28px rgba(24,39,63,.18);}
.workspace-more-body button {text-align:left;border:0;justify-content:flex-start;min-height:36px;}
.workspace-filter-chips {display:flex;align-items:center;flex-wrap:wrap;gap:6px;padding:12px 20px 0;}
.filter-chip {display:inline-flex;align-items:center;gap:8px;min-height:28px;padding:4px 8px;border:1px solid #dce5f3;background:#f0f5fc;color:#345789;font-size:11px;font-weight:500;max-width:100%;overflow-wrap:anywhere;}
.filter-chip span {font-size:15px;line-height:1;}
.workspace-filter-chips>.quiet {font-size:11px;min-height:28px;padding:4px 8px;}
.customer-table-scroll {max-height:calc(100dvh - 380px);min-height:200px;}
.customer-table-scroll thead {position:sticky;top:0;z-index:2;}
.customer-workspace .legacy-table {min-width:880px;}
.customer-workspace .legacy-table.all-columns {min-width:1320px;}
.customer-workspace .legacy-table th {padding:11px 14px;background:#f7f9fc;font-size:11px;color:#52637c;}
.customer-workspace .legacy-table td {padding:10px 14px;font-size:12px;line-height:1.4;height:56px;vertical-align:middle;}
.customer-workspace .legacy-table td:first-child,.customer-workspace .legacy-table th:first-child {padding-left:20px;width:42px;min-width:42px;}
.customer-workspace .legacy-table td:nth-child(2) {min-width:155px;position:relative;padding-left:53px;}
.customer-avatar {position:absolute;left:14px;top:50%;margin-top:-15px;display:flex;align-items:center;justify-content:center;width:30px;height:30px;background:#eef2f7;color:#61738c;border-radius:8px;font-weight:600;font-size:12px;}
.customer-identity-text {display:flex;flex-direction:column;align-items:flex-start;gap:3px;}
.customer-workspace .name-button {padding:0;min-height:20px;font-size:13px;font-weight:600;line-height:1.4;}
.customer-identity-text>small {color:#6c788a;font-size:10px;line-height:1.2;}
.customer-workspace .legacy-table .pill {display:inline-flex;align-items:center;gap:4px;min-height:24px;border-radius:4px;padding:3px 6px;font-size:11px;font-weight:500;}
.legacy-table .pill svg {order:2;width:10px;height:10px;}
.legacy-table .service-cell small {display:block;margin-top:3px;font-size:10px;}
.customer-workspace .legacy-table .text-button {display:inline-flex;align-items:center;gap:5px;min-height:30px;color:#526c92;font-size:11px;font-weight:500;}
.comfortable-rows .legacy-table td {height:72px;padding-top:17px;padding-bottom:17px;}
.customer-workspace .selection-toolbar {padding:9px 20px;}
.customer-workspace .selection-toolbar button {min-height:30px;font-size:11px;}
.customer-workspace .pager {display:flex;align-items:center;padding:12px 20px;gap:12px;border-top:1px solid var(--line);}
.customer-workspace .pager .actions {margin-left:auto;}
.page-size {display:flex;flex-direction:row;align-items:center;gap:8px;font-size:11px;color:#59677a;white-space:nowrap;margin:0;}
.page-size select {min-height:30px;padding:4px 6px;width:62px;font-size:12px;}
.customer-workspace .pager button,.customer-workspace .pager input {min-height:30px;padding:4px 7px;font-size:11px;}
.customer-workspace #jump-form {display:flex;gap:5px;}
.customer-workspace #jump-form input {width:44px;}
.customer-workspace .empty {height:250px;padding:40px!important;}
.customer-workspace .empty strong {display:block;font-size:16px;color:var(--ink);}
.customer-workspace .empty p {font-size:13px;margin:8px 0 16px;}
.modern-shell .main footer {padding:16px 28px;font-size:11px;}
.nav-backdrop {top:60px;}

/* Record context stays fixed while each task gets a single, explicit panel. */
.detail.record-workspace {width:min(1000px,calc(100vw - 100px));height:100dvh;max-height:100dvh;align-self:stretch;padding:0;display:flex;flex-direction:column;overflow:hidden;background:#fff;}
.record-workspace .detail-top {position:static;display:flex;gap:12px;padding:22px 28px 10px;border:0;flex-shrink:0;}
.record-workspace .detail-top h2 {font-size:24px;letter-spacing:-.025em;}
.record-workspace .detail-top .subtle {font-size:12px;color:#59677a;margin:4px 0 0;}
.record-workspace #close-detail {min-width:36px;min-height:36px;padding:8px;margin-left:0;}
.record-navigation {margin-left:auto;display:flex;align-items:center;gap:4px;flex-wrap:wrap;justify-content:flex-end;}
.record-navigation>span {width:100%;font-size:10px;color:#677587;text-align:right;margin-bottom:2px;}
.record-navigation button {font-size:11px;min-height:28px;padding:4px 6px;}
.record-identity {display:flex;align-items:center;gap:7px;padding:0 28px 18px;flex-wrap:wrap;flex-shrink:0;}
.record-status,.record-service {font-size:11px;padding:4px 8px;background:#edf3fc;color:#345789;border-radius:4px;font-weight:600;}
.record-service {background:#edf4ef;color:#36664c;}
.record-contact {margin-left:8px;display:flex;gap:7px;align-items:center;font-size:13px;color:#4b5769;}
.record-contact button {padding:3px 6px;min-height:28px;font-size:11px;color:#2454a4;}
.record-workspace .detail-draft-status {padding:9px 28px;margin:0;background:#f7f9fc;border-top:1px solid #e5eaf1;font-size:11px;line-height:1.5;flex-shrink:0;}
.record-tabs {display:flex;gap:25px;padding:0 28px;border-top:1px solid #e5eaf1;border-bottom:1px solid #dde3eb;flex-shrink:0;}
.record-tabs button {border:0;background:none;border-radius:0;min-height:48px;font-size:13px;font-weight:500;color:#59677a;padding:12px 0;}
.record-tabs button[aria-selected=true] {color:#2454a4;font-weight:700;box-shadow:inset 0 -2px #2454a4;}
.record-panels {overflow:auto;flex:1;min-height:0;scrollbar-width:thin;}
.record-pane {padding:24px 28px 32px!important;margin:0!important;max-width:100%;min-width:0;border:0;}
.record-pane[hidden] {display:none!important;}
.record-pane h3 {margin:0 0 16px;font-size:15px;font-weight:650;}
.record-pane #note-form {display:block;padding:0 0 20px;border-bottom:1px solid var(--line);position:relative;margin:0 0 24px;}
.record-pane #note-form>label {font-size:0;}
.record-pane #note-form textarea {font-size:14px;line-height:1.7;min-height:120px;border:1px solid #ccd6e4;border-radius:8px;padding:14px;margin-bottom:12px;}
.record-pane #note-form>.primary {width:auto;font-size:12px;min-height:36px;padding:8px 12px;}
.composer-shortcut {font-size:11px;color:#647185;margin-left:12px;}
.record-history-heading {display:flex;align-items:center;justify-content:space-between;gap:12px;}
.record-history-heading h3 {margin:0;}
.record-history-heading>span {font-size:11px;color:#647185;}
.record-note-search {margin:14px 0 4px;font-size:12px;color:#52637c;}
.record-note-search summary {cursor:pointer;min-height:28px;}
.record-note-search .row {margin:10px 0;}
.record-workspace .note-list {max-height:none;background:none;padding:0;}
.record-workspace .note {position:relative;padding:18px 0 18px 22px;margin:0;border:0;border-bottom:1px solid #ecf0f5;}
.record-workspace .note:before {content:'';position:absolute;left:0;top:24px;width:7px;height:7px;background:#d7e1ef;border-radius:50%;}
.record-workspace .note small {font-size:11px;color:#647185;}
.record-workspace .note p {font-size:14px;line-height:1.7;margin-top:8px;}
.record-workspace dl {display:grid;grid-template-columns:110px minmax(0,1fr);background:#f7f9fc;border-radius:8px;padding:18px 20px;margin-bottom:24px;}
.record-workspace #profile-form .profile-grid {display:grid;grid-template-columns:1fr 1fr;gap:16px;}
.record-workspace fieldset {padding:20px;border:1px solid #dce3ed;max-width:100%;min-inline-size:0;}
.record-workspace form .row {gap:12px;align-items:end;}
.record-workspace form .row label {min-width:0;flex:1;}
.record-workspace #status-form {padding-bottom:20px;border-bottom:1px solid var(--line);margin-bottom:20px;}
.record-workspace form>button:not(.primary) {margin-top:12px;}
.form-save-state {font-size:11px;color:#647185;margin-left:12px;}
.form-save-state.unsaved {color:#805514;font-weight:600;}
.record-workspace #customer-attachments {font-size:13px;}
.record-workspace #customer-attachments .notice {font-size:12px;}
.record-workspace #customer-attachments ul {padding-left:20px;}
.record-workspace .legacy-source {margin-top:24px;}
.record-workspace .table-wrap {width:100%;max-width:100%;}

@media(max-width:1099px) {
  .modern-shell .main,.modern-shell.expanded .main {margin-left:0;}
  .modern-shell .sidebar {width:212px;}
  .workspace-location {display:none;}
  .modern-shell .content {padding:20px;}
  .header-search {min-width:170px;}
  .detail.record-workspace {width:min(900px,95vw);}
}
@media(max-width:760px) {
  .modern-shell {padding-top:56px;}
  .modern-shell .topbar {height:56px;padding:0 12px;gap:8px;}
  .company-logo {width:112px;height:39px;}
  .modern-shell .sidebar {top:56px;height:calc(100dvh - 56px);}
  .modern-shell .identity {margin-left:auto;}
  .header-search {display:none;}
  .nav-backdrop {top:56px;}
  .modern-shell .demo {padding:5px 16px;font-size:9px;}
  .modern-shell .content {padding:18px 14px;}
  .modern-shell .page-head {flex-wrap:wrap;margin-bottom:16px;gap:12px;}
  .page-head h1 {font-size:22px;}
  .page-head .page-note {font-size:11px;line-height:1.5;}
  .page-head .actions {margin-left:0;}
  .page-head .actions button {font-size:12px;min-height:34px;}
  .workspace-views {padding:0 14px;gap:18px;}
  .view-tab {font-size:12px;min-height:44px;}
  .legacy-filters[data-refined] {padding:12px 14px 0;}
  .workspace-search {display:grid;grid-template-columns:1fr 1fr;gap:8px;}
  .workspace-search>label:nth-child(3) {max-width:none;}
  .workspace-search>.workspace-filters {margin:0;}
  .workspace-search>.workspace-filters>summary {width:100%;justify-content:center;}
  .workspace-search>button {justify-content:center;}
  .workspace-filter-body {position:fixed;inset:auto 12px 20px;width:auto;max-height:75dvh;padding:20px;z-index:25;}
  .workspace-filter-body .advanced-filter-grid {grid-template-columns:1fr;}
  .workspace-filter-body .date-range {grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);}
  .workspace-filter-body .date-range>span:first-child {grid-column:1/-1;}
  .workspace-tools {padding:12px 14px;flex-wrap:wrap;gap:6px;}
  .workspace-table-actions {gap:2px;margin-left:auto;}
  .workspace-table-actions button,.workspace-more>summary {font-size:10px;padding:5px;}
  .workspace-result {font-size:10px;}
  .workspace-result strong {font-size:12px;}
  .workspace-filter-chips {padding:10px 14px 0;}
  .customer-table-scroll {max-height:460px;min-height:180px;}
  .customer-workspace .legacy-table td:nth-child(2) {position:sticky;left:0;z-index:1;}
  .customer-workspace .pager {padding:12px 14px;gap:10px;flex-wrap:wrap;}
  .customer-workspace .pager .actions {margin-left:0;flex-wrap:wrap;}
  .customer-workspace #jump-form {margin-left:auto;}
  .detail.record-workspace {width:100%;max-width:100%;padding:0;}
  .record-workspace .detail-top {padding:18px 18px 10px;gap:8px;flex-wrap:wrap;}
  .record-workspace .detail-top h2 {font-size:21px;}
  .record-workspace #close-detail {margin-left:auto;order:1;}
  .record-workspace .detail-top>div:first-child {order:0;}
  .record-navigation {order:2;width:100%;margin-left:0;justify-content:flex-start;gap:8px;}
  .record-navigation>span {width:auto;margin:0 auto 0 0;text-align:left;}
  .record-identity {padding:0 18px 14px;gap:6px;}
  .record-contact {margin-left:0;gap:4px;font-size:12px;}
  .record-workspace .detail-draft-status {padding:9px 18px;font-size:10px;}
  .record-tabs {padding:0 18px;gap:22px;overflow:auto;}
  .record-tabs button {font-size:12px;min-height:44px;white-space:nowrap;}
  .record-pane {padding:20px 18px 28px!important;}
  .composer-shortcut {display:none;}
  .record-workspace #profile-form .profile-grid {grid-template-columns:minmax(0,1fr);}
  .record-workspace .row {flex-wrap:wrap;min-width:0;}
  .record-workspace fieldset {padding:16px;}
  .record-workspace dl {grid-template-columns:85px minmax(0,1fr);padding:16px;}
  .record-workspace #memo-filter .row {grid-template-columns:1fr 1fr;}
}
/* Latest consultation entry stays beside the status control without stretching the table. */
.customer-note-preview {max-width:260px;min-width:150px;margin:0 0 6px;white-space:normal;}
.customer-note-preview p {margin:0 0 3px;font-size:12px;line-height:1.5;overflow-wrap:anywhere;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;}
.customer-note-preview small {display:block;color:var(--text-secondary,#667085);font-size:10px;line-height:1.4;white-space:normal;}
.employee-email {display:block;overflow-wrap:anywhere;color:var(--muted);font-size:12px;}
.employee-actions {display:flex;gap:6px;flex-wrap:wrap;max-width:520px;}
.employee-list {overflow:auto;border:1px solid var(--line);border-radius:12px;background:var(--paper);}
.employee-actions button {font-size:12px;}
/* Source registrations remain separate until identity has been reviewed. */
.identity-review-badge{color:#8a4800!important;font-weight:700}
.identity-review:not(:empty){padding:12px 16px;border:1px solid #e9d7b5;border-radius:8px;background:#fff9ee;margin-block:12px}
.identity-review h4{margin:0 0 6px}.identity-review p{margin:6px 0}.identity-review ul{padding-left:20px}

/* Bulk import shares the existing dialog, with explicit partial-result feedback. */
dialog:has(.bulk-import) {width:min(760px,calc(100vw - 32px));max-height:88dvh;overflow:hidden;}
dialog:has(.bulk-import) #dialog-form {display:flex;flex-direction:column;max-height:calc(88dvh - 108px);min-height:0;}
dialog:has(.bulk-import) #dialog-form > .actions {flex-shrink:0;margin-top:12px;padding-top:12px;border-top:1px solid var(--line);}
.bulk-import {font-size:15px;line-height:1.65;overflow-y:auto;min-height:0;padding-inline-end:6px;}
.bulk-import .import-intro {margin:8px 0 16px;}
.bulk-import .import-help {display:flex;align-items:center;gap:12px;flex-wrap:wrap;}
.bulk-import label {display:grid;gap:6px;margin-top:16px;font-weight:600;}
.bulk-import input,.bulk-import select {width:100%;font-size:16px;}
.bulk-import input[type=file] {white-space:normal;padding:12px;}
.bulk-import .subtle {font-size:14px;color:var(--muted);}
.bulk-import h3 {margin:24px 0 8px;font-size:18px;}
.bulk-import .import-sample {padding-inline-start:24px;overflow-wrap:anywhere;}
.bulk-import progress {width:100%;height:12px;accent-color:var(--blue);}
.bulk-import #import-progress-text {font-variant-numeric:tabular-nums;overflow-wrap:anywhere;}
.bulk-import #import-error:not(:empty) {margin:16px 0;color:var(--bad);font-weight:600;overflow-wrap:anywhere;}
.bulk-import details {margin:16px 0;}
.bulk-import summary {cursor:pointer;font-weight:600;min-height:40px;}
.bulk-import .import-issues {max-height:260px;overflow:auto;}
.bulk-import table {width:100%;table-layout:fixed;}
.bulk-import th:first-child {width:86px;}
.bulk-import td,.bulk-import th {white-space:normal;overflow-wrap:anywhere;padding:10px 12px;text-align:start;}
.bulk-import [hidden] {display:none;}
@media(max-width:600px) {
 .bulk-import {font-size:16px;}
 .bulk-import .import-help {align-items:flex-start;flex-direction:column;gap:8px;}
 dialog:has(.bulk-import) .actions {display:flex;flex-wrap:wrap;gap:8px;}
 dialog:has(.bulk-import) .actions button {flex:1;min-height:44px;}
}
