:root {
  --sungbo-red: #e30613;
  --sungbo-red-dark: #b8000b;
  --sungbo-red-soft: #fff1f2;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #f5f6f8;
}

body {
  background: var(--bg);
  color: var(--ink);
}

a {
  color: inherit;
}

.app-navbar {
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 10px rgba(17, 24, 39, 0.05);
}

.app-brand {
  display: flex;
  align-items: center;
  padding: 0.25rem 0;
}

.app-brand img {
  height: 34px;
  width: auto;
  display: block;
}

.app-navlinks .nav-link {
  color: var(--ink);
  font-weight: 700;
  border-radius: 8px;
  padding: 0.45rem 0.65rem !important;
  font-size: 0.95rem;
}

.app-navlinks .nav-link:hover,
.app-navlinks .nav-link:focus {
  color: var(--sungbo-red);
  background: var(--sungbo-red-soft);
}

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

.dashboard-compact {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
  background: #ffffff;
  border: 1px solid var(--line);
  border-left: 5px solid var(--sungbo-red);
  border-radius: 12px;
  padding: 1rem 1.15rem;
  box-shadow: 0 4px 14px rgba(17, 24, 39, 0.05);
}

.dashboard-compact h1 {
  font-size: 1.65rem;
  font-weight: 900;
  margin: 0.15rem 0 0;
}

.page-kicker {
  color: var(--sungbo-red);
  font-weight: 900;
  font-size: 0.82rem;
}

.dashboard-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.global-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 0.75rem;
}

.stat-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(17, 24, 39, 0.05);
}

.stat-card:hover {
  border-color: rgba(227, 6, 19, 0.4);
  background: var(--sungbo-red-soft);
}

.stat-card span {
  color: var(--muted);
  font-weight: 800;
  font-size: 0.85rem;
}

.stat-card strong {
  display: block;
  color: var(--ink);
  font-size: 1.9rem;
  line-height: 1.1;
  margin-top: 0.25rem;
}

.card {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.card-header {
  border-bottom: 1px solid var(--line);
  padding: 0.75rem 1rem;
}

.recent-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
}

.recent-box {
  padding: 1rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  min-height: 190px;
}

.recent-box:nth-child(2n) {
  border-right: 0;
}

.recent-box h3 {
  font-size: 0.95rem;
  font-weight: 900;
  color: var(--sungbo-red);
  margin-bottom: 0.65rem;
}

.recent-box a {
  display: block;
  text-decoration: none;
  border-radius: 8px;
  padding: 0.45rem 0.5rem;
  margin-bottom: 0.2rem;
}

.recent-box a:hover {
  background: var(--sungbo-red-soft);
}

.recent-box b {
  display: block;
  font-size: 0.92rem;
}

.recent-box span {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
}

.empty {
  color: var(--muted);
  margin: 0;
  font-size: 0.9rem;
}

.menu-card {
  height: 100%;
  padding: 1.15rem;
  display: flex;
  gap: 1rem;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(17, 24, 39, 0.05);
  transition: 0.15s ease;
}

.menu-card:hover {
  transform: translateY(-2px);
  border-color: rgba(227, 6, 19, 0.35);
}

.menu-card h2 {
  font-size: 1.05rem;
  font-weight: 900;
  margin: 0 0 0.35rem;
  color: var(--ink);
}

.menu-card p {
  margin: 0;
  color: var(--muted);
}

.menu-icon {
  flex: 0 0 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--sungbo-red);
  color: white;
  font-weight: 900;
}

.btn-primary {
  background-color: var(--sungbo-red);
  border-color: var(--sungbo-red);
  font-weight: 800;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--sungbo-red-dark);
  border-color: var(--sungbo-red-dark);
}

.btn-outline-primary {
  color: var(--sungbo-red);
  border-color: rgba(227, 6, 19, 0.55);
  font-weight: 700;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
  background: var(--sungbo-red);
  border-color: var(--sungbo-red);
  color: white;
}

.table td,
.table th {
  vertical-align: middle;
}

.table thead th {
  color: var(--ink);
  font-size: 0.9rem;
}

.table-hover tbody tr:hover td {
  background: var(--sungbo-red-soft);
}

.form-control:focus,
.form-select:focus {
  border-color: rgba(227, 6, 19, 0.45);
  box-shadow: 0 0 0 0.22rem rgba(227, 6, 19, 0.12);
}

.mobile-action-bar {
  position: sticky;
  bottom: 0;
  background: rgba(255, 255, 255, 0.96);
  padding: 0.75rem;
  border-top: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

.form-label {
  font-weight: 800;
}

.process-line {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(54px, 1fr));
  gap: 0.6rem;
}

.process-line div {
  background: #f9fafb;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.7rem;
}

.process-line b {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--sungbo-red);
  color: white;
  margin-right: 0.35rem;
  font-size: 0.8rem;
}

.process-line span {
  font-weight: 800;
  font-size: 0.9rem;
}

.page-title-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-end;
}

.text-danger {
  color: var(--sungbo-red) !important;
}

.badge.text-bg-danger {
  background-color: var(--sungbo-red) !important;
}

.small {
  font-size: 0.875rem;
}

@media (max-width: 1200px) {
  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 992px) {
  .recent-grid {
    grid-template-columns: 1fr;
  }

  .recent-box {
    border-right: 0;
  }

  .process-line {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .app-brand img {
    height: 28px;
  }

  .global-search {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .dashboard-compact h1 {
    font-size: 1.35rem;
  }

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

  .process-line {
    grid-template-columns: 1fr;
  }
}


.company-map {
  width: 100%;
  height: 680px;
  background: #f9fafb;
  border-radius: 12px;
  overflow: hidden;
}

.mini-map {
  width: 100%;
  height: 320px;
  background: #f9fafb;
  border-radius: 12px;
  overflow: hidden;
}

.map-placeholder {
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 900;
}

.map-popup {
  padding: 0.65rem 0.75rem;
  font-size: 0.9rem;
  line-height: 1.45;
  min-width: 180px;
}

.map-popup a {
  color: var(--sungbo-red);
  font-weight: 800;
  text-decoration: none;
}

.map-company-list {
  max-height: 680px;
  overflow-y: auto;
}

@media (max-width: 992px) {
  .company-map {
    height: 520px;
  }
}


.address-result-list {
  display: grid;
  gap: 0.75rem;
}

.address-result-item {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1rem;
  background: #fff;
}

.address-result-item:hover {
  border-color: var(--sungbo-red);
  background: var(--sungbo-red-soft);
}


.address-result-item .badge { min-width: 46px; }
.address-result-item .text-truncate { max-width: 760px; }


/* v10.5 */
.form-label { font-weight: 700; }
.address-result-item .badge { min-width: 46px; }
.address-result-item .text-truncate { max-width: 760px; }


.employee-inline-table input,
.employee-inline-table select {
  min-width: 100%;
}

.employee-inline-table td {
  vertical-align: middle;
}

.employee-inline-table .form-control-sm,
.employee-inline-table .form-select-sm {
  font-size: 0.9rem;
}


.active-map-company {
  border-left: 5px solid var(--sungbo-red) !important;
  background: var(--sungbo-red-soft) !important;
}

.map-company-item {
  cursor: pointer;
}

.map-company-item:hover {
  background: #f8fafc;
}


.batch-log {
  height: 560px;
  overflow: auto;
  background: #0f172a;
  color: #e5e7eb;
  border-radius: 10px;
  padding: 12px;
  font-family: Consolas, monospace;
  font-size: 13px;
}

.batch-log-line {
  padding: 3px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.batch-log-line.ok {
  color: #86efac;
}

.batch-log-line.fail {
  color: #fca5a5;
}

.batch-log-line.info {
  color: #93c5fd;
}


.map-popup {
  min-width: 260px;
  max-width: 520px;
  padding: 4px 2px;
}

.map-popup-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 4px;
}

.map-popup-close {
  border: 0;
  background: transparent;
  font-size: 20px;
  line-height: 1;
  padding: 0 4px;
  cursor: pointer;
  color: #555;
}

.map-popup-close:hover {
  color: #000;
  font-weight: 700;
}


/* v10.15.2: 지도 정보창 닫기 버튼 위치 보정 */
.map-popup {
  position: relative;
  min-width: 320px;
  max-width: 540px;
  padding: 8px 36px 8px 8px;
}

.map-popup-head {
  display: block;
  margin-bottom: 4px;
  padding-right: 8px;
}

.map-popup-close {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  border: 1px solid #999;
  background: #fff;
  color: #222;
  font-size: 18px;
  line-height: 20px;
  padding: 0;
  cursor: pointer;
  z-index: 5;
  text-align: center;
}

.map-popup-close:hover {
  background: #f1f3f5;
  color: #000;
  border-color: #333;
  font-weight: 700;
}


/* v10.15.3: Naver InfoWindow close button final fallback */
.map-popup {
  position: relative !important;
  box-sizing: border-box !important;
  padding-right: 42px !important;
}

.map-popup .map-popup-close {
  position: absolute !important;
  top: 6px !important;
  right: 6px !important;
  left: auto !important;
  z-index: 9999 !important;
}


/* v10.16: 거래처 지도 로드뷰 패널 */
.roadview-panel {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: min(720px, calc(100vw - 48px));
  height: min(520px, calc(100vh - 96px));
  background: #fff;
  border: 1px solid #ced4da;
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.28);
  overflow: hidden;
  z-index: 3000;
}

.roadview-panel-header {
  height: 58px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid #dee2e6;
  background: #fff;
}

.roadview-close-btn {
  width: 32px;
  height: 32px;
  border: 1px solid #adb5bd;
  background: #fff;
  color: #222;
  font-size: 22px;
  line-height: 24px;
  padding: 0;
  cursor: pointer;
}

.roadview-close-btn:hover {
  background: #f1f3f5;
  border-color: #495057;
}

.roadview-canvas {
  width: 100%;
  height: calc(100% - 58px);
  background: #f8f9fa;
}

.roadview-empty {
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #6c757d;
}


/* v10.54: 영업동선 추천 검색결과 가독성 개선 */
.route-company-select {
  position: relative;
}

.route-picked-text {
  margin-top: .35rem;
  font-size: .82rem;
  color: #64748b;
  word-break: keep-all;
}

.route-search-results {
  position: static;
  z-index: 2500;
  max-height: 280px;
  overflow: auto;
  margin-top: 6px;
  border: 1px solid #dbe4ef;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .12);
}

.route-search-results:empty {
  display: none;
}

.route-search-item {
  display: block;
  width: 100%;
  text-align: left;
  background: #ffffff;
  border: 0;
  border-bottom: 1px solid #eef2f7;
  padding: .75rem .85rem;
  color: #0f172a;
  cursor: pointer;
}

.route-search-item:last-child {
  border-bottom: 0;
}

.route-search-item:hover,
.route-search-item:focus {
  background: #fff1f2;
  outline: 0;
}

.route-search-name {
  font-weight: 800;
  color: #111827;
  line-height: 1.25;
}

.route-search-address {
  margin-top: .2rem;
  font-size: .83rem;
  color: #475569;
  line-height: 1.35;
}

.route-search-meta {
  margin-top: .15rem;
  font-size: .76rem;
  color: #94a3b8;
  line-height: 1.35;
}

.route-search-empty {
  padding: .8rem .9rem;
  color: #64748b;
  font-size: .88rem;
}

.route-candidate-list {
  max-height: 520px;
  overflow: auto;
}

.route-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  font-weight: 800;
  box-shadow: 0 1px 3px rgba(0,0,0,0.28);
  border: 1px solid #fff;
  box-sizing: border-box;
  user-select: none;
  line-height: 1;
}

.route-marker-core {
  width: 28px;
  height: 28px;
  font-size: 12px;
  border-width: 2px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}

.route-marker-endpoint,
.route-marker.endpoint {
  background: #dc3545;
}

.route-marker-waypoint {
  background: #f59e0b;
}

.route-marker-recommend {
  width: 40px;
  height: 40px;
  font-size: 15px;
  background: #f97316;
  color: #111827;
  border-color: #ffffff;
  border-width: 2px;
}

.route-marker-small {
  width: 32px;
  height: 32px;
  font-size: 13px;
  border-width: 2px;
}

.route-marker-dot-tiny {
  width: 6px;
  height: 6px;
  font-size: 0;
  border: 1px solid rgba(255,255,255,.9);
  background: #f97316;
  opacity: .92;
  box-shadow: 0 1px 2px rgba(0,0,0,.18);
}

.route-marker-dot-small {
  width: 12px;
  height: 12px;
  font-size: 0;
  border: 1px solid rgba(255,255,255,.95);
  background: #f59e0b;
  opacity: .96;
  box-shadow: 0 1px 3px rgba(0,0,0,.22);
}

.route-marker-dot-medium {
  width: 20px;
  height: 20px;
  font-size: 0;
  border: 2px solid rgba(255,255,255,.95);
  background: #f59e0b;
  opacity: .98;
  box-shadow: 0 2px 5px rgba(0,0,0,.28);
}

.route-marker-mini,
.route-marker-dot {
  width: 8px;
  height: 8px;
  font-size: 0;
  border: 1px solid rgba(255,255,255,.9);
  background: #f59e0b;
  opacity: .95;
  box-shadow: 0 1px 2px rgba(0,0,0,.2);
}


/* v10.19.2: API connection check */
.api-check-output {
  min-height: 420px;
  max-height: 720px;
  overflow: auto;
  background: #0f172a;
  color: #e5e7eb;
  border-radius: 10px;
  padding: 14px;
  font-family: Consolas, monospace;
  font-size: 13px;
  white-space: pre-wrap;
}


.api-check-output.small-output {
  min-height: 220px;
  max-height: 360px;
}


/* v10.23 login */
.auth-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(185, 28, 28, .14), transparent 34%),
    linear-gradient(135deg, #f7f7f8 0%, #eef0f3 100%);
}
.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
}
.auth-card {
  width: min(860px, 100%);
  background: #fff;
  border: 1px solid rgba(17, 24, 39, .08);
  border-radius: 24px;
  padding: 34px;
  box-shadow: 0 18px 55px rgba(15, 23, 42, .12);
}
.auth-card.narrow {
  width: min(460px, 100%);
}
.auth-card.terms {
  width: min(920px, 100%);
}
.auth-logo-wrap {
  text-align: center;
  margin-bottom: 22px;
}
.auth-logo-wrap img {
  max-width: 210px;
  max-height: 58px;
  object-fit: contain;
}
.auth-role-card {
  display: block;
  height: 100%;
  padding: 28px 22px;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  text-decoration: none;
  color: #111827;
  background: #fafafa;
  transition: .16s ease;
}
.auth-role-card:hover {
  transform: translateY(-2px);
  border-color: #b91c1c;
  box-shadow: 0 12px 28px rgba(185, 28, 28, .12);
  color: #111827;
}
.auth-role-card.admin {
  background: #fff7f7;
}
.auth-role-title {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 8px;
}
.auth-role-desc {
  color: #6b7280;
}
.auth-notice {
  border: 1px dashed #f1b3b3;
  background: #fff8f8;
  color: #7f1d1d;
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 14px;
}
.terms-box {
  max-height: 460px;
  overflow: auto;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 22px 24px;
}
.terms-box h2 {
  font-size: 19px;
  font-weight: 800;
  margin-bottom: 12px;
}
.terms-box li {
  margin-bottom: 10px;
  line-height: 1.65;
}
.auth-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 999px;
  font-size: 12px;
  color: rgba(255,255,255,.86);
}


/* v10.24 audit */
.audit-table-wrap {
  max-height: calc(100vh - 260px);
}
.audit-table {
  font-size: 12px;
}
.audit-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f9fafb;
  white-space: nowrap;
}
.audit-query-cell {
  max-width: 340px;
  overflow: hidden;
  text-overflow: ellipsis;
}


/* v10.26 login status */
.login-status-panel {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 14px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.25);
}
.login-status-text {
  color: #fff;
  font-size: 13px;
  line-height: 1.1;
  white-space: nowrap;
}
.login-status-label {
  display: block;
  font-size: 10px;
  opacity: .75;
}
.login-status-text strong {
  font-size: 14px;
}
.login-logout-btn {
  white-space: nowrap;
  font-weight: 700;
}
.current-login-box {
  border: 1px solid #fecaca;
  background: #fff7f7;
  border-radius: 18px;
  padding: 22px;
  text-align: center;
}
.current-login-label {
  font-size: 13px;
  color: #7f1d1d;
  font-weight: 700;
}
.current-login-role {
  margin-top: 4px;
  font-size: 32px;
  font-weight: 900;
  color: #991b1b;
}
.current-login-desc {
  color: #6b7280;
  margin-top: 4px;
}
.dashboard-login-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border: 1px solid #e5e7eb;
  border-left: 5px solid #b91c1c;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(15,23,42,.05);
}
.dashboard-login-notice strong {
  font-size: 18px;
  color: #991b1b;
}
@media (max-width: 991px) {
  .login-status-panel {
    width: 100%;
    justify-content: space-between;
  }
  .dashboard-login-notice {
    align-items: flex-start;
    flex-direction: column;
  }
}


/* v10.27 ops improvements */
.copyable-cell {
  cursor: copy;
}
.copyable-cell:hover {
  background: #fff7ed;
  color: #9a3412;
}
.copy-toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 9999;
  background: #111827;
  color: #fff;
  border-radius: 12px;
  padding: 10px 14px;
  box-shadow: 0 12px 32px rgba(0,0,0,.2);
  font-size: 14px;
}
.quick-search-results {
  position: relative;
}
.quick-search-item,
.quick-search-empty {
  display: block;
  width: 100%;
  text-align: left;
  border: 1px solid #e5e7eb;
  background: #fff;
  padding: 10px 12px;
  border-radius: 10px;
  margin-top: 6px;
}
.quick-search-item:hover {
  border-color: #b91c1c;
  background: #fff7f7;
}
.quick-search-item b {
  display: block;
  color: #111827;
}
.quick-search-item span,
.quick-search-item small {
  display: block;
  color: #6b7280;
  margin-top: 2px;
}
.quick-search-empty {
  color: #6b7280;
  background: #f9fafb;
}
.map-dot-marker {
  display: inline-block;
  border-radius: 999px;
  background: #b91c1c;
  border: 2px solid #fff;
  box-shadow: 0 1px 5px rgba(0,0,0,.35);
}
.map-dot-marker.small {
  width: 8px;
  height: 8px;
  border-width: 1px;
}
.map-dot-marker.medium {
  width: 13px;
  height: 13px;
}
.company-table td {
  vertical-align: middle;
}


/* v10.28 company table layout */
.company-table {
  min-width: 1480px;
  table-layout: auto;
}
.company-table th {
  white-space: nowrap;
  vertical-align: middle;
}
.company-table td {
  vertical-align: middle;
}
.company-name-col {
  min-width: 190px;
}
.company-equipment-col {
  min-width: 260px;
}
.company-business-col {
  min-width: 220px;
}
.company-status-col {
  min-width: 90px;
  white-space: nowrap;
  text-align: center;
}
.company-owner-col {
  min-width: 96px;
  width: 96px;
  white-space: nowrap !important;
  word-break: keep-all;
  text-align: center;
}
.company-phone-col {
  min-width: 130px;
  white-space: nowrap;
}
.company-address-col {
  min-width: 330px;
  max-width: 430px;
}
.company-map-col {
  min-width: 86px;
  white-space: nowrap;
  text-align: center;
}
.company-manage-col {
  min-width: 76px;
  white-space: nowrap;
  text-align: center;
}
.company-table .btn {
  white-space: nowrap;
}


/* v10.30 floating quick search */
.quick-search-field {
  position: relative;
}
.quick-search-results.overlay {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% - 2px);
  z-index: 1050;
  max-height: 310px;
  overflow-y: auto;
  padding: 6px;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 16px 34px rgba(15, 23, 42, .18);
}
.quick-search-results.overlay:empty {
  display: none;
}
.quick-search-results.overlay .quick-search-item,
.quick-search-results.overlay .quick-search-empty {
  margin-top: 0;
  margin-bottom: 5px;
}
.delete-request-form {
  border-top: 1px solid #e5e7eb;
  padding-top: 16px;
}


/* v10.33 consultation layout stable */
#companyQuickSearchBox {
  min-height: 74px;
}
#companyQuickSearchBox.quick-search-hidden {
  visibility: hidden;
  pointer-events: none;
}
#companyQuickSearchBox.quick-search-hidden .quick-search-results {
  display: none !important;
}


/* v10.34 company table column sort */
.table-sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit;
  font-weight: 800;
  color: inherit;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
}
.table-sort-btn:hover {
  color: #dc2626;
}
.table-sort-btn .sort-arrows {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  color: #6b7280;
  font-size: 11px;
  line-height: 1;
}
.table-sort-btn.active .sort-arrows {
  border-color: #dc2626;
  background: #fff1f2;
  color: #dc2626;
}
.table-sort-btn.asc,
.table-sort-btn.desc {
  color: #991b1b;
}


/* v10.35 all table sort/find */
.table-find-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.table-find-toolbar .table-find-input {
  min-width: 320px;
  flex: 1 1 420px;
}
.table-find-status {
  min-width: 70px;
  color: #991b1b;
  font-weight: 800;
  text-align: center;
}
.table-find-hit {
  background: #fff7ed !important;
}
.table-find-current {
  outline: 3px solid #dc2626;
  outline-offset: -3px;
  background: #fee2e2 !important;
}
.table-find-current td {
  font-weight: 700;
}
.table-tools-table th {
  white-space: nowrap;
}
.table-tools-table td {
  vertical-align: middle;
}
.table-tools-table .table-sort-btn {
  justify-content: flex-start;
}


/* v10.36 server-side sort */
a.table-sort-btn {
  text-decoration: none;
}
a.table-sort-btn:hover {
  text-decoration: none;
}


/* v10.37 pagination performance */
.list-pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
}
.list-pagination-summary {
  color: #374151;
  font-size: 13px;
}
.list-pagination-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
@media (max-width: 768px) {
  .list-pagination-bar {
    align-items: flex-start;
    flex-direction: column;
  }
}


/* v10.42 permissions */
.permission-table th,
.permission-table td {
  vertical-align: middle;
}
.permission-table .form-check-input {
  width: 1.25rem;
  height: 1.25rem;
  cursor: pointer;
}
.permission-table .form-check-input:disabled {
  opacity: .45;
  cursor: not-allowed;
}


/* v10.45 mobile app */
.mobile-bottom-nav {
  display: none;
}

@media (max-width: 768px) {
  body {
    padding-bottom: 68px;
  }

  .app-page {
    padding-bottom: 72px;
  }

  .app-navbar .navbar-brand img {
    max-height: 34px;
  }

  .app-navlinks {
    gap: 2px;
  }

  .app-navlinks .nav-link {
    padding: .55rem .65rem;
    border-radius: 10px;
  }

  .login-status-panel {
    width: 100%;
    justify-content: space-between;
  }

  .mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1040;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(54px, 1fr));
    gap: 0;
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 -6px 20px rgba(15, 23, 42, .08);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }

  .mobile-bottom-link {
    text-align: center;
    text-decoration: none;
    color: #374151;
    font-size: 12px;
    font-weight: 700;
    padding: 8px 2px;
    border-radius: 12px;
  }

  .mobile-bottom-link:active,
  .mobile-bottom-link:hover {
    color: #b91c1c;
    background: #fee2e2;
  }

  .table-responsive {
    border-radius: 12px;
  }

  .card {
    border-radius: 16px;
  }

  .mobile-install-page .card {
    border-radius: 20px;
  }

  .mobile-action-bar {
    position: sticky;
    bottom: 64px;
    background: rgba(255,255,255,.96);
    border-top: 1px solid #e5e7eb;
    padding: 10px;
    z-index: 20;
  }

  input,
  select,
  textarea {
    font-size: 16px !important;
  }

  .btn {
    min-height: 40px;
  }

  .btn-sm {
    min-height: 32px;
  }
}

@media (display-mode: standalone) {
  .mobile-bottom-nav {
    display: grid;
  }
}


/* v10.51 관리자 메뉴 분리 */
.admin-menu-dropdown .admin-menu-link {
  font-weight: 700;
  color: #b91c1c !important;
  border: 1px solid rgba(185, 28, 28, .18);
  border-radius: 999px;
  padding-left: .85rem !important;
  padding-right: .85rem !important;
  background: rgba(185, 28, 28, .06);
}

.admin-dropdown-menu {
  min-width: 220px;
  border: 0;
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .16);
  padding: .65rem;
}

.admin-dropdown-menu .dropdown-header {
  color: #64748b;
  font-size: .78rem;
  font-weight: 800;
}

.admin-dropdown-menu .dropdown-item {
  border-radius: 10px;
  padding: .55rem .75rem;
  font-weight: 650;
}

.admin-dropdown-menu .dropdown-item:hover {
  background: #fef2f2;
  color: #991b1b;
}

.admin-dropdown-menu .admin-center-item {
  background: #b91c1c;
  color: #fff;
}

.admin-dropdown-menu .admin-center-item:hover {
  background: #991b1b;
  color: #fff;
}

.admin-center-card {
  border: 0;
  border-radius: 18px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .08);
}

.admin-center-section-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #111827;
}

.admin-center-section-desc {
  margin-top: .25rem;
  color: #64748b;
  font-size: .92rem;
}

.admin-center-list .list-group-item {
  border: 1px solid #e5e7eb;
  border-radius: 14px !important;
  margin-bottom: .6rem;
  padding: .9rem 1rem;
}

.admin-center-list .list-group-item strong {
  display: block;
  color: #111827;
  font-size: 1rem;
}

.admin-center-list .list-group-item span {
  display: block;
  color: #64748b;
  font-size: .88rem;
  margin-top: .2rem;
}

.admin-center-list .list-group-item:hover {
  background: #fef2f2;
  border-color: #fecaca;
}


/* v10.52 거래처 지도 검색 활성화 */
#mapQ:focus {
  border-color: #b91c1c;
  box-shadow: 0 0 0 .2rem rgba(185, 28, 28, .12);
}

#loadMapBtn {
  font-weight: 700;
}


/* v10.53 거래처 목록 키워드 검색 */
#companiesKeywordInput:focus {
  border-color: #b91c1c;
  box-shadow: 0 0 0 .2rem rgba(185, 28, 28, .12);
}


/* v10.56 경유 업체 동적 추가 */
.route-waypoint-box {
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  background: #f8fafc;
  padding: .75rem;
}

#addWaypointBtn:disabled {
  opacity: .65;
}


/* v10.60 영업동선 추천 마커 색상/크기 균형 조정 */
.route-marker-recommend {
  color: #111827;
}


/* v10.61 시군구 확대 이후 추천 마커 크기 2배 수준 보정 */
.route-marker-dot-small,
.route-marker-dot-medium,
.route-marker-small,
.route-marker-recommend {
  transition: width .12s ease, height .12s ease, font-size .12s ease;
}


/* v10.62 영업동선 추천 마커 즉시 hover 라벨 */
.route-marker-hover-label {
  background: rgba(17, 24, 39, .95);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 5px;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0,0,0,.22);
  pointer-events: none;
}


/* v10.63 거래처 지도 가벼운 즉시 hover 라벨 */
.map-marker-hover-label {
  background: rgba(17, 24, 39, .95);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 5px;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0,0,0,.22);
  pointer-events: none;
}


/* v10.64 지도 목록 페이지 / 핀 선택 목록 단일표시 */
.map-list-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
  padding: .55rem .75rem;
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
  font-size: .9rem;
}

.map-list-toolbar .btn {
  white-space: nowrap;
}

.map-company-item.active-map-company,
.route-candidate-item.active-map-company {
  background: #fff7ed;
  border-color: #fdba74;
}
