:root {
  --bg: #f5f7fb;
  --bg-strong: #101828;
  --paper: #ffffff;
  --panel: #ffffff;
  --soft: #f9fafc;
  --line: #e6eaf2;
  --ink: #1f2937;
  --muted: #6b7280;
  --accent: #2563eb;
  --accent-soft: #eaf1ff;
  --green: #16a34a;
  --green-soft: #eaf8ef;
  --navy: #101828;
  --red: #dc2626;
  --red-soft: #fff0f0;
  --orange: #f97316;
  --orange-soft: #fff4e8;
  --gray: #64748b;
  --gray-soft: #f1f3f7;
  --shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
  --shadow-strong: 0 24px 70px rgba(15, 23, 42, 0.12);
  --ui-control-height: 42px;
  --ui-control-radius: 12px;
  --ui-control-font-size: 14px;
  --ui-label-font-size: 13px;
  font-family: -apple-system, BlinkMacSystemFont, "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
}

body.is-booting {
  overflow: hidden;
}

body.is-booting .app-shell {
  visibility: hidden;
}

body.is-booting::before {
  content: "불러오는 중";
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: var(--bg);
  color: var(--accent);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.03em;
  z-index: 999;
}

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

.app-shell {
  min-height: 100vh;
}

body.is-guest #board-view {
  display: none !important;
}

body.is-auth #login-view {
  display: none !important;
}

.login-view {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(520px, 100%);
  padding: 34px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.22), transparent 32%),
    linear-gradient(160deg, rgba(16, 24, 40, 0.98), rgba(17, 34, 68, 0.96));
  color: white;
  box-shadow: var(--shadow-strong);
}

.login-card h1,
.page-head h1,
.brand {
  margin: 0;
  letter-spacing: -0.04em;
}

.sidebar-top {
  display: grid;
  gap: 22px;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: linear-gradient(135deg, #2563eb, #16a34a);
  display: grid;
  place-items: center;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.25);
  flex: 0 0 auto;
}

.brand-mark img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.brand-copy {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #8eb7ff;
  font-weight: 800;
}

.eyebrow--sidebar {
  color: #aab3c5;
}

.login-copy,
.page-copy,
.user-meta,
.hint-text {
  color: var(--muted);
  line-height: 1.6;
}

.page-copy {
  margin: 10px 0 0;
  font-size: 15px;
}

.login-copy {
  color: rgba(219, 228, 245, 0.82);
}

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

.field {
  display: grid;
  gap: 7px;
  font-size: 14px;
  font-weight: 700;
}

.field input {
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 0 14px;
  color: white;
  background: rgba(255, 255, 255, 0.06);
}

.field input::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.primary-btn,
.ghost-btn,
.nav-item {
  border: 0;
  cursor: pointer;
}

.primary-btn {
  height: 50px;
  border-radius: 14px;
  background: linear-gradient(135deg, #2563eb, #16a34a);
  color: white;
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.24);
}

.ghost-btn {
  height: 44px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.1);
  color: #dbe4f5;
  font-weight: 700;
  margin-top: auto;
}

.error-text {
  margin: 16px 0 0;
  color: #ffd0d0;
}

.board-view {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
  align-items: start;
  min-width: 0;
}

.sidebar {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 24px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 28px 20px;
  background: var(--bg-strong);
  color: white;
}

.sidebar > * {
  min-width: 0;
}

.brand {
  font-size: 16px;
  line-height: 1.15;
  font-weight: 950;
}

.brand-sub {
  margin: 4px 0 0;
  font-size: 12px;
  color: #aab3c5;
  font-weight: 750;
}

.role-label {
  margin: 0 0 8px;
  font-size: 12px;
  color: #aab3c5;
  font-weight: 900;
}

.user-box {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
}

.user-name {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
}

.user-meta {
  margin: 6px 0 0;
  color: #cfd6e6;
}

.nav-list {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.nav-label {
  margin: 0 10px 2px;
  font-size: 12px;
  color: #778299;
  font-weight: 900;
}

.nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
  padding: 13px 14px;
  border-radius: 14px;
  background: transparent;
  color: #cfd6e6;
  font-size: 14px;
  font-weight: 850;
  transition: 0.15s;
}


.nav-item.active {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.nav-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.75;
  flex: 0 0 auto;
}

.sidebar-bottom {
  margin-top: auto;
  padding-top: 22px;
  display: grid;
  gap: 14px;
}

.side-note {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  color: #dbe4f5;
  font-size: 13px;
  line-height: 1.55;
  font-weight: 650;
}

/* 알림 상태 표시 */
.notif-status {
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  color: #dbe4f5;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.notif-status--ok   { background: rgba(74, 222, 128, 0.12); color: #86efac; }
.notif-status--warn { background: rgba(251, 191, 36, 0.12); color: #fde68a; }
.notif-status--err  { background: rgba(248, 113, 113, 0.12); color: #fca5a5; }

.notif-status__summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.notif-status__icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border-radius: 50%;
  background: rgba(74, 222, 128, 0.18);
  border: 1px solid rgba(74, 222, 128, 0.4);
  color: #4ade80;
  font-size: 13px;
  font-weight: 900;
}

.notif-status__icon--warn {
  border-color: rgba(251, 191, 36, 0.45);
  background: rgba(251, 191, 36, 0.12);
  color: #fbbf24;
}

.notif-status__icon--err {
  border-color: rgba(248, 113, 113, 0.45);
  background: rgba(248, 113, 113, 0.12);
  color: #f87171;
}

.notif-status__copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}

.notif-status__copy strong {
  color: #dcfce7;
  font-size: 12px;
  font-weight: 800;
}

.notif-status__copy small {
  margin-top: 2px;
  color: rgba(134, 239, 172, 0.72);
  font-size: 10px;
  font-weight: 600;
}

.notif-status__copy .notif-status__version {
  color: rgba(219, 228, 245, 0.68);
  font-size: 9.5px;
  font-weight: 600;
}

.notif-status--warn .notif-status__copy strong {
  color: #fef3c7;
}

.notif-status--warn .notif-status__copy small {
  color: rgba(253, 230, 138, 0.78);
}

.notif-status--err .notif-status__copy strong {
  color: #fee2e2;
}

.notif-status--err .notif-status__copy small {
  color: rgba(252, 165, 165, 0.78);
}

.notif-helper-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: rgba(219, 228, 245, 0.78);
  font-size: 10px;
}

.notif-helper-action-btn {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #e5edff;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.notif-helper-action-btn:hover {
  background: rgba(255, 255, 255, 0.14);
}

.notif-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 5px;
  vertical-align: middle;
}
.notif-dot--on  { background: #4ade80; }
.notif-dot--off { background: #f87171; }

.notif-guide {
  font-size: 11px;
  font-weight: 500;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.6);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.notif-allow-btn {
  height: 28px;
  padding: 0 12px;
  border-radius: 8px;
  background: rgba(251, 191, 36, 0.25);
  border: 1px solid rgba(251, 191, 36, 0.4);
  color: #fde68a;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  width: fit-content;
}

.notif-link {
  color: rgba(255, 255, 255, 0.5);
  font-size: 11px;
  text-decoration: underline;
  cursor: pointer;
}

.notif-install-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid rgba(96, 165, 250, 0.45);
  border-radius: 8px;
  background: rgba(59, 130, 246, 0.2);
  color: #bfdbfe;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  text-decoration: none;
}

.notif-install-link:hover {
  background: rgba(59, 130, 246, 0.32);
  color: #eff6ff;
}

.main-content {
  padding: 30px 34px 60px;
  min-width: 0;
}

.page-head {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), transparent 34%),
    linear-gradient(135deg, #ffffff, #f2f6ff);
  box-shadow: var(--shadow);
}

.page-head h1 {
  font-size: clamp(30px, 4vw, 46px);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.summary-card,
.panel {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.summary-card {
  padding: 15px 16px;
  min-height: 104px;
}

.summary-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 950;
}

.summary-value {
  margin-top: 10px;
  font-size: 23px;
  font-weight: 950;
  letter-spacing: -0.04em;
  line-height: 1.15;
}

.summary-note {
  margin-top: 7px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 750;
  line-height: 1.4;
}

.panel-wrap {
  margin-top: 20px;
  min-width: 0;
}

.panel {
  padding: 22px;
  min-width: 0;
}

.panel h2 {
  margin: 0 0 14px;
  font-size: 22px;
  letter-spacing: -0.03em;
}

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

.list-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.list-card h3 {
  margin: 0 0 10px;
  font-size: 17px;
}

.list-row {
  display: grid;
  gap: 4px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(22, 35, 43, 0.08);
}

.list-row:last-child {
  border-bottom: 0;
}

.row-title {
  font-weight: 700;
}

.row-meta {
  color: var(--muted);
  font-size: 13px;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 950;
}

.badge--admin {
  background: var(--green-soft);
  color: var(--green);
}

.badge--active {
  background: #dcfce7;
  color: #166534;
}

.badge--inactive {
  background: #fee2e2;
  color: #991b1b;
}

.placeholder-card {
  padding: 24px;
  border-radius: 22px;
  background: linear-gradient(135deg, #ffffff, #f8fbff);
}

.placeholder-card--inner {
  padding: 28px;
}

.orders-shell {
  padding: 24px;
  min-width: 0;
}

.orders-shell--search {
  padding: 0;
  display: grid;
  gap: 18px;
}

.orders-filter-panel {
  padding: 24px;
}

.orders-check-shell {
  padding: 24px;
  min-width: 0;
}

.orders-toolbar {
  display: grid;
  grid-template-columns: 180px 1.1fr 1.1fr minmax(220px, 1fr) 110px;
  gap: 12px;
  align-items: end;
}

.orders-check-toolbar {
  display: grid;
  grid-template-columns: 160px 180px 150px minmax(240px, 1fr);
  gap: 12px;
  align-items: end;
}

.orders-check-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  margin-top: 18px;
}

.compact-field {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.compact-field span {
  font-size: var(--ui-label-font-size);
  font-weight: 800;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.compact-field input {
  height: var(--ui-control-height);
  border: 1px solid var(--line);
  border-radius: var(--ui-control-radius);
  padding: 0 14px;
  background: #fff;
  color: var(--ink);
  font-size: var(--ui-control-font-size);
}

.compact-field select {
  height: var(--ui-control-height);
  border: 1px solid var(--line);
  border-radius: var(--ui-control-radius);
  padding: 0 14px;
  background: #fff;
  color: var(--ink);
  font-size: var(--ui-control-font-size);
}

.compact-field--wide {
  min-width: 0;
}

.is-dimmed {
  opacity: 0.72;
}

.segmented-control {
  display: flex;
  width: 100%;
  min-width: 0;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid var(--line);
}

.seg-btn {
  min-height: 40px;
  flex: 1 1 0;
  min-width: 0;
  padding: 7px 14px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
  line-height: 1.25;
  white-space: normal;
  word-break: keep-all;
  text-align: center;
}

.segmented-control--scope .seg-btn,
.seg-btn--scope {
  font-size: 12px;
  letter-spacing: -0.03em;
}

.segmented-control--mode .seg-btn,
.seg-btn--mode {
  font-size: 12px;
  letter-spacing: -0.03em;
}

.seg-btn.active {
  background: white;
  color: var(--accent);
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.08);
}

.orders-toolbar .segmented-control {
  min-height: var(--ui-control-height);
  padding: 3px;
  border-radius: var(--ui-control-radius);
}

.orders-toolbar .seg-btn {
  min-height: calc(var(--ui-control-height) - 8px);
  padding: 4px 10px;
  border-radius: 9px;
}

.orders-submit {
  height: var(--ui-control-height);
  border-radius: var(--ui-control-radius);
  font-size: var(--ui-control-font-size);
}

.paste-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow);
  min-width: 0;
}

.paste-card--editor .paste-card__body {
  padding: 0;
}

.paste-card__body {
  padding: 18px 22px 22px;
}

.paste-input {
  width: 100%;
  min-height: 260px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px 16px;
  background: #fbfcff;
  color: var(--ink);
  line-height: 1.5;
}

.orders-check-input-mode {
  margin-bottom: 14px;
}

.sheet-editor {
  display: flex;
  flex-direction: column;
  min-height: 620px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fbfcff;
  overflow: hidden;
}

.sheet-editor__toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.sheet-editor__meta {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.sheet-editor__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.orders-check-field-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.orders-check-field-toggle {
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.orders-check-field-toggle.is-active {
  border-color: rgba(37, 99, 235, 0.22);
  background: var(--accent-soft);
  color: var(--accent);
}

.sheet-editor__actions .primary-btn {
  height: 36px;
  padding: 0 14px;
}

.sheet-editor__scroll {
  flex: 1 1 auto;
  min-height: 540px;
  overflow: auto;
}

.sheet-editor__table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.sheet-editor__table th,
.sheet-editor__table td {
  border-bottom: 1px solid var(--line);
  border-right: 1px solid #edf0f5;
}

.sheet-editor__table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 10px 12px;
  background: #f8fafc;
  color: #667085;
  font-size: 12px;
  font-weight: 800;
  text-align: left;
  white-space: nowrap;
}

.sheet-editor__table td {
  padding: 0;
  background: white;
}

.sheet-editor__table input {
  width: 100%;
  min-width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: var(--ink);
}

.sheet-editor__table input:focus {
  outline: none;
  background: rgba(37, 99, 235, 0.08);
}

.sheet-col--index {
  width: 56px;
  min-width: 56px;
  text-align: center;
}

.sheet-col--short {
  width: 120px;
  min-width: 120px;
}

.sheet-col--name {
  width: 140px;
  min-width: 140px;
}

.sheet-col--phone {
  width: 148px;
  min-width: 148px;
}

.sheet-col--item {
  width: 260px;
  min-width: 260px;
}

.sheet-col--address {
  width: 300px;
  min-width: 300px;
}

.sheet-col--message {
  width: 220px;
  min-width: 220px;
}

.sheet-col--comment {
  width: 180px;
  min-width: 180px;
}

.paste-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.error-banner,
.success-banner,
.loading-state,
.empty-state {
  margin-top: 16px;
  padding: 16px 18px;
  border-radius: 18px;
  font-weight: 700;
}

.error-banner {
  border: 1px solid rgba(220, 38, 38, 0.16);
  background: var(--red-soft);
  color: #b42318;
}

.success-banner {
  border: 1px solid rgba(22, 163, 74, 0.16);
  background: var(--green-soft);
  color: var(--green);
}

.error-banner--panel {
  margin: 16px 22px 0;
}

.loading-state,
.empty-state {
  border: 1px solid var(--line);
  background: linear-gradient(135deg, #ffffff, #f8fbff);
  color: var(--ink);
}

.orders-inline-status {
  margin-top: 14px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}

.table-card {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: visible;
  background: #fff;
  min-width: 0;
}

.table-card__head {
  padding: 20px 22px 0;
}

.table-card__head h2 {
  margin: 0;
  font-size: 19px;
  letter-spacing: -0.03em;
}

.settlement-shell {
  display: grid;
  gap: 18px;
}

.sales-shell {
  display: grid;
  gap: 18px;
}

.sales-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  align-items: end;
}

.sales-toolbar > .compact-field {
  flex: 1 1 140px;
  min-width: 0;
}

.sales-toolbar > .compact-field.compact-field--wide {
  flex-basis: 220px;
}

.sales-toolbar .compact-field,
.sales-editor-grid .compact-field,
.sales-editor-amounts .compact-field {
  gap: 6px;
}

.sales-toolbar .compact-field span,
.sales-editor-grid .compact-field span,
.sales-editor-amounts .compact-field span {
  white-space: nowrap;
}

.sales-toolbar .compact-field input,
.sales-toolbar .compact-field select,
.sales-editor-grid .compact-field input,
.sales-editor-grid .compact-field select,
.sales-editor-amounts .compact-field input {
  height: var(--ui-control-height);
}

.sales-toolbar .primary-btn,
.sales-toolbar-actions .ghost-action-btn,
.sales-editor-actions .ghost-action-btn,
.sales-editor-actions .primary-btn {
  height: var(--ui-control-height);
  border-radius: var(--ui-control-radius);
}

.sales-toolbar .primary-btn {
  flex: 0 0 auto;
  min-width: 96px;
  padding: 0 14px;
  box-shadow: none;
}

.sales-toolbar-actions .ghost-action-btn,
.sales-editor-actions .ghost-action-btn,
.sales-editor-actions .primary-btn {
  min-width: 116px;
  padding: 0 16px;
}

.sales-editor-actions .primary-btn {
  box-shadow: none;
}

.sales-metric-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 16px;
}

.sales-metric-toggles {
  flex: 1 1 520px;
}

.sales-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-left: auto;
  align-items: center;
}

.sales-summary-grid {
  margin-top: 0;
}

.sales-editor-panel {
  display: grid;
  gap: 18px;
}

.sales-editor-grid,
.sales-editor-amounts,
.sales-editor-notes {
  display: grid;
  gap: 14px;
  padding: 0 22px;
}

.sales-editor-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.sales-editor-amounts {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.sales-editor-notes {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sales-editor-notes textarea {
  min-height: 112px;
  resize: vertical;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.sales-editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  align-items: center;
  padding: 0 22px 22px;
}

.settlement-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.settlement-tab {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fbff;
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
}

.settlement-tab.active {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.18);
}

.invoice-ment-shell {
  display: grid;
  gap: 16px;
}

.invoice-ment-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.invoice-ment-link-box {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.invoice-ment-link-label {
  font-size: var(--ui-label-font-size);
  font-weight: 800;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.invoice-ment-link {
  display: inline-flex;
  align-items: center;
  min-height: var(--ui-control-height);
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--ui-control-radius);
  background: #fff;
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
  font-size: var(--ui-control-font-size);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.invoice-ment-actions .invoice-ment-action-btn {
  min-width: 92px;
  height: var(--ui-control-height);
  padding: 0 16px;
  border-radius: var(--ui-control-radius);
  font-size: var(--ui-control-font-size);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.invoice-ment-actions .invoice-ment-save-btn {
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.2);
}

.invoice-ment-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 16px;
  min-width: 0;
}

.invoice-ment-editor,
.invoice-ment-preview-card,
.invoice-ment-empty {
  min-width: 0;
}

.invoice-ment-snippets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.invoice-ment-snippets .ghost-action-btn {
  height: var(--ui-control-height);
  border-radius: var(--ui-control-radius);
  font-size: var(--ui-control-font-size);
}

.invoice-ment-fields {
  display: grid;
  gap: 14px;
}

.invoice-ment-field textarea {
  width: 100%;
  min-height: 140px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px 16px;
  background: #fbfcff;
  color: var(--ink);
  font-size: var(--ui-control-font-size);
  line-height: 1.6;
}

.invoice-ment-field:first-child textarea {
  min-height: 360px;
}

.invoice-ment-preview-wrap {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #f8fbff;
  padding: 12px;
}

.invoice-ment-preview-frame {
  width: 100%;
  min-height: 760px;
  border: 0;
  border-radius: 16px;
  background: #fff;
}

.panel-section-gap {
  margin-top: 18px;
}

.profile-agency-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  padding: 18px 22px 22px;
}

.profile-agency-edit,
.profile-agency-editor,
.profile-agency-list {
  min-width: 0;
}

.profile-agency-edit,
.profile-agency-editor,
.profile-agency-list {
  display: grid;
  gap: 12px;
}

.profile-agency-editor h3,
.profile-agency-list h3,
.profile-agency-edit h3 {
  margin: 0 0 12px;
  font-size: 17px;
  letter-spacing: -0.02em;
}

.profile-agency-form {
  display: grid;
  gap: 12px;
}

.sheet-editor--agency {
  min-height: 0;
  border-radius: 18px;
}

.sheet-editor--agency .sheet-editor__scroll {
  flex: 0 0 auto;
  min-height: 0;
  max-height: 320px;
}

.profile-agency-actions,
.profile-agency-row-actions,
.profile-agency-list__head {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.profile-agency-list__head {
  justify-content: space-between;
  margin-bottom: 12px;
}

.profile-agency-list__meta,
.profile-agency-list__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.profile-agency-search {
  gap: 0;
  margin-top: -4px;
}

.profile-agency-row-actions {
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 8px;
}

.profile-agency-table-wrap {
  max-height: 52vh;
  overflow-x: auto;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.data-table--profile-agency {
  width: 100%;
  min-width: 820px;
}

.data-table--profile-agency .checkbox-col {
  width: 48px;
  min-width: 48px;
}

.col-agency-group {
  min-width: 110px;
  width: 110px;
}

.col-agency-name {
  min-width: 180px;
  width: 180px;
}

.col-agency-address {
  min-width: 240px;
  width: 240px;
  white-space: normal !important;
  word-break: break-word;
}

.col-agency-meta {
  min-width: 110px;
  width: 110px;
}

.col-agency-date {
  min-width: 112px;
  width: 112px;
}

.inspect-agency-modal__content .table-card__head {
  padding-top: 0;
}

.detail-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 16px 22px 0;
}

.detail-metrics__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-left: auto;
}

.table-scroll-sync {
  width: 100%;
}

.table-scroll-track {
  overflow-x: auto;
  overflow-y: hidden;
  display: none;
  position: sticky;
  bottom: 0;
  z-index: 12;
  margin: 0 22px;
  max-width: calc(100% - 44px);
  border-top: 2px solid var(--line);
  background: #f8fafc;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
}

.table-scroll-track__spacer {
  height: 1px;
}

.table-scroll {
  width: 100%;
  max-height: 68vh;
  overflow: auto;
  padding: 0 22px;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
  overscroll-behavior: contain;
}

.table-scroll__inner {
  min-width: max-content;
}

.table-scroll__inner--fixed {
  min-width: max-content;
}

.table-scroll--main {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.table-scroll--main::-webkit-scrollbar {
  display: none;
}

.table-scroll--page {
  max-height: none;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior: auto;
  touch-action: pan-x;
}

.table-scroll__inner--page {
  min-width: max-content;
}

.data-table {
  width: 100%;
  min-width: max-content;
  border-collapse: separate;
  border-spacing: 0;
}

.data-table--detail {
  min-width: 2180px;
}

.data-table--orders-check {
  width: max-content;
  min-width: max-content;
}

.data-table--sales {
  width: max-content;
  min-width: max-content;
  table-layout: fixed;
}

.col-sales-type {
  width: 96px;
  min-width: 96px;
}

.col-sales-business {
  width: 112px;
  min-width: 112px;
}

.col-sales-company {
  width: 112px;
  min-width: 112px;
}

.col-sales-manager {
  width: 84px;
  min-width: 84px;
}

.col-sales-rank {
  width: 72px;
  min-width: 72px;
}

.col-sales-metric {
  width: 92px;
  min-width: 92px;
}

.col-sales-amount {
  width: 126px;
  min-width: 126px;
}

.col-sales-average {
  width: 126px;
  min-width: 126px;
}

.col-sales-period {
  width: 126px;
  min-width: 126px;
}

.checkbox-col {
  width: 48px;
  min-width: 48px;
  text-align: center !important;
}

.checkbox-col input {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.checkbox-col input:disabled {
  cursor: not-allowed;
}

.data-table th,
.data-table td {
  padding: 12px 12px;
  text-align: left;
  vertical-align: top;
  font-size: 13px;
  white-space: nowrap;
}

.data-table th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  background: #f8fafc;
  position: sticky;
  top: 0;
  z-index: 3;
  box-shadow: inset 0 -1px 0 var(--line);
}

.data-table td {
  border-bottom: 1px solid #edf0f5;
}

.data-table tbody tr:hover {
  background: #fbfdff;
}

.sortable-th {
  cursor: pointer;
  user-select: none;
}

.sortable-th.is-active {
  color: var(--navy);
}

.ghost-action-btn {
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--accent);
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

.ghost-action-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.ghost-action-btn--dark {
  border-color: var(--line);
  background: #f8fafc;
  color: #334155;
}

.ghost-action-btn--sm {
  height: 26px;
  padding: 0 10px;
  font-size: 11px;
  border-radius: 8px;
  border-color: var(--line);
  background: #f8fafc;
  color: #334155;
}

.sort-arrow {
  display: inline-block;
  min-width: 14px;
  color: var(--accent);
  font-size: 11px;
  text-align: center;
}

.ta-right {
  text-align: right !important;
}

.strong {
  font-weight: 800;
}

.mono {
  font-variant-numeric: tabular-nums;
}

.col-item {
  min-width: 320px;
  width: 320px;
  white-space: normal !important;
  word-break: break-word;
}

.col-name {
  min-width: 120px;
  width: 120px;
  max-width: 120px;
  white-space: normal !important;
  word-break: break-word;
}

.col-address {
  min-width: 360px;
  width: 360px;
  white-space: normal !important;
  word-break: break-word;
}

.col-order-address {
  min-width: 280px;
  width: 280px;
  white-space: normal !important;
  word-break: break-word;
}

.col-message {
  min-width: 180px;
  width: 180px;
  max-width: 180px;
}

.col-sales-comment {
  min-width: 260px;
  width: 260px;
  max-width: 260px;
}

.col-tracking {
  min-width: 140px;
  width: 140px;
  max-width: 140px;
  white-space: normal !important;
  word-break: break-all;
}

.col-close-time {
  min-width: 74px;
  width: 74px;
  max-width: 74px;
  white-space: nowrap;
}

.col-check-status {
  min-width: 112px;
  width: 112px;
  max-width: 112px;
  white-space: normal !important;
}

.col-check-amount {
  min-width: 112px;
  width: 112px;
  max-width: 112px;
  white-space: nowrap;
}

.popup-cell-btn {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.popup-cell-btn:hover {
  color: var(--accent);
  text-decoration: underline;
}

.text-preview-modal__backdrop {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.45);
}

.text-preview-modal__dialog {
  width: min(720px, 100%);
  max-height: min(70vh, 720px);
  overflow: auto;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow-strong);
}

.alarm-modal__dialog {
  width: min(560px, 100%);
}

.inspect-agency-modal__dialog {
  width: min(1180px, 100%);
  max-height: min(84vh, 960px);
}

.text-preview-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 22px 0;
}

.text-preview-modal__head h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.03em;
}

.text-preview-modal__body {
  padding: 18px 22px 22px;
  color: var(--ink);
  line-height: 1.7;
  white-space: normal;
  word-break: break-word;
}

.inspect-agency-modal__body {
  padding-top: 0;
}

#alarm-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1250;
}

#alarm-reminder-toast {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 1250;
}

.alarm-toast-card {
  width: min(360px, calc(100vw - 32px));
  padding: 16px 18px;
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.96);
  color: #f8fbff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.32);
}

.alarm-toast-card__title {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: #8eb7ff;
  text-transform: uppercase;
}

.alarm-toast-card__message {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.55;
  word-break: break-word;
}

.alarm-toast-card__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}

.alarm-toast-card__btn,
.alarm-toast-card .ghost-action-btn {
  height: 34px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  border: none;
  cursor: pointer;
}

.alarm-toast-card__btn {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.alarm-toast-card__btn:hover {
  background: rgba(255, 255, 255, 0.32);
}

.alarm-toast-card .ghost-action-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  color: rgba(255, 255, 255, 0.7) !important;
  box-shadow: none;
}

.alarm-toast-card .ghost-action-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff !important;
}

.alarm-reminder-toast__card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: min(280px, calc(100vw - 32px));
  padding: 14px 16px;
  border: 1px solid rgba(84, 118, 255, 0.34);
  border-radius: 18px;
  background: rgba(245, 249, 255, 0.98);
  color: #17325c;
  box-shadow: 0 14px 32px rgba(16, 42, 84, 0.18);
  text-align: left;
  cursor: pointer;
}

.alarm-reminder-toast__card:hover {
  background: #ffffff;
}

.alarm-reminder-toast__title {
  font-size: 14px;
  font-weight: 800;
}

.alarm-reminder-toast__desc {
  font-size: 12px;
  color: #5a6f96;
}

.alarm-modal__meta {
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.alarm-modal__message {
  line-height: 1.75;
  word-break: break-word;
}

.alarm-modal__link {
  color: #2563eb;
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-all;
}

.alarm-modal__message--urgent {
  background: #fff5f5;
  border-left: 4px solid #e53e3e;
  padding: 10px 14px;
  border-radius: 6px;
  color: #c53030;
}

.alarm-modal__dialog--paged {
  display: flex;
  flex-direction: column;
  height: min(78vh, 760px);
  max-height: min(78vh, 760px);
  overflow: hidden;
}

.alarm-modal__body-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 18px 22px;
}

.alarm-modal__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 22px 18px;
  border-top: 1px solid var(--divider);
}

.alarm-modal__footer-nav {
  flex: 1 1 auto;
  min-width: 0;
}

.alarm-modal__footer-spacer {
  display: block;
  min-height: 1px;
}

.alarm-modal__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.alarm-modal__confirm-btn {
  min-width: 72px;
}

/* NoticeImportant */
.alarm-modal__head--important {
  background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%);
  border-radius: 24px 24px 0 0;
  padding: 18px 22px;
}
.alarm-modal__head--important h2 {
  color: #fff;
}
.alarm-modal__head--important button {
  background: rgba(255, 255, 255, 0.18) !important;
  border-color: rgba(255, 255, 255, 0.45) !important;
  color: #fff !important;
}
.alarm-modal__dialog--notice-important {
  width: min(520px, 100%);
}
.alarm-modal__dialog--notice {
  width: min(624px, calc(100vw - 32px));
}
.alarm-modal__notice-title {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--ink);
}
.alarm-modal__nav {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  flex-wrap: wrap;
}
.alarm-modal__nav-count {
  font-size: 13px;
  color: var(--muted);
  font-weight: 700;
  min-width: 48px;
  text-align: center;
}

/* MessageChat */
.alarm-modal__dialog--chat {
  width: min(972px, calc(100vw - 32px));
}
.alarm-chat__body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 10px;
}
.alarm-chat__orders {
  max-height: 236px;
  overflow: auto;
  border: 1px solid var(--divider);
  border-radius: 12px;
  background: #fff;
}
.alarm-chat__orders-table {
  min-width: 100%;
  width: max-content;
  border-collapse: collapse;
  font-size: 12px;
}
.alarm-chat__col-warehouse {
  width: 55px;
}
.alarm-chat__col-item {
  width: 260px;
}
.alarm-chat__col-recipient {
  width: 112px;
}
.alarm-chat__col-address {
  width: 320px;
}
.alarm-chat__col-phone {
  width: 128px;
}
.alarm-chat__orders-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
}
.alarm-chat__orders-table th,
.alarm-chat__orders-table td {
  padding: 6px 10px;
  border: 1px solid var(--divider);
  text-align: left;
  white-space: nowrap;
}
.alarm-chat__orders-table td {
  vertical-align: middle;
}
.alarm-chat__orders-table tbody td:nth-child(2) {
  white-space: normal;
  word-break: break-word;
  line-height: 1.4;
  vertical-align: middle;
}
.alarm-chat__orders-table th {
  background: var(--gray-soft);
  font-weight: 700;
  color: var(--muted);
}
.alarm-chat__orders-table tr:first-child th {
  border-top: 0;
}
.alarm-chat__orders-table tr td:first-child,
.alarm-chat__orders-table tr th:first-child {
  border-left: 0;
}
.alarm-chat__orders-table tr td:last-child,
.alarm-chat__orders-table tr th:last-child {
  border-right: 0;
}
.alarm-chat__orders-table tbody tr:last-child td {
  border-bottom: 0;
}
.alarm-chat__messages {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.alarm-chat__bubble {
  max-width: 72%;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.alarm-chat__bubble--mine {
  align-self: flex-end;
  align-items: flex-end;
}
.alarm-chat__bubble--theirs {
  align-self: flex-start;
  align-items: flex-start;
}
.alarm-chat__name {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}
.alarm-chat__text {
  background: var(--gray-soft);
  border-radius: 14px;
  padding: 9px 14px;
  font-size: 14px;
  line-height: 1.55;
  word-break: break-word;
}
.alarm-chat__bubble--mine .alarm-chat__text {
  background: #2b6cb0;
  color: #fff;
}
.alarm-chat__time {
  font-size: 10px;
  color: var(--muted);
}
.alarm-chat__reply {
  border-top: 1px solid var(--divider);
  padding-top: 12px;
  display: grid;
  gap: 10px;
}
.alarm-chat__reply-input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 2px solid #94a3b8;
  border-radius: 10px;
  background: #fff;
  color: #1e293b;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  min-height: 72px;
}
.alarm-chat__reply-input:focus {
  outline: none;
  border-color: #2b6cb0;
  box-shadow: 0 0 0 2px rgba(43,108,176,0.15);
}
.alarm-chat__reply-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}
.alarm-chat__confirm-btn {
  min-width: 82px;
}
.alarm-chat__order-input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 7px 9px;
  border: 1px solid #c9d5ea;
  border-radius: 8px;
  background: #fff;
  font: inherit;
  color: var(--ink);
}
.alarm-chat__order-input--address {
  min-width: 220px;
}
.alarm-chat__order-input:focus {
  outline: none;
  border-color: #4f7cff;
  box-shadow: 0 0 0 3px rgba(79, 124, 255, 0.14);
}
.alarm-chat__order-input:disabled {
  background: #eef3fb;
  color: var(--muted);
  cursor: wait;
}

/* NOTICE keyword highlight */
mark.alarm-keyword {
  background: #fff3cd;
  color: #c05621;
  font-weight: 700;
  border-radius: 2px;
  padding: 0 1px;
}

/* Toast source variants */
.alarm-toast-card--noticeimportant {
  background: rgba(197, 48, 48, 0.96);
}
.alarm-toast-card--notice {
  background: rgba(44, 82, 130, 0.96);
}
.alarm-toast-card--messagechat {
  background: rgba(22, 101, 52, 0.96);
}

.chip-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--gray-soft);
  color: var(--gray);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.status-filter-chip {
  border: 1px solid transparent;
  cursor: pointer;
  transition: 0.15s;
}

.status-filter-chip.is-active {
  border-color: currentColor;
  box-shadow: inset 0 0 0 1px currentColor;
}

.status-filter-chip:hover {
  transform: translateY(-1px);
}

.status-chip--plain {
  background: var(--green-soft);
  color: var(--green);
}

.status-chip--info {
  background: var(--accent-soft);
  color: var(--accent);
}

.status-chip--warn {
  background: var(--orange-soft);
  color: var(--orange);
}

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

.status-chip--muted {
  background: var(--gray-soft);
  color: var(--gray);
}

.status-chip--success {
  background: var(--green-soft);
  color: var(--green);
}

.row-cancel-done td {
  background: rgba(102, 118, 128, 0.08);
}

.row-duplicate td {
  background-image: linear-gradient(0deg, rgba(29, 123, 98, 0.06), rgba(29, 123, 98, 0.06));
}

.row-no-order td {
  background-image: linear-gradient(0deg, rgba(249, 115, 22, 0.05), rgba(249, 115, 22, 0.05));
}

.row-no-invoice td {
  background-image: linear-gradient(0deg, rgba(36, 68, 86, 0.05), rgba(36, 68, 86, 0.05));
}

.table-empty-cell {
  padding: 28px 16px !important;
  text-align: center !important;
  color: var(--muted);
  font-weight: 800;
  background: #fbfcff;
}

.orders-check-row--1 td,
.orders-check-row--4 td,
.orders-check-row--5 td {
  background-image: linear-gradient(0deg, rgba(160, 33, 33, 0.06), rgba(160, 33, 33, 0.06));
}

.orders-check-row--2 td {
  background-image: linear-gradient(0deg, rgba(59, 130, 246, 0.08), rgba(59, 130, 246, 0.08));
}

.orders-check-row--3 td {
  background-image: linear-gradient(0deg, rgba(29, 123, 98, 0.08), rgba(29, 123, 98, 0.08));
}

.orders-check-row--6 td {
  background-image: linear-gradient(0deg, rgba(249, 115, 22, 0.08), rgba(249, 115, 22, 0.08));
}

.orders-check-row--jeju td {
  box-shadow: inset 0 1px 0 rgba(249, 115, 22, 0.22);
}

.orders-check-row--agency td {
  box-shadow: inset 3px 0 0 rgba(249, 115, 22, 0.4);
}

@media (max-width: 1100px) {
  .summary-grid,
  .list-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .orders-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .orders-check-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .orders-check-grid {
    grid-template-columns: 1fr;
  }

  .profile-agency-layout {
    grid-template-columns: 1fr;
  }

  .invoice-ment-toolbar,
  .invoice-ment-grid {
    grid-template-columns: 1fr;
  }

  .segmented-control {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .seg-btn {
    min-height: 42px;
    padding: 7px 8px;
    font-size: 11px;
    line-height: 1.2;
  }

  .segmented-control--scope .seg-btn,
  .seg-btn--scope {
    font-size: 11px;
    padding-left: 6px;
    padding-right: 6px;
  }

  .segmented-control--mode .seg-btn,
  .seg-btn--mode {
    font-size: 11px;
    padding-left: 6px;
    padding-right: 6px;
  }
}

@media (max-width: 860px) {
  .board-view {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    overflow: visible;
    padding: 20px 18px;
    gap: 18px;
  }

  .brand {
    font-size: 18px;
  }

  .nav-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  .nav-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-height: 42px;
    padding: 10px 14px;
    flex: 0 0 auto;
  }

  .ghost-btn {
    margin-top: 0;
    width: auto;
    align-self: flex-start;
  }

  .orders-toolbar {
    grid-template-columns: 1fr;
  }

  .orders-check-toolbar {
    grid-template-columns: 1fr;
  }

  .sales-editor-grid,
  .sales-editor-amounts,
  .sales-editor-notes {
    grid-template-columns: 1fr 1fr;
  }

  .invoice-ment-actions,
  .invoice-ment-snippets {
    justify-content: flex-start;
  }

  .invoice-ment-link {
    white-space: normal;
    word-break: break-all;
    line-height: 1.4;
    padding-top: 10px;
    padding-bottom: 10px;
    height: auto;
  }

  #alarm-toast {
    right: 12px;
    left: 12px;
    bottom: 12px;
  }

  .alarm-toast-card {
    width: auto;
  }

}

@media (max-width: 860px) {
  .sales-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .sales-toolbar > .compact-field,
  .sales-toolbar > .compact-field.compact-field--wide,
  .sales-toolbar .primary-btn {
    flex: 1 1 auto;
    width: 100%;
  }
}

@media (max-width: 640px) {
  .login-card,
  .page-head,
  .panel {
    padding: 20px;
  }

  .summary-grid,
  .list-grid {
    grid-template-columns: 1fr;
  }

  .main-content {
    padding: 14px;
  }

  .sidebar {
    padding: 16px 14px;
    border-bottom-left-radius: 22px;
    border-bottom-right-radius: 22px;
  }

  .brand-block {
    align-items: flex-start;
  }

  .orders-shell {
    padding: 16px;
  }

  .orders-shell--search {
    padding: 0;
  }

  .orders-filter-panel {
    padding: 20px;
  }

  .orders-check-shell {
    padding: 16px;
  }

  .sales-editor-grid,
  .sales-editor-amounts,
  .sales-editor-notes {
    grid-template-columns: 1fr;
    padding-left: 0;
    padding-right: 0;
  }

  .sales-editor-actions {
    padding-left: 0;
    padding-right: 0;
    justify-content: flex-start;
  }

  .page-head h1 {
    font-size: 28px;
  }

  .user-box {
    margin-top: 18px;
  }

  .nav-list {
    gap: 8px;
  }

  .nav-item {
    width: auto;
    max-width: 100%;
    text-align: center;
  }

  .segmented-control {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .seg-btn {
    width: 100%;
    min-height: 44px;
    padding: 8px 6px;
  }

  .table-scroll {
    padding: 0;
  }

  .table-scroll-sync {
  }

  .table-scroll-track {
    bottom: 0;
    margin-left: 0;
    margin-right: 0;
    max-width: 100%;
  }

  .table-scroll-track__spacer {
    height: 10px;
  }

  .table-card__head,
  .detail-metrics,
  .paste-card__body {
    padding-left: 0;
    padding-right: 0;
  }

  .sheet-editor {
    border-left: 0;
    border-right: 0;
    border-radius: 0;
  }

  .sheet-editor__toolbar {
    flex-direction: column;
    align-items: stretch;
    padding-left: 0;
    padding-right: 0;
  }

  .sheet-editor__actions {
    justify-content: flex-start;
  }

  .detail-metrics__actions {
    margin-left: 0;
  }

  .profile-agency-layout {
    padding-left: 0;
    padding-right: 0;
  }

  .profile-agency-actions,
  .profile-agency-row-actions,
  .profile-agency-list__head {
    align-items: stretch;
  }

  .profile-agency-list__meta,
  .profile-agency-list__actions {
    align-items: stretch;
  }

  .profile-agency-actions .ghost-action-btn,
  .profile-agency-actions .primary-btn,
  .profile-agency-list__actions .ghost-action-btn {
    width: 100%;
    justify-content: center;
  }

  .profile-agency-row-actions {
    flex-wrap: nowrap;
    justify-content: flex-start;
  }

  .profile-agency-row-actions .ghost-action-btn {
    width: auto;
  }
}

/* =========================================================
   정산달력
   ========================================================= */

.sc-shell {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  min-height: 0;
}

/* ---- 공통 바 (검색/필터/액션 공유) ---- */
.sc-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.sc-bar--search {
  background: #f8fafc;
}

.sc-bar--filter {
  background: #fff;
}

.sc-field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.sc-date-range {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sc-check-group {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: var(--ui-control-height);
}

/* 구분선 */
.sc-bar-div {
  width: 1px;
  height: 24px;
  background: var(--line);
  margin: 9px 2px;
  flex-shrink: 0;
}

/* 레이블 */
.sc-lbl {
  font-size: var(--ui-label-font-size);
  font-weight: 800;
  color: var(--muted);
  white-space: nowrap;
}
.sc-lbl--sep { font-weight: 400; color: #999; }

/* 공통 input / select */
.sc-ctrl {
  height: var(--ui-control-height);
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--ui-control-radius);
  font-size: var(--ui-control-font-size);
  background: #fff;
  color: var(--ink);
  outline: none;
}
.sc-ctrl:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12); }
.sc-ctrl--select { min-width: 140px; }
.sc-ctrl--text   { min-width: 220px; }

/* 체크박스 */
.sc-chk {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: var(--ui-control-font-size);
  color: var(--ink);
  cursor: pointer;
  white-space: nowrap;
}
.sc-chk input[type="checkbox"] { width: 17px; height: 17px; margin: 0; cursor: pointer; accent-color: var(--accent); }

/* 조회 버튼 */
.sc-search-btn {
  height: var(--ui-control-height);
  min-width: 88px;
  padding: 0 18px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--ui-control-radius);
  font-size: var(--ui-control-font-size);
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}
.sc-search-btn:hover:not(:disabled) { background: #1d4ed8; }
.sc-search-btn:disabled { opacity: 0.6; cursor: default; }

/* ---- 액션 영역 ---- */
.sc-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #fffdf5;
  border: 1px solid #e6dfc0;
  border-radius: 16px;
}

.sc-adj-btn {
  height: var(--ui-control-height);
  padding: 0 16px;
  border-radius: var(--ui-control-radius);
  border: 1px solid transparent;
  font-size: var(--ui-control-font-size);
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.sc-adj-btn:disabled { opacity: 0.5; cursor: default; }

.sc-adj-btn--blue   { background: #bdd7ee; border-color: #7aaac8; color: #1a3a50; }
.sc-adj-btn--red    { background: #ff4500; border-color: #cc3700; color: #fff; }
.sc-adj-btn--yellow { background: #ffff00; border-color: #c8c800; color: #333; }
.sc-adj-btn--empty  { background: #f0f0f0; border-color: #aaa;    color: #333; }

.sc-sel-count {
  font-size: var(--ui-control-font-size);
  color: #666;
}
.sc-sel-count strong { color: #333; }

.sc-adj-msg {
  font-size: var(--ui-control-font-size);
  padding: 8px 12px;
  border-radius: 10px;
}
.sc-adj-msg--ok  { background: #d4edda; color: #155724; }
.sc-adj-msg--err { background: #f8d7da; color: #721c24; }

/* ---- 그리드 ---- */
.sc-grid-wrap {
  overflow: auto;
  max-height: calc(100vh - 340px);
  border: 1px solid var(--border, #e0e0e0);
  border-radius: 14px;
  overscroll-behavior: contain;
  isolation: isolate;
  background: #fff;
}

.sc-grid {
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
  white-space: nowrap;
  table-layout: fixed;
  width: var(--sc-grid-width);
  min-width: var(--sc-grid-width);
}

.sc-grid th,
.sc-grid td {
  border: 0;
  border-right: 1px solid #ddd;
  border-bottom: 1px solid #ddd;
  padding: 3px 6px;
}
.sc-grid th { text-align: center; vertical-align: middle; }
.sc-grid td { text-align: right; }

/* ── sticky z-index 계층 ───────────────────────────────────────
   일반 데이터셀 < 좌측 고정열(10) < 헤더(20) < 코너 고정셀(30)
──────────────────────────────────────────────────────────────── */

/* 4행 sticky 헤더 — 각 행 높이 28px 기준 */
.sc-grid thead th {
  position: sticky;
  z-index: 20;
  height: 28px;
  background: #f0f0f0;
}
.sc-grid thead tr:nth-child(1) th { top: 0px; }
.sc-grid thead tr:nth-child(2) th { top: 28px; }
.sc-grid thead tr:nth-child(3) th { top: 56px; }
.sc-grid thead tr:nth-child(4) th { top: 84px; }

/* 좌측 고정 열 — body */
.sc-cell-date,
.sc-cell-dow {
  position: sticky;
  z-index: 10;
  background: #f8f8f8;
}

/* 코너 고정 셀: 수평+수직 스크롤 시 모든 셀 위에 표시 */
.sc-hdr-fix {
  position: sticky;
  z-index: 30 !important;
  top: 0 !important;
  background: #f0f0f0;
}

.sc-hdr-date,
.sc-cell-date {
  left: 0;
  width: 60px;
  min-width: 60px;
  max-width: 60px;
  text-align: center;
}

.sc-grid td.sc-cell-date,
.sc-grid td.sc-cell-dow {
  text-align: center;
}

.sc-hdr-dow,
.sc-cell-dow {
  left: 60px;
  width: 36px;
  min-width: 36px;
  max-width: 36px;
  padding-left: 2px;
  padding-right: 2px;
  text-align: center;
  box-shadow: 1px 0 0 #c8c8c8;
}

/* Row 0: 유형 헤더 */
.sc-hdr-type {
  text-align: center;
  font-weight: 700;
  font-size: 13px;
  border-bottom: 2px solid #aaa;
}
.sc-hdr-type--1 { background: #d4e6f5; }   /* 채널사 — 파랑 계열 */
.sc-hdr-type--2 { background: #fce5c8; }   /* 유통사 — 주황 계열 */
.sc-hdr-type--3 { background: #e4d9f5; }   /* 외부유통사 — 보라 계열 */
.sc-hdr-type--4 { background: #d5eddc; }   /* 기타사 — 초록 계열 */

/* Row 1: 사업체명 헤더 */
.sc-hdr-biz {
  text-align: center;
  font-size: 12px;
  font-weight: 500;
  background: #eaecf4;
  color: #333;
}

/* Row 2: 거래처명 헤더 */
.sc-hdr-comp {
  text-align: center;
  background: #f0f2f8;
  font-weight: 600;
  min-width: 180px;
}

/* Row 3: 면세/과세 헤더 */
.sc-hdr-sub {
  text-align: center;
  background: #f5f5f5;
  font-weight: 600;
  font-size: 13px;
  min-width: 90px;
  color: #444;
}

/* 데이터 셀 */
.sc-cell-amt {
  position: relative;
  text-align: center;
  cursor: pointer;
  user-select: none;
}
.sc-cell-amt:hover { opacity: 0.82; }
.sc-has-data { font-weight: 500; }

/* 요일 색상 */
.sc-day-sun { color: #d32f2f; font-weight: 600; }
.sc-day-sat { color: #1565c0; font-weight: 600; }

/* adj_chk 색상 */
/* adj_chk 색상 — RkColor.cs + System.Drawing.Color 원본값 */
.sc-blue   { background: #bdd7ee !important; color: #000; }   /* FromArgb(189,215,238) */
.sc-red    { background: #ff4500 !important; color: #fff; }   /* Color.OrangeRed */
.sc-yellow { background: #ffff00 !important; color: #000; }   /* Color.Yellow */
.sc-orange { background: #ffc000 !important; color: #000; }   /* FromArgb(255,192,0) */
.sc-green  { background: #c6e0b4 !important; color: #000; }   /* FromArgb(198,224,180) */
.sc-gray   { background: #aeaaaa !important; color: #000; }   /* FromArgb(174,170,170) */

/* 선택된 셀 */
.sc-sel {
  box-shadow:
    inset 0 2px 0 #1565c0,
    inset 0 -2px 0 #1565c0,
    inset 0 0 0 999px rgba(21, 101, 192, 0.10);
}

/* 면세·과세 한 쌍을 하나의 선택 블록으로 표시 */
.sc-cell-amt.sc-sel:nth-child(odd) {
  border-right-color: transparent;
  box-shadow:
    inset 2px 0 0 #1565c0,
    inset 0 2px 0 #1565c0,
    inset 0 -2px 0 #1565c0,
    inset 0 0 0 999px rgba(21, 101, 192, 0.10);
}

.sc-cell-amt.sc-sel:nth-child(even) {
  box-shadow:
    inset -2px 0 0 #1565c0,
    inset 0 2px 0 #1565c0,
    inset 0 -2px 0 #1565c0,
    inset 0 0 0 999px rgba(21, 101, 192, 0.10);
}

body.sc-dragging {
  user-select: none;
}

@media (max-width: 900px) {
  .sc-shell {
    padding: 12px 0;
  }

  .sc-bar,
  .sc-actions {
    align-items: stretch;
    border-radius: 14px;
  }

  .sc-field,
  .sc-ctrl--text {
    min-width: min(100%, 220px);
  }

  .sc-date-range {
    flex-wrap: wrap;
  }

  .sc-check-group {
    flex-wrap: wrap;
  }
}

@media (max-width: 640px) {
  .sc-field,
  .sc-ctrl,
  .sc-ctrl--select,
  .sc-ctrl--text,
  .sc-search-btn {
    width: 100%;
    min-width: 0;
  }

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

  .sc-date-range .sc-lbl--sep {
    display: none;
  }

  .sc-check-group {
    width: 100%;
  }
}

/* footer 합계 */
.sc-foot { background: #f5f5f5; font-weight: 600; }

/* 합계 — 그리드 상단 */
.sc-totals {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  padding: 6px 10px;
  background: #f7f8fa;
  border: 1px solid #e2e4e8;
  border-radius: 6px;
}
.sc-totals strong { font-weight: 700; }
.sc-totals-sel { color: #1565c0; }

/* === 특별단가·단골 (추가) === */

.proto-banner{background:repeating-linear-gradient(45deg,#fef3c7,#fef3c7 12px,#fde68a 12px,#fde68a 24px);color:#92400e;font-weight:800;font-size:12.5px;text-align:center;padding:7px 12px}
.proto-account{display:block;margin-top:12px}.proto-account span{display:block;font-size:11px;color:#93a0b8;font-weight:800;margin-bottom:5px}
.proto-account select{width:100%;height:38px;border-radius:10px;border:1px solid rgba(255,255,255,.16);background:rgba(255,255,255,.08);color:#fff;font-size:12px;font-weight:700;padding:0 10px}
.proto-account select option{color:#1f2937}
.acct-scope{font-size:12px;color:#1d4ed8;background:#eff6ff;border:1px solid #bfdbfe;padding:8px 12px;border-radius:10px;font-weight:800;margin-bottom:14px}.acct-scope b{color:#16243f}
.mkt{--card:#fff;--line:#e2e8f0;--radius:16px;--shadow:0 1px 2px rgba(15,23,42,.04),0 8px 24px rgba(15,23,42,.06);--sub:#64748b;--ink:#0f172a;--accent:#2563eb;--accent-soft:#dbeafe;--navy:#16243f;--profit:#16a34a;--muted:#94a3b8;color:var(--ink)}
.mkt .sec-head{display:flex;align-items:baseline;gap:10px;margin:22px 0 14px;flex-wrap:wrap}.mkt .sec-head h2{font-size:18px;font-weight:900}.mkt .sec-head .desc{font-size:13px;color:var(--sub);font-weight:700}.mkt .sec-head .spacer{flex:1}
.mkt .card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);padding:16px}
.mkt .grid{display:grid;gap:16px}.mkt .threecol{grid-template-columns:repeat(3,minmax(0,1fr))}
.mkt .notice{display:flex;gap:10px;align-items:flex-start;background:#eff6ff;border:1px solid #bfdbfe;color:#1e3a8a;border-radius:14px;padding:12px 14px;font-size:13px;font-weight:700}.mkt .notice b{font-weight:900}
.mkt .pill{display:inline-flex;align-items:center;gap:5px;border-radius:999px;padding:4px 8px;font-size:11px;font-weight:900;border:1px solid var(--line);background:#f8fafc;color:#475569;white-space:nowrap}
.mkt .pill.blue{background:#eff6ff;color:#1d4ed8;border-color:#bfdbfe}.mkt .pill.green{background:#ecfdf5;color:#047857;border-color:#bbf7d0}.mkt .pill.orange{background:#fff7ed;color:#c2410c;border-color:#fed7aa}.mkt .pill.gray{background:#f8fafc;color:#64748b;border-color:#e2e8f0}.mkt .pill.red{background:#fef2f2;color:#b91c1c;border-color:#fecaca}
.mkt .btn{border:1px solid var(--line);background:#fff;border-radius:10px;padding:9px 12px;font-size:13px;font-weight:900;color:#334155;cursor:pointer}.mkt .btn.dark{background:var(--navy);color:#fff;border-color:var(--navy)}.mkt .btn.primary{background:var(--accent);color:#fff;border-color:var(--accent)}
.mkt .toolbar{display:flex;gap:10px;align-items:end;flex-wrap:wrap}.mkt .field{display:flex;flex-direction:column;gap:5px;min-width:120px}.mkt .field.grow{flex:1;min-width:220px}.mkt .field label{font-size:12px;color:var(--sub);font-weight:900}.mkt .field input{border:1px solid var(--line);background:#fff;border-radius:10px;padding:9px 10px;font-size:13px;color:var(--ink);-webkit-text-fill-color:var(--ink)}
.mkt .scrollx{overflow:auto}.mkt table{width:100%;border-collapse:separate;border-spacing:0;font-size:13px;min-width:920px}
.mkt th,.mkt td{padding:10px 12px;border-bottom:1px solid var(--line);text-align:center;vertical-align:middle;word-break:keep-all}
.mkt th{font-size:12px;color:#475569;background:#f8fafc;font-weight:900;white-space:nowrap;position:sticky;top:0;z-index:1}
.mkt td.num{font-variant-numeric:tabular-nums;font-weight:800}.mkt .empty{padding:26px;text-align:center;color:var(--muted);font-weight:800}
.mkt .mini{font-size:12px;color:var(--sub);font-weight:700}.mkt .pos{color:#047857;font-weight:900}.mkt .discount{color:#dc2626}
.mkt .productcell{min-width:150px;max-width:240px;white-space:normal;font-weight:800}.mkt .channelcell{min-width:96px;white-space:normal;font-weight:900}.mkt .namecell{font-weight:900}.mkt .phonecell{font-variant-numeric:tabular-nums;white-space:nowrap}
.mkt .special-card{display:flex;flex-direction:column;gap:8px;position:relative;overflow:hidden}
.mkt .special-card:before{content:"특별";position:absolute;right:-24px;top:15px;transform:rotate(35deg);background:#fee2e2;color:#b91c1c;font-size:11px;font-weight:900;padding:5px 34px}
.mkt .special-title{font-size:16px;font-weight:900}.mkt .price-line{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.mkt .price-box{background:#f8fafc;border:1px solid var(--line);border-radius:12px;padding:9px}.mkt .price-box span{display:block;font-size:11px;color:var(--sub);font-weight:900}.mkt .price-box b{font-size:17px}
.mkt .progress{height:8px;background:#e2e8f0;border-radius:999px;overflow:hidden}.mkt .progress i{display:block;height:100%;background:linear-gradient(90deg,#f97316,#ef4444)}

.mkt .reg-2col{display:grid;grid-template-columns:1.35fr 1fr;gap:14px;align-items:start}
@media(max-width:1100px){.mkt .reg-2col{grid-template-columns:1fr}}
.mkt .regrow{cursor:pointer}.mkt .regrow:hover td{background:#f8fafc}.mkt .regrow.sel td{background:#eff6ff}
.mkt .reg-detail{padding:16px}
.mkt .reg-input{background:#f8fafc;border:1px solid var(--line);border-radius:12px;padding:12px}
.mkt .ri-head{font-size:14px;margin-bottom:10px}.mkt .ri-head b{font-size:15px}
.mkt .ri-row{display:flex;align-items:center;gap:8px;margin-bottom:8px}.mkt .ri-row label{font-size:12px;font-weight:900;color:var(--sub);min-width:44px}
.mkt .ri-row input[type=text]{flex:1;border:1px solid var(--line);border-radius:8px;padding:7px 9px;font-size:13px}
.mkt .ri-checks{display:flex;align-items:center;gap:16px;font-size:13px;font-weight:800}
.mkt .ri-checks label{display:flex;align-items:center;gap:5px;cursor:pointer}

.mkt .commentcell{min-width:150px}.mkt .commentcell input{width:100%;border:1px solid var(--line);border-radius:8px;padding:6px 8px;font-size:12px;color:var(--ink);-webkit-text-fill-color:var(--ink)}
.mkt td input[type=checkbox]{width:16px;height:16px;cursor:pointer}
.mkt .dinfo{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:6px}
.mkt .ditem{background:#f8fafc;border:1px solid var(--line);border-radius:10px;padding:9px}.mkt .ditem span{font-size:11px;color:var(--sub);font-weight:900;display:block;margin-bottom:3px}.mkt .ditem b{font-size:14px}
.mkt .subtabs{display:flex;gap:8px;margin:0 0 14px;flex-wrap:wrap}
.mkt .subtabs button{border:1px solid var(--line);background:#fff;border-radius:999px;padding:8px 16px;font-size:13px;font-weight:800;color:#475569;cursor:pointer}
.mkt .subtabs button.active{background:var(--navy);color:#fff;border-color:var(--navy)}
.mkt .field select{border:1px solid var(--line);border-radius:10px;padding:9px 10px;font-size:13px;background:#fff;color:var(--ink)}

