@font-face {
  font-family: "Pretendard";
  src: url("/assets/fonts/pretendard/static/Pretendard-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Pretendard";
  src: url("/assets/fonts/pretendard/static/Pretendard-Medium.otf") format("opentype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Pretendard";
  src: url("/assets/fonts/pretendard/static/Pretendard-SemiBold.otf") format("opentype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Pretendard";
  src: url("/assets/fonts/pretendard/static/Pretendard-Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
:root {
  --brand-900: #0b2f4a;
  --brand-800: #0f3f66;
  --brand-700: #15659a;
  --brand-600: #1b7fb1;
  --brand-100: #e6f3f8;
  --ink-900: #111827;
  --ink-700: #334155;
  --ink-500: #64748b;
  --line-100: #e2e8f0;
  --surface-100: #f7fafb;
  --surface-200: #eef4f6;
  --danger-600: #b42318;
}

* {
  box-sizing: border-box;
}

body {
  font-family: "Pretendard", "Noto Sans KR", "Apple SD Gothic Neo",
    "Malgun Gothic", sans-serif;
  font-weight: 400;
  font-size: 15px;
  color: var(--ink-900);
  background: linear-gradient(180deg, #f2f8fb 0%, #fcfeff 60%, #f3f9fb 100%);
}

table {
  width: 100%;
  border-collapse: collapse;
}

.table-head th {
  font-size: 12px;
  letter-spacing: 0.01em;
}

.admin-table {
  width: 100%;
}

.admin-cards {
  display: none;
  gap: 12px;
}

.admin-card {
  background: #ffffff;
  border: 1px solid var(--line-100);
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 10px 22px rgba(17, 24, 39, 0.06);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-card-title {
  font-weight: 500;
  color: var(--ink-900);
}

.admin-card-meta {
  font-size: 12px;
}

.admin-card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}

.admin-card-label {
  color: var(--ink-500);
}

.admin-card-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.app-nav {
  background: #ffffff;
  border-bottom: 1px solid rgba(15, 63, 102, 0.08);
  box-shadow: 0 8px 20px rgba(15, 63, 102, 0.06);
}

.app-nav-inner {
  gap: 12px;
  flex-wrap: wrap;
}

.brand-title {
  color: var(--brand-800);
  letter-spacing: -0.02em;
  font-weight: 400;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
}

.brand-logo {
  width: 104px;
  height: auto;
  display: block;
}

#nav-buttons,
#admin-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.nav-actions {
  display: flex;
  gap: 8px;
}

.admin-nav-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.nav-actions-left,
.nav-actions-right {
  display: flex;
  gap: 8px;
}
.panel {
  background: #ffffff;
  border: 1px solid var(--line-100);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(17, 24, 39, 0.06);
}

.panel-title {
  color: var(--ink-900);
  font-weight: 450;
}

.modal-title {
  margin: 0 0 18px;
  padding: 10px 14px;
  background: var(--brand-100);
  color: var(--brand-800);
  border-radius: 12px;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.01em;
  border: 1px solid rgba(21, 101, 154, 0.12);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 400;
  font-size: 13px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn-primary {
  background: var(--brand-700);
  color: #ffffff;
  box-shadow: 0 8px 16px rgba(21, 101, 154, 0.2);
}

.btn-primary:hover {
  background: var(--brand-800);
  transform: translateY(-1px);
}

.btn-disabled {
  opacity: 0.6;
  box-shadow: none;
  transform: none;
  cursor: not-allowed;
}

.btn-disabled:hover {
  transform: none;
}

.btn-ghost {
  background: var(--surface-200);
  color: var(--ink-700);
}

.btn-ghost:hover {
  background: #e3edf2;
}

.btn-danger {
  background: #fef2f2;
  color: var(--danger-600);
  border: 1px solid #f4c7c7;
}

.btn-danger:hover {
  background: #fde8e8;
}

.chip {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 4px 12px;
  border-radius: 12px;
  background: #edf3f6;
  color: #2b5d74;
  font-weight: 400;
  font-size: 13px;
  border: 1px solid rgba(21, 101, 154, 0.2);
  position: relative;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.chip-active {
  background: var(--brand-100);
  color: var(--brand-800);
  border-color: #c7e1ef;
}

.category-filter.active {
  background: #d7eaf4;
  color: #0f3f66;
  border-color: rgba(15, 63, 102, 0.35);
  box-shadow: 0 10px 22px rgba(15, 63, 102, 0.2);
  transform: translateY(-1px);
}

.category-filter.active::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.65;
  position: absolute;
  top: 6px;
  right: 8px;
}

.category-filter[data-category="accident"],
.category-filter[data-category="traffic"],
.category-filter[data-category="warning"],
.category-filter[data-category="event"],
.category-filter[data-category="other"] {
  background: #edf3f6;
  color: #2b5d74;
  border-color: rgba(21, 101, 154, 0.2);
}

.muted {
  color: var(--ink-500);
}

input,
select,
textarea {
  border-color: var(--line-100);
  border-radius: 10px;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--brand-600);
  box-shadow: 0 0 0 3px rgba(27, 127, 177, 0.12);
}

.card {
  border: 1px solid var(--line-100);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(17, 24, 39, 0.06);
  overflow: visible;
}

.post-card {
  cursor: pointer;
}

.post-stats {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.post-media {
  border-radius: 16px 16px 0 0;
  overflow: hidden;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--brand-100);
  color: var(--brand-800);
  font-weight: 400;
  font-size: 11px;
}

.badge-muted {
  background: var(--surface-200);
  color: var(--ink-700);
}

.card-title {
  font-weight: 400;
  color: var(--ink-900);
}

.text-link {
  color: var(--brand-700);
  font-weight: 400;
}

.text-link:hover {
  color: var(--brand-800);
}

.icon-button {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-700);
  background: var(--brand-100);
}

.icon-button:hover {
  color: var(--brand-800);
  background: #d7eaf4;
}

.icon-button-danger {
  color: var(--danger-600);
  background: #fbeaea;
}

.icon-button-danger:hover {
  background: #f6dcdc;
}

.post-actions {
  position: relative;
}

.menu-button {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: none;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.menu-button img {
  width: 18px;
  height: 18px;
  display: block;
}

.menu-button:hover {
  background: #edf3f6;
}

.context-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 140px;
  background: #ffffff;
  border: 1px solid rgba(15, 63, 102, 0.12);
  border-radius: 12px;
  box-shadow: 0 12px 24px rgba(15, 63, 102, 0.12);
  padding: 6px;
  z-index: 20;
}

.context-menu.hidden {
  display: none;
}

.context-item {
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--ink-700);
  font-size: 13px;
  cursor: pointer;
}

.context-item:hover {
  background: #edf3f6;
  color: var(--brand-800);
}

.table-head {
  background: var(--surface-200);
  color: var(--ink-700);
  font-weight: 400;
}

.table-row:hover {
  background: #f7faf9;
}

.stat-card {
  background: #ffffff;
  border: 1px solid var(--line-100);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(17, 24, 39, 0.06);
}

.stat-card i {
  color: var(--brand-600);
}

.tab-active {
  color: var(--brand-800);
  border-bottom: 2px solid var(--brand-700);
  font-weight: 400;
}

.admin-tabs {
  gap: 4px;
}

.admin-tabs .tab-button {
  white-space: nowrap;
}

.map-shell {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line-100);
}

#map {
  width: 100%;
  height: 520px;
}

#map,
.map-shell {
  position: relative;
  z-index: 1;
}

.empty-state {
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  grid-template-columns: none;
  gap: 0;
}

.dialog-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 20000;
}

.dialog-card {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid var(--line-100);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.18);
  width: min(420px, 92vw);
  padding: 18px 20px 20px;
}

.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.dialog-title {
  font-size: 18px;
  font-weight: 500;
  color: var(--ink-900);
}

.dialog-close {
  border: none;
  background: var(--surface-200);
  color: var(--ink-700);
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.dialog-close:hover {
  background: #e3edf2;
}

.dialog-body {
  color: var(--ink-700);
  font-size: 14px;
  line-height: 1.6;
}

.dialog-media {
  margin-bottom: 14px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface-200);
}

.dialog-image {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: cover;
}

.dialog-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.dialog-label {
  font-size: 12px;
  color: var(--ink-500);
}

.dialog-value {
  font-size: 13px;
  color: var(--ink-900);
}

.dialog-divider {
  height: 1px;
  background: var(--line-100);
  margin: 12px 0;
}

.dialog-description {
  font-size: 14px;
  color: var(--ink-700);
}

.dialog-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.dialog-textarea {
  border: 1px solid var(--line-100);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
  resize: vertical;
}

.dialog-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

#post-modal,
#auth-modal {
  z-index: 20000;
}

.post-map {
  width: 100%;
  height: 220px;
  border-radius: 14px;
  border: 1px solid var(--line-100);
  overflow: hidden;
  background: var(--surface-200);
}

@media (min-width: 768px) {
  .brand-logo {
    width: 160px;
  }

  #map {
    height: 560px;
  }

  .dialog-card {
    width: min(520px, 86vw);
  }

  .post-map {
    height: 260px;
  }
}

@media (min-width: 1024px) {
  .brand-logo {
    width: 104px;
  }

  #map {
    height: 620px;
  }

  .dialog-card {
    width: min(560px, 78vw);
  }

  .post-map {
    height: 300px;
  }
}

.file-input {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line-100);
  background: #ffffff;
  cursor: pointer;
}

.file-input input[type="file"] {
  display: none;
}

.file-input-button {
  background: #dfeef6;
  color: var(--brand-700);
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.file-input-name {
  font-size: 13px;
  color: var(--ink-700);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 768px) {
  body {
    font-size: 14px;
  }

  .brand-logo {
    width: 96px;
  }

  .app-nav-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  #nav-buttons,
  #admin-nav {
    width: 100%;
    justify-content: flex-start;
  }

  .nav-actions--spaced {
    width: 100%;
    justify-content: space-between;
  }

  .btn {
    padding: 8px 12px;
    font-size: 12px;
  }

  .admin-table {
    display: none;
  }

  .admin-cards {
    display: grid;
  }

  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  #map {
    height: 360px;
  }

  .panel {
    border-radius: 14px;
  }

  .admin-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 6px;
  }

  .admin-tabs .tab-button {
    padding: 10px 14px;
    font-size: 12px;
  }
}
