* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #1a1a1a;
  background: #f5f6f8;
}

.site-header {
  background: #1f2937;
  color: #fff;
  height: 56px;
}

.site-header-inner {
  height: 100%;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-header .brand {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
}

.header-user {
  color: #d1d5db;
  font-size: 0.9rem;
}

.admin-body {
  display: flex;
  align-items: stretch;
  min-height: calc(100vh - 56px);
}

.admin-sidebar {
  width: 220px;
  flex: 0 0 220px;
  background: #fff;
  border-right: 1px solid #e5e7eb;
  padding: 1.5rem 0;
}

.lnb {
  display: flex;
  flex-direction: column;
}

.lnb-group {
  margin-bottom: 1.5rem;
}

.lnb-group-title {
  padding: 0 1.5rem;
  margin-bottom: 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.lnb-link {
  display: block;
  padding: 0.55rem 1.5rem;
  color: #374151;
  text-decoration: none;
  font-size: 0.92rem;
  border-left: 3px solid transparent;
}

.lnb-link:hover {
  background: #f3f4f6;
}

.lnb-link.active {
  background: #eef2ff;
  border-left-color: #4f46e5;
  color: #4f46e5;
  font-weight: 600;
}

.admin-content {
  flex: 1;
  min-width: 0;
  padding: 2rem 2rem 0;
  display: flex;
  flex-direction: column;
}

.chart-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.chart-card h2 {
  margin: 0 0 1.25rem;
  font-size: 1rem;
  font-weight: 700;
}

.stat-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.stat-tile {
  flex: 0 0 180px;
  padding: 0.85rem 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

.stat-label {
  font-size: 0.78rem;
  color: #6b7280;
}

.stat-value {
  margin-top: 0.25rem;
  font-size: 1.4rem;
  font-weight: 700;
  color: #111827;
}

.chart-legend {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
  color: #374151;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.legend-swatch {
  display: inline-block;
  width: 14px;
  height: 3px;
  border-radius: 2px;
}

.legend-swatch.current {
  background: #2563eb;
}

.legend-swatch.prev {
  background: #f59e0b;
}

.line-chart {
  position: relative;
  max-width: 720px;
}

.line-chart svg {
  display: block;
  width: 100%;
  height: auto;
}

.lc-grid {
  stroke: #f1f2f4;
  stroke-width: 1;
}

.lc-baseline {
  stroke: #d1d5db;
  stroke-width: 1;
}

.lc-axis {
  font-size: 12px;
  fill: #6b7280;
}

.lc-line {
  fill: none;
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.lc-line.current {
  stroke: #2563eb;
}

.lc-line.prev {
  stroke: #f59e0b;
}

.lc-dot {
  stroke: #fff;
  stroke-width: 2;
}

.lc-dot.current {
  fill: #2563eb;
}

.lc-dot.prev {
  fill: #f59e0b;
}

.lc-dot.is-active {
  r: 6;
}

.lc-value {
  font-size: 12px;
  font-weight: 700;
  fill: #374151;
}

.lc-cross {
  stroke: #9ca3af;
  stroke-width: 1;
  stroke-dasharray: 3 3;
}

.lc-hit {
  fill: transparent;
  cursor: pointer;
}

.line-chart-tooltip {
  position: absolute;
  transform: translate(-50%, calc(-100% - 14px));
  padding: 0.45rem 0.65rem;
  background: #111827;
  color: #fff;
  border-radius: 6px;
  font-size: 0.78rem;
  white-space: nowrap;
  pointer-events: none;
}

.line-chart-tooltip .tt-title {
  color: #d1d5db;
}

.line-chart-tooltip .tt-title {
  margin-bottom: 0.2rem;
}

.line-chart-tooltip .tt-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.15rem;
}

.period-table {
  width: 100%;
  max-width: 720px;
  margin-top: 1rem;
  border-collapse: collapse;
  font-size: 0.82rem;
  text-align: center;
}

.period-table th,
.period-table td {
  padding: 0.45rem 0.25rem;
  border-top: 1px solid #e5e7eb;
}

.period-table th {
  color: #6b7280;
  font-weight: 500;
}

.period-table tbody th {
  text-align: left;
  white-space: nowrap;
  color: #374151;
}

.chart-note {
  margin: 1.25rem 0 0;
  font-size: 0.78rem;
  color: #9ca3af;
}

.release-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

.release-table .col-date {
  width: 12%;
}

.release-table .col-summary,
.release-table .col-link {
  width: 44%;
}

.release-table th,
.release-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
  vertical-align: top;
}

.release-table th {
  font-size: 0.82rem;
  color: #6b7280;
  font-weight: 700;
  border-bottom: 2px solid #e5e7eb;
  white-space: nowrap;
}

.release-table td.release-date {
  white-space: nowrap;
  font-size: 0.85rem;
  color: #6b7280;
}

.release-table td.release-summary {
  font-size: 0.9rem;
  line-height: 1.8;
  color: #111827;
}

.release-table td.release-link a {
  color: #4f46e5;
  font-size: 0.85rem;
  text-decoration: none;
}

.release-table td.release-link a:hover {
  text-decoration: underline;
}

.release-table tbody tr:last-child td {
  border-bottom: none;
}

.member-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

.member-table th,
.member-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
  font-size: 0.88rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-table th {
  font-size: 0.82rem;
  color: #6b7280;
  font-weight: 700;
  border-bottom: 2px solid #e5e7eb;
}

.member-table tbody tr:last-child td {
  border-bottom: none;
}

.member-empty {
  text-align: center;
  color: #9ca3af;
  padding: 2rem 1rem;
}

.listing-row {
  cursor: pointer;
}

.listing-row:hover {
  background: #f9fafb;
}

.status-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
}

.status-active {
  background: #ecfdf5;
  color: #059669;
}

.status-pending {
  background: #fffbeb;
  color: #d97706;
}

.status-leaved {
  background: #f3f4f6;
  color: #6b7280;
}

.status-cancel {
  background: #fef2f2;
  color: #dc2626;
}

.license-link {
  color: #4f46e5;
  font-weight: 600;
  text-decoration: none;
}

.license-link:hover {
  text-decoration: underline;
}

.license-empty {
  color: #9ca3af;
}

.table-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-bottom: 1rem;
}

.action-button {
  padding: 0.45rem 1rem;
  border: none;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.action-approve {
  background: #ecfdf5;
  color: #059669;
}

.action-hold {
  background: #fffbeb;
  color: #d97706;
}

.action-reject {
  background: #fef2f2;
  color: #dc2626;
}

.pagination {
  display: flex;
  gap: 0.4rem;
  justify-content: center;
  margin-top: 1.5rem;
}

.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 0.5rem;
  border-radius: 6px;
  color: #374151;
  text-decoration: none;
  font-size: 0.85rem;
}

.page-link:hover {
  background: #f3f4f6;
}

.page-link.active {
  background: #4f46e5;
  color: #fff;
  font-weight: 700;
}

.page-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.site-footer {
  margin-top: auto;
  padding: 1.5rem 0;
  border-top: 1px solid #e5e7eb;
  text-align: center;
  color: #6b7280;
  font-size: 0.85rem;
}

.header-user-group {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logout-form {
  margin: 0;
}

.logout-button {
  background: none;
  border: none;
  color: #d1d5db;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

.logout-button:hover {
  color: #fff;
}

.login-body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f6f8;
}

.login-container {
  width: 100%;
  max-width: 360px;
  padding: 1.5rem;
}

.login-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
}

.login-brand {
  font-size: 1.2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 1.5rem;
}

.login-error {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
  border-radius: 6px;
  padding: 0.6rem 0.8rem;
  font-size: 0.85rem;
  margin: 0 0 1rem;
}

.login-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.4rem;
}

.login-input {
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 0.6rem 0.75rem;
  font-size: 0.95rem;
  margin-bottom: 1.1rem;
}

.login-input:focus {
  outline: none;
  border-color: #4f46e5;
}

.login-input:read-only {
  background: #f9fafb;
  color: #6b7280;
}

.login-submit {
  background: #4f46e5;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.7rem;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
}

.login-submit:hover {
  background: #4338ca;
}

/* 베너 관리 - 목록 인라인 액션 버튼 */
.inline-form {
  display: inline;
}

.link-button {
  background: none;
  border: none;
  padding: 0;
  color: #4f46e5;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
}

.link-button:hover {
  text-decoration: underline;
}

.link-button-danger {
  color: #dc2626;
}

.link-as-button {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

/* 베너 관리 - 등록/수정 폼 */
.banner-form {
  max-width: 640px;
}

.form-row {
  margin-bottom: 1.1rem;
  display: flex;
  flex-direction: column;
}

.form-row-inline {
  flex-direction: row;
  gap: 1.5rem;
}

.form-row-inline > div {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.4rem;
}

.form-input {
  margin-bottom: 0;
}

.banner-textarea {
  min-height: 90px;
  resize: vertical;
  font-family: inherit;
}

.form-fieldset {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1rem 1.25rem 0.25rem;
  margin: 0 0 1.1rem;
}

.form-fieldset legend {
  padding: 0 0.4rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: #4f46e5;
}

.form-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  height: 100%;
  font-size: 0.9rem;
  color: #374151;
}

/* 베너 관리 - 앱 메인화면 히어로 베너 미리보기 (kordom-app .hero 톤 재사용) */
.hero-preview {
  background: linear-gradient(135deg, #0c2648, #1a3d7c 60%, #2a4f8f);
  color: #fff;
  border-radius: 8px;
  padding: 3rem 1.5rem;
  text-align: center;
  margin-bottom: 0.75rem;
}

.hero-preview-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  word-break: keep-all;
}

.hero-preview-content {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 1.25rem;
  min-height: 1.2em;
  word-break: keep-all;
}

.hero-preview-actions {
  min-height: 2.4rem;
}

.hero-preview-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  border-radius: 6px;
  background: #d9a441;
  color: #0c2648;
  font-weight: 700;
  font-size: 0.9rem;
}

/* 통역사 관리 - 프로필 사진 */
.interpreter-thumb {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.interpreter-thumb-lg {
  display: block;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 0.6rem;
}

/* 매물 관리 - 등록/수정 폼 (한국어/러시아어 컬럼을 좌우로 배치) */
.listing-form {
  max-width: 1100px;
}

/* 필드를 DOM 순서대로 2칸씩 채워, 한국어/러시아어 쌍이 같은 grid row(=같은 높이)에 놓이게 한다.
   짝이 없는 공통 필드는 러시아어 쪽에 .listing-cell-empty 빈 셀을 둬 정렬을 유지한다. */
.listing-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 2rem;
  align-items: start;
}

.listing-cell-empty {
  margin-bottom: 1.1rem;
}

.listing-col-header {
  font-size: 0.95rem;
  font-weight: 700;
  color: #4f46e5;
  padding-bottom: 0.5rem;
  margin-bottom: 1.1rem;
  border-bottom: 2px solid #eef2ff;
}

.listing-detail-value {
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 0.6rem 0.75rem;
  font-size: 0.9rem;
  background: #f9fafb;
  color: #1a1a1a;
  min-height: 2.3rem;
}

.listing-detail-value-multiline {
  white-space: pre-line;
  min-height: 4.5rem;
}

.listing-zip-row {
  display: flex;
  gap: 0.6rem;
}

.listing-zip-row .form-input {
  flex: 1;
}

.listing-photo-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-bottom: 0.75rem;
}

.listing-file-list {
  list-style: none;
  margin: 0.6rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.listing-file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.4rem 0.6rem;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
}

.listing-file-name {
  font-size: 0.85rem;
  color: #374151;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.listing-file-remove {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: #fee2e2;
  color: #dc2626;
  font-size: 0.9rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.listing-file-remove:hover {
  background: #fecaca;
}

.listing-photo-item {
  width: 96px;
}

.listing-photo-thumb-wrap {
  position: relative;
}

.listing-photo-thumb {
  display: block;
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
}

.listing-photo-order {
  position: absolute;
  top: 4px;
  left: 4px;
  background: rgba(17, 24, 39, 0.72);
  color: #fff;
  font-size: 0.7rem;
  line-height: 1;
  padding: 3px 5px;
  border-radius: 4px;
}

.listing-photo-remove {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  color: #dc2626;
  margin-top: 0.35rem;
}

.listing-photo-hint {
  font-size: 0.78rem;
  color: #9ca3af;
  margin: 0 0 0.75rem;
}

.listing-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 4px;
}

.listing-search-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid #e5e7eb;
}

.listing-search-form .form-row {
  margin-bottom: 0;
}

.listing-search-form input.form-input,
.listing-search-form select.form-input {
  height: 38px;
  margin-bottom: 0;
}

@media (max-width: 900px) {
  .listing-form-grid {
    grid-template-columns: 1fr;
  }

  .listing-cell-empty {
    display: none;
  }
}

.inquiry-date-range {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.inquiry-total {
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
  color: #4b5563;
}

.inquiry-detail td {
  background: #f9fafb;
}

.inquiry-detail-list {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 0.4rem 1rem;
  margin: 0;
  text-align: left;
}

.inquiry-detail-list dt {
  font-weight: 600;
  color: #6b7280;
}

.inquiry-detail-list dd {
  margin: 0;
}

.inquiry-message {
  white-space: pre-wrap;
  word-break: break-word;
}

.inquiry-status-select {
  padding: 0.2rem 0.4rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}
