:root {
  /* 화이트 베이스 */
  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-hover: #eef2f8;
  --border: #dde3ec;
  --text: #1c2434;
  --muted: #5a6578;
  /* 남색 포인트 */
  --accent: #1e3a6e;
  --accent-hover: #152a52;
  --accent-soft: rgba(30, 58, 110, 0.1);
  --accent-ring: rgba(30, 58, 110, 0.22);
  --success: #0d7a4f;
  --warning: #b45309;
  --danger: #c53030;
  --sidebar-w: 260px;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(28, 36, 52, 0.08);
  --shadow-card: 0 1px 3px rgba(28, 36, 52, 0.06);
  --font: "Pretendard", "Segoe UI", system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  height: 100%;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

/* 관리자·운수 레이아웃: 본문만 스크롤, 좌측 네비는 뷰포트 높이 고정·스크롤 없음 */
body:not(.login-page) {
  overflow: hidden;
}

body.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1.5rem;
  background: #e8e8e8;
}

.login-card {
  width: 100%;
  max-width: 420px;
  min-height: min(32rem, calc((100dvh - 3rem) * 2 / 3));
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2.5rem 2rem 2rem;
  box-shadow: 0 4px 24px rgba(28, 36, 52, 0.08);
  box-sizing: border-box;
}

.login-card .login-logo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  text-align: center;
  margin-bottom: 2.75rem;
}

.login-card .login-logo-img {
  max-width: min(300px, 100%);
  height: auto;
  display: block;
  margin: 0 auto;
  object-fit: contain;
}

.login-card-title {
  margin: 0 0 1.25rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: #1a1d24;
  text-align: left;
  letter-spacing: -0.02em;
}

.login-card .login-alert {
  margin-bottom: 1rem;
}

.login-form .login-field {
  width: 100%;
  margin-bottom: 0.8em;
  padding: 1.3rem;
  font-size: 0.95rem;
  color: var(--text);
  background: #f0f2f5;
  border: 1px solid transparent;
  border-radius: 8px;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.login-form .login-field::placeholder {
  color: #7a828d;
}

.login-form .login-field:focus {
  outline: none;
  background: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-ring);
}

.login-form .login-submit-btn {
  width: 100%;
  margin-top: 1.2rem;
  margin-bottom: 0;
  padding: 0.85rem 1rem;
  font-size: 1.3rem;
  font-weight: 700;
  border-radius: 8px;
}

.login-find-wrap {
  margin: 1.1rem 0 0;
  text-align: center;
}

.login-find-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: #5c6570;
  text-decoration: none;
}

.login-find-link:hover {
  color: var(--accent);
  text-decoration: underline;
}

.login-copy {
  margin: 0;
  margin-top: auto;
  padding-top: 1.75rem;
  text-align: center;
  font-size: 0.7rem;
  line-height: 1.4;
  color: #9aa3af;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-control {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 1rem;
  margin-bottom: 1rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s, border-color 0.15s, color 0.15s;
  text-decoration: none;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  width: 100%;
  padding: 0.75rem;
  margin-top: 0.5rem;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

/* 표·인라인 액션: primary도 짧은 칩 형태 (전역 width:100%는 로그인 등 폼용) */
.data-table .btn-primary {
  width: auto;
  margin-top: 0;
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--surface-hover);
  border-color: #c5cdd9;
}

.btn-sm {
  padding: 0.35rem 0.65rem;
  font-size: 0.85rem;
}

.btn-danger {
  background: rgba(197, 48, 48, 0.08);
  color: var(--danger);
  border: 1px solid rgba(197, 48, 48, 0.35);
}

.btn-danger:hover {
  background: rgba(197, 48, 48, 0.14);
}

.alert {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.alert-danger {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.alert-success {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}

.app-shell {
  display: flex;
  height: 100%;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
}

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  height: 100%;
  max-height: 100%;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 1.25rem 0;
  display: flex;
  flex-direction: column;
  box-shadow: 2px 0 12px rgba(28, 36, 52, 0.04);
  overflow: hidden;
}

.sidebar-brand {
  padding: 0 1.25rem 1.25rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.75rem;
}

.sidebar-brand-logo-link {
  display: inline-block;
  line-height: 0;
  text-decoration: none;
  margin-bottom: 0.35rem;
}

.sidebar-brand-logo-link:focus-visible {
  outline: 2px solid var(--accent-ring);
  outline-offset: 3px;
  border-radius: 6px;
}

.sidebar-brand-logo {
  display: block;
  height: auto;
  max-height: 3rem;
  width: auto;
  max-width: 14rem;
  object-fit: contain;
}

.sidebar-brand span {
  font-size: 0.8rem;
  color: var(--muted);
}

.sidebar-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.sidebar-nav a {
  display: block;
  padding: 0.65rem 1.25rem;
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}

.sidebar-nav a:hover {
  color: var(--text);
  background: var(--surface-hover);
}

.sidebar-nav a.active {
  color: var(--accent);
  background: var(--accent-soft);
  border-left-color: var(--accent);
  font-weight: 600;
}

.sidebar-footer {
  margin-top: auto;
  padding: 1rem 1.25rem 0;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sidebar-user {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.45;
  margin-bottom: 0.15rem;
}

.sidebar-user-role {
  font-weight: 600;
  color: var(--text);
  font-size: 0.8rem;
}

.sidebar-user-company {
  margin-top: 0.2rem;
  font-weight: 600;
  color: var(--text);
  font-size: 0.82rem;
  word-break: break-word;
}

.sidebar-user-id {
  margin-top: 0.15rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.sidebar-footer-btn {
  width: 100%;
  justify-content: center;
}

.main {
  flex: 1 1 0;
  min-width: 0;
  min-height: 0;
  padding: 1.5rem 2rem;
  overflow-x: auto;
  overflow-y: auto;
  background: var(--bg);
  -webkit-overflow-scrolling: touch;
}

.page-title {
  margin: 0 0 0.25rem;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.page-desc {
  color: var(--muted);
  margin: 0 0 1.5rem;
  font-size: 0.95rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-card);
}

.card--content-limit {
  box-sizing: border-box;
  max-width: 1000px;
  width: 100%;
}

/* /carrier/scores 공공관리제 평가점수 카드만 본문 전폭 */
.card--content-limit--scores {
  max-width: none;
}

.table-wrap {
  overflow-x: auto;
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.data-table th,
.data-table td {
  padding: 0.65rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  word-break: break-word;
  overflow-wrap: break-word;
  white-space: normal;
}

.data-table th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: #f8fafc;
}

.data-table th:nth-child(1),
.data-table td:nth-child(1),
.data-table th:nth-child(2),
.data-table td:nth-child(2),
.data-table th:nth-child(3),
.data-table td:nth-child(3) {
  min-width: 90px;
}

.data-table tr:hover td {
  background: #f8fafc;
}

/* 운수 평가 이의신청 — 내 글 목록 (열 너비·액션 정렬) */
.objections-list-table {
  table-layout: fixed;
  width: 100%;
}

.objections-list-table th:nth-child(1),
.objections-list-table td:nth-child(1) {
  width: 11rem;
}

.objections-list-table th:nth-child(2),
.objections-list-table td:nth-child(2) {
  min-width: 0;
}

.objections-list-table th:nth-child(3),
.objections-list-table td:nth-child(3) {
  width: 7.5rem;
  white-space: nowrap;
  text-align: center;
}

.objections-list-table th:nth-child(4),
.objections-list-table td:nth-child(4) {
  width: 10rem;
  white-space: nowrap;
}

.objections-list-table th:nth-child(5),
.objections-list-table td:nth-child(5) {
  width: 11.5rem;
  white-space: nowrap;
  vertical-align: middle;
  text-align: right;
}

.objections-list-table .objections-row-actions {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 0.35rem;
  align-items: center;
  justify-content: flex-end;
  max-width: 100%;
}

.objections-list-table .objections-row-actions form {
  display: inline;
  margin: 0;
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-pending {
  background: #fffbeb;
  color: var(--warning);
  border: 1px solid #fde68a;
}

.badge-answered {
  background: #ecfdf5;
  color: var(--success);
  border: 1px solid #a7f3d0;
}

.badge-closed {
  background: #f1f5f9;
  color: var(--muted);
  border: 1px solid var(--border);
}

.row-flex {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
}

.row-flex .field {
  flex: 1;
  min-width: 160px;
}

/* 목록 상단 검색: 입력 + 버튼 한 줄 정렬 */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.filter-bar .field {
  flex: 1 1 200px;
  min-width: 0;
  margin: 0;
}

.filter-bar .form-control {
  margin-bottom: 0;
}

.filter-bar__actions {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.5rem;
  flex: 0 0 auto;
}

.filter-bar__actions .btn {
  margin: 0;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .filter-bar__actions {
    flex: 1 1 100%;
    justify-content: flex-start;
  }
}

.content-html {
  line-height: 1.65;
  color: var(--text);
}

.content-html p {
  margin: 0 0 0.75rem;
}

.content-html img {
  display: block;
  max-width: 100%;
  height: auto;
}

.content-html p:last-child {
  margin-bottom: 0;
}

.content-html .guide-busfine-btns {
  margin: 1.1rem 0 0;
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.5rem 0.65rem;
}

.content-html .guide-busfine-btns .btn-primary {
  width: 100%;
  max-width: 300px;
  margin-top: 0;
}

@media (max-width: 500px) {
  .content-html .guide-busfine-btns .btn-primary{max-width: none;}
}

a {
  color: var(--accent);
}

a:hover {
  color: var(--accent-hover);
}

.pagination-meta {
  margin: 0 0 0.75rem;
  font-size: 0.875rem;
  color: var(--muted);
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.pagination-pages {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.pagination-pages a,
.pagination-current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.5rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

.pagination-pages a {
  color: var(--accent);
  border: 1px solid var(--border);
  background: var(--surface);
}

.pagination-pages a:hover {
  background: var(--surface-hover);
  border-color: #c5cdd9;
}

.pagination-current {
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
}

.pagination-disabled {
  font-size: 0.85rem;
  color: var(--muted);
  opacity: 0.65;
  user-select: none;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.2s, visibility 0.2s;
}

.modal.is-open {
  visibility: visible;
  opacity: 1;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(28, 36, 52, 0.45);
  cursor: pointer;
}

.modal-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 920px;
  max-height: min(90vh, 900px);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.modal-header h3 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--accent);
}

.modal-header .sub {
  margin: 0.25rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.modal-close {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: 8px;
  background: var(--surface-hover);
  color: var(--text);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.modal-close:hover {
  background: var(--border);
}

.modal-body {
  padding: 1rem 1.25rem 1.25rem;
  overflow: auto;
}

.modal-table-wrap {
  max-height: min(60vh, 520px);
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.modal-table-wrap table {
  margin: 0;
}

.modal-table-wrap .data-table th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.modal-table-wrap .form-control {
  margin: 0;
  padding: 0.4rem 0.5rem;
  font-size: 0.875rem;
}

.modal-table-wrap .score-col {
  width: 7rem;
}

.modal-table-wrap .memo-col {
  min-width: 8rem;
}

.modal-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-top: 1rem;
  padding: 1rem;
  border-top: 1px solid var(--border);
}

.modal-footer--split {
  flex-wrap: nowrap;
  justify-content: stretch;
  gap: 0.5rem;
}

.modal-footer--split .btn {
  flex: 1 1 0;
  min-width: 0;
  width: auto;
  margin-top: 0;
  justify-content: center;
}

@media (max-width: 900px) {
  .app-shell {
    flex-direction: column;
    height: 100%;
    max-height: none;
    overflow: hidden;
  }

  .sidebar {
    width: 100%;
    height: auto;
    max-height: none;
    border-right: none;
    border-bottom: 1px solid var(--border);
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    align-content: flex-start;
    padding: 0.75rem 1rem;
    box-shadow: 0 2px 8px rgba(28, 36, 52, 0.06);
    flex-shrink: 0;
    overflow: visible;
  }

  .sidebar-brand {
    border: none;
    margin: 0;
    padding: 0 1rem 0 0;
  }

  .sidebar-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    flex: 1 1 auto;
    min-height: 0;
    overflow: visible;
  }

  .sidebar-nav a {
    border-left: none;
    border-radius: 8px;
    padding: 0.45rem 0.75rem;
  }

  .sidebar-nav a.active {
    border-left: none;
  }

  .sidebar-footer {
    border: none;
    padding: 0;
    margin: 0;
    width: 100%;
    margin-top: 0;
  }

  .main {
    padding: 1rem;
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
  }
}

.pc-only { display: none !important; }

@media (min-width: 900px) {
  .pc-only { display: table-cell !important; }
}

.mobile-only { display: table-cell !important; }
@media (min-width: 900px) {
  .mobile-only { display: none !important; }
}

.carrier-scores-route-table th,
.carrier-scores-route-table td {
  text-align: center;
  vertical-align: middle;
}

.carrier-scores-route-table .carrier-scores-head-max th {
  font-size: 0.8125rem;
  font-weight: 600;
  background: #e8f0fb;
  color: #1e3a5f;
  border-bottom-width: 2px;
}

@media (max-width: 899px) {
  /* 모바일: 노선유형/노선/주관/확인 4등분 */
  .carrier-scores-route-table th:nth-child(1),
  .carrier-scores-route-table td:nth-child(1),
  .carrier-scores-route-table th:nth-child(2),
  .carrier-scores-route-table td:nth-child(2),
  .carrier-scores-route-table th:nth-child(3),
  .carrier-scores-route-table td:nth-child(3),
  .carrier-scores-route-table th.mobile-only,
  .carrier-scores-route-table td.mobile-only {
    width: 25%;
    min-width: 0;
    max-width: none;
  }
}

@media (min-width: 900px) {
  /* PC: 평가점수 노출 테이블만 전체 컬럼 min-width 90px */
  .carrier-scores-route-table th,
  .carrier-scores-route-table td {
    min-width: 90px;
  }
  .carrier-scores-route-table {
    width: max-content;
    min-width: 100%;
  }
  .table-wrap {
    overflow-x: auto;
  }
}


.evaluation-info {
  max-width: 700px;
  margin: 20px 0;
  font-family: "Noto Sans KR", sans-serif;
  color: #222;
}

.evaluation-info h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.evaluation-info table {
  width: 100%;
  border-collapse: collapse;
  border-top: 2px solid #000;
  font-size: 13px;
}

.evaluation-info thead th {
  background: #e9e9e9;
  text-align: center;
  font-weight: 600;
  padding: 8px 10px;
  border-bottom: 1px solid #999;
  border-right: 1px solid #999;
}

.evaluation-info thead th:last-child {
  border-right: none;
}

.evaluation-info tbody td {
  padding: 10px 12px;
  border-bottom: 1px dotted #bbb;
  border-right: 1px solid #999;
  vertical-align: middle;
  line-height: 1.5;
}

.evaluation-info tbody td:last-child {
  border-right: none;
}

.evaluation-info tbody td:first-child {
  text-align: center;
  background: #f7f7f7;
  font-weight: 500;
  word-break: keep-all;
}

.evaluation-info td[rowspan] {
  vertical-align: middle;
}

.evaluation-info tbody tr:last-child td {
  border-bottom: 1px solid #999;
}

.evaluation-info tbody tr + tr td:first-child {
  border-right: 1px solid #999;
}

/* 핵심 수정 */
.evaluation-info tbody td p {
  position: relative;
  padding-left: 10px;
  margin: 0;
}

.evaluation-info tbody td p::before {
  content: "·";
  position: absolute;
  left: 0;
  top: 0.2em;
}
