:root {
  color-scheme: light;
  --bg: #eef3f7;
  --bg-2: #f7f9fb;
  --glass: rgba(255, 255, 255, 0.72);
  --glass-strong: rgba(255, 255, 255, 0.88);
  --line: rgba(112, 129, 151, 0.24);
  --line-strong: rgba(73, 91, 116, 0.28);
  --text: #152133;
  --muted: #607089;
  --blue: #2468d8;
  --green: #12845f;
  --amber: #a86709;
  --red: #c53535;
  --cyan: #0b7f92;
  --shadow: 0 24px 70px rgba(29, 47, 70, 0.12);
  --soft-shadow: 0 10px 28px rgba(29, 47, 70, 0.08);
}

/* Login screen: keep the sales-web login surface structurally identical. */
.login-overlay {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1e293b, #0f172a) !important;
  padding: 20px;
}

.login-box {
  display: block;
  background: #ffffff !important;
  width: 100%;
  max-width: 360px;
  border: 0 !important;
  border-radius: 16px !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35) !important;
  padding: 32px 26px !important;
}

.login-title {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
}

.login-label {
  display: block;
  font-size: 12px;
  color: #475569;
  margin: 14px 0 6px;
  font-weight: 600;
}

.login-text {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  font-size: 15px;
  background: #ffffff;
  color: #0f172a;
  box-sizing: border-box;
}

.login-text:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.login-text::placeholder {
  color: #94a3b8;
}

.login-remember {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 16px 2px 0;
  font-size: 13px;
  color: #475569;
  cursor: pointer;
}

.login-remember input {
  width: 15px;
  height: 15px;
  accent-color: #2563eb;
  margin: 0;
}

.login-btn {
  width: 100%;
  margin-top: 20px !important;
  padding: 12px !important;
  min-height: 0 !important;
  border: 0 !important;
  border-radius: 9px !important;
  background: #2563eb !important;
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.login-btn:hover:not(:disabled) {
  background: #1d4ed8 !important;
}

.login-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.login-msg {
  margin-top: 14px;
  font-size: 13px;
  color: #dc2626;
  min-height: 18px;
  line-height: 1.5;
}

.auth-summary {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-height: 34px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.logout-btn {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  font-size: 13px;
  font-weight: 750;
}

.logout-btn:hover {
  border-color: var(--blue);
  color: var(--blue);
}

@media (max-width: 480px) {
  .login-overlay {
    padding: 14px;
    align-items: flex-start;
  }

  .login-box {
    max-width: 100%;
    margin-top: 6vh;
    padding: 26px 20px !important;
  }

  .login-text {
    font-size: 16px;
  }

  .login-btn {
    padding: 14px !important;
  }
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 360px;
  margin: 0;
  background:
    linear-gradient(140deg, rgba(233, 240, 246, 0.96), rgba(248, 250, 252, 0.98) 42%, rgba(236, 243, 245, 0.96)),
    var(--bg);
  color: var(--text);
  font-family: "Segoe UI", "Malgun Gothic", Arial, sans-serif;
  letter-spacing: 0;
}

.vendor-portal [data-tab="registration"],
.vendor-portal [data-tab="policy"],
.vendor-portal [data-tab="issue"],
.vendor-portal .vendor-admin-panel {
  display: none !important;
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.app-frame {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
  padding: 16px;
  gap: 16px;
}

.sidebar {
  position: sticky;
  top: 16px;
  height: calc(100vh - 32px);
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(247, 250, 252, 0.74);
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(22px) saturate(150%);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #162033;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

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

.brand-block strong {
  font-size: 15px;
}

.brand-block span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

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

.nav-item {
  min-height: 38px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 760;
  text-align: left;
}

.nav-item.active,
.nav-item:hover {
  border-color: var(--line);
  background: var(--glass-strong);
  color: var(--text);
}

.side-status {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
}

.side-status span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.side-status strong {
  font-size: 14px;
  line-height: 1.35;
}

.workspace {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 14px;
  padding-bottom: 32px;
}

.workspace-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.64);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px) saturate(160%);
}

.headline {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 820;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  letter-spacing: 0;
}

h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.04;
  font-weight: 820;
  overflow-wrap: anywhere;
}

h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
}

h3 {
  margin: 0 0 9px;
  font-size: 14px;
  line-height: 1.3;
}

.lead {
  max-width: 820px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 650;
  line-height: 1.55;
  overflow-wrap: anywhere;
  word-break: break-all;
}

.head-actions {
  display: grid;
  justify-items: end;
  gap: 10px;
  min-width: 180px;
}

.query-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: var(--soft-shadow);
}

.query-panel h2 {
  font-size: 17px;
}

.query-controls {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.date-control {
  width: min(220px, 100%);
}

.date-control input {
  width: 100%;
}

.roster-vendor-control {
  min-width: 180px;
}

.head-button-row {
  justify-content: flex-end;
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: min(360px, 100%);
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(226, 233, 242, 0.72);
}

.segment {
  min-height: 36px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 780;
}

.segment.active {
  background: rgba(255, 255, 255, 0.95);
  color: var(--blue);
  box-shadow: 0 3px 12px rgba(29, 47, 70, 0.12);
}

.sync-pill,
.status-chip,
.tag,
.summary-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.75);
  color: var(--muted);
  white-space: nowrap;
  font-weight: 780;
}

.alert-panel {
  padding: 12px 14px;
  border: 1px solid rgba(197, 53, 53, 0.28);
  border-radius: 8px;
  background: rgba(197, 53, 53, 0.08);
  color: var(--red);
  font-size: 13px;
  font-weight: 760;
  line-height: 1.5;
}

.sync-pill,
.status-chip {
  min-height: 32px;
  padding: 0 12px;
  font-size: 13px;
}

.tag,
.summary-chip {
  min-height: 26px;
  padding: 0 8px;
  font-size: 12px;
  line-height: 1;
}

.ok,
.good {
  border-color: rgba(18, 132, 95, 0.25);
  background: rgba(18, 132, 95, 0.1);
  color: var(--green);
}

.warn {
  border-color: rgba(168, 103, 9, 0.28);
  background: rgba(168, 103, 9, 0.1);
  color: var(--amber);
}

.danger {
  border-color: rgba(197, 53, 53, 0.28);
  background: rgba(197, 53, 53, 0.1);
  color: var(--red);
}

.neutral {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.68);
  color: var(--muted);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(150px, 1fr));
  gap: 10px;
}

.metric-card {
  min-height: 112px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--glass);
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(18px) saturate(150%);
}

.metric-card p,
.metric-card span {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
  line-height: 1.35;
}

.metric-card strong {
  display: block;
  margin: 8px 0 9px;
  font-size: 34px;
  line-height: 1;
}

.metric-card.good strong {
  color: var(--green);
}

.metric-card.warn strong {
  color: var(--amber);
}

.metric-card.danger strong,
.metric-card.risk strong {
  color: var(--red);
}

.dashboard-grid,
.split-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(360px, 0.8fr);
  gap: 14px;
}

.vendor-dashboard-grid,
.vendor-ops-grid,
.registration-grid {
  display: grid;
  gap: 14px;
}

.vendor-dashboard-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 14px;
}

.vendor-ops-grid {
  grid-template-columns: 1fr;
}

.registration-grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.8fr);
}

.roster-workspace {
  display: grid;
  grid-template-columns: minmax(380px, 0.85fr) minmax(420px, 1fr) minmax(340px, 0.7fr);
  gap: 14px;
  align-items: start;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

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

.panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--glass);
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(20px) saturate(150%);
  overflow: hidden;
}

.section-gap {
  margin-top: 14px;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.48);
}

.panel-head.compact {
  align-items: center;
}

.filter-bar,
.button-row {
  display: flex;
  align-items: end;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

label {
  display: grid;
  gap: 5px;
}

label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

input,
select,
textarea {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--text);
  outline: none;
}

input,
select {
  min-height: 34px;
  padding: 0 10px;
}

.search input {
  width: 190px;
}

button.primary,
button.ghost {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 790;
}

button.primary {
  border-color: rgba(36, 104, 216, 0.34);
  background: var(--blue);
  color: #fff;
}

button.ghost {
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
}

.file-input {
  display: none;
}

.roster-help,
.message-line {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

.message-line {
  min-height: 24px;
  padding: 4px 0 0;
  color: var(--green);
}

.message-line.error {
  color: var(--red);
}

.vendor-card {
  min-height: 286px;
  padding: 16px;
}

.vendor-card-head,
.vendor-card-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.vendor-card-actions {
  align-items: center;
  justify-content: flex-start;
  margin-top: 14px;
  flex-wrap: wrap;
}

.vendor-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.vendor-stat {
  min-height: 74px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
}

.vendor-stat span,
.vendor-stat strong {
  display: block;
}

.vendor-stat span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
  line-height: 1.35;
}

.vendor-stat strong {
  margin-top: 7px;
  font-size: 24px;
  line-height: 1;
}

.vendor-stat.good strong {
  color: var(--green);
}

.vendor-stat.warn strong {
  color: var(--amber);
}

.vendor-name-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 72px;
  margin-top: 14px;
  overflow: hidden;
}

.vendor-name-strip span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.65);
  color: var(--text);
  font-size: 12px;
  font-weight: 780;
}

.target-list,
.fingerprint-box,
.registration-form {
  display: grid;
  gap: 10px;
  padding: 14px 16px 16px;
}

.target-card {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
}

.target-card h3,
.fingerprint-box h3 {
  margin: 0;
  font-size: 15px;
}

.target-card p,
.fingerprint-box p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
  line-height: 1.45;
}

.target-card strong {
  font-size: 13px;
  line-height: 1.45;
}

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

.target-check-list span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

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

.registration-form .wide,
.registration-form .target-checks,
.registration-form button,
.registration-form .message-line {
  grid-column: 1 / -1;
}

textarea {
  min-height: 88px;
  padding: 10px;
  resize: vertical;
  line-height: 1.45;
}

.target-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.check-input {
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
}

.check-input input {
  min-height: 0;
}

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

.roster-panel {
  min-height: 620px;
}

.directory-panel {
  min-height: 620px;
}

.directory-message {
  padding: 8px 16px 0;
}

.directory-access-policy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 16px;
  padding: 10px 12px;
  border-left: 3px solid var(--blue);
  border-radius: 4px;
  background: rgba(239, 246, 255, 0.88);
}

.directory-access-policy div {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.directory-access-policy strong,
.directory-access-policy span,
.directory-access-policy small {
  line-height: 1.45;
}

.directory-access-policy strong {
  font-size: 13px;
}

.directory-access-policy span {
  color: var(--blue);
  font-size: 14px;
  font-weight: 820;
}

.directory-access-policy small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-align: right;
}

.directory-table {
  min-width: 1080px;
}

.directory-table th:nth-child(2),
.directory-table td:nth-child(2) {
  width: 170px;
}

.directory-table th:nth-child(3),
.directory-table td:nth-child(3) {
  width: 140px;
}

.directory-table th:nth-child(4),
.directory-table td:nth-child(4) {
  width: 260px;
}

.directory-table th:nth-child(5),
.directory-table td:nth-child(5) {
  width: 180px;
}

.directory-table th:nth-child(6),
.directory-table td:nth-child(6) {
  width: 130px;
}

.directory-reader-rights {
  min-width: 0;
}

.directory-reader-names {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.directory-person strong,
.directory-person span {
  display: block;
}

.directory-person span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.directory-assignment-control {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto;
  gap: 6px;
  align-items: center;
}

.directory-assignment-control select {
  min-width: 0;
  width: 100%;
}

.roster-board {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  min-height: 560px;
}

.roster-editor,
.roster-list-zone,
.roster-compare-zone {
  min-width: 0;
  padding: 14px 16px 16px;
}

.roster-editor,
.roster-list-zone {
  border-bottom: 1px solid var(--line);
}

.zone-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 32px;
  margin-bottom: 10px;
}

.zone-head h3,
.roster-compare-zone h4 {
  margin: 0;
  color: var(--text);
  line-height: 1.35;
}

.zone-head h3 {
  font-size: 16px;
}

.roster-policy-notice {
  display: grid;
  gap: 3px;
  margin-bottom: 10px;
  padding: 9px 11px;
  border-left: 3px solid var(--amber);
  border-radius: 4px;
  background: rgba(255, 247, 237, 0.82);
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
}

.roster-policy-notice strong {
  font-size: 13px;
}

.roster-policy-notice span {
  color: var(--muted);
  font-weight: 700;
}

.roster-compare-zone h4 {
  margin-bottom: 8px;
  font-size: 13px;
}

.roster-actions {
  display: flex;
  gap: 8px;
  margin: 10px 0 8px;
}

.roster-table-wrap {
  max-height: 560px;
}

.roster-input-table-wrap,
.comparison-table-wrap {
  max-height: 360px;
}

.roster-table-wrap table {
  min-width: 360px;
}

.roster-input-table-wrap table {
  min-width: 760px;
}

.comparison-table-wrap table {
  min-width: 780px;
}

.roster-input-table-wrap input {
  width: 100%;
}

.roster-name-cell {
  display: grid;
  gap: 6px;
}

.roster-suggestion-list {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.roster-suggestion-note {
  color: var(--amber);
  font-size: 12px;
  font-weight: 760;
  line-height: 1.35;
}

.person-candidate {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  max-width: 100%;
  padding: 3px 7px;
  border: 1px solid rgba(25, 121, 87, 0.22);
  border-radius: 8px;
  background: rgba(236, 253, 245, 0.82);
  color: var(--green);
  font-size: 12px;
  font-weight: 820;
}

.person-candidate span {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.roster-table-wrap th:nth-child(3),
.roster-table-wrap th:nth-child(4),
.roster-table-wrap td:nth-child(3),
.roster-table-wrap td:nth-child(4) {
  width: 72px;
}

.table-wrap {
  overflow: auto;
  max-height: 560px;
}

.table-wrap.tall {
  max-height: 720px;
}

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

.vendor-roster-table {
  min-width: 760px;
}

th,
td {
  padding: 12px 13px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  font-size: 13px;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(247, 250, 252, 0.94);
  color: var(--muted);
  font-size: 12px;
  font-weight: 820;
}

.worker-row {
  cursor: pointer;
}

.worker-row:hover,
.worker-row.selected {
  background: rgba(36, 104, 216, 0.06);
}

.person-cell strong,
.person-cell span {
  display: block;
}

.person-cell span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.empty-cell,
.empty-row {
  padding: 16px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.detail-panel {
  align-self: start;
}

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

.detail-item {
  min-height: 66px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
}

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

.detail-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.detail-item strong {
  margin-top: 7px;
  font-size: 14px;
  line-height: 1.35;
  word-break: keep-all;
}

.timeline {
  display: grid;
  gap: 8px;
  padding: 0 16px 16px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 54px 64px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.52);
}

.timeline-item > span:first-child {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.timeline-item strong {
  min-width: 0;
  font-size: 13px;
  line-height: 1.35;
}

.roster-input {
  width: 100%;
  min-height: 214px;
  padding: 12px;
  resize: vertical;
  line-height: 1.5;
  font-family: inherit;
}

.compare-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 10px;
}

.compare-grid,
.two-lists {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 0 16px 16px;
}

.roster-compare-zone .compare-grid {
  grid-template-columns: 1fr;
  padding: 0;
}

.compare-grid.single {
  grid-template-columns: 1fr;
  padding-top: 14px;
  max-height: 700px;
  overflow: auto;
}

.issue-panel .two-lists {
  padding-top: 14px;
}

.compact-list,
.check-list,
.policy-list,
.scenario-cards {
  display: grid;
  gap: 8px;
}

.source-counts {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.issue-list {
  display: grid;
  gap: 8px;
  padding: 14px 16px 16px;
}

.issue-row {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) max-content;
  gap: 10px;
  align-items: center;
  min-height: 56px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
}

.issue-row strong,
.issue-row small {
  display: block;
}

.issue-row strong {
  font-size: 13px;
  line-height: 1.35;
}

.issue-row small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 680;
  line-height: 1.35;
}

.compact-row {
  width: 100%;
  min-height: 48px;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
  text-align: left;
}

.mini-action {
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  font-size: 12px;
  font-weight: 780;
}

.mini-action.danger-text {
  color: var(--red);
}

.compact-row span:last-child {
  min-width: 0;
}

.compact-row strong,
.compact-row small {
  display: block;
}

.compact-row strong {
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
}

.compact-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 680;
  line-height: 1.35;
}

.divider {
  height: 1px;
  margin: 0 16px 14px;
  background: var(--line);
}

.issue-panel > h3 {
  padding: 0 16px;
}

#mealWithoutEntryRows {
  padding: 0 16px 16px;
}

.scenario-panel,
.checklist-panel {
  min-height: 320px;
}

.scenario-cards,
.policy-list,
.check-list {
  padding: 14px 16px 16px;
}

.scenario-card,
.policy-row,
.check-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
}

.scenario-card {
  display: grid;
  gap: 12px;
  padding: 12px;
}

.scenario-card.active {
  border-color: rgba(36, 104, 216, 0.32);
  background: rgba(36, 104, 216, 0.07);
}

.scenario-card h3 {
  margin: 10px 0 6px;
  font-size: 15px;
}

.scenario-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 680;
  line-height: 1.5;
}

.scenario-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.55;
}

.policy-row {
  display: grid;
  gap: 6px;
  padding: 11px;
}

.policy-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
}

.policy-row strong {
  font-size: 13px;
  line-height: 1.45;
}

.check-row {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 8px;
  padding: 10px;
  align-items: start;
}

.check-row span {
  width: 8px;
  height: 8px;
  margin-top: 5px;
  border-radius: 999px;
  background: var(--cyan);
}

.check-row strong {
  font-size: 13px;
  line-height: 1.45;
}

@media (max-width: 1380px) {
  .metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dashboard-grid,
  .split-grid,
  .vendor-dashboard-grid,
  .vendor-ops-grid,
  .registration-grid,
  .policy-grid {
    grid-template-columns: 1fr;
  }
}

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

@media (max-width: 920px) {
  .app-frame {
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .workspace-head {
    display: grid;
  }

  .head-actions {
    justify-items: stretch;
    min-width: 0;
  }

  .query-panel {
    display: grid;
  }

  .query-controls {
    justify-content: stretch;
  }

  .date-control {
    width: 100%;
  }

  .roster-vendor-control {
    width: 100%;
  }

  .metric-grid,
  .compare-grid,
  .two-lists,
  .vendor-stat-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .roster-board {
    grid-template-columns: 1fr;
  }

  .filter-bar,
  .button-row {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .workspace-head,
  .panel-head {
    padding: 13px;
  }

  .roster-panel > .panel-head {
    display: grid;
  }

  .directory-panel > .panel-head {
    display: grid;
  }

  .directory-panel > .panel-head .directory-filter-bar {
    display: grid;
    width: 100%;
    justify-content: stretch;
  }

  .directory-panel > .panel-head .directory-filter-bar .status-chip {
    justify-self: start;
  }

  .directory-panel > .panel-head .directory-filter-bar label,
  .directory-panel > .panel-head .directory-filter-bar input,
  .directory-panel > .panel-head .directory-filter-bar select {
    width: 100%;
  }

  .directory-access-policy {
    display: grid;
    margin: 0 13px;
  }

  .directory-access-policy div {
    display: grid;
    gap: 2px;
  }

  .directory-access-policy small {
    text-align: left;
  }

  .roster-panel > .panel-head .button-row {
    justify-content: stretch;
  }

  h1 {
    font-size: 28px;
    line-height: 1.12;
  }

  .lead {
    font-size: 14px;
  }

  .search input,
  .filter-bar,
  .button-row {
    width: 100%;
  }

  .filter-bar label,
  .button-row button,
  .file-input {
    flex: 1 1 100%;
  }

  .registration-form {
    grid-template-columns: 1fr;
  }

  .roster-input-table-wrap,
  .comparison-table-wrap,
  .directory-table-wrap {
    overflow: visible;
    max-height: none;
  }

  .roster-input-table-wrap table,
  .comparison-table-wrap table,
  .roster-input-table-wrap thead,
  .comparison-table-wrap thead,
  .roster-input-table-wrap tbody,
  .comparison-table-wrap tbody,
  .roster-input-table-wrap tr,
  .comparison-table-wrap tr,
  .roster-input-table-wrap td,
  .comparison-table-wrap td {
    display: block;
    min-width: 0;
    width: 100%;
  }

  .roster-input-table-wrap thead,
  .comparison-table-wrap thead {
    display: none;
  }

  .roster-input-table-wrap tr,
  .comparison-table-wrap tr {
    margin-bottom: 10px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.62);
  }

  .roster-input-table-wrap td,
  .comparison-table-wrap td {
    padding: 6px 0;
    border-bottom: 0;
  }

  .roster-input-table-wrap td::before,
  .comparison-table-wrap td::before {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 820;
  }

  .roster-input-table-wrap td:nth-child(1)::before {
    content: "이름";
  }

  .roster-input-table-wrap td:nth-child(2)::before {
    content: "휴대폰 번호";
  }

  .roster-input-table-wrap td:nth-child(3)::before {
    content: "입력 상태";
  }

  .roster-input-table-wrap td:nth-child(4)::before {
    content: "처리";
  }

  .vendor-roster-table,
  .vendor-roster-table thead,
  .vendor-roster-table tbody,
  .vendor-roster-table tr,
  .vendor-roster-table td {
    display: block;
    min-width: 0;
    width: 100%;
  }

  .vendor-roster-table thead {
    display: none;
  }

  .vendor-roster-table tr {
    margin-bottom: 10px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.62);
  }

  .vendor-roster-table td {
    padding: 6px 0;
    border-bottom: 0;
  }

  .vendor-roster-table td::before {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 820;
  }

  .vendor-roster-table td:nth-child(1)::before {
    content: "업체";
  }

  .vendor-roster-table td:nth-child(2)::before {
    content: "제출 인원";
  }

  .vendor-roster-table td:nth-child(3)::before {
    content: "세콤 등록";
  }

  .vendor-roster-table td:nth-child(4)::before {
    content: "현장 기록";
  }

  .vendor-roster-table td:nth-child(5)::before {
    content: "식사";
  }

  .vendor-roster-table td:nth-child(6)::before {
    content: "제출 상태";
  }

  .comparison-table-wrap td:nth-child(1)::before {
    content: "인원";
  }

  .comparison-table-wrap td:nth-child(2)::before {
    content: "업체 명단";
  }

  .comparison-table-wrap td:nth-child(3)::before {
    content: "세콤 현장";
  }

  .comparison-table-wrap td:nth-child(4)::before {
    content: "식사";
  }

  .comparison-table-wrap td:nth-child(5)::before {
    content: "결과";
  }

  .directory-table,
  .directory-table thead,
  .directory-table tbody,
  .directory-table tr,
  .directory-table td {
    display: block;
    min-width: 0;
    width: 100%;
  }

  .directory-table thead {
    display: none;
  }

  .directory-table tr {
    margin-bottom: 10px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.62);
  }

  .directory-table td {
    padding: 6px 0;
    border-bottom: 0;
  }

  .directory-table td::before {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 820;
  }

  .directory-table td:nth-child(1)::before {
    content: "인원";
  }

  .directory-table td:nth-child(2)::before {
    content: "휴대폰 번호";
  }

  .directory-table td:nth-child(3)::before {
    content: "세콤 사번";
  }

  .directory-table td:nth-child(4)::before {
    content: "소속 업체";
  }

  .directory-table td:nth-child(5)::before {
    content: "현재 출입 권한";
  }

  .directory-table td:nth-child(6)::before {
    content: "상태";
  }

  .directory-assignment-control {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}
