@font-face {
  font-family: "Noto Sans KR";
  src: url("/font/NotoSansKR-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Noto Sans KR";
  src: url("/font/NotoSansKR-SemiBold.ttf") format("truetype");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Noto Sans KR";
  src: url("/font/NotoSansKR-Bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  --ivory: #f7f4ec;
  --paper: #fffdf8;
  --white: #fff;
  --navy: #102e45;
  --navy-soft: #1d4058;
  --ink: #203744;
  --muted: #71808a;
  --line: #dcded9;
  --gold: #b9955b;
  --gold-soft: #e5d7ba;
  --sage: #87978a;
  --sage-light: #e8eee8;
  --danger: #a55353;
  --sans: "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;
  --serif: "Batang", "Times New Roman", serif;
  --shadow: 0 24px 70px rgba(16, 46, 69, 0.13);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  background: #f2f2ed;
  font-family: var(--sans);
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea {
  color: inherit;
  font: inherit;
}

button {
  cursor: pointer;
}

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

[hidden] {
  display: none !important;
}

.admin-logo {
  display: inline-flex;
  align-items: center;
  gap: 13px;
}

.admin-logo__mark {
  display: grid;
  align-items: end;
  grid-template-columns: repeat(3, 7px);
  gap: 4px;
  width: 30px;
  height: 38px;
  transform: skewX(-11deg);
}

.admin-logo__mark i {
  display: block;
  width: 7px;
  border-radius: 999px 999px 2px 2px;
  background: var(--navy);
}

.admin-logo__mark i:nth-child(1) { height: 22px; }
.admin-logo__mark i:nth-child(2) { height: 30px; }
.admin-logo__mark i:nth-child(3) { height: 38px; background: var(--gold); }

.admin-logo > span:last-child {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  line-height: 1.05;
}

.admin-logo strong {
  color: var(--navy);
  font-family: var(--serif);
  font-size: 21px;
  letter-spacing: -0.04em;
}

.admin-logo small {
  margin-top: 6px;
  color: var(--sage);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.15em;
}

.auth-screen {
  display: grid;
  grid-template-columns: minmax(460px, 0.82fr) 1.18fr;
  min-height: 100vh;
  background: var(--ivory);
}

.auth-card {
  display: flex;
  justify-content: center;
  flex-direction: column;
  width: min(100%, 550px);
  padding: 64px 72px;
  margin: 0 auto;
}

.auth-intro {
  margin-top: 95px;
}

.auth-intro > p {
  margin: 0 0 14px;
  color: var(--gold);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.auth-intro h1 {
  margin: 0;
  color: var(--navy);
  font-family: var(--serif);
  font-size: 42px;
  font-weight: 400;
  letter-spacing: -0.06em;
}

.auth-intro > span {
  display: block;
  margin-top: 15px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
}

.auth-card form {
  margin-top: 48px;
}

.auth-card label,
.admin-main label {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.auth-card label + label {
  margin-top: 20px;
}

.auth-card label > span,
.admin-main label > span {
  color: #435763;
  font-size: 11px;
  font-weight: 600;
}

.auth-card input {
  width: 100%;
  height: 52px;
  padding: 0 15px;
  border: 1px solid var(--line);
  outline: 0;
  background: var(--paper);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-card input:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(16, 46, 69, 0.08);
}

.auth-hint {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}

.auth-card form > button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 54px;
  margin-top: 22px;
  padding: 0 20px;
  color: #fff;
  border: 0;
  background: var(--navy);
  font-size: 13px;
  font-weight: 600;
}

.auth-card form > button b {
  color: var(--gold-soft);
  font-weight: 400;
}

.auth-card form > button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.auth-message,
.inline-message {
  min-height: 21px;
  margin: 12px 0 0;
  color: var(--danger);
  font-size: 11px;
}

.back-link {
  width: max-content;
  margin-top: 28px;
  color: var(--muted);
  font-size: 11px;
}

.auth-visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100vh;
  overflow: hidden;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    var(--navy);
  background-size: 52px 52px;
}

.auth-visual::before,
.auth-visual::after {
  position: absolute;
  border: 1px solid rgba(229, 215, 186, 0.2);
  border-radius: 50%;
  content: "";
}

.auth-visual::before {
  width: 650px;
  height: 650px;
}

.auth-visual::after {
  width: 470px;
  height: 470px;
}

.auth-document {
  position: relative;
  z-index: 2;
  width: min(360px, 54%);
  aspect-ratio: 0.77;
  padding: 48px 42px;
  color: var(--navy);
  background: var(--paper);
  border: 1px solid var(--gold-soft);
  box-shadow: 35px 35px 0 rgba(135, 151, 138, 0.88), 70px 70px 0 rgba(185, 149, 91, 0.24);
  transform: rotate(4deg);
}

.auth-document > span {
  display: block;
  padding-bottom: 18px;
  border-bottom: 2px solid var(--navy);
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.auth-document strong {
  display: block;
  margin-top: 70px;
  font-family: var(--serif);
  font-size: 42px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: -0.06em;
}

.auth-document i {
  display: block;
  width: 100%;
  height: 4px;
  margin-top: 17px;
  background: #dfe1dc;
  border-radius: 999px;
}

.auth-document i:nth-of-type(2) { width: 84%; }
.auth-document i:nth-of-type(3) { width: 62%; }

.auth-document small {
  position: absolute;
  bottom: 42px;
  left: 42px;
  color: var(--sage);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.13em;
}

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

.admin-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 78px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.96);
  backdrop-filter: blur(14px);
}

.admin-logo--header .admin-logo__mark {
  grid-template-columns: repeat(3, 6px);
  width: 26px;
  height: 32px;
}

.admin-logo--header .admin-logo__mark i {
  width: 6px;
}

.admin-logo--header .admin-logo__mark i:nth-child(1) { height: 18px; }
.admin-logo--header .admin-logo__mark i:nth-child(2) { height: 25px; }
.admin-logo--header .admin-logo__mark i:nth-child(3) { height: 32px; }

.admin-logo--header strong {
  font-size: 18px;
}

.admin-header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-header__actions a,
.admin-header__actions button {
  padding: 10px 14px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 11px;
}

.admin-header__actions a span {
  margin-left: 9px;
  color: var(--gold);
}

.admin-header__actions button {
  color: var(--muted);
}

.admin-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
  padding-top: 78px;
}

.admin-sidebar {
  position: fixed;
  top: 78px;
  bottom: 0;
  left: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  width: 260px;
  padding: 34px 20px 25px;
  color: rgba(255, 255, 255, 0.65);
  background: var(--navy);
}

.admin-sidebar__status {
  padding: 0 11px 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.admin-sidebar__status > span {
  color: var(--gold-soft);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.17em;
}

.admin-sidebar__status strong {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 10px;
  color: #fff;
  font-size: 12px;
}

.admin-sidebar__status strong i {
  width: 7px;
  height: 7px;
  background: #79ad88;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(121, 173, 136, 0.13);
}

.admin-sidebar__status p {
  margin: 10px 0 0;
  font-size: 9px;
  line-height: 1.55;
}

.admin-sidebar nav {
  display: grid;
  gap: 4px;
  margin-top: 28px;
}

.admin-sidebar nav button {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  height: 48px;
  padding: 0 13px;
  color: rgba(255, 255, 255, 0.58);
  border: 0;
  border-radius: 3px;
  background: transparent;
  font-size: 12px;
  text-align: left;
}

.admin-sidebar nav button span {
  width: 28px;
  color: var(--gold-soft);
  font-family: var(--serif);
  font-size: 9px;
}

.admin-sidebar nav button b {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-left: auto;
  color: var(--navy);
  background: var(--gold-soft);
  border-radius: 50%;
  font-size: 9px;
}

.admin-sidebar nav button[aria-current="page"] {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.admin-sidebar nav button[aria-current="page"]::before {
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 0;
  width: 2px;
  background: var(--gold);
  content: "";
}

.admin-sidebar__guide {
  margin-top: auto;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
}

.admin-sidebar__guide strong {
  color: var(--gold-soft);
  font-size: 10px;
}

.admin-sidebar__guide p {
  margin: 9px 0 0;
  font-size: 9px;
  line-height: 1.7;
}

.admin-main {
  grid-column: 2;
  width: min(970px, calc(100% - 70px));
  margin: 0 auto;
  padding: 58px 0 130px;
}

.panel-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 38px;
}

.panel-heading p {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.17em;
}

.panel-heading h1 {
  margin: 0;
  color: var(--navy);
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 400;
  letter-spacing: -0.05em;
}

.panel-heading > div > span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 11px;
}

.panel-heading > a,
.panel-action {
  padding: 11px 14px;
  color: var(--navy);
  border: 1px solid var(--line);
  background: var(--paper);
  font-size: 10px;
}

.admin-main fieldset {
  min-width: 0;
  margin: 0 0 22px;
  padding: 30px;
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: 0 8px 25px rgba(16, 46, 69, 0.035);
}

.admin-main legend {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  color: var(--navy);
  font-size: 13px;
  font-weight: 600;
}

.admin-main legend span {
  color: var(--gold);
  font-family: var(--serif);
  font-size: 10px;
}

.admin-main fieldset > label,
.admin-main .field-grid {
  margin-top: 19px;
}

.admin-main fieldset > label:first-of-type {
  margin-top: 10px;
}

.field-grid {
  display: grid;
  gap: 20px;
}

.field-grid--2 {
  grid-template-columns: 1fr 1fr;
}

.admin-main input:not([type="checkbox"]),
.admin-main textarea {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid #d2d6d2;
  outline: 0;
  background: #fff;
  font-size: 12px;
  line-height: 1.6;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.admin-main input:not([type="checkbox"]) {
  height: 45px;
}

.admin-main textarea {
  resize: vertical;
}

.admin-main input:focus,
.admin-main textarea:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(16, 46, 69, 0.07);
}

.service-editor-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.service-editor-list fieldset {
  margin: 0;
}

.toggle-field {
  display: flex !important;
  align-items: center;
  flex-direction: row !important;
  gap: 14px !important;
  padding: 16px;
  border: 1px solid var(--line);
  background: var(--sage-light);
}

.toggle-field input {
  width: 38px;
  height: 20px;
  accent-color: var(--navy);
}

.toggle-field > span {
  display: flex;
  flex-direction: column;
}

.toggle-field strong {
  color: var(--navy);
  font-size: 11px;
}

.toggle-field small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.savebar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 260px;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 82px;
  padding: 14px max(36px, calc((100vw - 260px - 970px) / 2));
  border-top: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.96);
  box-shadow: 0 -12px 35px rgba(16, 46, 69, 0.08);
  backdrop-filter: blur(14px);
}

.savebar > div {
  display: flex;
  flex-direction: column;
}

.savebar strong {
  color: var(--navy);
  font-size: 11px;
}

.savebar span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.savebar button,
.security-submit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 185px;
  height: 46px;
  padding: 0 18px;
  color: #fff;
  border: 0;
  background: var(--navy);
  font-size: 11px;
  font-weight: 600;
}

.savebar button b,
.security-submit span {
  color: var(--gold-soft);
  font-weight: 400;
}

.savebar button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.inquiry-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding: 18px 22px;
  color: var(--navy);
  background: var(--sage-light);
  border: 1px solid #d7dfd7;
}

.inquiry-toolbar strong {
  font-size: 12px;
}

.inquiry-toolbar strong span {
  color: var(--gold);
  font-family: var(--serif);
  font-size: 17px;
}

.inquiry-toolbar p {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
}

.inquiry-list {
  display: grid;
  gap: 12px;
}

.inquiry-card {
  padding: 24px 26px;
  border: 1px solid var(--line);
  background: var(--paper);
}

.inquiry-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.inquiry-card__head > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.inquiry-card__head b {
  color: var(--navy);
  font-size: 13px;
}

.inquiry-card__head span {
  padding: 5px 8px;
  color: var(--navy);
  background: var(--sage-light);
  font-size: 9px;
}

.inquiry-card__head time {
  color: var(--muted);
  font-size: 9px;
}

.inquiry-card__meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  margin-top: 17px;
}

.inquiry-card__meta div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.inquiry-card__meta small {
  color: var(--sage);
  font-size: 8px;
  font-weight: 700;
}

.inquiry-card__meta strong,
.inquiry-card__meta a {
  color: #415663;
  font-size: 10px;
  font-weight: 500;
}

.inquiry-card__message {
  margin: 18px 0 0;
  padding: 16px;
  color: #536771;
  background: #f5f5f0;
  font-size: 11px;
  line-height: 1.75;
  white-space: pre-wrap;
}

.inquiry-empty {
  padding: 80px 20px;
  color: var(--muted);
  border: 1px dashed #c8cec8;
  background: var(--paper);
  font-size: 12px;
  text-align: center;
}

.field-help {
  margin: 15px 0;
  color: var(--muted);
  font-size: 9px;
}

.security-submit {
  margin-top: 20px;
}

.admin-toast {
  position: fixed;
  right: 24px;
  bottom: 100px;
  z-index: 100;
  max-width: 350px;
  padding: 15px 19px;
  color: #fff;
  background: var(--navy);
  border-left: 3px solid var(--gold);
  box-shadow: var(--shadow);
  font-size: 11px;
}

.admin-toast.is-error {
  background: #673d3d;
  border-left-color: #df8e8e;
}

@media (max-width: 1050px) {
  .admin-layout {
    grid-template-columns: 210px minmax(0, 1fr);
  }

  .admin-sidebar {
    width: 210px;
  }

  .admin-main {
    width: calc(100% - 44px);
  }

  .savebar {
    left: 210px;
    padding-right: 25px;
    padding-left: 25px;
  }
}

@media (max-width: 820px) {
  .auth-screen {
    grid-template-columns: 1fr;
  }

  .auth-card {
    min-height: 100vh;
  }

  .auth-visual {
    display: none;
  }

  .admin-layout {
    display: block;
  }

  .admin-sidebar {
    position: fixed;
    top: 78px;
    right: 0;
    bottom: auto;
    width: 100%;
    height: 62px;
    padding: 7px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }

  .admin-sidebar__status,
  .admin-sidebar__guide {
    display: none;
  }

  .admin-sidebar nav {
    display: flex;
    gap: 4px;
    margin: 0;
    overflow-x: auto;
  }

  .admin-sidebar nav button {
    flex: 0 0 auto;
    width: auto;
    padding: 0 15px;
  }

  .admin-sidebar nav button span {
    display: none;
  }

  .admin-main {
    width: calc(100% - 34px);
    padding-top: 95px;
  }

  .service-editor-list {
    grid-template-columns: 1fr;
  }

  .savebar {
    left: 0;
  }
}

@media (max-width: 580px) {
  .auth-card {
    padding: 36px 24px;
  }

  .auth-intro {
    margin-top: 70px;
  }

  .admin-header {
    height: 68px;
    padding: 0 14px;
  }

  .admin-logo--header small,
  .admin-header__actions a {
    display: none;
  }

  .admin-sidebar {
    top: 68px;
    height: 56px;
    padding: 5px 10px;
  }

  .admin-sidebar nav button {
    height: 44px;
    padding: 0 11px;
    font-size: 10px;
  }

  .admin-main {
    padding-top: 80px;
  }

  .panel-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }

  .admin-main fieldset {
    padding: 22px 16px;
  }

  .field-grid--2 {
    grid-template-columns: 1fr;
  }

  .savebar {
    min-height: 70px;
    padding: 10px 14px;
  }

  .savebar > div {
    display: none;
  }

  .savebar button {
    width: 100%;
  }

  .inquiry-toolbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .inquiry-card__head,
  .inquiry-card__head > div {
    align-items: flex-start;
    flex-direction: column;
  }

  .inquiry-card__meta {
    grid-template-columns: 1fr 1fr;
  }

  .admin-toast {
    right: 14px;
    bottom: 82px;
    left: 14px;
    max-width: none;
  }
}
