.operation-failure {
  position: fixed; z-index: 2000; bottom: 16px; left: 16px; right: 16px;
  display: flex; align-items: center; gap: 12px; padding: 16px 20px;
  border: 1px solid #e9ad32; border-radius: 12px; background: #fff4db; color: #593b00;
  box-shadow: 0 6px 24px #0002; font-size: 14px;
}
.operation-failure span { flex: 1; }
.operation-failure button { padding: 8px; flex-shrink: 0; }
.ops-dialog { width: min(480px, calc(100vw - 32px)); box-sizing: border-box; padding: 24px; border: 0; border-radius: 16px; }
.ops-dialog::backdrop { background: #11182788; }
.ops-dialog label { display: grid; gap: 6px; margin: 16px 0; font-weight: 600; }
.ops-dialog input { box-sizing: border-box; width: 100%; padding: 12px; border: 1px solid #ccd3df; border-radius: 8px; }
.ops-dialog p { line-height: 1.6; }
.ops-form-message, .ops-warning { color: #a63c13; }
.ops-event { border-top: 1px solid #e5e7eb; padding-top: 10px; font-size: 13px; overflow-wrap: anywhere; }
#operationsStatus { margin-bottom: 24px; }
#operationsStatus h2 { margin-top: 0; }
:root {
  --ink: #111827;
  --muted: #697586;
  --line: #e4e8ef;
  --paper: #f2f4f7;
  --panel: #ffffff;
  --brand: #2f73ff;
  --brand-strong: #1454e8;
  --brand-dark: #1f2937;
  --brand-soft: #eef6ff;
  --brand-line: #b9ddff;
  --accent: #2f73ff;
  --blue: #2f73ff;
  --state-soft: #eef6ff;
  --state-mid: #e8f1ff;
  --red-soft: #ffe3e3;
  --shadow: none;
  --card-shadow: 0 1px 0 rgba(16, 24, 40, 0.02);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--paper);
  font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
}

.is-hidden {
  display: none !important;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 258px minmax(0, 1fr);
  min-height: 100vh;
}

.login-screen {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background: var(--brand-dark);
}

.login-panel {
  display: grid;
  width: min(460px, 100%);
  gap: 24px;
  padding: 28px;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.28);
}

.login-brand {
  padding: 0;
  color: var(--ink);
}

.login-brand span {
  color: var(--muted);
}

.login-panel h1 {
  margin-bottom: 10px;
  font-size: 28px;
  line-height: 1.25;
}

.login-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.login-form {
  display: grid;
  gap: 14px;
}

.login-form .primary-button {
  width: 100%;
  margin-top: 2px;
}

.login-hint {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.login-error {
  min-height: 18px;
  margin: 0;
  color: #842029;
  font-size: 13px;
  font-weight: 700;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px 14px;
  color: #ffffff;
  background: #111b4a;
  border-right: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 6px 10px;
}

.brand img {
  display: block;
  width: 132px;
  height: auto;
}

.brand strong,
.brand span {
  display: block;
}

.brand span {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
}

.nav-list {
  display: grid;
  gap: 4px;
  order: 3;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 40px;
  padding: 0 13px;
  border: 0;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.78);
  background: transparent;
  text-align: left;
  font-size: 14px;
  font-weight: 800;
}

.nav-item:hover,
.nav-item.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.icon {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  color: #78a5ff;
}

.sidebar-card {
  display: none;
}

.sidebar-card strong {
  display: block;
  margin: 8px 0;
  font-size: 28px;
}

.sidebar-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.workspace {
  min-width: 0;
  padding: 0 54px 48px;
  background: #f1f3f6;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  min-height: 92px;
  margin: 0 0 0;
  padding: 22px 0 18px;
  background: #f1f3f6;
}

body:not([data-view="dashboard"]) .workspace,
body:not([data-view="dashboard"]) .topbar {
  background: #ffffff;
}

body:not([data-view="dashboard"]) .workspace {
  padding-bottom: 64px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 28px;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 18px;
}

.topbar-actions,
.filters,
.modal-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar > .topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.topbar > .topbar-actions .secondary-button,
.topbar > .topbar-actions .primary-button {
  width: auto;
}

.user-chip {
  width: auto;
  min-width: 170px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--card-shadow);
}

.user-chip strong,
.user-chip span {
  display: block;
}

.user-chip strong {
  font-size: 14px;
}

.user-chip span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.role-switch {
  display: flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.role-button {
  min-width: 68px;
  height: 34px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
}

.role-button.active {
  color: #ffffff;
  background: var(--ink);
}

.primary-button,
.secondary-button,
.ghost-button,
.icon-button,
.file-button {
  min-height: 38px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 900;
}

.primary-button {
  padding: 0 16px;
  color: #ffffff;
  background: var(--brand);
}

.primary-button:hover {
  background: var(--brand-strong);
}

.secondary-button,
.ghost-button,
.file-button {
  padding: 0 12px;
  color: var(--ink);
  background: var(--panel);
  border-color: #d8dee8;
}

.file-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.file-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.ghost-button {
  color: var(--muted);
}

.icon-button {
  width: 38px;
  padding: 0;
  background: var(--paper);
}

.notice-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  margin: 30px 0 34px;
  padding: 0 22px;
  border: 1px solid var(--brand-line);
  border-radius: 8px;
  background: #eaf5ff;
}

.notice-strip strong {
  color: var(--accent);
}

.partner-promo-strip {
  display: none;
  align-items: center;
  gap: 10px;
  min-height: 62px;
  margin: 0 -54px;
  padding: 0 54px;
  color: #ffffff;
  background: #4b5563;
}

.partner-promo-strip span {
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--brand);
  background: #ffffff;
  font-size: 12px;
  font-weight: 900;
}

.partner-promo-strip strong {
  font-size: 15px;
}

.promo-close {
  margin-left: auto;
  border: 0;
  color: #ffffff;
  background: transparent;
  font-size: 30px;
  line-height: 1;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 30px;
}

.metric,
.panel {
  border: 0;
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--card-shadow);
}

.metric {
  min-height: 112px;
  padding: 22px 24px;
}

.metric-button {
  display: block;
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.metric-button:hover {
  border-color: rgba(40, 84, 255, 0.45);
}

.metric span,
.metric small {
  display: block;
  color: var(--muted);
}

.metric strong {
  display: block;
  margin: 10px 0 4px;
  color: #1f2937;
  font-size: 32px;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(340px, 1fr);
  gap: 26px;
}

.dashboard-extra {
  margin-top: 26px;
}

.data-panel {
  margin-top: 34px;
}

.account-panel {
  margin-top: 18px;
}

.partner-performance-panel,
.partner-support-panel,
.homepage-inbox-panel {
  margin-top: 26px;
}

.panel {
  min-width: 0;
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 22px 24px 14px;
  border-bottom: 0;
}

.panel-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.clickable-row {
  cursor: pointer;
}

.clickable-row:hover {
  background: var(--paper);
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  color: var(--ink);
  background: #eef1f8;
  font-size: 12px;
  font-weight: 800;
}

.status.new {
  color: var(--brand-strong);
  background: var(--state-soft);
}

.status.active {
  color: #1d43c7;
  background: var(--state-mid);
}

.status.done {
  color: #21306f;
  background: #edf0ff;
}

.status.danger {
  color: #842029;
  background: var(--red-soft);
}

.notice-list,
.ticket-list,
.lead-board,
.resource-grid,
.partner-grid {
  padding: 18px;
}

.notice-item,
.ticket-item,
.lead-card,
.resource-card,
.partner-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.notice-item {
  padding: 14px;
}

.notice-item.important {
  border-color: var(--brand-line);
  border-left: 4px solid var(--brand);
  background: var(--brand-soft);
}

.notice-item + .notice-item {
  margin-top: 10px;
}

.notice-item strong,
.resource-card strong,
.partner-card strong {
  display: block;
  margin-bottom: 7px;
}

.notice-item span,
.resource-card span,
.partner-card span,
.ticket-item span,
.lead-card span {
  color: var(--muted);
  font-size: 13px;
}

.notice-item p,
.resource-card p,
.resource-card small {
  display: block;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.resource-card small {
  color: #48515f;
}

.library-page {
  display: grid;
  gap: 18px;
}

.library-page > .panel-head {
  padding: 0 0 16px;
  border-bottom: 1px solid var(--line);
}

.library-page .resource-grid {
  min-height: 160px;
  padding: 16px 0 0;
}

.library-page .empty-list {
  border: 1px dashed #d8dee8;
  border-radius: 8px;
  background: #ffffff;
}

.resource-stats-panel {
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.resource-stats-panel .panel-head {
  padding-left: 0;
  padding-right: 0;
}

select,
input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
}

select,
input {
  height: 38px;
  padding: 0 11px;
}

textarea {
  padding: 10px 11px;
  resize: vertical;
}

.filters select {
  width: 146px;
}

.filters input {
  width: 240px;
}

.filters button {
  white-space: nowrap;
}

.lead-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.lead-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 18px;
  align-items: start;
}

.lead-card {
  display: grid;
  gap: 12px;
  padding: 15px;
  text-align: left;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.lead-card:hover,
.lead-card.selected {
  border-color: rgba(40, 84, 255, 0.45);
  box-shadow: 0 16px 34px rgba(40, 84, 255, 0.12);
}

.lead-card:hover {
  transform: translateY(-1px);
}

.lead-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.lead-card h3 {
  margin: 0 0 4px;
  font-size: 17px;
}

.lead-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.lead-meta span {
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--paper);
}

.lead-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.lead-tags span {
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--brand-strong);
  background: var(--brand-soft);
  font-size: 12px;
  font-weight: 900;
}

.detail-tags {
  margin-top: 2px;
}

.lead-next-action {
  display: block;
  padding: 9px 10px;
  border-radius: 8px;
  color: var(--brand-strong);
  background: var(--brand-soft);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.lead-card select {
  margin-top: 4px;
}

.lead-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.lead-card-actions select {
  width: 132px;
  height: 32px;
  margin-top: 0;
  font-size: 13px;
}

.compact-button {
  justify-self: start;
  min-height: 32px;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.danger-button {
  color: #842029;
}

.detail-panel {
  position: sticky;
  top: 28px;
}

.empty-detail {
  display: grid;
  min-height: 340px;
  place-items: center;
  align-content: center;
  padding: 28px;
  text-align: center;
}

.empty-icon {
  display: grid;
  width: 48px;
  height: 48px;
  margin-bottom: 14px;
  place-items: center;
  border-radius: 8px;
  color: var(--brand-strong);
  background: var(--state-soft);
  font-size: 22px;
}

.empty-detail p,
.empty-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.detail-section {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.detail-section:last-child {
  border-bottom: 0;
}

.detail-section h3 {
  margin: 0;
  font-size: 14px;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.profile-grid span {
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.profile-grid b {
  color: var(--brand-strong);
  font-size: 16px;
}

.profile-grid small,
.message-history-list span {
  color: var(--muted);
  font-size: 12px;
}

.related-leads,
.checklist-list,
.message-history-list {
  display: grid;
  gap: 8px;
}

.related-leads button,
.checklist-item,
.calendar-item,
.message-dashboard-item,
.partner-score-item {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  text-align: left;
}

.related-leads button:hover,
.calendar-item:hover,
.message-dashboard-item:hover,
.partner-score-item:hover {
  border-color: var(--brand-line);
  background: var(--brand-soft);
}

.checklist-item {
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
}

.checklist-item input {
  width: 16px;
  height: 16px;
}

.message-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.calendar-list,
.message-dashboard-list,
.partner-score-list {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.calendar-date {
  width: fit-content;
  padding: 4px 7px;
  border-radius: 7px;
  color: var(--brand-strong);
  background: var(--brand-soft);
  font-size: 12px;
  font-weight: 800;
}

.score-bar {
  overflow: hidden;
  height: 7px;
  border-radius: 999px;
  background: #e8ecf7;
}

.score-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
}

.message-admin-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.75fr) minmax(360px, 1.25fr);
  gap: 18px;
  padding: 18px;
}

.message-template-list,
.message-template-editor,
.message-history-admin-list {
  display: grid;
  gap: 10px;
}

.message-template-editor {
  align-content: start;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.message-template-item,
.message-history-admin-item {
  display: grid;
  gap: 5px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  text-align: left;
}

.message-template-item:hover,
.message-template-item:focus-visible {
  border-color: var(--brand-line);
  background: var(--brand-soft);
}

.message-template-item.inactive {
  opacity: 0.62;
}

.message-template-item span,
.message-template-item small,
.message-history-admin-item span,
.message-history-admin-item p {
  color: var(--muted);
  font-size: 13px;
}

.message-history-admin-list {
  padding: 18px;
}

.message-history-admin-item p {
  margin: 0;
  line-height: 1.5;
}

.token-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkbox-label input {
  width: 16px;
  height: 16px;
}

.consult-link-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  min-height: calc(100vh - 86px);
  margin: 0 -54px -48px 0;
  background: #ffffff;
}

.consult-link-main {
  padding: 34px 52px 60px;
}

.consult-beta-strip {
  display: grid;
  grid-template-columns: 18px auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  width: min(100%, 1040px);
  min-height: 56px;
  margin-bottom: 28px;
  padding: 0 18px;
  border-radius: 8px;
  color: #475467;
  background: #f5f7fa;
}

.consult-beta-strip span {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: #98a2b3;
  font-size: 12px;
  font-weight: 900;
}

.consult-beta-strip strong {
  color: #344054;
  white-space: nowrap;
}

.consult-beta-strip p {
  margin: 0;
  font-size: 14px;
}

.consult-section {
  width: min(100%, 1040px);
  margin-top: 34px;
}

.consult-section h2 {
  margin-bottom: 14px;
  font-size: 20px;
}

.consult-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.consult-link-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 66px;
  padding: 0 18px 0 22px;
  border-radius: 8px;
  color: #1d2939;
  background: linear-gradient(90deg, #f8fbff, #eef6ff);
}

.consult-link-box span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
}

.consult-template-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.consult-template-card {
  display: grid;
  grid-template-rows: minmax(170px, auto) auto;
  min-height: 292px;
  border: 1px solid #d8dee8;
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.consult-template-card textarea {
  min-height: 178px;
  border: 0;
  border-radius: 0;
  padding: 20px;
  line-height: 1.6;
  resize: none;
}

.consult-template-card footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 18px;
  border-top: 1px solid #edf0f5;
}

.consult-template-card strong {
  font-size: 15px;
}

.consult-phone-preview {
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 18px;
  padding: 40px 34px;
  background: linear-gradient(180deg, #f7f9fc 0%, #e3fbfb 100%);
}

.phone-frame {
  display: grid;
  gap: 16px;
  width: min(100%, 322px);
  padding: 16px 20px 18px;
  border-radius: 22px;
  background: #eaf5ff;
}

.phone-status {
  display: flex;
  justify-content: space-between;
  color: #101828;
  font-size: 13px;
  font-weight: 900;
}

.phone-logo {
  display: flex;
  justify-content: center;
  padding-top: 18px;
}

.phone-logo img {
  width: 122px;
}

.phone-frame > p {
  margin: 16px 0 0;
  color: #344054;
  text-align: center;
}

.phone-frame > h2 {
  color: #101828;
  font-size: 24px;
  text-align: center;
}

.preview-form-card {
  display: grid;
  gap: 10px;
  padding: 18px;
  border-radius: 8px;
  background: #ffffff;
}

.preview-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  border-radius: 8px;
  background: #eef1f6;
}

.preview-tabs button {
  height: 34px;
  border: 0;
  border-radius: 7px;
  color: #667085;
  background: transparent;
  font-weight: 900;
}

.preview-tabs button.active {
  color: #1d2939;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(16, 24, 40, 0.08);
}

.preview-form-card > span,
.preview-row,
.preview-textarea {
  min-height: 42px;
  padding: 12px;
  border: 1px solid #e4e8ef;
  border-radius: 8px;
  color: #98a2b3;
  font-size: 13px;
}

.preview-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.preview-textarea {
  min-height: 72px;
}

.preview-check {
  color: #667085;
  font-size: 13px;
  font-weight: 800;
}

.preview-check::before {
  content: "✓";
  margin-right: 8px;
  color: #c0c7d2;
}

.preview-check.active::before {
  color: var(--brand);
}

.preview-form-card > button {
  height: 48px;
  border: 0;
  border-radius: 8px;
  color: #ffffff;
  background: #cfe0ff;
  font-weight: 900;
}

.phone-frame > a {
  margin-top: 390px;
  color: var(--brand);
  text-align: center;
  font-weight: 900;
}

.calendar-month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1px;
  padding: 18px;
  background: var(--line);
}

.calendar-weekday,
.calendar-day {
  background: #ffffff;
}

.calendar-weekday {
  padding: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.calendar-day {
  min-height: 116px;
  padding: 10px;
}

.calendar-day.muted {
  background: #f7f9fd;
  color: var(--muted);
}

.calendar-day.today {
  box-shadow: inset 0 0 0 2px var(--brand);
}

.calendar-day > strong {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
}

.calendar-day-items {
  display: grid;
  gap: 5px;
}

.calendar-day-items button {
  overflow: hidden;
  width: 100%;
  padding: 6px 7px;
  border: 0;
  border-radius: 7px;
  color: var(--brand-strong);
  background: var(--brand-soft);
  font-size: 12px;
  font-weight: 800;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-help {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.detail-sync-message {
  margin: 12px 12px 0;
  padding: 10px 12px;
  border: 1px solid #ffd1d1;
  border-radius: 8px;
  color: #842029;
  background: #fff4f4;
  font-size: 13px;
  font-weight: 800;
}

.info-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
  margin: 0;
}

.info-list div {
  min-width: 0;
}

.info-list dt {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.info-list dd {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  word-break: keep-all;
}

.memo-form .primary-button {
  justify-self: end;
}

.next-action-form .secondary-button {
  justify-self: end;
}

.timeline,
.history-list {
  display: grid;
  gap: 10px;
}

.timeline-item {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.timeline-item strong,
.history-list span {
  display: block;
  color: var(--ink);
  font-size: 13px;
}

.timeline-item p {
  margin: 6px 0;
  color: var(--ink);
  line-height: 1.5;
}

.timeline-item span,
.history-list span {
  color: var(--muted);
}

.timeline-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.history-list span {
  padding-left: 10px;
  border-left: 2px solid var(--line);
  line-height: 1.5;
}

.empty-list {
  grid-column: 1 / -1;
  padding: 30px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.pipeline-list,
.stale-list {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.homepage-inbox {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 0 24px 24px;
}

.homepage-inbox-item {
  display: grid;
  gap: 18px;
  min-height: 148px;
  padding: 18px 20px;
  border: 0;
  border-radius: 8px;
  color: inherit;
  text-align: left;
  background: #ffffff;
  cursor: pointer;
}

.homepage-inbox-item:hover {
  border-color: transparent;
  background: var(--brand-soft);
}

.homepage-inbox-item span,
.homepage-inbox-item small {
  display: block;
}

.homepage-inbox-item strong {
  display: block;
  margin-bottom: 8px;
  font-size: 17px;
}

.homepage-inbox-item small {
  color: var(--muted);
  line-height: 1.45;
}

.homepage-inbox-item em {
  align-self: end;
  color: var(--brand);
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
}

.pipeline-item {
  display: grid;
  gap: 8px;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
}

.pipeline-item div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.pipeline-item strong {
  color: var(--ink);
}

.pipeline-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef1f8;
}

.pipeline-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
}

.stale-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  text-align: left;
}

.stale-item:hover {
  border-color: rgba(40, 84, 255, 0.45);
}

.stale-item span,
.stale-item small {
  display: block;
}

.stale-item strong {
  display: block;
  margin-bottom: 4px;
}

.stale-item small {
  color: var(--muted);
}

.stale-item em {
  flex: 0 0 auto;
  font-style: normal;
}

.data-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 18px;
}

.data-summary span {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--muted);
  background: var(--paper);
  font-size: 13px;
}

.data-summary strong {
  color: var(--ink);
}

.partner-performance-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 18px;
}

.partner-performance-item {
  display: grid;
  gap: 7px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  text-align: left;
}

.partner-performance-item:hover {
  border-color: rgba(40, 84, 255, 0.45);
}

.partner-performance-item strong {
  margin-bottom: 2px;
}

.partner-performance-item span {
  color: var(--muted);
  font-size: 13px;
}

.resource-grid,
.partner-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.resource-card,
.partner-card {
  padding: 16px;
}

.resource-type {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin-bottom: 12px;
  padding: 0 8px;
  border-radius: 999px;
  color: var(--brand-strong);
  background: var(--state-soft);
  font-size: 12px;
  font-weight: 800;
}

.ticket-list {
  display: grid;
  gap: 12px;
}

.account-list {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.account-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.account-item strong,
.account-item span,
.account-item p {
  display: block;
}

.account-item strong {
  margin-bottom: 5px;
  font-size: 16px;
}

.account-item span,
.account-item p {
  color: var(--muted);
  font-size: 13px;
}

.account-item p {
  margin: 7px 0 0;
}

.account-solutions {
  display: inline-flex;
  width: fit-content;
  margin-top: 9px;
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--brand);
  background: #edf4ff;
  font-weight: 800;
}

.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.account-actions button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.solution-check-group {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.solution-check-group > strong {
  font-size: 13px;
}

.solution-check-group > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.solution-check-group label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  font-size: 13px;
  font-weight: 800;
}

.solution-check-group input {
  width: auto;
}

.solution-check-group p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.ticket-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 156px;
  gap: 12px;
  align-items: start;
  padding: 15px;
}

.ticket-item h3 {
  margin: 0 0 5px;
  font-size: 16px;
}

.ticket-item p {
  margin: 8px 0 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
}

.ticket-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.ticket-actions select {
  flex-basis: 100%;
  height: 34px;
  font-size: 13px;
}

.ops-alert-bar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 30px 0 18px;
}

.ops-alert-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 16px 18px;
  border: 0;
  border-radius: 8px;
  color: var(--ink);
  background: #ffffff;
  text-align: left;
  box-shadow: var(--card-shadow);
}

.ops-alert-card strong,
.ops-alert-card small {
  display: block;
}

.ops-alert-card small {
  margin-top: 3px;
  color: var(--muted);
  line-height: 1.35;
}

.ops-alert-icon {
  display: grid;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  color: #ffffff;
  background: var(--brand);
  font-weight: 900;
}

.toast-stack {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 20;
  display: grid;
  gap: 10px;
  width: min(340px, calc(100vw - 28px));
}

.toast-message {
  padding: 13px 14px;
  border: 1px solid var(--brand-line);
  border-radius: 8px;
  color: var(--ink);
  background: #ffffff;
  box-shadow: var(--shadow);
  text-align: left;
  font-weight: 800;
}

.global-search-panel {
  position: relative;
  margin: 0 0 30px;
}

.global-search-panel input {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border: 1px solid #d8dee8;
  border-radius: 8px;
  background: #ffffff;
}

body:not([data-view="dashboard"]) .ops-alert-bar,
body:not([data-view="dashboard"]) .global-search-panel,
body:not([data-view="dashboard"]) .notice-strip {
  display: none;
}

.global-search-results {
  position: absolute;
  z-index: 15;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  display: grid;
  gap: 6px;
  max-height: 420px;
  overflow: auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.global-search-results > strong {
  margin: 8px 4px 2px;
  color: var(--brand);
  font-size: 12px;
}

.global-search-results button {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px;
  border: 0;
  border-radius: 8px;
  background: var(--brand-soft);
  text-align: left;
}

.global-search-results em {
  flex: 0 0 auto;
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

.quick-activity-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.attachment-upload {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.attachment-list {
  display: grid;
  gap: 8px;
}

.attachment-item,
.audit-log-item,
.backup-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.attachment-item strong,
.attachment-item small,
.audit-log-item strong,
.audit-log-item small,
.backup-item strong,
.backup-item small {
  display: block;
}

.attachment-item small,
.audit-log-item small,
.backup-item small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.attachment-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
}

.audit-log-list,
.backup-list {
  display: grid;
  gap: 8px;
}

.audit-log-item em {
  flex: 0 0 auto;
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

.resource-stats-panel {
  margin-top: 8px;
}

.operations-focus-panel,
.monthly-report-panel {
  margin: 26px 0;
}

.focus-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.focus-grid h3 {
  margin: 0 0 10px;
  font-size: 14px;
}

.focus-list {
  display: grid;
  gap: 8px;
}

.focus-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #ffffff;
  text-align: left;
}

.focus-item.delayed {
  border-color: #ffc9c9;
  background: #fff8f8;
}

.focus-item strong,
.focus-item small {
  display: block;
}

.focus-item small {
  margin-top: 4px;
  color: var(--muted);
}

.focus-item em {
  flex: 0 0 auto;
  color: var(--brand);
  font-style: normal;
  font-weight: 900;
}

.report-table-wrap {
  overflow-x: auto;
}

.report-table {
  min-width: 760px;
}

.report-table td:not(:first-child),
.report-table th:not(:first-child) {
  text-align: right;
}

.resource-scope {
  display: inline-flex;
  width: fit-content;
  padding: 4px 8px;
  border-radius: 8px;
  color: var(--brand);
  background: var(--brand-soft);
  font-weight: 800;
}

.resource-access-row select[multiple] {
  min-height: 88px;
  padding: 8px;
}

.stat-total {
  color: var(--brand);
  font-size: 22px;
}

.stats-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.stats-split h3 {
  margin: 0 0 10px;
  font-size: 14px;
}

.stats-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.stats-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stats-row strong {
  flex: 0 0 auto;
  color: var(--ink);
}

.modal {
  width: min(560px, calc(100vw - 28px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.24);
}

.modal::backdrop {
  background: rgba(15, 23, 42, 0.45);
}

.modal-body {
  display: grid;
  gap: 14px;
  padding: 22px;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.partner-page {
  display: grid;
  gap: 26px;
  max-width: 1480px;
}

body:not([data-view="dashboard"]) .partner-page {
  max-width: 1360px;
}

.partner-page-head,
.partner-page-title,
.partner-table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.partner-page-title h2,
.partner-page-head h2 {
  margin: 0;
  font-size: 22px;
}

.guide-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 30px;
  align-items: center;
  min-height: 220px;
  padding: 42px 48px;
  border-radius: 8px;
  background: #f0f3f7;
}

.guide-hero strong {
  display: block;
  margin-bottom: 12px;
  color: var(--ink);
  font-size: 24px;
}

.guide-hero p {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 16px;
}

.guide-hero img {
  width: 100%;
  max-height: 170px;
  object-fit: contain;
}

.guide-hero-actions,
.table-actions,
.product-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#orderHistoryView .partner-table-toolbar .table-actions {
  display: none;
}

.order-detail-head,
.order-status-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.order-detail-head h2 {
  margin: 5px 0 4px;
  font-size: 22px;
}

.order-detail-head p {
  margin: 0;
  color: var(--muted);
}

.order-status-row {
  align-items: end;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.order-status-row label {
  min-width: 220px;
}

.order-status-row > div {
  display: grid;
  gap: 3px;
  text-align: right;
}

.order-status-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.order-status-row strong {
  color: var(--ink);
  font-size: 20px;
}

.order-item-table {
  border-radius: 8px;
}

.inline-status-select {
  min-width: 118px;
  height: 34px;
  padding: 0 28px 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
}

.order-history-log {
  display: grid;
  gap: 10px;
}

.order-history-log > strong {
  color: var(--ink);
  font-size: 15px;
}

.order-history-log ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.order-history-log li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.order-history-log li span {
  color: var(--muted);
  font-size: 12px;
}

.order-history-log li strong {
  color: var(--ink);
  font-size: 13px;
}

.empty-table-cell {
  padding: 38px 16px;
  color: var(--muted);
  text-align: center;
}

.kiwoom-page {
  display: grid;
  gap: 22px;
}

.kiwoom-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.kiwoom-metric,
.kiwoom-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--card-shadow);
}

.kiwoom-metric {
  padding: 18px;
}

.kiwoom-metric span,
.kiwoom-metric small {
  display: block;
  color: var(--muted);
}

.kiwoom-metric strong {
  display: block;
  margin: 8px 0 3px;
  color: var(--ink);
  font-size: 28px;
}

.kiwoom-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.kiwoom-point-list,
.kiwoom-product-list,
.kiwoom-resource-list {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.kiwoom-point-list article,
.kiwoom-product-list article,
.kiwoom-resource-item {
  display: grid;
  gap: 7px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.kiwoom-point-list article {
  grid-template-columns: 44px minmax(0, 1fr);
}

.kiwoom-point-list b,
.kiwoom-product-list span,
.kiwoom-resource-item span {
  color: var(--brand);
  font-weight: 900;
}

.kiwoom-point-list p,
.kiwoom-product-list p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.kiwoom-table-wrap {
  padding: 18px;
}

.kiwoom-resource-item {
  width: 100%;
  text-align: left;
}

.partner-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.partner-tabs button {
  min-height: 40px;
  padding: 0 15px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-weight: 800;
}

.partner-tabs button.active {
  color: var(--ink);
  background: #eef1f5;
}

.strong-tabs {
  gap: 18px;
  border-bottom: 1px solid var(--line);
}

.strong-tabs button {
  border-radius: 0;
  background: transparent;
}

.strong-tabs button.active {
  border-bottom: 2px solid var(--ink);
  background: transparent;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px 24px;
}

.guide-card {
  display: grid;
  gap: 8px;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
}

.guide-card-shell {
  position: relative;
}

.guide-card-main {
  display: grid;
  gap: 8px;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
}

.guide-card:hover strong,
.guide-card-main:hover strong {
  color: var(--brand);
}

.guide-card img,
.guide-card-main img {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  background: #eef2f8;
  object-fit: cover;
}

.guide-card span,
.guide-card small,
.guide-card-main span,
.guide-card-main small {
  color: var(--muted);
  font-size: 13px;
}

.guide-card strong,
.guide-card-main strong {
  color: var(--ink);
  font-size: 17px;
  line-height: 1.4;
}

.guide-card-edit {
  justify-self: start;
}

.guide-inline-editor {
  margin: 0 0 20px;
}

.guide-inline-form {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--brand-line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--card-shadow);
}

.guide-inline-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.guide-inline-head strong,
.guide-inline-head p {
  display: block;
}

.guide-inline-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.guide-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 18px;
  align-items: stretch;
}

.guide-detail-hero,
.guide-detail-actions,
.guide-detail-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.guide-detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  align-items: center;
  min-height: 260px;
  padding: 34px;
}

.guide-detail-hero span {
  display: block;
  margin-bottom: 10px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 900;
}

.guide-detail-hero h2 {
  margin: 0 0 14px;
  color: var(--ink);
  font-size: 32px;
  line-height: 1.25;
}

.guide-detail-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.guide-detail-hero img {
  width: 100%;
  max-height: 210px;
  object-fit: contain;
}

.guide-detail-actions {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 18px;
}

.guide-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.7fr);
  gap: 18px;
}

.guide-detail-section {
  padding: 24px;
}

.guide-detail-section h2 {
  margin: 0 0 16px;
  color: var(--ink);
  font-size: 20px;
}

.guide-step-list,
.guide-check-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 22px;
  color: var(--ink);
  line-height: 1.6;
}

.guide-check-list + h2 {
  margin-top: 28px;
}

.guide-script-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.guide-detail-section p {
  margin: 0;
  color: var(--ink);
  line-height: 1.75;
  white-space: pre-line;
}

.content-admin-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.content-admin-sidebar,
.content-admin-editor {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.content-admin-sidebar {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.content-admin-tabs {
  gap: 6px;
}

.content-admin-tabs button {
  min-height: 34px;
  padding: 0 11px;
  font-size: 13px;
}

.content-admin-list {
  display: grid;
  gap: 8px;
  max-height: 560px;
  overflow: auto;
}

.content-admin-item {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  text-align: left;
}

.content-admin-item.active,
.content-admin-item:hover {
  border-color: var(--brand-line);
  background: var(--brand-soft);
}

.content-admin-item span,
.content-admin-item small {
  color: var(--muted);
  font-size: 12px;
}

.content-admin-item strong {
  color: var(--ink);
  line-height: 1.35;
}

.content-admin-editor {
  display: grid;
  gap: 14px;
  padding: 20px;
}

.content-admin-editor label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.content-admin-editor input,
.content-admin-editor textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
}

.content-admin-editor input {
  height: 40px;
  padding: 0 12px;
}

.content-admin-editor textarea {
  min-height: 88px;
  padding: 11px 12px;
  resize: vertical;
}

.cart-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: #ffffff;
  font-weight: 800;
}

.cart-button span {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: var(--brand);
  font-size: 12px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 28px;
}

.product-card {
  position: relative;
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  min-height: 150px;
  padding: 22px;
  border: 1px solid #ccd4df;
  border-radius: 8px;
  background: #ffffff;
  text-align: left;
}

.product-card:hover {
  border-color: rgba(40, 84, 255, 0.48);
  box-shadow: var(--card-shadow);
}

.product-card img,
.product-card-canvas {
  width: 100%;
  height: 110px;
  border-radius: 8px;
  background: #f1f3f6;
  object-fit: contain;
}

.product-card strong,
.product-card small,
.product-card p,
.product-card em {
  display: block;
}

.product-card strong {
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 18px;
}

.product-card small {
  color: var(--muted);
}

.product-card p {
  margin: 18px 0 4px;
  color: var(--muted);
}

.product-card em {
  color: var(--brand);
  font-style: normal;
  font-weight: 900;
}

.product-badge {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 1;
  padding: 4px 7px;
  border-radius: 999px;
  color: var(--brand);
  background: #eef5ff;
  font-size: 12px;
  font-weight: 900;
}

.back-link-button {
  justify-self: start;
  border: 0;
  color: var(--ink);
  background: transparent;
  font-size: 22px;
  font-weight: 900;
}

#productDetailView .partner-page {
  max-width: 1240px;
  margin: 0 auto;
  gap: 34px;
}

#productDetailView .back-link-button {
  margin-left: -8px;
  padding: 8px;
}

.product-detail-layout {
  display: grid;
  grid-template-columns: minmax(480px, 1fr) 440px;
  gap: 82px;
  align-items: start;
}

.product-gallery {
  display: grid;
  gap: 22px;
  justify-items: center;
  padding-top: 8px;
}

.product-main-image {
  display: grid;
  width: 100%;
  min-height: 430px;
  place-items: center;
  border: 1px solid #e4e8ef;
  border-radius: 8px;
  background: #edf1f6;
}

.product-main-image img,
.product-main-canvas {
  position: relative;
  z-index: 1;
  display: block;
  width: min(420px, 82%);
  height: auto;
}

.product-thumb {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  border: 2px solid var(--brand);
  border-radius: 8px;
  background: #ffffff;
}

.product-thumb img,
.product-thumb-canvas {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.product-buy-panel {
  display: grid;
  gap: 18px;
  padding-top: 22px;
}

.product-buy-panel h2 {
  margin: 0;
  color: var(--ink);
  font-size: 31px;
}

.product-buy-panel p {
  margin: 0;
  color: var(--muted);
}

.product-alert {
  padding: 12px 14px;
  border-radius: 8px;
  color: #d86600 !important;
  background: #fff0d8;
  font-weight: 900;
}

.product-alert.is-muted {
  color: var(--brand) !important;
  background: var(--brand-soft);
}

.price-summary {
  display: grid;
  gap: 11px;
  padding: 20px;
  border: 1px solid #edf0f4;
  border-radius: 8px;
  background: #fafbfc;
}

.price-summary dl {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin: 0;
}

.price-summary dt {
  color: var(--muted);
}

.price-summary dd {
  margin: 0;
  color: var(--ink);
  font-weight: 800;
}

.price-summary .total {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.price-summary .total dd {
  font-size: 20px;
}

.qty-stepper {
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  width: 224px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f3f6fa;
}

.qty-stepper button,
.qty-stepper input {
  height: 48px;
  border: 0;
  text-align: center;
  background: transparent;
  font-size: 18px;
}

.qty-stepper input {
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  background: #ffffff;
}

.product-action-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.product-detail-section {
  display: grid;
  gap: 22px;
  max-width: 920px;
  margin: 10px auto 0;
  padding-top: 18px;
  border-top: 1px solid #edf0f4;
}

.product-detail-section h2 {
  margin: 28px 0 0;
  color: var(--ink);
}

.product-detail-section p {
  margin: 0;
  color: var(--ink);
  line-height: 1.7;
}

.product-cart-panel {
  display: grid;
  gap: 14px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.empty-cart {
  display: grid;
  gap: 6px;
  min-height: 110px;
  align-content: center;
  padding: 12px;
  color: var(--muted);
}

.empty-cart strong {
  color: var(--ink);
  font-size: 18px;
}

.empty-cart p {
  margin: 0;
}

.cart-panel-head,
.cart-total,
.cart-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.cart-panel-head span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.cart-panel-head strong {
  color: var(--ink);
  font-size: 20px;
}

.cart-item-list {
  display: grid;
  gap: 10px;
}

.cart-item {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.cart-item img,
.cart-item-canvas {
  flex: 0 0 74px;
  width: 74px;
  height: 58px;
  border-radius: 8px;
  background: #ffffff;
  object-fit: contain;
}

.cart-item div:nth-child(2) {
  flex: 1 1 auto;
  min-width: 0;
}

.cart-item strong,
.cart-item small,
.cart-item em {
  display: block;
}

.cart-item small {
  margin-top: 3px;
  color: var(--muted);
}

.cart-item em {
  margin-top: 7px;
  color: var(--brand);
  font-style: normal;
  font-weight: 900;
}

.cart-qty {
  display: inline-grid;
  grid-template-columns: 32px 42px 32px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.cart-qty button,
.cart-qty span {
  display: grid;
  height: 34px;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 900;
}

.cart-qty span {
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
}

.cart-total {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.cart-total span {
  color: var(--muted);
  font-weight: 800;
}

.cart-total strong {
  color: var(--ink);
  font-size: 22px;
}

.table-subtext {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.operation-detail-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.operation-detail-panel span,
.operation-detail-panel p {
  color: var(--muted);
}

.operation-detail-panel h2 {
  margin: 4px 0 6px;
  color: var(--ink);
  font-size: 20px;
}

.operation-detail-panel p {
  margin: 0;
}

.operation-action-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.toss-sync-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.toss-sync-card {
  display: grid;
  gap: 8px;
  min-height: 138px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.toss-sync-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.toss-sync-card strong {
  color: var(--ink);
  font-size: 24px;
}

.toss-sync-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.date-range {
  display: inline-grid;
  grid-template-columns: 150px auto 150px;
  gap: 8px;
  align-items: center;
  width: max-content;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.date-range input {
  height: 44px;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-weight: 800;
}

.compact-range {
  margin-top: -10px;
}

.partner-table-wrap {
  border: 0;
  background: transparent;
}

.partner-table {
  width: 100%;
  border-collapse: collapse;
  color: var(--ink);
}

.partner-table th,
.partner-table td {
  min-height: 44px;
  padding: 13px 14px;
  border: 1px solid #ccd4df;
  text-align: left;
  vertical-align: middle;
}

.partner-table thead th,
.partner-table tbody th {
  background: #f1f3f6;
  color: #4f5b6b;
  font-weight: 800;
}

.company-info-stack {
  display: grid;
  gap: 30px;
}

.company-info-stack h2 {
  margin: 0 0 14px;
  color: var(--ink);
  font-size: 21px;
}

.info-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  margin: 0 6px 6px 0;
  padding: 0 9px;
  border-radius: 999px;
  background: #eef1f5;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .brand div:last-child,
  .nav-item:not(.active),
  .nav-item.active {
    font-size: 0;
  }

  .nav-item {
    justify-content: center;
  }

  .sidebar-card {
    display: none;
  }

  .workspace {
    padding: 0 28px 36px;
  }

  .topbar,
  .partner-promo-strip {
    margin-left: -28px;
    margin-right: -28px;
    padding-left: 28px;
    padding-right: 28px;
  }

  .metric-grid,
  .resource-grid,
  .partner-grid,
  .guide-grid,
  .kiwoom-metric-grid,
  .partner-performance-list,
  .toss-sync-grid,
  .homepage-inbox,
  .ops-alert-bar,
  .stats-split,
  .focus-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .content-grid,
  .consult-link-layout,
  .guide-hero,
  .kiwoom-grid,
  .guide-detail-layout,
  .guide-detail-hero,
  .guide-detail-grid,
  .content-admin-layout,
  .product-detail-layout,
  .lead-board,
  .lead-layout {
    grid-template-columns: 1fr;
  }

  .consult-link-layout {
    margin-right: 0;
  }

  .consult-phone-preview {
    padding: 28px;
  }

  .detail-panel {
    position: static;
  }
}

@media (max-width: 720px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 12px;
  }

  .brand {
    padding-bottom: 4px;
  }

  .brand div:last-child {
    display: block;
    font-size: initial;
  }

  .nav-list {
    grid-template-columns: repeat(5, 1fr);
  }

  .nav-item {
    min-height: 38px;
    padding: 0;
  }

  .workspace {
    padding: 0 14px 28px;
  }

  .topbar,
  .partner-promo-strip {
    margin-left: -14px;
    margin-right: -14px;
    padding-left: 14px;
    padding-right: 14px;
  }

  .partner-promo-strip {
    align-items: flex-start;
    flex-direction: column;
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .topbar,
  .topbar-actions,
  .panel-head,
  .filters,
  .account-item,
  .ticket-item {
    align-items: stretch;
    flex-direction: column;
  }

  .account-item {
    grid-template-columns: 1fr;
  }

  .account-actions {
    justify-content: flex-start;
  }

  .ticket-item {
    grid-template-columns: 1fr;
  }

  .ticket-actions {
    justify-content: flex-start;
  }

  .role-switch {
    width: 100%;
  }

  .role-button {
    flex: 1;
  }

  .metric-grid,
  .resource-grid,
  .partner-grid,
  .guide-grid,
  .product-grid,
  .partner-performance-list,
  .homepage-inbox,
  .consult-template-grid,
  .ops-alert-bar,
  .stats-split,
  .focus-grid,
  .quick-activity-grid,
  .template-grid,
  .attachment-upload,
  .form-row {
    grid-template-columns: 1fr;
  }

  .product-card {
    grid-template-columns: 1fr;
  }

  .partner-page-head,
  .partner-page-title,
  .partner-table-toolbar,
  .operation-detail-panel,
  .cart-panel-head,
  .cart-total,
  .cart-item {
    align-items: stretch;
    flex-direction: column;
  }

  .cart-item {
    align-items: flex-start;
  }

  .date-range {
    width: 100%;
    grid-template-columns: 1fr auto 1fr;
  }

  .guide-hero {
    padding: 28px 20px;
  }

  .consult-link-main {
    padding: 22px 14px;
  }

  .consult-beta-strip {
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: start;
    padding: 14px;
  }

  .consult-beta-strip p,
  .consult-beta-strip .ghost-button {
    grid-column: 1 / -1;
  }

  .consult-link-box {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .phone-frame > a {
    margin-top: 80px;
  }

  .attachment-item,
  .audit-log-item,
  .backup-item,
  .global-search-results button {
    align-items: stretch;
    flex-direction: column;
  }

  .toast-stack {
    right: 14px;
    bottom: 14px;
  }

  .filters select,
  .filters input {
    width: 100%;
  }

  h1 {
    font-size: 25px;
  }
}

/* Scope labels remain readable in the desktop rail and mobile menu rows. */
.sidebar-role { display: flex; align-items: center; gap: 8px; padding: 10px; border: 1px solid #6984d955; border-radius: 8px; background: #ffffff09; color: #cbd9ff; font-size: 11px; font-weight: 700; }
.sidebar-role-dot { width: 6px; height: 6px; border-radius: 50%; background: #94b4ff; flex-shrink: 0; }
.nav-group { min-width: 0; }
.nav-group + .nav-group { margin-top: 14px; padding-top: 14px; border-top: 1px solid #ffffff26; }
.nav-group-heading { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin: 0 8px 10px; color: #97a8d5; font-size: 11px; font-weight: 700; }
.nav-group-items { display: grid; gap: 3px; }
.nav-group-admin { border-radius: 8px; }
.nav-group-admin .nav-group-heading { color: #f6d598; }
.nav-group-badge { padding: 3px 5px; border: 1px solid #d8ac5144; border-radius: 4px; color: #f6d598; background: #d8ac5114; font-size: 9px; white-space: nowrap; }
.nav-label { min-width: 0; line-height: 1.4; }
.nav-access { margin-left: auto; padding: 2px 4px; border-radius: 4px; color: #eac886; background: #d8ac511a; font-size: 9px; white-space: nowrap; }
.sidebar .icon { flex-shrink: 0; font-size: 17px; }
.page-access-badge { display: inline-block; margin-bottom: 6px; padding: 3px 7px; border: 1px solid #d6dfed; border-radius: 5px; background: #fff; color: #5b6c83; font-size: 11px; font-weight: 700; }
.page-access-badge.is-admin { border-color: #e9d1a2; background: #fff6e6; color: #886024; }
@media (min-width: 721px) and (max-width: 1100px) {
  .sidebar-role { display: none; }
  .nav-label, .nav-access, .nav-group-badge { display: none; }
  .nav-group-heading { justify-content: center; margin-left: 0; margin-right: 0; font-size: 10px; }
}
@media (max-width: 720px) {
  .sidebar { height: auto; overflow: visible; gap: 8px; }
  .sidebar-role { display: none; }
  .sidebar .brand img { width: 90px; }
  .nav-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; min-width: 0; }
  .nav-group + .nav-group { margin-top: 0; padding-top: 8px; }
  .nav-group-heading { justify-content: flex-start; margin: 0 4px 5px; font-size: 10px; }
  .nav-group-items { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: thin; padding-bottom: 3px; }
  .sidebar .nav-item { flex: 0 0 auto; width: auto; gap: 5px; padding: 6px 10px; min-height: 34px; font-size: 12px; white-space: nowrap; }
  .nav-label { display: inline; font-size: 12px; }
  .nav-access { display: none; }
  .sidebar .icon { font-size: 15px; width: 18px; height: 18px; }
}

/* Keep the order list scroll inside its panel and stack detail sections. */
#orderHistoryView, #orderHistoryView .partner-page { min-width: 0; max-width: 100%; }
#orderHistoryView .partner-page > * { min-width: 0; }
#orderHistoryView .table-wrap { width: 100%; max-width: 100%; min-width: 0; }
#orderHistoryView .order-list-table { min-width: 760px; table-layout: fixed; }
#orderHistoryView .partner-table td { white-space: normal; overflow-wrap: anywhere; }
#orderHistoryView .order-date-col { width: 108px; }
#orderHistoryView .order-number-col { width: 220px; }
#orderHistoryView .order-qty-col { width: 60px; }
#orderHistoryView .order-status-col { width: 100px; }
#orderHistoryView .order-action-col { width: 108px; }
#orderHistoryView .order-number { font: 12px/1.6 ui-monospace, Consolas, monospace; }
#orderHistoryTable tr.is-selected { background: #f0f5ff; }
#orderHistoryTable button[aria-pressed=true] { color: #2453c8; border-color: #8baafb; background: #fff; }
#orderDetailPanel { display: grid; grid-template-columns: minmax(0, 1fr); width: 100%; min-width: 0; align-items: start; gap: 20px; }
#orderDetailPanel > * { min-width: 0; max-width: 100%; }
#orderDetailPanel .order-detail-head > div { min-width: 0; }
#orderDetailPanel h2, #orderDetailPanel .order-detail-head p { overflow-wrap: anywhere; line-height: 1.6; }
#orderDetailPanel .order-detail-head .status { flex-shrink: 0; }
#orderDetailPanel .order-status-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
#orderDetailPanel .order-status-row label { min-width: 0; width: min(100%, 320px); }
#orderDetailPanel .order-status-row select { min-width: 0; width: 100%; }
#orderDetailPanel .order-item-table table { min-width: 520px; }
#orderDetailPanel .order-item-table td:not(:first-child), #orderDetailPanel .order-item-table th:not(:first-child) { white-space: nowrap; text-align: right; }
#orderDetailPanel .operation-action-grid { justify-content: flex-start; }
#orderHistoryMessage:empty { display: none; }
.order-history-toolbar { flex-wrap: wrap; align-items: end; }
.order-date-filter { display: flex; align-items: end; gap: 10px; flex-wrap: wrap; min-width: 0; }
.order-date-filter input { width: 160px; min-width: 0; }
@media (max-width: 720px) {
  .order-date-filter { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .order-date-filter input { width: 100%; }
  .order-date-filter button { grid-column: 1 / -1; justify-self: start; }
  #orderDetailPanel .order-status-row { grid-template-columns: minmax(0, 1fr); }
  #orderDetailPanel .order-status-row label { width: 100%; }
  #orderDetailPanel .order-status-row > div { text-align: left; }
  #orderDetailPanel .order-detail-head, #orderDetailPanel .order-history-log li { flex-direction: column; align-items: flex-start; }
}
#orderHistoryView .order-date-col { width: 124px; }
#orderHistoryView .order-action-col { width: 116px; }
#orderHistoryView .order-list-table td:first-child, #orderHistoryView .order-list-table td:last-child, #orderHistoryView .order-list-table button { white-space: nowrap; }
@media (max-width: 720px) {
  #orderHistoryView .order-list-table, #orderHistoryView .order-list-table tbody { display: block; width: 100%; min-width: 0; }
  #orderHistoryView .order-list-table thead, #orderHistoryView .order-list-table colgroup { display: none; }
  #orderHistoryView .order-list-table tbody { display: grid; gap: 12px; }
  #orderHistoryView .order-list-table tr[data-order-no] { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 14px; border: 1px solid #ccd4df; border-radius: 8px; }
  #orderHistoryView .order-list-table td { display: block; min-width: 0; padding: 0; border: 0; }
  #orderHistoryView .order-list-table td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 4px; color: var(--muted); font-size: 11px; font-family: inherit; font-weight: 600; }
  #orderHistoryView .order-list-table td:nth-child(3) { grid-column: 1 / -1; grid-row: 1; }
  #orderHistoryView .order-list-table td:nth-child(3)::before { display: none; }
  #orderHistoryView .order-list-table td:nth-child(1) { grid-row: 2; }
  #orderHistoryView .order-list-table td:nth-child(4) { grid-row: 2; }
  #orderHistoryView .order-list-table td:nth-child(2) { grid-column: 1 / -1; grid-row: 3; }
  #orderHistoryView .order-list-table td:nth-child(5), #orderHistoryView .order-list-table td:nth-child(6) { grid-row: 4; align-self: end; }
}
@media (max-width: 720px) {
  #orderDetailPanel .order-item-table table, #orderDetailPanel .order-item-table tbody { display: block; width: 100%; min-width: 0; }
  #orderDetailPanel .order-item-table thead { display: none; }
  #orderDetailPanel .order-item-table tbody { display: grid; gap: 10px; }
  #orderDetailPanel .order-item-table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; }
  #orderDetailPanel .order-item-table td { display: block; min-width: 0; padding: 0; border: 0; text-align: left; white-space: normal; overflow-wrap: anywhere; }
  #orderDetailPanel .order-item-table td::before { content: attr(data-label); display: block; margin-bottom: 4px; color: var(--muted); font-size: 11px; font-weight: 600; }
  #orderDetailPanel .order-item-table td:first-child { grid-column: 1 / -1; font-weight: 700; }
  #orderDetailPanel .order-item-table td:first-child::before { display: none; }
  #orderDetailPanel .order-item-table td:last-child { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding-top: 10px; font-weight: 700; }
}

/* Bound nested grids to the available workspace instead of intrinsic table widths. */
.view, .partner-page, .partner-page > *, .panel-head, .partner-page-head, .partner-page-title { min-width: 0; max-width: 100%; }
.partner-page { width: 100%; }
.filters { min-width: 0; flex-wrap: wrap; }
.panel-head { flex-wrap: wrap; }
.panel-head > h2 { flex-shrink: 0; }
.panel-head > .filters { flex: 1 1 auto; justify-content: flex-end; }
.partner-page-title h2, .partner-page-head h2 { min-width: 0; overflow-wrap: anywhere; line-height: 1.5; }
#productDetailView .product-detail-layout { grid-template-columns: minmax(0, 1.08fr) minmax(300px, .92fr); gap: clamp(20px, 3.5vw, 48px); }
.product-detail-layout > *, .product-gallery, .product-main-image, .product-buy-panel, .product-detail-section { min-width: 0; max-width: 100%; }
.product-detail-section { width: 100%; }
.product-main-image img, .product-main-canvas { max-width: 100%; }
.product-buy-panel h2, .product-buy-panel p { overflow-wrap: anywhere; }
#productDetailView .partner-table { table-layout: fixed; }
#productDetailView .partner-table th, #productDetailView .partner-table td { white-space: normal; overflow-wrap: anywhere; }
.kiwoom-grid > *, .kiwoom-panel, .kiwoom-point-list, .kiwoom-product-list, .kiwoom-resource-list { min-width: 0; max-width: 100%; }
.kiwoom-table-wrap { min-width: 0; max-width: 100%; overflow-x: auto; }
.kiwoom-table-wrap .partner-table { table-layout: fixed; }
.kiwoom-table-wrap .partner-table th { width: 100px; }
.kiwoom-table-wrap .partner-table th, .kiwoom-table-wrap .partner-table td { white-space: normal; overflow-wrap: anywhere; line-height: 1.6; }
.company-info-stack, .company-info-stack > section { min-width: 0; max-width: 100%; }
.company-info-stack .partner-table { table-layout: fixed; }
.company-info-stack .partner-table th, .company-info-stack .partner-table td { white-space: normal; overflow-wrap: anywhere; line-height: 1.6; }
@media (max-width: 1100px) {
  #productDetailView .product-detail-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .product-main-image { min-height: 240px; }
  .price-summary dl { flex-wrap: wrap; }
  .price-summary dd { margin-left: auto; }
  .company-info-stack table, .company-info-stack tbody { display: block; width: 100%; }
  .company-info-stack tr { display: grid; grid-template-columns: 100px minmax(0, 1fr); }
  .company-info-stack .partner-table th, .company-info-stack .partner-table td { display: block; padding: 10px; font-size: 13px; }
}

/* Lead cards need a readable minimum width even when the page itself fits. */
#leadsView .lead-layout { grid-template-columns: minmax(0, 1fr) minmax(380px, 420px); }
#leadsView .lead-layout > *, #leadsView .lead-board, #leadsView .lead-card { min-width: 0; }
#leadsView .lead-board { grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); align-items: start; }
#leadsView .lead-card-head > div { min-width: 0; flex: 1; }
#leadsView .lead-card-head .status, #leadDetail .detail-actions .status { flex-shrink: 0; white-space: nowrap; }
#leadsView .lead-card h3 { line-height: 1.5; }
#leadsView .lead-card h3, #leadsView .lead-card p, #leadsView .lead-card span, #leadsView .lead-card small { overflow-wrap: anywhere; }
#leadsView .lead-card p { margin: 0; line-height: 1.6; }
#leadsView .lead-card .lead-meta span { max-width: 100%; }
#leadDetail, #leadDetail .detail-section, #leadDetail .detail-head > div { min-width: 0; }
#leadDetail .detail-head { flex-wrap: wrap; }
#leadDetail .detail-head > div:first-of-type { flex: 1 1 180px; }
#leadDetail h2, #leadDetail dd, #leadDetail p, #leadDetail .history-list span, #leadDetail .attachment-item strong { overflow-wrap: anywhere; }
#leadDetail h2 { line-height: 1.5; }
#leadDetail input:not([type=checkbox]), #leadDetail select, #leadDetail textarea { width: 100%; min-width: 0; max-width: 100%; }
#leadDetail .attachment-upload { grid-template-columns: minmax(0, 1fr) auto; }
#leadDetail .timeline-item p { white-space: pre-wrap; }
.lead-back-to-list { display: none; flex-basis: 100%; }
@media (max-width: 1400px) {
  #leadsView .lead-layout { grid-template-columns: minmax(0, 1fr); }
  #leadDetail { position: static; }
  .lead-back-to-list { display: flex; flex: 0 0 100%; width: 100%; justify-content: flex-start; white-space: nowrap; }
}
@media (max-width: 720px) {
  #leadsView .lead-board { padding: 12px; }
  #leadDetail .attachment-upload { grid-template-columns: minmax(0, 1fr); }
  #leadDetail .attachment-upload button { justify-self: start; }
}
