:root {
  color-scheme: light;
  --font-ui: "Pretendard", "Pretendard Variable", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "Segoe UI", sans-serif;
  --text-xs: 12px;
  --text-sm: 13px;
  --text-md: 14px;
  --text-base: 15px;
  --text-lg: 17px;
  --text-xl: 15px;
  --text-title: 20px;
  --ink: #0d1520;
  --muted: #435264;
  --line: #cbd6e2;
  --paper: #ffffff;
  --soft: #f3f6f9;
  --nav: #102331;
  --nav-2: #163447;
  --accent: #0f8b8d;
  --accent-dark: #086b6d;
  --warn: #c87920;
  --danger: #bb3e3e;
  --success: #22835f;
  --shadow: 0 18px 45px rgba(31, 45, 61, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--soft);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: var(--text-base);
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0;
  -webkit-font-smoothing: subpixel-antialiased;
  -moz-osx-font-smoothing: auto;
  text-rendering: optimizeLegibility;
}

.login-screen {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 22px;
  background: linear-gradient(135deg, var(--nav), #24475a);
}

body.auth-loading .app-shell {
  visibility: hidden;
}

body.auth-loading .login-screen {
  visibility: hidden;
}

.login-screen.hidden {
  display: none;
}

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

.login-brand {
  margin-bottom: 4px;
  color: var(--ink);
}

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

.login-error {
  min-height: 20px;
  margin: 0;
  color: var(--danger);
  font-size: var(--text-sm);
  font-weight: 800;
}

.login-card label {
  gap: 7px;
  font-size: var(--text-sm);
}

.login-card input {
  min-height: 40px;
  height: 40px;
  padding: 0 11px;
  border-radius: 8px;
  font-size: var(--text-base);
}

.login-card .primary-button {
  min-height: 40px;
  border-radius: 8px;
  font-size: var(--text-base);
}

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

.app-shell.is-locked {
  filter: blur(2px);
  pointer-events: none;
  user-select: none;
}

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

.logout-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(16, 35, 49, 0.48);
}

.logout-overlay.hidden-control {
  display: none !important;
}

.saving-overlay {
  position: fixed;
  inset: 0;
  z-index: 2200;
  display: grid;
  place-items: center;
  pointer-events: none;
  background: rgba(16, 35, 49, 0.18);
}

.saving-card {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 150px;
  justify-content: center;
  padding: 16px 22px;
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 18px 46px rgba(16, 35, 49, 0.24);
  font-size: var(--text-lg);
  font-weight: 900;
}

.saving-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid #d5e3ea;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: saving-spin 0.8s linear infinite;
}

@keyframes saving-spin {
  to {
    transform: rotate(360deg);
  }
}

.logout-modal {
  width: min(420px, calc(100vw - 32px));
  border-radius: 8px;
  background: #ffffff;
  padding: 22px;
  box-shadow: var(--shadow);
}

.logout-modal .modal-actions {
  justify-content: flex-end;
}

button,
input,
select,
textarea {
  font: inherit;
  font-weight: 600;
}

input:disabled,
select:disabled,
textarea:disabled,
input[readonly],
textarea[readonly],
input[aria-disabled="true"],
select[aria-disabled="true"],
textarea[aria-disabled="true"] {
  border-color: #adc2d6 !important;
  background: #e8eef6 !important;
  color: #52657a !important;
  cursor: not-allowed;
  opacity: 1;
}

input[readonly],
textarea[readonly] {
  cursor: default;
}

input:disabled::placeholder,
textarea:disabled::placeholder,
input[readonly]::placeholder,
textarea[readonly]::placeholder {
  color: #7c8fa3;
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 252px 1fr;
  min-height: 100vh;
  transition: grid-template-columns 300ms ease;
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 100vh;
  overflow-y: auto;
  background: linear-gradient(180deg, var(--nav), var(--nav-2));
  color: #f7fbff;
  padding: 24px 18px;
  transition: padding 300ms ease, opacity 220ms ease;
}

.app-shell.sidebar-hidden {
  grid-template-columns: 18px minmax(0, 1fr);
}

.app-shell.sidebar-hidden .sidebar {
  overflow: hidden;
  padding-right: 0;
  padding-left: 0;
}

.app-shell.sidebar-hidden .sidebar::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 4px;
  height: 100%;
  background: rgba(20, 154, 151, 0.65);
}

.app-shell.sidebar-hidden .sidebar > * {
  opacity: 0;
  pointer-events: none;
}

.sidebar > * {
  transition: opacity 180ms ease;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 34px;
  min-width: 0;
}

.sidebar > .brand {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 10px;
  border-radius: 8px;
  cursor: pointer;
}

.sidebar > .brand:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.78);
  outline-offset: 4px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: var(--accent);
  font-weight: 800;
}

.brand-logo {
  display: block;
  width: 96px;
  height: 42px;
  border-radius: 8px;
  background: #ffffff;
  object-fit: contain;
  padding: 4px;
}

.login-brand .brand-logo {
  width: 112px;
  height: 48px;
}

.sidebar > .brand .brand-logo {
  width: 96px;
  height: 44px;
}

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

.brand strong {
  font-size: 18px;
  line-height: 1.15;
  white-space: nowrap;
  letter-spacing: 0;
}

.sidebar > .brand strong {
  font-size: 17px;
  line-height: 1.16;
  white-space: normal;
  word-break: keep-all;
}

.login-brand strong {
  font-size: 20px;
}

.brand span {
  margin-top: 3px;
  color: #b9c9d7;
  font-size: var(--text-sm);
}

.nav-tabs {
  display: grid;
  gap: 4px;
}

.nav-group {
  display: grid;
}

.nav-category {
  margin-top: 12px;
  padding: 9px 12px 8px;
  color: #8fb4c8;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0;
  border-radius: 8px;
}

.nav-category:first-child {
  margin-top: 0;
}

.nav-submenu {
  display: grid;
  gap: 4px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-2px);
  transition: max-height 460ms ease, opacity 360ms ease, transform 360ms ease;
}

.nav-subcategory {
  margin: 4px 0 2px 20px;
  color: #9fc0d2;
  font-size: var(--text-xs);
  font-weight: 900;
}

.nav-group:hover .nav-submenu {
  max-height: 640px;
  opacity: 1;
  transform: translateY(0);
}

.nav-tab {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: 0;
  border-radius: 8px;
  padding: 13px 14px;
  background: transparent;
  color: #dce8f1;
  font-size: var(--text-base);
  font-weight: 700;
  text-align: left;
  transition: background 220ms ease, color 220ms ease;
}

.nav-subtab {
  margin-left: 8px;
  width: calc(100% - 8px);
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 700;
}

.nav-subtab .icon {
  width: 20px;
  height: 20px;
  font-size: 12px;
}

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

.icon {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  font-weight: 700;
}

.main {
  min-width: 0;
  padding: 28px;
}

.topbar,
.panel-header,
.modal-header,
.toolbar,
.modal-actions {
  display: flex;
  align-items: center;
}

.topbar {
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--accent-dark);
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.connection {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: var(--text-sm);
  font-weight: 700;
}

.connection.ok {
  color: var(--success);
}

.connection.error {
  color: var(--danger);
}

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

h1 {
  margin-bottom: 0;
  font-size: var(--text-title);
  line-height: 1.2;
  font-weight: 800;
}

h2 {
  margin-bottom: 16px;
  font-size: var(--text-xl);
  line-height: 1.3;
  font-weight: 800;
}

.toolbar {
  gap: 10px;
  flex-wrap: wrap;
}

.topbar .toolbar #logoutBtn,
.topbar .toolbar #userManualBtn {
  width: 104px;
  min-height: 40px;
  padding: 0 10px;
  justify-content: center;
  white-space: nowrap;
}

.user-badge {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #ffffff;
  color: var(--muted);
  font-size: var(--text-sm);
  font-weight: 800;
}

.primary-button,
.ghost-button,
.text-button,
.icon-button,
.danger-button,
.yellow-button {
  border-radius: 6px;
  border: 1px solid transparent;
  min-height: 26px;
  padding: 0 10px;
  font-size: var(--text-xs);
  font-weight: 800;
  line-height: 1;
}

.primary-button {
  background: var(--accent);
  color: #ffffff;
}

.primary-button:hover {
  background: var(--accent-dark);
}

.ghost-button {
  background: #ffffff;
  border-color: var(--line);
  color: var(--ink);
}

.mini-button {
  min-height: 22px;
  padding: 0 7px;
  font-size: var(--text-xs);
}

.table-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.registered-vehicle-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.registered-vehicle-toolbar .primary-button,
.registered-vehicle-toolbar .ghost-button,
.registered-vehicle-toolbar .danger-button {
  min-height: 24px;
  height: 24px;
  padding: 0 9px;
}

.select-cell {
  width: 34px;
  text-align: center;
}

.select-cell input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  vertical-align: middle;
}

tr.selected-row > td {
  background: #eef7f6;
}

.vehicle-date-flicker {
  color: #b91c1c;
  font-weight: 800;
  animation: vehicle-date-flicker 0.9s ease-in-out infinite;
}

@keyframes vehicle-date-flicker {
  0%, 100% {
    background: #fff7ed;
    opacity: 1;
  }
  50% {
    background: #fee2e2;
    opacity: 0.35;
  }
}

#registeredVehicles tbody td {
  height: 22px;
  padding: 0 4px;
  font-size: var(--text-xs);
  line-height: 1.1;
  vertical-align: middle;
}

#registeredVehicles thead th {
  height: 22px;
  padding: 0 4px;
  font-size: var(--text-xs);
  line-height: 1.1;
  vertical-align: middle;
}

.org-chart-panel {
  overflow: hidden;
}

.org-chart-top {
  display: grid;
  grid-template-columns: minmax(360px, 1.2fr) 150px minmax(420px, 1.4fr);
  border: 1px solid var(--line);
  border-bottom: 0;
  background: #ffffff;
}

.org-info-box,
.org-executive-slot {
  min-height: 220px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 14px 18px;
}

.org-info-box:nth-child(3n),
.org-executive-slot:nth-child(3n) {
  border-right: 0;
}

.org-company-principles {
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
}

.org-company-principles img {
  width: 220px;
  height: 80px;
  object-fit: contain;
  margin-bottom: 10px;
}

.org-policy-lines p {
  margin: 8px 0;
  color: #001dff;
}

.org-policy-lines strong {
  color: #e11d48;
}

.org-info-box ul {
  margin: 0;
  padding-left: 18px;
  line-height: 1.55;
}

.org-chart-board {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(136px, 1fr);
  gap: 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 6px 6px;
  background: #ffffff;
}

.org-team-column {
  min-width: 0;
  border-right: 1px solid var(--line);
}

.org-team-column:last-child {
  border-right: 0;
}

.org-team-column h3 {
  margin: 0;
  padding: 7px 6px;
  border-bottom: 1px solid var(--line);
  background: #eef7fb;
  color: #17445a;
  font-size: var(--text-md);
  line-height: 1.2;
  text-align: center;
  word-break: keep-all;
}

.org-member-list {
  display: grid;
  gap: 10px;
  padding: 10px;
}

.org-member-card {
  display: grid;
  justify-items: center;
  gap: 5px;
  min-height: 210px;
  border-bottom: 1px solid #edf2f7;
  padding-bottom: 10px;
  text-align: center;
}

.org-executive-slot .org-member-card,
.org-member-card.compact {
  min-height: 0;
  border-bottom: 0;
  padding-bottom: 0;
}

.org-member-card:last-child {
  border-bottom: 0;
}

.org-avatar {
  display: grid;
  place-items: center;
  width: 120px;
  height: 156px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #f7fafc, #e8eef4);
  color: #17445a;
  font-size: 22px;
  font-weight: 800;
}

.org-executive-slot .org-avatar,
.org-member-card.compact .org-avatar {
  width: 122px;
  height: 156px;
}

.org-photo {
  display: block;
  width: 120px;
  height: 156px;
  border: 1px solid var(--line);
  object-fit: cover;
  background: #f8fafc;
}

.org-executive-slot .org-photo,
.org-member-card.compact .org-photo {
  width: 122px;
  height: 156px;
}

.org-member-card strong {
  color: var(--text);
  font-size: var(--text-sm);
}

.org-member-card span {
  color: var(--muted);
  font-size: var(--text-xs);
  line-height: 1.25;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.org-member-note {
  color: #001dff !important;
  font-weight: 700;
}

.org-empty-team {
  min-height: 160px;
  margin: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: var(--text-xs);
}

.org-edit-dialog {
  width: min(720px, 92vw);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

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

.org-photo-preview-wrap {
  display: flex;
  align-items: end;
  gap: 10px;
  margin-top: 12px;
}

.org-photo-preview-wrap img {
  width: 96px;
  height: 120px;
  border: 1px solid var(--line);
  object-fit: cover;
}

@media (max-width: 980px) {
  .org-chart-top {
    grid-template-columns: 1fr;
  }

  .org-info-box,
  .org-executive-slot {
    border-right: 0;
  }
}

.registered-vehicle-draft-row input {
  width: 100%;
  min-width: 72px;
  height: 20px;
  min-height: 20px;
  padding: 0 4px;
  border: 1px solid var(--line);
  border-radius: 5px;
  font-size: var(--text-xs);
  line-height: 1;
}

.registered-vehicle-inline-actions {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 72px 44px 44px;
  gap: 4px;
  align-items: center;
}

.inline-cell-input,
.inline-cell-select {
  width: 100%;
  min-width: 72px;
  height: 26px;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  font: inherit;
}

.inline-cell-input[type="number"],
.number-cell,
.number-cell input {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

#crmTeamGoals table th,
#crmTeamGoals table td {
  height: 18px;
  padding: 0 4px;
  font-size: 12px;
  line-height: 1;
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#crmTeamGoals .wide-data-table th,
#crmTeamGoals .wide-data-table td {
  height: 18px;
  padding: 0 4px;
}

#crmTeamGoals .crm-goal-table {
  table-layout: fixed;
}

#crmTeamGoals .crm-goal-table th,
#crmTeamGoals .crm-goal-table td {
  height: 18px;
  padding: 0 4px;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#crmTeamGoals table input,
#crmTeamGoals table select,
#crmTeamGoals table .inline-cell-input,
#crmTeamGoals table .inline-cell-select {
  min-height: 18px;
  height: 18px;
  padding: 0 4px;
  font-size: 11px;
  line-height: 1;
}

#crmTeamGoals table input[type="checkbox"] {
  width: 12px;
  height: 12px;
}

#crmTeamGoals table .mini-button {
  min-height: 18px;
  height: 18px;
  padding: 0 6px;
  font-size: 11px;
  line-height: 1;
}

#crmTeamGoals table th {
  text-align: center;
}

#crmTeamGoals table .number-cell,
#crmTeamGoals table td.number-cell,
#crmTeamGoals table .number-cell input {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

#crmTeamGoals .crm-goal-table .select-column,
#crmTeamGoals .crm-goal-table th:nth-child(1),
#crmTeamGoals .crm-goal-table td:nth-child(1) {
  text-align: center;
}

#crmTeamGoals .crm-goal-plan-table {
  min-width: 1400px;
}

#crmTeamGoals .crm-goal-actual-table {
  min-width: 1380px;
}

#crmTeamGoals .crm-goal-monthly-table {
  min-width: 1480px;
}

#crmTeamGoals .table-subsection {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  margin-bottom: 6px;
}

#crmTeamGoals .table-subsection h2 {
  margin: 0;
}

#crmTeamGoals .table-summary-row td {
  height: 18px;
  padding-top: 0;
  padding-bottom: 0;
  font-weight: 900;
}

#crmTeamGoalPlanTotal td,
#crmTeamGoalActualTotal td,
#crmTeamMonthlySalesTotal td,
#crmTeamMonthlyPurchaseTotal td,
#crmTeamMonthlyManagementTotal td,
#crmTeamMonthlyCommonTotal td {
  font-weight: 900;
}

.crm-team-goal-sales-summary {
  display: grid;
  gap: 8px;
  margin: 0 0 10px;
}

.crm-memo-field {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
}

.crm-memo-field label {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
  height: 174px;
}

.crm-memo-history,
.crm-memo-textarea {
  flex: 1 1 auto;
  width: 100%;
  min-height: 140px;
  height: 140px;
  resize: vertical;
}

.crm-memo-history {
  color: #344256;
  background: #f6f8fb;
}

.crm-owner-chart-panel {
  margin-top: 10px;
}

.panel-title-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.panel-title-actions h2 {
  margin: 0;
}

.crm-list-header {
  display: grid;
  grid-template-columns: minmax(220px, max-content) minmax(260px, 1fr) minmax(340px, max-content);
  align-items: center;
}

.crm-weekly-report-button {
  justify-self: center;
}

.compact-action-button {
  min-height: 22px;
  height: 22px;
  padding: 0 8px;
  font-size: 11px;
}

.crm-owner-chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 10px;
}

.crm-owner-chart-card {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.crm-owner-chart-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.crm-owner-chart-title strong {
  color: var(--ink);
  font-size: var(--text-md);
}

.crm-owner-chart-title span {
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 800;
}

.crm-owner-stage-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.crm-owner-stage-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 22px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 800;
  background: #f8fafc;
}

.crm-owner-stage-chip.has-count {
  border-color: #b8e2dc;
  color: var(--accent-dark);
  background: #eefaf8;
}

.crm-owner-amount-bars {
  display: grid;
  gap: 7px;
}

.crm-owner-amount-row {
  display: grid;
  grid-template-columns: 36px minmax(80px, 1fr) max-content;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 800;
}

.crm-owner-amount-row strong {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.crm-owner-amount-meter {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8edf2;
}

.crm-owner-amount-meter > i {
  display: block;
  width: calc(var(--crm-owner-rate) * 1%);
  height: 100%;
  border-radius: inherit;
}

.crm-owner-amount-budget {
  background: #64748b;
}

.crm-owner-amount-quote {
  background: #bd7a2d;
}

.crm-owner-amount-order {
  background: var(--accent);
}

.crm-team-goal-sales-summary-header,
.crm-team-goal-sales-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.crm-team-goal-sales-summary-header strong {
  color: var(--ink);
  font-size: 20px;
  font-weight: 800;
}

.crm-team-goal-sales-summary-header span {
  color: var(--muted);
  font-size: var(--text-sm);
  font-weight: 800;
}

.crm-team-goal-sales-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 8px;
}

.crm-team-goal-sales-group {
  display: grid;
  gap: 6px;
}

.crm-team-goal-sales-group-title {
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 900;
}

.crm-team-goal-sales-pager {
  justify-content: flex-end;
}

.crm-team-goal-sales-card {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.crm-team-goal-sales-title,
.crm-team-goal-sales-values {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.crm-team-goal-sales-title strong {
  color: var(--ink);
  font-size: var(--text-md);
}

.crm-team-goal-sales-title span,
.crm-team-goal-sales-values span {
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 800;
}

.crm-team-goal-sales-values b {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.crm-team-goal-sales-meter {
  position: relative;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8f2fb;
}

.crm-team-goal-sales-meter > i {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
}

.crm-team-goal-sales-rate {
  width: calc(var(--goal-rate) * 1%);
  background: linear-gradient(90deg, #0f6e8c, #10b981);
}

.crm-team-goal-sales-amount {
  width: calc(var(--sales-rate) * 1%);
  opacity: 0.36;
  background: #2563eb;
}

.crm-team-goal-actual-summary {
  display: grid;
  gap: 8px;
  margin: 0 0 10px;
}

.crm-team-goal-actual-card .crm-team-goal-sales-meter {
  background: #eef6e9;
}

.crm-team-goal-actual-rate {
  width: calc(var(--goal-rate) * 1%);
  background: linear-gradient(90deg, #166534, #84cc16);
}

.rate-flicker {
  color: #b91c1c !important;
  animation: rate-flicker 0.9s ease-in-out infinite;
}

@keyframes rate-flicker {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.28;
  }
}

.record-action-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.list-action-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
  vertical-align: middle;
}

.select-column {
  width: 40px;
  min-width: 40px;
  text-align: center;
}

.select-column input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
}

.state-button {
  border: 1px solid transparent;
  color: #ffffff;
}

.state-button.pending {
  background: var(--success);
}

.state-button.done {
  background: var(--warn);
}

.state-button.attention {
  background: #eef4f8 !important;
  border-color: #f59e0b !important;
  color: #0f172a !important;
  animation: approval-pulse 1s ease-in-out infinite;
}

.record-action-group .state-button {
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  color: #0f172a;
  font-weight: 800;
}

.record-action-group .state-button.pending {
  background: #eef4f8;
  border-color: transparent;
}

.record-action-group .state-button.done {
  background: #e8f8ef;
  border-color: transparent;
  color: #0f766e;
}

.record-action-group .state-button.attention {
  background: #fff7e6 !important;
  border-color: #f59e0b !important;
  color: #0f172a !important;
  animation: approval-name-flicker 1s ease-in-out infinite;
}

.state-button:disabled {
  cursor: not-allowed;
  opacity: 0.88;
}

.cancel-button {
  background: #fff2f2;
  color: var(--danger);
  border-color: #ffd5d5;
}

.yellow-button {
  background: #ffd75a;
  border: 1px solid #e5b936;
  color: #17202a;
  font-weight: 700;
}

@keyframes approval-pulse {
  0%,
  100% {
    background: #eef4f8;
    border-color: #f59e0b;
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.1);
  }

  50% {
    background: #fff7e6;
    border-color: #f59e0b;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.35);
  }
}

.text-button {
  min-height: 24px;
  padding: 0;
  background: transparent;
  color: var(--accent-dark);
}

.icon-button {
  width: 40px;
  padding: 0;
  background: var(--soft);
  color: var(--ink);
}

.inline-add-button {
  width: 26px;
  min-width: 26px;
  min-height: 26px;
  height: 26px;
  margin-left: 6px;
  border-color: transparent;
  background: var(--accent);
  color: #ffffff;
  font-size: 15px;
  line-height: 1;
  vertical-align: middle;
}

.danger-button {
  min-height: 24px;
  padding: 0 8px;
  background: #fff2f2;
  color: var(--danger);
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

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

.metric {
  padding: 20px;
}

.metric span {
  color: var(--muted);
  font-size: var(--text-md);
}

.metric strong {
  display: block;
  margin-top: 10px;
  font-size: 32px;
  line-height: 1.1;
  font-weight: 800;
}

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

.dashboard-mini-panel {
  min-height: 150px;
  padding: 14px;
}

.dashboard-mini-panel .panel-header {
  margin-bottom: 6px;
}

.dashboard-mini-list {
  display: grid;
  gap: 5px;
}

.dashboard-mini-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 3px 8px;
  align-items: center;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.dashboard-mini-action-item {
  grid-template-columns: minmax(0, 1fr) max-content max-content;
}

.dashboard-mini-action-item em {
  grid-column: 2 / 3;
}

.dashboard-mini-action-item .mini-button {
  grid-column: 3 / 4;
  grid-row: 1 / span 2;
  align-self: center;
}

.dashboard-mini-item strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: var(--text-sm);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-mini-item span {
  grid-column: 1 / 2;
  overflow: hidden;
  color: var(--muted);
  font-size: var(--text-xs);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-mini-item em {
  grid-column: 2 / 3;
  grid-row: 1 / span 2;
  align-self: center;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--accent-dark);
  font-size: var(--text-xs);
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.dashboard-notice-item {
  width: 100%;
  border-color: var(--line);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.dashboard-notice-item:hover strong {
  color: var(--accent-dark);
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 18px;
}

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

.notice-layout {
  display: grid;
  gap: 18px;
}

.test-layout {
  display: grid;
  gap: 18px;
}

.records-layout {
  display: grid;
  grid-template-rows: auto auto;
  gap: 18px;
  min-height: 0;
}

.records-layout > .panel {
  width: 100%;
}

.employee-layout {
  display: grid;
  gap: 18px;
}

.employee-form-panel {
  gap: 14px;
}

.employee-form-grid {
  display: grid;
  grid-template-columns: minmax(130px, 0.8fr) minmax(130px, 0.8fr) minmax(110px, 0.7fr) minmax(190px, 1fr) minmax(220px, 1.15fr) 120px;
  gap: 12px;
  align-items: end;
}

.record-field-grid {
  display: grid;
  grid-template-columns: minmax(210px, 1.25fr) minmax(145px, 0.82fr) minmax(145px, 0.82fr) minmax(105px, 0.58fr) minmax(145px, 0.82fr) minmax(260px, 1.25fr) 120px;
  gap: 12px;
  align-items: end;
}

.education-record-form-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.1fr) minmax(150px, 0.8fr) minmax(150px, 0.8fr) minmax(150px, 0.8fr) minmax(130px, 0.7fr) minmax(150px, 0.8fr);
  gap: 12px;
  align-items: end;
}

.education-record-form-grid .form-wide {
  grid-column: 1 / span 2;
}

.education-record-list-filter {
  display: grid;
  width: 100%;
  box-sizing: border-box;
  grid-template-columns: repeat(8, minmax(0, 1fr)) 48px;
  gap: 8px;
  align-items: center;
  max-width: 100%;
}

.education-record-list-filter > *,
.education-record-list-filter .record-filter-mode,
.education-record-list-filter .record-filter-mode select {
  width: 100%;
  min-width: 0;
}

.education-record-list-filter button {
  min-height: 38px;
  white-space: nowrap;
}

.record-participants textarea {
  min-height: 40px;
  height: 40px;
  resize: vertical;
}

.record-content-field textarea {
  min-height: 180px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
}

.compact-actions {
  margin-top: 2px;
}

.compact-submit {
  width: 120px;
  min-height: 40px;
}

.pagination {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

.record-preview-modal {
  max-width: min(760px, calc(100vw - 32px));
}

.record-preview-body {
  display: grid;
  gap: 10px;
}

.quality-document-native-frame {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 420px;
  border: 0;
  background: #ffffff;
  opacity: 0;
}

.quality-document-native-frame.is-loaded {
  opacity: 1;
}

.quality-document-native-shell {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 420px;
  background: #ffffff;
}

.quality-document-native-loading {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  color: var(--muted);
  font-weight: 800;
  background: #ffffff;
}

.preview-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.preview-row strong,
.preview-row span,
.preview-row div {
  padding: 10px 12px;
}

.preview-row strong {
  background: var(--soft);
}

.preview-row.pre-wrap div {
  white-space: pre-wrap;
}

.records-layout > .panel:last-child {
  align-self: stretch;
}

.course-layout {
  display: grid;
  gap: 18px;
}

.course-form-panel {
  gap: 14px;
}

.course-form-grid {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(220px, 1.25fr) minmax(170px, 1fr) minmax(120px, 0.7fr) minmax(120px, 0.7fr) 110px minmax(180px, 0.75fr) minmax(180px, 0.75fr);
  gap: 12px;
  align-items: end;
}

.course-form-grid > label,
.course-form-grid > fieldset {
  min-width: 0;
}

.course-period-field {
  display: grid;
  grid-column: span 2;
  grid-template-columns: minmax(130px, 1fr) auto minmax(130px, 1fr);
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.course-pass-score-field {
  max-width: 110px;
}

.course-form-grid [data-open-course-target-picker] {
  width: 100%;
  min-height: 34px;
  padding: 0 12px;
  white-space: nowrap;
}

.course-period-field legend {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: var(--text-sm);
  font-weight: 800;
}

.course-period-field span {
  color: var(--muted);
  font-weight: 800;
}

.admin-user-layout {
  display: grid;
  gap: 18px;
}

.admin-user-form-panel {
  gap: 14px;
}

.admin-user-form-grid {
  display: grid;
  grid-template-columns: minmax(130px, 0.75fr) minmax(190px, 1fr) minmax(170px, 1fr) minmax(170px, 1fr) minmax(120px, 0.7fr) minmax(130px, 0.75fr) minmax(190px, 1fr);
  gap: 12px;
  align-items: end;
}

.asset-layout {
  display: grid;
  gap: 18px;
}

.asset-form-panel,
.asset-request-form {
  gap: 14px;
}

.asset-form-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(140px, 1fr));
  gap: 12px;
  align-items: end;
}

.asset-register-form-grid {
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  gap: 10px 12px;
}

.asset-request-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px 12px;
  align-items: end;
}

.asset-wide-field {
  grid-column: 1 / -1;
}

.asset-wide-field textarea {
  min-height: 48px;
  height: 56px;
}

.asset-change-field textarea {
  min-height: 40px;
  height: 40px;
  resize: vertical;
}

.asset-form-grid label,
.asset-request-grid label {
  gap: 5px;
}

.asset-form-grid input,
.asset-form-grid select,
.asset-request-grid input,
.asset-request-grid select {
  min-height: 36px;
}

.asset-request-grid textarea {
  min-height: 56px;
  height: 64px;
}

.schedule-layout {
  display: grid;
  gap: 12px;
}

.schedule-form-panel {
  gap: 14px;
}

.work-diary-layout {
  display: grid;
  gap: 12px;
}

.allowance-layout {
  display: grid;
  gap: 18px;
}

.allowance-form-panel {
  gap: 14px;
}

.allowance-form-grid {
  display: grid;
  grid-template-columns: minmax(145px, 0.75fr) minmax(145px, 0.75fr) minmax(160px, 0.9fr) minmax(150px, 0.8fr) minmax(130px, 0.7fr) minmax(110px, 0.55fr) minmax(125px, 0.65fr) minmax(120px, 0.65fr) 150px;
  gap: 12px;
  align-items: end;
}

.crm-layout {
  display: grid;
  gap: 18px;
}

.crm-form-panel {
  gap: 14px;
}

.crm-team-goal-form-panel {
  gap: 14px;
}

.crm-team-goal-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(145px, 1fr));
  gap: 12px;
  align-items: end;
}

.crm-team-goal-section-title {
  grid-column: 1 / -1;
  margin: 2px 0 0;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
}

.crm-team-goal-input-group {
  grid-column: 1 / -1;
}

.crm-team-goal-section-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(145px, 1fr));
  gap: 12px;
  align-items: end;
  margin-top: 10px;
}

.crm-monthly-input-groups {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
}

.crm-monthly-input-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px 12px;
}

.crm-monthly-input-group summary {
  cursor: pointer;
  color: var(--accent-dark);
  font-weight: 800;
}

.crm-monthly-input-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.crm-form-grid {
  display: grid;
  grid-template-columns: minmax(200px, 1.2fr) minmax(130px, 0.8fr) minmax(140px, 0.85fr) minmax(180px, 1fr) minmax(130px, 0.75fr) minmax(130px, 0.75fr) minmax(145px, 0.75fr) minmax(130px, 0.75fr);
  gap: 12px;
  align-items: end;
}

.crm-management-cost-form-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(150px, 1fr));
  gap: 12px;
  align-items: end;
}

.team-asset-plan-form-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 10px;
  align-items: end;
}

.team-asset-plan-wide {
  grid-column: 1 / -1;
}

.team-asset-plan-wide textarea {
  min-height: 48px;
  height: 48px;
}

.crm-form-grid-compact {
  grid-template-columns: minmax(180px, 1.2fr) minmax(140px, 0.8fr) minmax(140px, 0.8fr) minmax(180px, 1fr) minmax(130px, 0.7fr) auto;
}

.crm-wide-field {
  grid-column: 1 / -1;
}

.crm-management-cost-form-grid .crm-wide-field textarea {
  min-height: 44px;
  height: 44px;
}

#crmForm textarea[name="memo"] {
  min-height: 76px;
  height: 76px;
}

#crm .schedule-form-grid {
  grid-template-columns: repeat(7, minmax(118px, 1fr));
  gap: 8px 10px;
}

#crm .schedule-form-grid label {
  gap: 4px;
}

#crm .schedule-form-grid input,
#crm .crm-quotation-select-button {
  min-height: 34px;
}

.team-leader-weekly-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.team-leader-weekly-form-grid label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.team-leader-weekly-form-grid .form-wide {
  grid-column: span 2;
}

.team-leader-weekly-form-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.team-leader-weekly-basic-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.team-leader-weekly-form-row.customer-info-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.team-leader-weekly-sales-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.team-leader-weekly-form-row label {
  min-width: 0;
}

.team-leader-weekly-form-grid .team-leader-weekly-progress-section,
.team-leader-weekly-form-grid .team-leader-weekly-sales-section,
.team-leader-weekly-form-grid .team-leader-weekly-detail-risk-section,
.team-leader-weekly-form-grid .team-leader-weekly-calibration-section {
  grid-column: 1 / -1;
}

.team-leader-weekly-form-grid .team-leader-weekly-sales-section label,
.team-leader-weekly-form-grid .team-leader-weekly-detail-risk-section label,
.team-leader-weekly-form-grid .team-leader-weekly-calibration-section label {
  min-width: 0;
}

.team-leader-weekly-form-grid .first-half-sales-row,
.team-leader-weekly-form-grid .second-half-sales-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 14px;
}

.team-leader-weekly-form-grid .sales-purchase-monthly-plan-row,
.team-leader-weekly-detail-grid .sales-purchase-monthly-plan-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
}

.team-leader-weekly-detail-grid .sales-purchase-monthly-plan-row .team-leader-weekly-detail-row {
  grid-template-columns: minmax(126px, max-content) minmax(0, 1fr);
  align-items: center;
}

.team-leader-weekly-detail-grid .sales-purchase-monthly-plan-row label {
  white-space: nowrap;
}

.team-leader-weekly-form-grid .team-leader-weekly-risk-control-row label {
  min-width: 0;
}

.team-leader-weekly-form-grid textarea {
  min-height: 88px;
}

.team-leader-weekly-form-grid .team-leader-weekly-audit-row {
  min-width: 0;
}

.team-leader-weekly-form-grid .team-leader-weekly-audit-row label {
  display: block;
}

.team-leader-weekly-form-grid .team-leader-weekly-audit-control textarea {
  width: 100%;
}

.team-leader-weekly-form-grid .team-leader-weekly-sales-section .team-leader-weekly-audit-row,
.team-leader-weekly-form-grid .team-leader-weekly-detail-risk-section .team-leader-weekly-audit-row {
  min-width: 0;
}

.team-leader-weekly-form-grid .team-leader-weekly-sales-section .team-leader-weekly-audit-row label,
.team-leader-weekly-form-grid .team-leader-weekly-detail-risk-section .team-leader-weekly-audit-row label {
  display: block;
  margin-bottom: 4px;
}

.team-leader-weekly-form-grid .team-leader-weekly-detail-risk-section {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
}

.team-leader-weekly-form-grid .team-leader-weekly-detail-risk-section .team-leader-weekly-risk-control-row {
  grid-column: 1 / -1;
}

.team-leader-weekly-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #f8fbfd;
}

.team-leader-weekly-table-panel table {
  min-width: 1500px;
}

.team-leader-weekly-table-panel .pre-wrap-cell {
  min-width: 220px;
  max-width: 320px;
  white-space: pre-wrap;
}

.team-weekly-filter-head {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.team-weekly-filter-button {
  width: 18px;
  height: 18px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: var(--muted);
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
}

.team-weekly-filter-button.active {
  border-color: var(--primary);
  color: var(--primary);
  background: #edf7f7;
}

.team-weekly-filter-menu {
  position: fixed;
  z-index: 10000;
  display: grid;
  gap: 2px;
  width: 210px;
  max-height: 240px;
  overflow: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.18);
}

.team-weekly-filter-menu button {
  border: 0;
  border-radius: 6px;
  background: transparent;
  padding: 7px 8px;
  text-align: left;
  cursor: pointer;
}

.team-weekly-filter-menu button:hover,
.team-weekly-filter-menu button.active {
  background: #edf7f7;
  color: var(--primary);
  font-weight: 700;
}

.team-leader-weekly-detail-modal {
  width: min(1360px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 16px;
}

.team-leader-weekly-detail-years {
  display: grid;
  gap: 14px;
  max-height: calc(100vh - 150px);
  overflow: auto;
  padding-right: 4px;
}

.team-leader-weekly-detail-form {
  display: grid;
  gap: 12px;
  height: 100%;
}

.team-leader-weekly-detail-drag-handle {
  cursor: move;
  user-select: none;
}

.team-leader-weekly-detail-drag-handle h2 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-leader-weekly-detail-year {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.team-leader-weekly-detail-year h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.team-leader-weekly-detail-year-title {
  display: grid;
  grid-template-columns: auto minmax(180px, 320px);
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}

.team-leader-weekly-detail-year-title h3 {
  margin: 0;
}

.team-leader-weekly-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
}

.team-leader-weekly-detail-row {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.team-leader-weekly-detail-row label {
  color: var(--muted);
  font-weight: 700;
}

.team-leader-weekly-detail-row input,
.team-leader-weekly-detail-row select,
.team-leader-weekly-detail-row textarea {
  min-width: 0;
}

.team-leader-weekly-detail-row textarea {
  min-height: 78px;
  resize: vertical;
}

.team-leader-weekly-detail-grid .weekly-main-progress-row {
  grid-column: 1 / -1;
}

.team-leader-weekly-detail-grid .weekly-main-progress-row textarea {
  min-height: 184px;
}

.team-leader-weekly-detail-grid .customer-issue-row,
.team-leader-weekly-detail-grid .annual-closing-report-row {
  grid-column: 2;
}

.team-leader-weekly-progress-section {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  padding: 12px;
  border: 3px dashed #facc15;
  border-radius: 8px;
  background: rgba(250, 204, 21, 0.04);
}

.team-leader-weekly-progress-section .weekly-main-progress-row {
  grid-column: 1 / -1;
}

.team-leader-weekly-audit-control {
  display: grid;
  gap: 6px;
}

.team-leader-weekly-audit-control textarea[readonly] {
  background: #f8fafc;
  color: #1f2937;
}

.team-leader-weekly-audit-control textarea[name$="Append"] {
  min-height: 54px;
  background: #fff;
}

.team-leader-weekly-sales-section {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  border: 3px dashed #2563eb;
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(37, 99, 235, 0.03);
}

.team-leader-weekly-detail-grid .first-half-sales-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: 18px;
  row-gap: 10px;
  align-items: center;
}

.team-leader-weekly-detail-grid .first-half-sales-row .team-leader-weekly-detail-row {
  grid-template-columns: minmax(126px, max-content) minmax(160px, 1fr);
  align-items: center;
  gap: 8px;
}

.team-leader-weekly-detail-grid .first-half-sales-row label {
  white-space: nowrap;
}

.team-leader-weekly-detail-grid .half-gap-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
}

.team-leader-weekly-detail-grid .half-gap-row .team-leader-weekly-detail-row {
  grid-template-columns: 140px minmax(0, 1fr);
}

.team-leader-weekly-detail-grid .second-half-sales-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 14px;
}

.team-leader-weekly-detail-grid .second-half-sales-row .team-leader-weekly-detail-row {
  grid-template-columns: minmax(126px, max-content) minmax(160px, 1fr);
  align-items: center;
}

.team-leader-weekly-detail-grid .second-half-sales-row label {
  white-space: nowrap;
}

.team-leader-weekly-detail-grid .customer-info-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 14px;
}

.team-leader-weekly-detail-grid .customer-info-row .team-leader-weekly-detail-row {
  grid-template-columns: 96px minmax(0, 1fr);
}

.team-leader-weekly-detail-grid .customer-info-row label {
  white-space: nowrap;
}

.team-leader-weekly-detail-grid .owner-info-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 14px;
}

.team-leader-weekly-detail-grid .owner-info-row .team-leader-weekly-detail-row {
  grid-template-columns: 96px minmax(0, 1fr);
}

.team-leader-weekly-detail-grid .owner-info-row label {
  white-space: nowrap;
}

.team-leader-weekly-detail-grid .order-status-row,
.team-leader-weekly-detail-grid .sales-summary-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 14px;
}

.team-leader-weekly-detail-grid .order-status-row .team-leader-weekly-detail-row,
.team-leader-weekly-detail-grid .sales-summary-row .team-leader-weekly-detail-row {
  grid-template-columns: minmax(96px, max-content) minmax(0, 1fr);
  align-items: center;
}

.team-leader-weekly-detail-grid .order-status-row label,
.team-leader-weekly-detail-grid .sales-summary-row label {
  white-space: nowrap;
}

.team-leader-weekly-detail-risk-section {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  padding: 12px;
  border: 3px dashed #e02424;
  border-radius: 8px;
  background: #fffafa;
}

.team-leader-weekly-detail-risk-section .team-leader-weekly-detail-row {
  grid-template-columns: 140px minmax(0, 1fr);
}

.team-leader-weekly-calibration-section {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  padding: 12px;
  border: 3px dashed #16a34a;
  border-radius: 8px;
  background: rgba(22, 163, 74, 0.03);
}

.team-leader-monthly-plan-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
  min-width: 0;
}

.team-leader-monthly-plan-control input[type="hidden"] {
  display: none;
}

.team-leader-monthly-plan-control .mini-button {
  white-space: nowrap;
}

.team-leader-monthly-plan-dialog {
  width: min(720px, calc(100vw - 32px));
  border: 0;
  border-radius: 8px;
  padding: 18px;
}

.team-leader-monthly-plan-form {
  display: grid;
  gap: 14px;
}

.team-leader-monthly-plan-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.team-leader-monthly-plan-grid label {
  display: grid;
  gap: 4px;
  font-weight: 700;
}

.team-leader-monthly-plan-total {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  font-weight: 700;
}

.team-leader-weekly-risk-control-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 14px;
}

.team-leader-weekly-risk-control-row .team-leader-weekly-detail-row {
  grid-template-columns: minmax(108px, max-content) minmax(0, 1fr);
  align-items: center;
}

.team-leader-weekly-risk-control-row label {
  white-space: nowrap;
}

.team-leader-weekly-detail-grid .first-half-plan-gap {
  grid-column: 2;
}

.team-leader-weekly-detail-grid .second-half-target-gap {
  grid-column: 1;
  grid-row: auto;
}

.team-leader-weekly-detail-grid .calibration-onsite-amount,
.team-leader-weekly-detail-grid .calibration-external-amount,
.team-leader-weekly-detail-grid .validation-sales-amount,
.team-leader-weekly-detail-grid .calibration-onsite-plan-amount,
.team-leader-weekly-detail-grid .calibration-external-plan-amount,
.team-leader-weekly-detail-grid .sales-plan-amount,
.team-leader-weekly-calibration-section .calibration-onsite-amount,
.team-leader-weekly-calibration-section .calibration-external-amount,
.team-leader-weekly-calibration-section .validation-sales-amount,
.team-leader-weekly-calibration-section .calibration-onsite-plan-amount,
.team-leader-weekly-calibration-section .calibration-external-plan-amount,
.team-leader-weekly-calibration-section .sales-plan-amount {
  grid-column: 1;
}

.team-leader-weekly-detail-grid .calibration-onsite-quantity,
.team-leader-weekly-detail-grid .calibration-external-quantity,
.team-leader-weekly-detail-grid .product-sales-amount,
.team-leader-weekly-detail-grid .calibration-onsite-plan-quantity,
.team-leader-weekly-detail-grid .calibration-external-plan-quantity,
.team-leader-weekly-detail-grid .purchase-plan-amount,
.team-leader-weekly-calibration-section .calibration-onsite-quantity,
.team-leader-weekly-calibration-section .calibration-external-quantity,
.team-leader-weekly-calibration-section .product-sales-amount,
.team-leader-weekly-calibration-section .calibration-onsite-plan-quantity,
.team-leader-weekly-calibration-section .calibration-external-plan-quantity,
.team-leader-weekly-calibration-section .purchase-plan-amount {
  grid-column: 2;
}

.crm-stage-field {
  grid-column: span 1;
  min-width: 0;
}

#crm .table-wrap {
  overflow: visible;
}

.crm-stage-stepper,
.crm-stage-progress {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.crm-stage-stepper {
  min-height: 34px;
}

.crm-stage-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 7px;
  background: #ffffff;
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 800;
  white-space: nowrap;
}

button.crm-stage-step {
  cursor: pointer;
}

.crm-stage-step.is-done {
  border-color: #b8e2dc;
  background: #eefaf8;
  color: var(--accent-dark);
}

.crm-stage-step.is-current {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.crm-stage-progress .crm-stage-step {
  min-height: 21px;
  padding: 0 5px;
}

.crm-stage-step.is-flicker {
  animation: crm-stage-flicker 1s ease-in-out infinite;
}

.crm-quotation-field {
  display: flex;
  align-items: center;
  gap: 6px;
}

.crm-quotation-select-button {
  justify-content: flex-start;
  min-width: 120px;
}

.crm-quotation-picker-modal {
  width: min(980px, calc(100vw - 32px));
  min-width: min(680px, calc(100vw - 32px));
}

.crm-quotation-picker-modal .quotation-status-list-wrap th,
.crm-quotation-picker-modal .quotation-status-list-wrap td {
  height: 24px;
  padding: 2px 8px;
  line-height: 1.15;
  vertical-align: middle;
}

.crm-quotation-picker-modal .quotation-status-list-wrap input[type="checkbox"] {
  width: 14px;
  height: 14px;
  margin: 0;
}

.crm-quotation-picker-modal .quotation-status-list-wrap .select-column {
  width: 36px;
  min-width: 36px;
  padding-left: 6px;
  padding-right: 6px;
  text-align: center;
}

.crm-quotation-picker-modal .quotation-month-day-button {
  line-height: 1.15;
}

@keyframes crm-stage-flicker {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(15, 139, 141, 0.18);
    filter: brightness(1);
  }

  50% {
    box-shadow: 0 0 0 4px rgba(15, 139, 141, 0.28);
    filter: brightness(1.08);
  }
}

.crm-contact-actions {
  display: flex;
  gap: 8px;
  align-items: end;
  white-space: nowrap;
}

.contact-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
}

.contact-suggestion-button {
  width: auto;
}

.dialog-form-grid {
  grid-template-columns: repeat(3, minmax(160px, 1fr));
}

.kpi-layout {
  display: grid;
  gap: 18px;
}

.kpi-form-panel {
  gap: 14px;
}

.quality-document-layout {
  display: grid;
  gap: 18px;
}

.quality-document-form-panel {
  gap: 14px;
}

.quality-document-form-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.3fr) minmax(120px, 0.6fr) minmax(150px, 0.75fr) minmax(150px, 0.75fr) minmax(240px, 1fr);
  gap: 12px;
  align-items: end;
}

.quality-document-file-field .file-action-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.quality-document-file-field input[type="file"] {
  flex: 1;
  min-width: 0;
}

.quality-revision-form-panel {
  display: grid;
  gap: 14px;
}

.quality-revision-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: start;
}

.quality-revision-form-grid {
  display: grid;
  grid-template-columns:
    minmax(180px, 1.1fr)
    minmax(150px, 0.8fr)
    minmax(150px, 0.8fr)
    minmax(160px, 0.8fr)
    minmax(220px, 1fr);
  gap: 10px;
  align-items: end;
}

.quality-revision-form-grid > label {
  min-width: 0;
}

.quality-revision-form-grid input[type="file"] {
  padding: 6px 8px;
}

.approval-person-panel {
  display: grid;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.approval-person-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 24px;
}

.approval-person-list {
  display: grid;
  gap: 4px;
}

.quality-revision-form-panel .approval-person-list {
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  align-items: start;
  overflow-x: visible;
}

.quality-revision-form-panel .approval-person-label-row {
  display: none;
}

.quality-revision-form-panel .approval-person-row {
  grid-template-columns: minmax(92px, 1fr) minmax(70px, 0.42fr) auto;
  min-width: 0;
}

.approval-person-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(110px, 0.35fr) auto;
  gap: 4px;
  align-items: center;
  padding: 2px 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.approval-person-label-row {
  padding-top: 0;
  padding-bottom: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: var(--text-sm);
  font-weight: 800;
}

.approval-person-selector {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 4px;
  align-items: center;
}

.approval-person-row input,
.approval-person-row select {
  min-height: 22px;
  height: 22px;
  padding: 0 6px;
  font-size: var(--text-xs);
  line-height: 1;
}

.approval-person-row .mini-button {
  min-height: 20px;
  height: 20px;
  padding: 0 6px;
  font-size: 11px;
}

.approval-person-order {
  font-weight: 800;
  color: var(--accent-dark);
}

#employeeApprovalProcess.approval-person-list {
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 6px;
}

#employees .employee-approval-panel {
  gap: 6px;
  padding: 10px 12px;
}

#employees .employee-approval-panel .approval-person-header h2 {
  margin: 0;
  font-size: var(--text-base);
  line-height: 1.2;
}

#employees .employee-approval-panel .approval-person-row {
  grid-template-columns: 24px minmax(140px, 1fr) minmax(90px, 120px);
  gap: 6px;
  padding: 4px 6px;
  min-height: 38px;
}

#employees .employee-approval-panel .employee-approval-main-line {
  display: contents;
}

#employees .employee-approval-panel .approval-person-row input,
#employees .employee-approval-panel .approval-person-row select {
  height: 28px;
  min-height: 28px;
  padding: 0 8px;
}

#employees .employee-approval-panel .approval-person-row .mini-button {
  height: 26px;
  min-height: 26px;
}

.employee-approval-document {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 24px 28px;
  background: #ffffff;
  color: #111827;
  font-family: "Malgun Gothic", Arial, sans-serif;
}

.employee-approval-document h2 {
  margin: 0 0 24px;
  text-align: center;
  text-decoration: underline;
}

.employee-approval-document h3 {
  margin: 24px 0 8px;
  font-size: 14px;
}

.employee-approval-document table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  margin-bottom: 22px;
}

.employee-approval-document th,
.employee-approval-document td {
  border: 1px solid #8b8f97;
  padding: 9px 10px;
  text-align: center;
  vertical-align: middle;
  font-size: 13px;
  line-height: 1.35;
}

.employee-approval-document th {
  background: #f3f4f6;
  font-weight: 800;
}

.employee-approval-document tbody th {
  width: 140px;
}

.employee-approval-document .employee-plan-extra-row td {
  height: 78px;
}

.employee-approval-document .employee-signature-block {
  display: grid;
  gap: 3px;
  padding: 8px 4px;
  text-align: left;
  line-height: 1.35;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.employee-approval-person-row {
  grid-template-columns: 1fr;
  gap: 0;
  padding: 5px 6px;
}

.employee-approval-main-line {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) minmax(82px, 0.35fr);
  gap: 6px;
  align-items: center;
}

.approval-name-flow {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.approval-name-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: #eef4f8;
  font-weight: 800;
}

.approval-name-separator {
  color: var(--muted);
  font-weight: 900;
}

.approval-current-name {
  border-color: #f59e0b;
  background: #fff7e6;
  animation: approval-name-flicker 1s ease-in-out infinite;
}

@keyframes approval-name-flicker {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.1);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.35);
  }
}

.pending-author-flicker {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 999px;
  color: #a15c00;
  background: #fff7e6;
  font-weight: 900;
  animation: pending-author-flicker 1s ease-in-out infinite;
}

@keyframes pending-author-flicker {
  0%,
  100% {
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.12);
  }
  50% {
    opacity: 0.42;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.28);
  }
}

.version-log-button {
  min-width: 52px;
}

#qualityDocumentRows td {
  height: 22px;
  line-height: 1.2;
  vertical-align: middle;
}

#qualityDocumentRows .row-actions {
  max-width: 100%;
}

#qualityRevisionRows td,
#qualitySignatureRows td {
  height: 26px;
  padding-top: 2px;
  padding-bottom: 2px;
  line-height: 1.2;
  overflow: visible;
}

#qualityRevisionRows .approval-name-chip,
#qualitySignatureRows .approval-name-chip {
  min-height: 22px;
  padding-top: 1px;
  padding-bottom: 1px;
}

.quality-revision-audit-modal {
  width: min(1280px, calc(100vw - 36px));
  max-height: calc(100vh - 36px);
}

.quality-revision-audit-modal .table-wrap {
  max-height: calc(100vh - 170px);
  overflow: auto;
}

.comment-hover-wrap {
  position: relative;
  display: inline-flex;
}

.comment-hover-popover {
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  z-index: 50;
  display: none;
  width: min(420px, 70vw);
  max-height: 280px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
  padding: 10px 12px;
  background: #ffffff;
  color: var(--text);
  line-height: 1.55;
  text-align: left;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.comment-hover-wrap:hover .comment-hover-popover,
.comment-hover-wrap:focus-within .comment-hover-popover {
  display: block;
}

.quality-document-viewer-modal {
  width: 100%;
  max-width: 100%;
  height: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

#qualityDocumentViewerDialog {
  position: fixed;
  z-index: 10000;
  top: 6px;
  right: auto;
  bottom: auto;
  left: 50%;
  width: min(1188px, calc(100vw - 12px));
  height: calc(100vh - 12px);
  min-width: min(620px, calc(100vw - 56px));
  min-height: 520px;
  max-width: calc(100vw - 12px);
  max-height: calc(100vh - 12px);
  margin: 0;
  overflow: hidden;
  resize: both;
  background: #ffffff;
  transform: translateX(-50%);
}

#qualityDocumentViewerDialog:not([open]) {
  display: none;
}

#qualityDocumentViewerDialog[open] {
  display: flex;
  flex-direction: column;
}

#qualityDocumentViewerDialog .modal-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  flex: 0 0 auto;
  cursor: move;
  user-select: none;
}

#qualityDocumentViewerDialog .modal-header h2 {
  min-width: 0;
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  overflow-wrap: anywhere;
  line-height: 1.25;
}

#qualityDocumentViewerDialog .modal-header button {
  cursor: pointer;
}

#qualityDocumentViewerDialog .modal-header > .ghost-button {
  justify-self: end;
}

#qualityDocumentViewerDialog.is-minimized {
  top: auto;
  bottom: 8px;
  left: 8px;
  width: min(520px, calc(100vw - 16px));
  height: auto;
  min-width: 0;
  min-height: 0;
  max-width: calc(100vw - 16px);
  resize: none;
  transform: none;
}

#qualityDocumentViewerDialog.is-minimized .quality-document-frame,
#qualityDocumentViewerDialog.is-minimized #qualityDocumentViewerPager,
#qualityDocumentViewerDialog.is-minimized .quality-document-resize-handle {
  display: none;
}

#qualityDocumentViewerDialog::backdrop {
  display: none;
}

.quality-document-frame,
#qualityDocumentFrame {
  width: 100%;
  flex: 1;
  min-height: 0;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  overflow: auto;
  padding: 0;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.quality-document-resize-handle {
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 18px;
  height: 18px;
  border: 0;
  padding: 0;
  background:
    linear-gradient(135deg, transparent 0 48%, #64748b 49% 53%, transparent 54%),
    linear-gradient(135deg, transparent 0 64%, #94a3b8 65% 69%, transparent 70%);
  cursor: nwse-resize;
  opacity: 0.75;
  z-index: 5;
}

.quality-document-resize-handle:hover {
  opacity: 1;
}

.quality-document-object {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #fff;
  pointer-events: auto;
}

.quality-document-viewer-shell {
  position: relative;
  overflow: visible;
  background: #fff;
  margin: 12px auto;
}

.quality-document-shield {
  position: absolute;
  inset: 0 18px 0 0;
  z-index: 2;
  background: transparent;
  cursor: default;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.pdf-loading {
  min-height: 100%;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 700;
  text-align: center;
  padding: 24px;
}

.pdf-error {
  color: #b91c1c;
  white-space: pre-wrap;
}

.pdf-page-toolbar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: -14px -14px 14px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.pdf-page-indicator {
  min-width: 64px;
  color: var(--text);
  font-size: var(--text-sm);
  font-weight: 800;
  text-align: center;
}

.pdf-zoom-indicator {
  min-width: 48px;
}

.pdf-header-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  align-self: start;
  padding-top: 8px;
}

.pdf-viewer-note {
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 800;
  white-space: nowrap;
}

.pdf-toolbar-divider {
  width: 1px;
  height: 24px;
  background: var(--line);
}

.pdf-page-stage {
  display: grid;
  justify-items: center;
  align-items: center;
  min-height: 100%;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.pdf-page-shell {
  position: relative;
  margin: 0 auto;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.pdf-page-canvas {
  display: block;
  max-width: 100%;
  margin: 0;
  background: #fff;
  image-rendering: auto;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.kpi-item-form-grid,
.kpi-result-form-grid {
  display: grid;
  gap: 12px;
  align-items: end;
}

.kpi-item-form-grid {
  grid-template-columns: minmax(100px, 0.7fr) minmax(180px, 1.2fr) minmax(130px, 0.85fr) minmax(145px, 0.85fr) minmax(120px, 0.75fr) minmax(80px, 0.5fr) minmax(100px, 0.6fr) minmax(110px, 0.65fr) minmax(135px, 0.75fr) minmax(135px, 0.75fr) minmax(90px, 0.55fr) minmax(95px, 0.55fr);
}

.kpi-result-form-grid {
  grid-template-columns: minmax(240px, 1.4fr) minmax(145px, 0.8fr) minmax(145px, 0.8fr) minmax(115px, 0.6fr) minmax(180px, 1fr) minmax(240px, 1.2fr);
}

.kpi-wide-field {
  grid-column: 1 / -1;
}

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

.applicant-picker {
  position: relative;
  min-width: 0;
}

.applicant-suggestions {
  position: absolute;
  z-index: 20;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.applicant-suggestions button {
  display: block;
  width: 100%;
  min-height: 34px;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 0 12px;
  background: #ffffff;
  color: var(--ink);
  text-align: left;
}

.applicant-suggestions button:hover,
.applicant-suggestions button:focus {
  background: var(--soft);
}

.asset-suggestion-field {
  position: relative;
}

.asset-transfer-suggestions {
  position: fixed;
  z-index: 40;
  width: 260px;
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.asset-transfer-suggestions button {
  display: block;
  width: 100%;
  min-height: 34px;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 0 12px;
  background: #ffffff;
  color: var(--ink);
  text-align: left;
}

.asset-transfer-suggestions button:hover,
.asset-transfer-suggestions button:focus {
  background: var(--soft);
}

.work-diary-form-panel {
  gap: 14px;
}

.schedule-form-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(150px, 1fr));
  gap: 12px;
  align-items: end;
}

.common-contact-form-grid {
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  gap: 8px 12px;
}

.common-contact-form-grid label {
  gap: 4px;
}

.common-contact-form-grid input {
  min-height: 32px;
}

#commonContactDialog {
  width: min(920px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
}

#commonContactDialog #commonContactDialogForm {
  padding: 14px;
}

#commonContactDialog .panel-header {
  position: sticky;
  top: 0;
  z-index: 1;
  margin: -14px -14px 10px;
  padding: 12px 14px 8px;
  background: #ffffff;
}

#commonContactDialog .common-contact-form-grid {
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 8px 10px;
}

#commonContactDialog .common-contact-form-grid .form-wide {
  grid-column: span 2;
}

#commonContactDialog .common-contact-form-grid textarea {
  min-height: 84px;
}

.field-add-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  gap: 4px;
  align-items: center;
}

.icon-mini-button {
  width: 28px;
  min-width: 28px;
  min-height: 32px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--accent-dark);
  font-size: var(--text-lg);
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.icon-mini-button:hover {
  border-color: var(--accent);
  background: var(--soft);
}

.work-diary-form-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(150px, 1fr));
  gap: 12px;
  align-items: end;
}

.work-diary-content-field {
  grid-column: 1 / -1;
  align-self: stretch;
}

.work-diary-content-field textarea {
  width: 100%;
  min-height: 140px;
  height: clamp(140px, 18vh, 220px);
  resize: vertical;
}

.field-with-help {
  position: relative;
}

.field-help-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.field-help-wrap input {
  width: 100%;
  padding-right: 34px;
}

.field-help-icon {
  position: absolute;
  right: 10px;
  top: 50%;
  z-index: 2;
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  cursor: help;
}

.field-help-popover {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 80;
  display: none;
  min-width: 150px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  box-shadow: var(--shadow);
  font-size: var(--text-sm);
  font-weight: 800;
  white-space: nowrap;
}

.field-help-wrap:hover .field-help-popover,
.field-help-wrap:focus-within .field-help-popover {
  display: block;
}

.work-diary-event {
  border-left-color: #4f46e5;
}

.calendar-toolbar {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.panel-subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: var(--text-sm);
  font-weight: 700;
}

.schedule-calendar-panel .panel-header {
  justify-content: flex-start;
  gap: 8px;
  margin-bottom: 4px;
}

.schedule-calendar-panel .panel-header > div:first-child {
  display: flex;
  align-items: center;
  gap: 8px;
}

.schedule-calendar-panel h2 {
  font-size: var(--text-sm);
  font-weight: 800;
}

.schedule-calendar-panel .panel-subtitle {
  display: none;
}

.schedule-calendar-panel .user-badge {
  min-height: 24px;
  border: 0;
  padding: 0 4px;
  font-size: var(--text-xs);
}

.schedule-calendar-panel .mini-button {
  min-height: 22px;
  padding: 0 6px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(118px, 1fr));
  gap: 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #ffffff;
}

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

.calendar-weekday {
  min-height: 26px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 800;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.calendar-day {
  position: relative;
  z-index: 1;
  min-height: 104px;
  padding: 4px 4px 28px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.muted-day {
  background: #f6f8fb;
}

.calendar-day-head {
  position: relative;
  z-index: 8;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: var(--text-xs);
}

.calendar-add-button {
  min-width: 22px;
  min-height: 20px;
  border-color: transparent;
  background: transparent;
  color: var(--accent-dark);
  font-size: var(--text-xs);
  line-height: 1;
}

.calendar-add-button:hover {
  background: #e8f7f7;
  color: var(--accent-dark);
}

.calendar-events {
  display: grid;
  gap: 4px;
}

.calendar-event {
  display: grid;
  gap: 1px;
  position: relative;
  border-left: 3px solid var(--accent);
  border-radius: 4px;
  padding: 4px 5px;
  background: #f8fbff;
  font-size: var(--text-xs);
  line-height: 1.25;
}

.calendar-event:hover,
.calendar-event:focus-within {
  z-index: 20;
}

.calendar-event strong {
  font-size: var(--text-xs);
}

.calendar-event span {
  color: var(--muted);
}

.calendar-event.continuous-schedule {
  border-left-width: 5px;
  background: linear-gradient(90deg, rgba(74, 144, 146, 0.14), #f8fbff 42%);
  min-height: 38px;
  align-content: center;
}

.calendar-event.multi-day-schedule {
  border-left-color: #3478c7;
  background: #eef5ff;
  box-shadow: inset 0 0 0 1px rgba(52, 120, 199, 0.16);
}

.calendar-event.multi-day-color-0 {
  border-left-color: #3478c7;
  background: #eef5ff;
  box-shadow: inset 0 0 0 1px rgba(52, 120, 199, 0.16);
}

.calendar-event.multi-day-color-1 {
  border-left-color: #2f9e73;
  background: #effaf5;
  box-shadow: inset 0 0 0 1px rgba(47, 158, 115, 0.18);
}

.calendar-event.multi-day-color-2 {
  border-left-color: #b7791f;
  background: #fff8e8;
  box-shadow: inset 0 0 0 1px rgba(183, 121, 31, 0.18);
}

.calendar-event.multi-day-color-3 {
  border-left-color: #805ad5;
  background: #f5f0ff;
  box-shadow: inset 0 0 0 1px rgba(128, 90, 213, 0.18);
}

.calendar-event.multi-day-color-4 {
  border-left-color: #d53f8c;
  background: #fff0f7;
  box-shadow: inset 0 0 0 1px rgba(213, 63, 140, 0.16);
}

.calendar-event.multi-day-color-5 {
  border-left-color: #dd6b20;
  background: #fff4ec;
  box-shadow: inset 0 0 0 1px rgba(221, 107, 32, 0.16);
}

.calendar-event.multi-day-color-6 {
  border-left-color: #319795;
  background: #eafbfa;
  box-shadow: inset 0 0 0 1px rgba(49, 151, 149, 0.18);
}

.calendar-event.multi-day-color-7 {
  border-left-color: #5a67d8;
  background: #f0f2ff;
  box-shadow: inset 0 0 0 1px rgba(90, 103, 216, 0.18);
}

.calendar-event.multi-day-color-8 {
  border-left-color: #718096;
  background: #f5f7fa;
  box-shadow: inset 0 0 0 1px rgba(113, 128, 150, 0.2);
}

.calendar-event.multi-day-color-9 {
  border-left-color: #c53030;
  background: #fff1f1;
  box-shadow: inset 0 0 0 1px rgba(197, 48, 48, 0.16);
}

.calendar-event.continuous-start {
  margin-right: -5px;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.calendar-event.continuous-middle {
  margin-left: -5px;
  margin-right: -5px;
  border-left-color: transparent;
  border-radius: 0;
  background: #eef8f8;
}

.calendar-event.continuous-end {
  margin-left: -5px;
  border-left-color: transparent;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  background: #eef8f8;
}

.calendar-event .continuous-label {
  font-weight: 700;
  color: var(--accent-dark);
}

.calendar-event .continuous-fill {
  display: block;
  min-height: 16px;
}

.work-diary-content-lines {
  display: grid;
  gap: 2px;
}

.work-diary-content-lines span {
  color: var(--muted);
}

.work-diary-total {
  color: var(--text);
  font-weight: 700;
  margin-top: 2px;
}

.work-diary-popover {
  position: absolute;
  left: calc(100% + 8px);
  top: 0;
  z-index: 30;
  display: none;
  width: min(360px, 72vw);
  max-height: 360px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
  padding: 10px;
  background: #ffffff;
  color: var(--text);
}

.work-diary-event:hover .work-diary-popover,
.work-diary-event:focus-within .work-diary-popover,
.work-diary-event:focus .work-diary-popover {
  display: grid;
  gap: 7px;
}

.work-diary-popover strong {
  color: var(--text);
  font-size: var(--text-sm);
}

.work-diary-popover-row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.work-diary-popover-row > span {
  color: var(--muted);
  font-weight: 700;
}

.work-diary-popover-row > p {
  margin: 0;
  color: var(--text);
  white-space: pre-line;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.calendar-event-actions {
  display: flex;
  gap: 4px;
  margin-top: 3px;
}

.calendar-event-actions .mini-button,
.calendar-event-actions .danger-button {
  min-height: 24px;
  padding: 2px 6px;
  font-size: var(--text-xs);
}

.calendar-event.meeting,
.calendar-event.education {
  border-left-color: #2563eb;
}

.calendar-event.validation,
.calendar-event.calibration {
  border-left-color: #0f8b8d;
}

.calendar-event.sales {
  border-left-color: #d97706;
}

.calendar-event.vacation,
.calendar-event.leave {
  border-left-color: #16a34a;
}

.calendar-event.all-leave-event {
  border-left-color: #16a34a;
  background: #effaf3;
}

.leave-schedule-panel {
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.compact-header {
  justify-content: flex-start;
  gap: 10px;
}

.leave-schedule-panel table {
  min-width: 760px;
}

.stacked-panels {
  display: grid;
  gap: 18px;
}

.date-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

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

.audit-filter {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 220px)) minmax(110px, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
}

.select-with-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px;
  gap: 8px;
  align-items: end;
}

.education-document-view-button {
  min-height: 34px;
  min-width: 34px;
}

.education-record-course-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.education-record-course-title .education-document-view-button {
  min-height: 24px;
  min-width: 24px;
  width: 24px;
  height: 24px;
  padding: 0;
  font-size: 14px;
}

.add-master-button {
  min-height: 40px;
  background: var(--accent);
  color: #ffffff;
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
}

.add-master-button:hover {
  background: var(--accent-dark);
}

.schedule-form-grid > .select-with-action {
  grid-template-columns: minmax(0, 1fr) 32px;
}

.schedule-form-grid > .select-with-action:has([data-schedule-work-type-inline]),
.schedule-form-grid > .select-with-action:has([data-schedule-location-inline]) {
  grid-template-columns: minmax(0, 1fr) minmax(120px, 0.8fr) 32px;
}

.schedule-add-button {
  align-self: end;
  min-height: 40px;
}

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

.panel-header {
  justify-content: space-between;
  gap: 8px;
  min-height: 32px;
  margin-bottom: 8px;
}

.panel-header h2 {
  margin-bottom: 0;
  font-size: var(--text-base);
  line-height: 1.2;
}

.list-title-filter {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  min-width: 0;
}

.title-inline-control {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 800;
}

.title-inline-control select {
  min-width: 96px;
  height: 36px;
  padding: 0 10px;
}

.list-filter {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 800;
}

.list-filter::before {
  content: "";
  width: 10px;
  height: 10px;
  border: 2px solid var(--muted);
  border-top: 0;
  border-left: 0;
  transform: rotate(45deg) translateY(-2px);
  opacity: 0.8;
}

.list-filter input {
  width: 220px;
  max-width: min(42vw, 260px);
  min-height: 34px;
  padding: 0 10px;
  font-size: var(--text-sm);
}

.filter-mode-select {
  width: 74px;
  min-height: 34px;
  padding: 0 8px;
  font-size: var(--text-xs);
  font-weight: 800;
}

#crmManagementCostPlanForm {
  display: none !important;
}

.table-head-add-button {
  width: 20px;
  height: 20px;
  min-height: 20px;
  margin-left: 4px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.table-head-add-button:hover {
  background: var(--accent-dark);
}

#crmManagementCostPlans table th,
#crmManagementCostPlans table td {
  height: 18px;
  padding: 0 4px;
  font-size: 12px;
  line-height: 1;
}

#crmManagementCostPlans table input[type="checkbox"] {
  width: 12px;
  height: 12px;
}

#crmManagementCostPlans table .mini-button {
  min-height: 18px;
  height: 18px;
  padding: 0 6px;
  font-size: 11px;
  line-height: 1;
}

#crmManagementCostPlans .select-column {
  width: 30px;
  min-width: 30px;
}

#crmManagementCostPlans .table-summary-row td {
  height: 18px;
  padding-top: 0;
  padding-bottom: 0;
  font-weight: 900;
}

.record-filter-mode {
  display: flex;
  align-items: center;
  gap: 6px;
}

.record-list-filter {
  display: flex;
  align-items: end;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 7px;
  flex: 1;
}

.record-list-filter label {
  min-width: 108px;
  max-width: 136px;
}

.record-list-filter button {
  flex: 0 0 auto;
}

.result-filter-row th {
  padding-top: 8px;
}

.table-filter {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 92px;
}

.table-filter input {
  min-height: 30px;
  height: 30px;
  padding: 5px 7px;
  font-size: var(--text-xs);
}

.table-filter button {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 8px;
  background: #ffffff;
  color: var(--ink);
  font-size: var(--text-xs);
  font-weight: 800;
  white-space: nowrap;
}

.record-select-box {
  width: 20px;
  min-height: 20px;
  height: 20px;
  padding: 0;
  margin: 0;
}

.form-panel {
  display: grid;
  gap: 8px;
}

.form-panel > .panel-header {
  justify-content: flex-start;
  gap: 8px;
  min-height: 26px;
  margin-bottom: 4px;
}

.form-panel > .panel-header h2 {
  flex: 0 0 auto;
  line-height: 26px;
}

.form-panel > .panel-header .primary-button,
.form-panel > .panel-header .ghost-button {
  min-height: 24px;
  height: 24px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: var(--text-xs);
  line-height: 1;
  white-space: nowrap;
}

.account-details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.account-details summary {
  min-height: 40px;
  padding: 10px 12px;
  color: var(--ink);
  font-size: var(--text-sm);
  font-weight: 800;
  cursor: pointer;
}

.account-details[open] {
  padding-bottom: 12px;
}

.account-details[open] summary {
  margin-bottom: 4px;
}

.account-details label {
  margin: 0 12px 12px;
}

.account-details label:last-child {
  margin-bottom: 0;
}

label {
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.15;
}

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

input,
select {
  min-height: 28px;
  height: 28px;
  padding: 0 9px;
  font-size: 12px;
  line-height: 1;
}

textarea {
  min-height: 72px;
  padding: 8px 9px;
  font-size: 12px;
  line-height: 1.35;
  resize: vertical;
}

.search-input {
  max-width: 240px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.table-subsection {
  margin-top: 12px;
}

.table-subsection h2 {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: var(--text-base);
  font-weight: 800;
  letter-spacing: 0;
}

table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

table,
.question-list,
.compact-table-panel,
.table-wrap {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: geometricPrecision;
}

.wide-data-table {
  min-width: 1680px;
}

.table-summary-row td {
  background: #f8fafc;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.25;
  white-space: nowrap;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

th,
td {
  padding: 3px 6px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-align: left;
  vertical-align: middle;
  font-size: var(--text-xs);
  font-weight: 800;
  line-height: 1.15;
}

.compact-table-panel table th,
.compact-table-panel table td {
  height: 18px;
  padding: 0 4px;
  font-size: 12px;
  line-height: 1;
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.compact-table-panel table input,
.compact-table-panel table select,
.compact-table-panel table .inline-cell-input,
.compact-table-panel table .inline-cell-select {
  min-height: 18px;
  height: 18px;
  padding: 0 4px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.compact-table-panel table input[type="checkbox"] {
  width: 12px;
  height: 12px;
}

.compact-table-panel table .mini-button {
  min-height: 18px;
  height: 18px;
  padding: 0 6px;
  font-size: 11px;
  line-height: 1;
}

.manager-check-button.is-pending {
  border-color: #ef8f00;
  color: #8a4f00;
  background: #fff2cc;
  animation: manager-check-flicker 1s ease-in-out infinite;
}

.manager-check-button.is-done {
  color: #2f6d54;
  background: #e8f7ef;
}

.manager-check-line {
  display: block;
  margin-top: 3px;
  color: #425466;
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1.2;
  white-space: normal;
}

#results .compact-table-panel table {
  min-width: 1500px;
  table-layout: fixed;
}

#results .compact-table-panel table th:nth-child(1),
#results .compact-table-panel table td:nth-child(1) { width: 12%; }

#results .compact-table-panel table th:nth-child(2),
#results .compact-table-panel table td:nth-child(2) { width: 10%; }

#results .compact-table-panel table th:nth-child(3),
#results .compact-table-panel table td:nth-child(3) { width: 10%; }

#results .compact-table-panel table th:nth-child(4),
#results .compact-table-panel table td:nth-child(4) { width: 24%; }

#results .compact-table-panel table th:nth-child(5),
#results .compact-table-panel table td:nth-child(5) { width: 7%; }

#results .compact-table-panel table th:nth-child(6),
#results .compact-table-panel table td:nth-child(6) { width: 8%; }

#results .compact-table-panel table th:nth-child(7),
#results .compact-table-panel table td:nth-child(7) { width: 8%; }

#results .compact-table-panel table th:nth-child(8),
#results .compact-table-panel table td:nth-child(8) { width: 21%; }

#results .compact-table-panel table td.result-action-cell {
  height: 34px;
  overflow: visible;
  white-space: normal;
}

#educationStatus .education-status-table {
  min-width: 1280px;
  table-layout: fixed;
}

#educationStatus .education-status-table th,
#educationStatus .education-status-table td {
  height: 24px;
  padding: 2px 8px;
  line-height: 1.15;
  vertical-align: middle;
}

#educationStatus .education-status-table th {
  text-align: center;
}

#educationStatus .education-status-table td {
  text-align: left;
}

#educationStatus .education-status-table td:nth-child(2),
#educationStatus .education-status-table td:nth-child(3),
#educationStatus .education-status-table td:nth-child(4),
#educationStatus .education-status-table td:nth-child(5),
#educationStatus .education-status-table td:nth-child(6) {
  text-align: center;
}

#educationStatus .education-status-course-col { width: 30%; }
#educationStatus .education-status-team-col { width: 10%; }
#educationStatus .education-status-trainee-col { width: 14%; }
#educationStatus .education-status-date-col { width: 13%; }
#educationStatus .education-status-created-col { width: 16%; }
#educationStatus .education-status-result-col { width: 17%; }

#educationStatus .education-status-filter-row th {
  height: 26px;
  padding: 2px 5px;
}

#educationStatus .education-status-filter-row input {
  width: 100%;
  min-width: 0;
  height: 22px;
  min-height: 22px;
  padding: 0 6px;
  font-size: 11px;
}

#educationStatus .education-status-search-cell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 4px;
  align-items: center;
}

#educationStatus .education-status-search-cell .mini-button {
  height: 22px;
  min-height: 22px;
  padding: 0 7px;
}

.result-action-buttons {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  white-space: nowrap;
}

.hash-verify-button {
  border: 1px solid #7aa0c4;
  background: #eef6ff;
  color: #24527a;
}

.hash-verify-button:disabled {
  border-color: #d8e1ec;
  background: #f5f7fa;
  color: #9aa8b8;
}

@keyframes manager-check-flicker {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.1);
  }
  50% {
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.38);
  }
}

#users .compact-table-panel table th,
#users .compact-table-panel table td {
  height: 22px;
  padding: 2px 6px;
  line-height: 1.15;
  vertical-align: middle;
}

#users .compact-table-panel table {
  table-layout: fixed;
}

#users .compact-table-panel table th:nth-child(1),
#users .compact-table-panel table td:nth-child(1) { width: 8%; }
#users .compact-table-panel table th:nth-child(2),
#users .compact-table-panel table td:nth-child(2) { width: 8%; }
#users .compact-table-panel table th:nth-child(3),
#users .compact-table-panel table td:nth-child(3) { width: 15%; }
#users .compact-table-panel table th:nth-child(4),
#users .compact-table-panel table td:nth-child(4) { width: 8%; }
#users .compact-table-panel table th:nth-child(5),
#users .compact-table-panel table td:nth-child(5) { width: 6%; }
#users .compact-table-panel table th:nth-child(6),
#users .compact-table-panel table td:nth-child(6) { width: 8%; }
#users .compact-table-panel table th:nth-child(7),
#users .compact-table-panel table td:nth-child(7) { width: 6%; }
#users .compact-table-panel table th:nth-child(8),
#users .compact-table-panel table td:nth-child(8) { width: 10%; }
#users .compact-table-panel table th:nth-child(9),
#users .compact-table-panel table td:nth-child(9) { width: 11%; }
#users .compact-table-panel table th:nth-child(10),
#users .compact-table-panel table td:nth-child(10) { width: 10%; }
#users .compact-table-panel table th:nth-child(11),
#users .compact-table-panel table td:nth-child(11) { width: 9%; }

#users .compact-table-panel table th,
#users .compact-table-panel table td {
  text-align: center;
}

#users .compact-table-panel table th:nth-child(1),
#users .compact-table-panel table td:nth-child(1),
#users .compact-table-panel table th:nth-child(2),
#users .compact-table-panel table td:nth-child(2),
#users .compact-table-panel table th:nth-child(4),
#users .compact-table-panel table td:nth-child(4),
#users .compact-table-panel table th:nth-child(5),
#users .compact-table-panel table td:nth-child(5),
#users .compact-table-panel table th:nth-child(6),
#users .compact-table-panel table td:nth-child(6),
#users .compact-table-panel table th:nth-child(7),
#users .compact-table-panel table td:nth-child(7),
#users .compact-table-panel table th:nth-child(8),
#users .compact-table-panel table td:nth-child(8),
#users .compact-table-panel table th:nth-child(9),
#users .compact-table-panel table td:nth-child(9),
#users .compact-table-panel table th:nth-child(10),
#users .compact-table-panel table td:nth-child(10),
#users .compact-table-panel table th:nth-child(11),
#users .compact-table-panel table td:nth-child(11) {
  white-space: nowrap;
}

#users .compact-table-panel table th:nth-child(3),
#users .compact-table-panel table td:nth-child(3) {
  text-align: left;
}

#users .compact-table-panel table th:nth-child(11),
#users .compact-table-panel table td:nth-child(11) {
  overflow: visible;
  text-overflow: clip;
}

#users .compact-table-panel table td:nth-child(11) {
  display: table-cell;
}

#users .compact-table-panel table td:nth-child(11) .mini-button {
  margin: 0 1px;
}

.asset-table-panel table th,
.asset-table-panel table td {
  height: 18px;
  padding: 0 4px;
  font-size: var(--text-xs);
  line-height: 1;
}

.asset-table-panel table .mini-button {
  min-height: 18px;
  height: 18px;
  padding: 0 6px;
  font-size: 11px;
  line-height: 1;
}

#educationRecordRows td {
  height: 24px;
  padding-top: 2px;
  padding-bottom: 2px;
  line-height: 1.15;
}

#educationRecordRows .mini-button,
#educationRecordRows .record-action-group .state-button {
  min-height: 21px;
  height: 21px;
  padding-top: 0;
  padding-bottom: 0;
}

#educationRecordRows .record-action-group {
  gap: 5px;
}

.compact-table-panel table th {
  text-align: center;
}

.center-cell {
  text-align: center;
}

.row-actions {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  line-height: 1;
  vertical-align: middle;
  white-space: nowrap;
}

.course-target-modal {
  width: min(980px, calc(100vw - 36px));
}

.course-target-table-wrap {
  max-height: 66vh;
}

.course-target-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 10px 14px;
}

.course-target-department-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: #ffffff;
}

.course-target-department-card h3 {
  margin: 0;
  padding: 6px 10px;
  background: #eef5f8;
  color: var(--accent-dark);
  font-size: var(--text-sm);
  font-weight: 900;
}

.course-target-department-card table {
  width: 100%;
}

.course-target-department-card th,
.course-target-department-card td {
  height: 28px;
  padding: 4px 8px;
  text-align: left;
}

.course-target-department-option,
.course-target-name-option,
.course-target-toggle-all {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 800;
}

.course-target-department-option {
  color: inherit;
}

.course-target-department-option input,
.course-target-name-option input,
.course-target-toggle-all input,
#courseTargetOverlay input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
}

.course-target-toggle-all {
  margin: 0 0 8px;
}

.course-target-total {
  margin-top: 10px;
  padding: 8px 10px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-weight: 900;
}

.course-target-department-row td {
  background: #eef5f8;
  color: var(--accent-dark);
  font-weight: 900;
  text-align: left;
}

.course-target-modal tfoot td {
  background: #f8fbfd;
  font-weight: 900;
}

.compact-table-panel table td:has(.row-actions),
.compact-table-panel table td.compact-action-cell {
  text-align: center;
}

.compact-table-panel table .number-cell,
.compact-table-panel table td.number-cell,
.compact-table-panel table .number-cell input {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.group-label-cell {
  color: var(--ink);
  font-weight: 800;
  vertical-align: top;
  background: #fbfdff;
}

.account-summary-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: center;
}

.account-summary-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 24px;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  white-space: nowrap;
}

.account-summary-item strong {
  color: var(--ink);
  font-weight: 800;
}

th {
  color: var(--muted);
  font-size: var(--text-sm);
  font-weight: 800;
}

.wide-data-table th,
.wide-data-table td {
  padding-top: 2px;
  padding-bottom: 2px;
}

.compact-data-table th,
.compact-data-table td {
  height: 26px;
  padding: 2px 6px;
  line-height: 1.2;
}

.table-group-row td {
  background: #f4f7fb;
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 800;
  height: 24px;
  padding: 3px 8px;
}

.compact-action-cell {
  text-align: center;
  white-space: nowrap;
}

.crm-management-cost-detail-modal {
  max-width: min(720px, calc(100vw - 32px));
}

.crm-management-cost-detail-grid {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.crm-management-cost-detail-grid strong,
.crm-management-cost-detail-grid p {
  min-height: 34px;
  margin: 0;
  padding: 8px 10px;
  background: #ffffff;
  line-height: 1.35;
}

.crm-management-cost-detail-grid strong {
  color: var(--muted);
  font-size: var(--text-sm);
}

.team-asset-plan-remark-modal {
  max-width: min(640px, calc(100vw - 32px));
}

.team-asset-plan-remark-text {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.5;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 8px;
  font-size: var(--text-xs);
  font-weight: 800;
}

.status.pass {
  background: #e8f7ef;
  color: var(--success);
}

.status.fail {
  background: #fff3e4;
  color: var(--warn);
}

.status.wait {
  background: #eef3f8;
  color: var(--muted);
}

.progress-list,
.question-list,
.test-paper,
.course-grid {
  display: grid;
  gap: 12px;
}

.question-list {
  gap: 6px;
}

.progress-item {
  display: grid;
  gap: 7px;
}

.progress-title {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: var(--text-md);
}

.bar {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7edf3;
}

.bar span {
  display: block;
  height: 100%;
  background: var(--accent);
}

.course-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.course-card,
.question-card,
.notice-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 15px;
  background: #fbfdff;
}

.question-card {
  padding: 8px 10px;
  border-radius: 6px;
}

.course-card h3,
.question-card h3 {
  margin: 0 0 8px;
  font-size: var(--text-lg);
  line-height: 1.35;
}

.question-card h3 {
  margin-bottom: 4px;
  font-size: var(--text-sm);
  line-height: 1.25;
}

.question-card .card-meta {
  gap: 5px;
  font-size: var(--text-xs);
  font-weight: 800;
  line-height: 1.2;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: var(--text-sm);
}

.card-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.notice-form-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.6fr) minmax(420px, 1fr) minmax(240px, 0.55fr);
  gap: 12px;
  align-items: end;
}

.notice-form-grid textarea {
  min-height: 96px;
  resize: vertical;
}

.notice-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 12px;
}

.notice-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.notice-head h3 {
  margin: 0 0 5px;
  font-size: var(--text-lg);
  line-height: 1.35;
}

.notice-title-button {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 900;
  text-align: left;
  cursor: pointer;
}

.notice-title-button:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

.notice-head p,
.notice-body {
  margin: 0;
  color: var(--muted);
}

.notice-body {
  margin-top: 12px;
  line-height: 1.65;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.notice-attachment-button {
  margin-top: 10px;
}

.notice-dialog {
  width: min(860px, calc(100vw - 40px));
  max-height: min(720px, calc(100vh - 40px));
  padding: 24px;
}

.notice-dialog-head h2 {
  margin: 0 0 8px;
}

.notice-dialog-head p {
  margin: 0 0 18px;
  color: var(--muted);
}

.notice-dialog-content {
  max-height: 480px;
  overflow: auto;
  line-height: 1.7;
  white-space: normal;
}

.notice-dialog-attachment {
  margin-top: 18px;
}

.department-list {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.department-list h3 {
  margin: 0 0 12px;
  font-size: var(--text-lg);
}

.department-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.department-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 8px 0 12px;
  background: #f8fbfd;
  color: var(--ink);
  font-size: var(--text-sm);
  font-weight: 800;
}

.department-chip button {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: #fff2f2;
  color: var(--danger);
  font-weight: 900;
}

.master-list {
  display: grid;
  gap: 16px;
}

.master-list strong {
  display: block;
  margin-bottom: 8px;
  font-size: var(--text-sm);
}

.muted-text {
  color: var(--muted);
  font-size: var(--text-sm);
}

.role-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.empty-cell,
.empty-state {
  padding: 24px 10px;
  color: var(--muted);
  text-align: center;
}

dialog {
  width: min(880px, calc(100vw - 28px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  box-shadow: 0 24px 80px rgba(18, 28, 38, 0.3);
}

dialog::backdrop {
  background: rgba(11, 23, 34, 0.55);
}

.emergency-contact-detail-dialog,
.emergency-contact-edit-dialog {
  width: min(720px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 48px));
  overflow: auto;
}

.emergency-contact-edit-dialog form {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
}

.emergency-contact-detail-dialog .modal-header,
.emergency-contact-edit-dialog .modal-header {
  margin: 0;
  padding: 0;
}

.emergency-contact-edit-dialog .dialog-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 10px;
}

.emergency-contact-edit-dialog label {
  gap: 2px;
}

.emergency-contact-edit-dialog input,
.emergency-contact-edit-dialog select {
  min-height: 24px;
  height: 24px;
  padding: 0 7px;
}

.emergency-contact-edit-dialog textarea {
  min-height: 54px;
  padding: 6px 7px;
}

.emergency-contact-edit-dialog .form-wide {
  grid-column: 1 / -1;
}

.emergency-contact-photo-control {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  min-height: 24px;
}

.emergency-contact-photo-control img {
  width: 44px;
  height: 56px;
  border: 1px solid var(--line);
  background: #ffffff;
  object-fit: cover;
}

.emergency-contact-edit-dialog .modal-actions {
  justify-content: flex-end;
  margin-top: 2px;
}

.emergency-contact-detail-grid {
  display: grid;
  gap: 0;
  padding: 12px 14px 14px;
}

.emergency-contact-detail-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  border-bottom: 1px solid var(--line);
}

.emergency-contact-detail-row strong,
.emergency-contact-detail-row span {
  padding: 10px 12px;
  word-break: break-word;
}

.emergency-contact-detail-row strong {
  background: #f6f9fb;
  color: var(--ink);
}

#emergencyContacts .emergency-contact-table th,
#emergencyContacts .emergency-contact-table td {
  height: 22px;
  padding: 1px 5px;
  font-size: var(--text-xs);
  line-height: 1.1;
  vertical-align: middle;
}

#emergencyContacts .emergency-contact-table th:first-child,
#emergencyContacts .emergency-contact-table td:first-child {
  width: 34px;
  text-align: center;
}

#emergencyContacts input[data-select-emergency-contact] {
  appearance: none;
  width: 14px;
  min-width: 14px;
  height: 14px;
  min-height: 14px;
  margin: 0;
  padding: 0;
  border: 1px solid #6f8194;
  border-radius: 2px;
  background: #ffffff;
  vertical-align: middle;
}

#emergencyContacts input[data-select-emergency-contact]:checked {
  border-color: var(--accent-dark);
  background:
    linear-gradient(135deg, transparent 0 42%, #ffffff 42% 58%, transparent 58%),
    linear-gradient(45deg, transparent 0 44%, #ffffff 44% 60%, transparent 60%),
    var(--accent);
}

.test-modal {
  position: fixed;
  inset: 50% auto auto 50%;
  z-index: 1200;
  max-height: min(760px, calc(100vh - 48px));
  overflow: auto;
  padding: 22px;
  transform: translate(-50%, -50%);
}

#testDialog[open] {
  display: block;
}

.test-grading-status {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #eef7f7;
  color: var(--primary-dark);
  font-size: var(--text-md);
  font-weight: 800;
}

.test-meta-grid {
  display: grid;
  grid-template-columns: minmax(180px, 220px) minmax(220px, 1fr);
  gap: 12px;
  align-items: center;
  margin-bottom: 8px;
}

.test-meta-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  white-space: nowrap;
}

.readonly-field-display {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 24px;
  padding: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: var(--text-md);
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.test-meta-grid select {
  width: 100%;
}

.modal-header {
  justify-content: space-between;
  margin-bottom: 18px;
}

.modal-header h2 {
  margin-bottom: 0;
}

.modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.test-question {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.test-question strong {
  display: block;
  margin-bottom: 10px;
  font-size: var(--text-base);
}

.option-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  color: var(--ink);
  font-size: var(--text-md);
  font-weight: 500;
}

.option-row input {
  width: auto;
  min-height: auto;
}

.modal-actions {
  justify-content: flex-end;
  gap: 10px;
  margin: 18px 0 0;
  padding: 0;
}

@media (max-width: 980px) {
  .test-meta-grid {
    grid-template-columns: 1fr;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 5;
    padding: 14px;
  }

  .brand {
    margin-bottom: 12px;
  }

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

  .nav-tab {
    justify-content: center;
    padding: 10px 8px;
  }

  .nav-tab span:last-child {
    display: none;
  }

  .main {
    padding: 18px;
  }

  .topbar,
  .split-layout,
  .work-grid,
  .records-layout,
  .record-field-grid,
  .education-record-form-grid,
  .education-record-list-filter,
  .notice-form-grid,
  .course-form-grid,
  #crm .schedule-form-grid,
  .schedule-form-grid,
  .work-diary-form-grid,
  .allowance-form-grid,
  .asset-form-grid,
  .asset-request-grid,
  .crm-management-cost-form-grid,
  .team-asset-plan-form-grid,
  .team-leader-weekly-form-grid,
  .team-leader-weekly-form-row,
  .kpi-item-form-grid,
  .kpi-result-form-grid,
  .quality-revision-form-grid,
  .quality-revision-layout,
  .approval-person-row,
  .dashboard-mini-grid,
  .team-leader-weekly-detail-grid,
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .records-layout {
    grid-template-rows: auto auto;
    min-height: 0;
  }

  .topbar {
    display: grid;
  }

  .crm-stage-field {
    grid-column: auto;
  }

  .crm-memo-field {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .metric-grid,
  .modal-grid,
  .date-pair,
  #crm .schedule-form-grid,
  .schedule-form-grid,
  .work-diary-form-grid,
  .allowance-form-grid,
  .crm-management-cost-form-grid,
  .team-asset-plan-form-grid,
  .team-leader-weekly-detail-row,
  .kpi-item-form-grid,
  .kpi-result-form-grid,
  .select-with-action {
    grid-template-columns: 1fr;
  }

  .team-leader-weekly-detail-grid .first-half-sales-row,
  .team-leader-weekly-detail-grid .first-half-sales-row .team-leader-weekly-detail-row,
  .team-leader-weekly-detail-grid .half-gap-row,
  .team-leader-weekly-detail-grid .half-gap-row .team-leader-weekly-detail-row,
  .team-leader-weekly-detail-grid .second-half-sales-row,
  .team-leader-weekly-detail-grid .second-half-sales-row .team-leader-weekly-detail-row,
  .team-leader-weekly-detail-grid .customer-info-row,
  .team-leader-weekly-detail-grid .customer-info-row .team-leader-weekly-detail-row,
  .team-leader-weekly-detail-grid .owner-info-row,
  .team-leader-weekly-detail-grid .owner-info-row .team-leader-weekly-detail-row,
  .team-leader-weekly-detail-grid .order-status-row,
  .team-leader-weekly-detail-grid .order-status-row .team-leader-weekly-detail-row,
  .team-leader-weekly-detail-grid .sales-summary-row,
  .team-leader-weekly-detail-grid .sales-summary-row .team-leader-weekly-detail-row,
  .team-leader-weekly-detail-grid .sales-purchase-monthly-plan-row,
  .team-leader-weekly-detail-grid .sales-purchase-monthly-plan-row .team-leader-weekly-detail-row,
  .team-leader-weekly-form-grid .sales-purchase-monthly-plan-row,
  .team-leader-weekly-detail-year-title,
  .team-leader-weekly-progress-section,
  .team-leader-weekly-sales-section,
  .team-leader-weekly-detail-risk-section,
  .team-leader-weekly-detail-risk-section .team-leader-weekly-detail-row,
  .team-leader-weekly-calibration-section,
  .team-leader-weekly-risk-control-row,
  .team-leader-weekly-risk-control-row .team-leader-weekly-detail-row {
    grid-template-columns: 1fr;
  }

  .team-leader-weekly-detail-grid .first-half-sales-row label,
  .team-leader-weekly-detail-grid .customer-info-row label,
  .team-leader-weekly-detail-grid .owner-info-row label,
  .team-leader-weekly-detail-grid .order-status-row label,
  .team-leader-weekly-detail-grid .sales-summary-row label,
  .team-leader-weekly-risk-control-row label {
    white-space: normal;
  }

  .team-leader-weekly-calibration-section .team-leader-weekly-detail-row {
    grid-column: auto;
  }

  .team-leader-monthly-plan-control,
  .team-leader-monthly-plan-grid {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: var(--text-title);
  }

  .panel-header {
    align-items: stretch;
    flex-direction: column;
  }

  .course-target-grid {
    grid-template-columns: 1fr;
  }

  .crm-list-header {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .crm-weekly-report-button {
    justify-self: start;
  }

  .search-input {
    max-width: none;
  }
}

#employeeForm .employee-form-grid {
  display: flex !important;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
}

#employeeForm .employee-form-grid > label {
  flex: 1 1 0;
  min-width: 130px;
}

#employeeForm .employee-form-grid > button {
  flex: 0 0 120px;
}

#employees .table-wrap table {
  table-layout: fixed;
}

#employees .table-wrap th,
#employees .table-wrap td {
  text-align: center;
  vertical-align: middle;
}

#employees .table-wrap th:nth-child(1),
#employees .table-wrap td:nth-child(1) {
  width: 8%;
  text-align: left;
}

#employees .table-wrap th:nth-child(2),
#employees .table-wrap td:nth-child(2) {
  width: 8%;
}

#employees .table-wrap th:nth-child(3),
#employees .table-wrap td:nth-child(3) {
  width: 8%;
}

#employees .table-wrap th:nth-child(4),
#employees .table-wrap td:nth-child(4) {
  width: 42%;
  text-align: left;
}

#employees .table-wrap th:nth-child(5),
#employees .table-wrap td:nth-child(5) {
  width: 22%;
  overflow: hidden;
}

#employees .table-wrap th:nth-child(6),
#employees .table-wrap td:nth-child(6) {
  width: 190px;
  white-space: nowrap;
}

#employees .table-wrap th:nth-child(7),
#employees .table-wrap td:nth-child(7) {
  width: 120px;
  white-space: nowrap;
}

.document-actions {
  justify-content: center;
}

.document-actions .mini-button {
  white-space: nowrap;
}

.employee-approval-list-flow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 4px;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
}

.employee-approval-list-flow .approval-name-flow,
.employee-approval-list-flow .approval-inline-buttons {
  flex: 0 1 auto;
  min-width: 0;
  white-space: nowrap;
}

.employee-approval-list-flow .approval-name-chip {
  max-width: 76px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.employee-approval-list-flow .approval-inline-action {
  flex: 0 0 auto;
}

.employee-plan-cell {
  white-space: normal;
}

.employee-plan-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 2px;
  align-items: center;
  text-align: left;
  line-height: 1.35;
}

.employee-plan-list-item {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}

.employee-plan-list-item strong {
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
}

.employee-plan-list-item span {
  color: var(--ink-soft);
  flex: 0 0 auto;
}

.employee-approval-step-button {
  white-space: nowrap;
}

.approval-status-actions {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
}

.approval-inline-action {
  white-space: nowrap;
}

.approval-inline-buttons {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.employee-approval-flow {
  display: flex;
  align-items: center;
  min-height: 32px;
}

#employeeForm .employee-work-field-group {
  display: grid;
  flex: 2 1 420px;
  grid-template-columns: repeat(5, max-content);
  align-items: end;
  gap: 6px 12px;
  min-width: 360px;
  margin: 0;
  padding: 0;
  border: 0;
}

#employeeForm .employee-work-field-group legend {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: var(--text-sm);
  font-weight: 800;
  line-height: 1.2;
}

#employeeForm .employee-work-field-group label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 40px;
  color: var(--ink);
  font-size: var(--text-sm);
  font-weight: 700;
  white-space: nowrap;
}

#employeeForm .employee-work-field-group input {
  width: 14px;
  height: 14px;
  min-height: 14px;
  padding: 0;
}

#employeeForm .employee-education-plan-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 10px 16px;
  flex: 1 0 100%;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

#employeeForm .employee-education-plan-group legend {
  padding: 0 6px;
  color: var(--muted);
  font-size: var(--text-sm);
  font-weight: 800;
}

#employeeForm .employee-education-plan-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(130px, 160px) auto minmax(130px, 160px);
  gap: 8px;
  align-items: center;
}

#employeeForm .employee-education-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: var(--text-sm);
  font-weight: 800;
  white-space: nowrap;
}

#employeeForm .employee-education-check input {
  width: 14px;
  height: 14px;
  min-height: 14px;
  padding: 0;
}

#userForm .admin-user-form-grid {
  display: flex !important;
  flex-wrap: nowrap;
  gap: 12px;
  align-items: end;
  overflow-x: auto;
}

#userForm .admin-user-form-grid > label,
#userForm .admin-user-form-grid > .select-with-action,
#userForm .admin-user-form-grid > .account-details {
  flex: 1 1 0;
  min-width: 150px;
}

#userForm .admin-user-form-grid > .account-details {
  align-self: end;
}

#userForm.user-invite-panel {
  display: grid;
  grid-template-columns: auto auto minmax(280px, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 5px 14px;
}

#userForm.user-invite-panel .panel-header {
  display: contents;
  margin: 0;
}

#userForm.user-invite-panel .panel-header h2 {
  margin: 0;
  font-size: var(--text-base);
  line-height: 28px;
  white-space: nowrap;
}

#userForm.user-invite-panel .panel-header .primary-button {
  grid-column: 2;
  grid-row: 1;
}

#userForm.user-invite-panel .admin-user-form-grid {
  display: block !important;
  grid-column: 3;
  grid-row: 1;
  min-width: 0;
  overflow: visible;
}

#userForm.user-invite-panel .admin-user-form-grid > label {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}

#userForm.user-invite-panel input {
  min-height: 26px;
  height: 26px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 12px;
}

.smtp-settings-panel {
  gap: 8px;
  width: 100%;
}

.smtp-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(320px, 1fr));
  gap: 6px 20px;
  align-items: end;
}

.smtp-settings-grid label {
  gap: 4px;
}

.smtp-settings-grid input,
.smtp-settings-grid select {
  min-height: 28px;
  height: 28px;
  padding-top: 0;
  padding-bottom: 0;
}

.smtp-port-field input {
  text-align: right;
}

.smtp-checkbox {
  min-height: 28px;
  align-content: end;
  font-weight: 800;
}

.smtp-checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
}

.smtp-checkbox-row input {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin: 0;
}

.smtp-status-message {
  min-width: 0;
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.smtp-status-message[data-tone="success"] {
  color: var(--accent-dark);
}

.smtp-status-message[data-tone="error"] {
  color: #b91c1c;
}

.smtp-status-message[data-tone="pending"] {
  color: #1d4ed8;
}

.smtp-test-recipient {
  grid-column: auto;
}

.smtp-test-action {
  max-width: 180px;
}

.smtp-test-button {
  min-height: 28px;
}

.quotation-upload-panel {
  display: grid;
  grid-template-columns: max-content max-content minmax(420px, 1fr);
  gap: 8px;
  align-items: center;
  padding: 6px 14px;
}

.quotation-upload-panel .panel-header {
  display: contents;
}

.quotation-upload-panel .panel-header h2 {
  grid-column: 1;
  grid-row: 1;
  align-self: center;
  margin: 0;
  white-space: nowrap;
}

.quotation-upload-panel .panel-header .primary-button {
  grid-column: 2;
  grid-row: 1;
}

.quotation-upload-grid {
  display: grid;
  grid-column: 3;
  grid-row: 1;
  grid-template-columns: minmax(360px, 1fr);
  gap: 0;
  align-items: center;
}

.quotation-upload-grid label {
  display: grid;
  grid-template-columns: max-content minmax(260px, 1fr);
  gap: 10px;
  align-items: center;
}

.quotation-upload-grid input[type="file"] {
  min-height: 28px;
  padding: 3px 9px;
}

.quotation-status-table th,
.quotation-status-table td {
  white-space: nowrap;
}

.quotation-status-table .text-left {
  min-width: 220px;
  max-width: 420px;
  white-space: normal;
  text-align: left;
}

.quotation-status-table .number-cell,
.sales-status-table .number-cell,
#quotationUploadRows .number-cell {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

#salesUploadRows .number-cell {
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.sales-status-table td {
  white-space: nowrap;
}

.sales-status-table .text-left {
  min-width: 300px;
  max-width: 520px;
  white-space: normal;
  text-align: left;
}

.quotation-month-day-button,
.sales-invoice-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent-dark);
  font: inherit;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.quotation-month-day-button:hover,
.sales-invoice-button:hover {
  color: var(--accent);
}

.quotation-chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.quotation-report-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: auto;
  justify-content: flex-end;
}

.quotation-report-period {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 900;
}

.quotation-report-period input {
  width: 122px;
  min-height: 24px;
  padding: 0 5px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: var(--text-xs);
}

.quotation-report-button {
  white-space: nowrap;
}

#quotationStatusChartPanel .quotation-chart-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-auto-flow: row;
}

.quotation-chart-toolbar {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-top: 16px;
}

.quotation-chart-toolbar h3 {
  margin: 0;
  font-size: var(--text-lg);
}

.quotation-chart-filters {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 0;
  justify-self: stretch;
}

.quotation-chart-toolbar label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  font-size: var(--text-sm);
  font-weight: 900;
}

.quotation-chart-toolbar select {
  min-width: 92px;
}

.quotation-month-filter {
  display: grid;
  grid-template-columns: repeat(13, minmax(58px, 1fr));
  gap: 5px;
  align-items: center;
  min-width: 0;
}

.quotation-month-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  min-height: 32px;
  padding: 4px 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  white-space: nowrap;
}

.quotation-month-check input {
  width: 14px;
  height: 14px;
}

.quotation-chart-card {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 14px;
  align-items: center;
  min-height: 116px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.sales-chart-card {
  grid-template-columns: 1fr;
  align-content: center;
}

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

.sales-chart-bars {
  display: grid;
  gap: 7px;
}

.sales-chart-bar-row {
  display: grid;
  grid-template-columns: 36px minmax(90px, 1fr) max-content;
  gap: 8px;
  align-items: center;
  font-size: var(--text-sm);
  font-weight: 800;
  color: var(--muted);
}

.sales-chart-bar-row strong {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.sales-chart-meter {
  width: 100%;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9eef2;
}

.sales-chart-meter > i {
  display: block;
  width: calc(var(--sales-rate) * 1%);
  height: 100%;
  border-radius: inherit;
}

.sales-amount-bar {
  background: linear-gradient(90deg, var(--accent), var(--success));
}

.purchase-amount-bar {
  background: linear-gradient(90deg, var(--warn), #b06b1d);
}

.sales-support-chart-section {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.sales-sub-chart-heading {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-top: 18px;
}

.sales-sub-chart-heading h3 {
  margin: 0;
  font-size: var(--text-lg);
}

.sales-sub-chart-heading .quotation-chart-filters {
  justify-self: stretch;
}

.sales-category-type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.sales-category-type-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.sales-category-type-title {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  font-weight: 900;
}

.sales-category-type-title span {
  color: var(--muted);
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums;
}

.sales-category-type-bars {
  display: grid;
  gap: 8px;
}

.sales-category-type-row {
  display: grid;
  grid-template-columns: minmax(54px, max-content) minmax(90px, 1fr) max-content;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: var(--text-sm);
  font-weight: 800;
}

.sales-support-list-button {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font: inherit;
}

.sales-support-list-button:hover span,
.sales-support-list-button:hover strong {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.sales-category-type-row strong {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.type-amount-bar {
  background: linear-gradient(90deg, var(--success), #2f7f67);
}

.type-amount-bar-internal {
  background: linear-gradient(90deg, #2f7f67, #4e9b80);
}

.type-amount-bar-external {
  background: linear-gradient(90deg, #3f6fa8, #6f94c8);
}

.type-amount-bar-seoho {
  background: linear-gradient(90deg, #8a63a8, #aa86c2);
}

.type-amount-bar-sales {
  background: linear-gradient(90deg, #c28a2e, #d6a64f);
}

.type-amount-bar-repair {
  background: linear-gradient(90deg, #b5564f, #cf766f);
}

.type-amount-bar-validation {
  background: linear-gradient(90deg, #4d8c9b, #73a9b5);
}

.type-amount-bar-etc {
  background: linear-gradient(90deg, #6f7d8a, #96a1aa);
}

.support-cost-bar {
  background: linear-gradient(90deg, var(--warn), #d39b3a);
}

.kolas-amount-bar-kolas {
  background: linear-gradient(90deg, #2f7f67, #66a98d);
}

.kolas-amount-bar-non {
  background: linear-gradient(90deg, #3f6fa8, #7aa0ce);
}

.kolas-amount-bar-doc {
  background: linear-gradient(90deg, #8a63a8, #b08ac9);
}

.kolas-amount-bar-cal {
  background: linear-gradient(90deg, #c28a2e, #d7aa5c);
}

.kolas-amount-bar-etc {
  background: linear-gradient(90deg, #6f7d8a, #9aa4ad);
}

.quotation-donut {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: conic-gradient(
    var(--success) 0 calc(var(--won-end) * 1%),
    var(--warn) calc(var(--won-end) * 1%) calc(var(--progress-end) * 1%),
    var(--danger) calc(var(--progress-end) * 1%) 100%
  );
  position: relative;
}

.quotation-donut::after {
  content: "";
  position: absolute;
  inset: 13px;
  border-radius: 50%;
  background: #ffffff;
}

.quotation-donut span {
  position: relative;
  z-index: 1;
  font-size: var(--text-lg);
  font-weight: 900;
}

.quotation-chart-detail {
  display: grid;
  gap: 8px;
}

.quotation-chart-detail strong {
  font-size: var(--text-md);
}

.quotation-chart-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 12px;
  color: var(--muted);
  font-size: var(--text-sm);
  font-weight: 800;
}

.quotation-chart-counts > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.quotation-status-list-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: var(--text-sm);
  font-weight: 800;
}

.quotation-status-list-button:hover {
  color: var(--ink);
  text-decoration: underline;
}

.quotation-status-list-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 8px 16px 16px;
  background: rgba(16, 35, 49, 0.42);
  overflow: auto;
}

.quotation-status-list-modal {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: min(1080px, calc(100vw - 32px));
  height: min(820px, calc(100vh - 24px));
  min-width: min(720px, calc(100vw - 32px));
  min-height: 360px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 24px);
  padding: 18px;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
  overflow: hidden;
  resize: both;
}

.quotation-status-list-wrap {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
}

.quotation-status-list-wrap table {
  min-width: 1280px;
  table-layout: auto;
}

.quotation-status-list-wrap-detailed table {
  min-width: 2400px;
}

.quotation-status-list-wrap-detailed th:nth-child(1),
.quotation-status-list-wrap-detailed td:nth-child(1) {
  position: sticky;
  left: 0;
  z-index: 3;
  min-width: 110px;
  background: #ffffff;
}

.quotation-status-list-wrap-detailed th:nth-child(2),
.quotation-status-list-wrap-detailed td:nth-child(2) {
  position: sticky;
  left: 110px;
  z-index: 3;
  min-width: 210px;
  background: #ffffff;
}

.quotation-status-list-wrap-detailed th:nth-child(3),
.quotation-status-list-wrap-detailed td:nth-child(3) {
  position: sticky;
  left: 320px;
  z-index: 3;
  min-width: 360px;
  background: #ffffff;
}

.quotation-status-list-wrap-detailed th:nth-child(-n+3) {
  z-index: 4;
}

.quotation-status-list-wrap-detailed tbody tr:nth-child(even) td:nth-child(-n+3),
.quotation-status-list-wrap-detailed tfoot td:nth-child(-n+3) {
  background: #f8fafc;
}

.quotation-status-list-wrap th,
.quotation-status-list-wrap td {
  white-space: nowrap;
}

.crm-company-detail-wrap {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.crm-company-detail-record h3 {
  margin: 0 0 12px;
  font-size: var(--text-lg);
  font-weight: 900;
}

.crm-company-detail-grid {
  border: 2px dashed #facc15;
  border-radius: 8px;
  padding: 12px;
}

.crm-company-detail-grid .team-leader-weekly-detail-row input,
.crm-company-detail-grid .team-leader-weekly-detail-row textarea {
  background: #f8fafc;
}

.crm-company-detail-grid .weekly-main-progress-row textarea {
  min-height: 150px;
}

.crm-company-detail-grid .customer-info-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.crm-company-detail-grid .owner-info-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.crm-company-detail-grid .crm-detail-triple-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 14px;
}

.crm-company-detail-grid .crm-detail-triple-row .team-leader-weekly-detail-row,
.crm-company-detail-grid .crm-detail-memo-row {
  grid-template-columns: minmax(96px, max-content) minmax(0, 1fr);
}

.crm-company-detail-grid .crm-detail-wide-field {
  grid-column: span 2;
}

.crm-company-detail-grid .crm-detail-full-field {
  grid-column: 1 / -1;
}

.crm-company-detail-grid .crm-detail-wide-field input,
.crm-company-detail-grid .crm-detail-full-field textarea {
  min-width: 100%;
}

.crm-company-detail-grid .crm-detail-compact-textarea textarea {
  min-height: 42px;
  height: 42px;
  resize: vertical;
  line-height: 1.35;
}

.crm-company-detail-separator {
  width: 100%;
  border: 0;
  border-top: 1px solid var(--border);
}

.quotation-status-list-wrap .text-left {
  min-width: 300px;
  max-width: 520px;
  white-space: normal;
  text-align: left;
}

.quotation-status-list-wrap .amount-cell {
  min-width: 110px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.quotation-status-list-wrap .excel-text-cell {
  min-width: 120px;
}

.quotation-status-list-wrap .excel-wide-cell {
  min-width: 260px;
}

.quotation-chart-counts > span > i,
.quotation-status-list-button > i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.team-weekly-linked-customer {
  color: #0b63c7 !important;
  font-weight: 900 !important;
}

#commonContactRows td.common-contact-sales-exact {
  color: #0b63c7 !important;
  font-weight: 900 !important;
}

#commonContactRows td.common-contact-sales-partial {
  color: #dc2626 !important;
  font-weight: 900 !important;
}

#teamLeaderWeeklyReportRows td.team-weekly-linked-customer {
  color: #0b63c7 !important;
  font-weight: 900 !important;
}

#teamLeaderWeeklyReportRows td.team-weekly-missing-sales-report {
  color: #dc2626 !important;
  font-weight: 900 !important;
}

#salesTeamWeeklyReportRows td.team-weekly-linked-customer {
  color: #0b63c7 !important;
  font-weight: 900 !important;
}

#salesTeamWeeklyReportRows td.team-weekly-missing-sales-report {
  color: #dc2626 !important;
  font-weight: 900 !important;
}

#salesTeamWeeklyReportRows .team-weekly-linked-customer {
  color: #0b63c7 !important;
  font-weight: 900 !important;
}

#salesTeamWeeklyReportRows .team-weekly-missing-sales-report {
  color: #dc2626 !important;
  font-weight: 900 !important;
}

.won-dot {
  background: var(--success);
}

.progress-dot {
  background: var(--warn);
}

.lost-dot {
  background: var(--danger);
}

.helper-text {
  margin: 0;
  color: var(--muted);
  font-size: var(--text-sm);
}

@media (max-width: 720px) {
  #employeeForm .employee-form-grid,
  #userForm .admin-user-form-grid {
    flex-wrap: wrap;
  }

  #employeeForm .employee-form-grid > label,
  #employeeForm .employee-form-grid > button,
  #userForm .admin-user-form-grid > label,
  #userForm .admin-user-form-grid > .select-with-action,
  #userForm .admin-user-form-grid > .account-details {
    flex-basis: 100%;
  }
}

@media (max-width: 920px) {
  .smtp-settings-grid {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }

  .quotation-chart-toolbar,
  .sales-sub-chart-heading,
  .quotation-chart-filters {
    grid-template-columns: 1fr;
  }

  .quotation-month-filter {
    grid-template-columns: repeat(auto-fit, minmax(58px, 1fr));
  }

  #quotationStatusChartPanel .quotation-chart-grid {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    grid-auto-flow: row;
  }

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

  .quotation-upload-panel {
    grid-template-columns: 1fr;
  }

  .quotation-upload-panel .panel-header {
    display: flex;
  }

  .quotation-upload-panel .panel-header .primary-button,
  .quotation-upload-grid {
    grid-column: auto;
  }

  .quotation-upload-grid label {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .smtp-settings-grid {
    grid-template-columns: 1fr;
  }

  .sales-chart-grid {
    grid-template-columns: 1fr;
  }
}
