@font-face {
    font-family: "Pretendard Variable";
    src: url("./fonts/PretendardVariable.woff2") format("woff2");
    font-weight: 45 920;
    font-display: swap;
}

:root {
    --brand: #0b4fd4;
    --brand-deep: #082f86;
    --ink: #111827;
    --muted: #667085;
    --line: #dfe4ec;
    --surface: #f5f7fb;
    --white: #fff;
    --danger: #c62828;
    --success: #147a50;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    color: var(--ink);
    background: var(--surface);
    font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
    letter-spacing: -.012em;
    word-break: keep-all;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button, input, textarea, select { color: inherit; font: inherit; }
button { cursor: pointer; }

.skip-link {
    position: fixed;
    top: 8px;
    left: 8px;
    z-index: 100;
    padding: 10px 16px;
    color: #fff;
    background: #111827;
    border-radius: 8px;
    transform: translateY(-150%);
}

.skip-link:focus { transform: translateY(0); }

.inquiry-header, .admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(1180px, calc(100% - 64px));
    min-height: 82px;
    margin: 0 auto;
}

.wordmark, .admin-wordmark { display: inline-flex; align-items: center; gap: 12px; }

.wordmark-mark, .admin-wordmark span {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    color: #fff;
    background: var(--brand);
    border-radius: 10px;
    font-size: 21px;
    font-weight: 850;
}

.wordmark > span:last-child { display: grid; line-height: 1.15; }
.wordmark b, .admin-wordmark b { font-size: 16px; letter-spacing: .01em; }
.wordmark small { margin-top: 4px; color: var(--muted); font-size: 10px; }

.header-link {
    padding: 9px 0;
    color: #495369;
    border-bottom: 1px solid #aeb7c7;
    font-size: 13px;
    font-weight: 650;
}

.inquiry-main {
    display: grid;
    grid-template-columns: minmax(0, .86fr) minmax(540px, 1.14fr);
    width: min(1180px, calc(100% - 64px));
    min-height: calc(100vh - 154px);
    margin: 0 auto;
    padding: 72px 0 88px;
}

.inquiry-copy {
    align-self: start;
    padding: 48px 74px 48px 0;
}

.eyebrow, .panel-heading p, .admin-title p, .login-card > p, .card-label {
    margin: 0 0 18px;
    color: var(--brand);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .15em;
}

.inquiry-copy h1 {
    margin: 0;
    font-size: clamp(42px, 5.2vw, 66px);
    line-height: 1.06;
    letter-spacing: -.055em;
}

.inquiry-copy > p:not(.eyebrow) {
    max-width: 450px;
    margin: 28px 0 0;
    color: var(--muted);
    font-size: 16px;
}

.inquiry-copy dl { margin: 56px 0 0; }
.inquiry-copy dl div { display: grid; grid-template-columns: 92px 1fr; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.inquiry-copy dt { color: #8a94a6; font-size: 12px; }
.inquiry-copy dd { margin: 0; font-size: 13px; font-weight: 650; }
.inquiry-copy dd a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }

.inquiry-panel {
    padding: clamp(34px, 5vw, 62px);
    background: #fff;
    border: 1px solid #e5e9f0;
    border-radius: 26px;
    box-shadow: 0 28px 80px rgba(20, 35, 68, .1);
}

.panel-heading h2, .success-panel h2 {
    margin: 0;
    font-size: clamp(27px, 3vw, 38px);
    line-height: 1.2;
    letter-spacing: -.045em;
}

.inquiry-panel form { display: grid; gap: 26px; margin-top: 38px; }
.field { display: grid; }
.field label, .status-form label, .login-card label { margin-bottom: 9px; font-size: 13px; font-weight: 750; }
.field label span { margin-left: 5px; color: var(--brand); font-size: 10px; }

.field input, .field textarea, .login-card input, .filter-form select, .status-form select {
    width: 100%;
    border: 1px solid #ced5e0;
    border-radius: 10px;
    outline: 0;
    background: #fff;
    transition: border-color .18s, box-shadow .18s;
}

.field input, .login-card input { min-height: 52px; padding: 0 15px; }
.field textarea { min-height: 188px; padding: 14px 15px; line-height: 1.7; resize: vertical; }
.field input:focus, .field textarea:focus, .login-card input:focus, .filter-form select:focus, .status-form select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(11, 79, 212, .12);
}

.field [aria-invalid="true"] { border-color: var(--danger); }
.field small { margin-top: 7px; color: #8992a3; font-size: 11px; }
.field-error { display: block; margin-top: 6px; color: var(--danger); font-size: 12px; font-style: normal; }

.privacy-field { padding: 17px 18px; background: #f7f9fd; border-radius: 10px; }
.privacy-field label { display: flex; align-items: flex-start; gap: 11px; color: #606a7d; font-size: 12px; cursor: pointer; }
.privacy-field input { flex: 0 0 auto; width: 17px; height: 17px; margin: 3px 0 0; accent-color: var(--brand); }
.privacy-field b { color: #30384a; }

.submit-button, .primary-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    padding: 0 22px;
    color: #fff;
    background: var(--brand);
    border: 0;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 800;
}

.submit-button { width: 100%; justify-content: space-between; }
.submit-button:hover, .primary-action:hover { background: var(--brand-deep); }
.honeypot { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.form-alert { margin: 26px 0 0; padding: 13px 15px; color: #852424; background: #fff1f1; border-radius: 9px; font-size: 12px; }

.success-panel { display: grid; align-content: center; min-height: 540px; text-align: center; }
.success-panel > span { display: grid; place-items: center; width: 54px; height: 54px; margin: 0 auto 26px; color: #fff; background: var(--success); border-radius: 50%; font-size: 22px; font-weight: 800; }
.success-panel > p { margin: 0 0 12px; color: var(--success); font-size: 12px; font-weight: 800; letter-spacing: .08em; }
.success-actions { display: grid; gap: 14px; margin-top: 38px; }
.success-actions > a:last-child { color: var(--muted); font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }

.inquiry-footer { display: flex; justify-content: space-between; width: min(1180px, calc(100% - 64px)); margin: 0 auto; padding: 22px 0 34px; color: #8a94a6; font-size: 11px; }

/* 관리자 --------------------------------------------------------------- */
.admin-page { min-height: 100vh; background: #f3f5f8; }
.admin-header { width: min(1320px, calc(100% - 64px)); border-bottom: 1px solid #dfe4eb; }
.admin-header form { margin: 0; }
.admin-header button, .back-link { color: #536074; background: transparent; border: 0; font-size: 12px; font-weight: 700; }
.admin-header button:hover, .back-link:hover { color: var(--brand); }

.admin-main { width: min(1320px, calc(100% - 64px)); margin: 0 auto; padding: 62px 0 90px; }
.admin-title { display: flex; align-items: end; justify-content: space-between; gap: 28px; }
.admin-title p { margin-bottom: 9px; }
.admin-title h1 { margin: 0; font-size: 38px; letter-spacing: -.045em; }
.admin-title > strong { color: #5e687b; font-size: 14px; }

.filter-form { display: flex; align-items: end; flex-wrap: wrap; gap: 8px; margin: 34px 0 18px; }
/* 라벨은 화면에서 감추되 낭독기에는 남긴다. 입력칸이 늘어 placeholder 만으로는 구분이 어렵다. */
.filter-form label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.filter-field { display: flex; flex-direction: column; }
.filter-field.grow { flex: 1 1 200px; min-width: 160px; }
.filter-form select { width: 180px; height: 42px; padding: 0 12px; font-size: 12px; }
.filter-form input {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    border: 1px solid #ced5e0;
    border-radius: 10px;
    outline: 0;
    background: #fff;
    font-size: 12px;
    transition: border-color .18s, box-shadow .18s;
}
.filter-form input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(11, 79, 212, .12); }
.filter-form input[type="date"] { width: 150px; }
.filter-dash { align-self: center; padding-bottom: 12px; color: #9aa3b4; font-size: 12px; }
.filter-reset {
    display: inline-flex;
    align-items: center;
    height: 42px;
    padding: 0 15px;
    border: 1px solid #d7dce6;
    border-radius: 8px;
    color: #5c6579;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}
.filter-reset:hover { border-color: #b9c1d0; background: #f6f8fc; }

@media (max-width: 720px) {
    .filter-form select, .filter-form input[type="date"] { width: 100%; }
    .filter-field { flex: 1 1 140px; }
    .filter-dash { display: none; }
}
.filter-form button, .status-form button {
    height: 42px;
    padding: 0 17px;
    color: #fff;
    background: #202838;
    border: 0;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 750;
}

.admin-table-card, .detail-card { background: #fff; border: 1px solid #e0e5ec; border-radius: 14px; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; font-size: 12px; }
th, td { padding: 16px 18px; border-bottom: 1px solid #edf0f4; text-align: left; }
th { color: #7c8698; background: #fafbfc; font-size: 10px; letter-spacing: .05em; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f8faff; }
td:first-child a, .content-link { color: #243b7b; font-weight: 700; }
.contact-cell { max-width: 210px; overflow: hidden; text-overflow: ellipsis; }
.content-link { display: block; max-width: 360px; overflow: hidden; text-overflow: ellipsis; }

.status-badge { display: inline-flex; align-items: center; min-height: 26px; padding: 0 9px; border-radius: 99px; font-size: 10px; font-weight: 800; }
.status-badge.received { color: #2456b9; background: #eaf1ff; }
.status-badge.in-progress { color: #98610e; background: #fff4d8; }
.status-badge.completed { color: #19704d; background: #e6f7ef; }
.empty-state { display: grid; place-items: center; gap: 5px; min-height: 260px; color: #8a94a6; text-align: center; }
.empty-state b { color: #495368; font-size: 16px; }
.empty-state span { font-size: 12px; }

.pagination { display: flex; align-items: center; justify-content: center; gap: 22px; margin-top: 24px; font-size: 12px; }
.pagination a { color: var(--brand); font-weight: 750; }
.pagination span { color: #a5adba; }

.detail-main { max-width: 1120px; }
.detail-main .admin-title { margin-top: 22px; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(320px, .55fr); gap: 18px; margin-top: 30px; }
.detail-card { padding: 30px; }
.inquiry-content-card pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; font-size: 15px; line-height: 1.8; }
.inquiry-meta-card dl { margin: 0; }
.inquiry-meta-card dl > div { padding: 15px 0; border-top: 1px solid #edf0f4; }
.inquiry-meta-card dl > div:first-child { padding-top: 0; border-top: 0; }
.inquiry-meta-card dt { margin-bottom: 5px; color: #8992a3; font-size: 10px; }
.inquiry-meta-card dd { margin: 0; overflow-wrap: anywhere; font-size: 13px; font-weight: 650; }
.inquiry-meta-card dd small { display: block; margin-top: 3px; color: #939bab; font-size: 10px; font-weight: 500; }
.status-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 24px; padding-top: 24px; border-top: 1px solid #e3e7ed; }
.status-form label { grid-column: 1 / -1; }
.status-form select { height: 42px; padding: 0 12px; font-size: 12px; }
.admin-alert { margin: 22px 0 0; padding: 12px 14px; color: #17613f; background: #e8f7ef; border-radius: 8px; font-size: 12px; }
.admin-alert.error { color: #902d2d; background: #fff0f0; }

/* 관리자 로그인 -------------------------------------------------------- */
.admin-login-page { display: grid; min-height: 100vh; place-items: center; background: #111827; }
.login-shell { width: min(420px, calc(100% - 40px)); }
.login-shell .admin-wordmark { margin: 0 0 22px; color: #fff; }
.login-card { padding: 38px; background: #fff; border-radius: 18px; box-shadow: 0 26px 80px rgba(0, 0, 0, .3); }
.login-card > p { margin-bottom: 8px; }
.login-card h1 { margin: 0 0 28px; font-size: 28px; letter-spacing: -.04em; }
.login-card form { display: grid; }
.login-card label { margin-top: 18px; }
.login-card button { min-height: 50px; margin-top: 26px; color: #fff; background: var(--brand); border: 0; border-radius: 9px; font-weight: 800; }
.login-shell > small { display: block; margin-top: 18px; color: #8992a3; text-align: center; }

@media (max-width: 900px) {
    .inquiry-main { grid-template-columns: 1fr; }
    .inquiry-copy { padding: 30px 0 50px; }
    .inquiry-copy > p:not(.eyebrow) { max-width: 620px; }
    .inquiry-copy dl { margin-top: 36px; }
    .detail-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
    .inquiry-header, .inquiry-main, .inquiry-footer, .admin-header, .admin-main { width: min(100% - 34px, 100%); }
    .inquiry-header, .admin-header { min-height: 68px; }
    .wordmark-mark, .admin-wordmark span { width: 34px; height: 34px; }
    .header-link { font-size: 11px; }
    .inquiry-main { padding: 30px 0 56px; }
    .inquiry-copy { padding: 22px 0 38px; }
    .inquiry-copy h1 { font-size: 41px; }
    .inquiry-copy > p:not(.eyebrow) { margin-top: 21px; font-size: 14px; }
    .inquiry-copy dl div { grid-template-columns: 78px 1fr; }
    .inquiry-panel { padding: 27px 20px; border-radius: 18px; }
    .success-panel { min-height: 430px; }
    .inquiry-footer { display: grid; gap: 4px; }
    .admin-main { padding: 42px 0 70px; }
    .admin-title { align-items: start; }
    .admin-title h1 { font-size: 31px; }
    .filter-form select { flex: 1; width: auto; }
    .detail-card { padding: 22px 18px; }
    .login-card { padding: 30px 23px; }
}


.password-card { max-width: 460px; padding: 28px 30px 30px; }
.password-account { margin-bottom: 20px; color: #7c8698; font-size: 12px; }
.password-account b { color: #202838; font-size: 13px; }
.password-card .field + .field { margin-top: 16px; }
.password-card button {
    width: 100%;
    height: 46px;
    margin-top: 22px;
    border: 0;
    border-radius: 10px;
    color: #fff;
    background: var(--brand);
    font-size: 13px;
    font-weight: 750;
}


/* 관리자 헤더 오른쪽 묶음 ------------------------------------------------
   링크와 버튼을 같은 상자로 맞춘다. 그냥 두면 button 의 기본 여백·line-height 때문에
   링크보다 2px 높고 1px 아래로 내려앉아 줄이 안 맞는다. */
.admin-header-actions { display: flex; align-items: center; gap: 2px; }
.admin-header-actions > a,
.admin-header-actions form > button {
    display: inline-flex;
    align-items: center;
    height: 34px;
    padding: 0 12px;
    border: 0;
    border-radius: 8px;
    color: #536074;
    background: transparent;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
}
.admin-header-actions > a:hover,
.admin-header-actions form > button:hover { color: var(--brand); background: #eef2fa; }

/* 사용자 관리 --------------------------------------------------------- */
.create-card { margin: 26px 0 10px; padding: 22px 24px 18px; }
.create-card .filter-form { margin: 12px 0 0; }
.create-hint { display: block; margin-top: 10px; color: #8992a3; font-size: 11px; }

.issued-card { margin: 22px 0 0; padding: 18px 20px; border: 1px solid #b9d3ff; border-radius: 12px; background: #f2f7ff; }
.issued-card p { margin: 0 0 10px; color: #3c4a63; font-size: 12px; }
.issued-card code {
    display: inline-block;
    padding: 10px 14px;
    border: 1px solid #cbd9f2;
    border-radius: 8px;
    background: #fff;
    color: #14306e;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .08em;
}
.issued-card small { display: block; margin-top: 10px; color: #6b7891; font-size: 11px; }

/* 표 안의 입력칸. 행 높이가 들쭉날쭉하지 않게 높이를 하나로 고정한다. */
.admin-table-card td input[type="text"],
.admin-table-card td select {
    width: 100%;
    height: 34px;
    padding: 0 10px;
    border: 1px solid #d7dce6;
    border-radius: 8px;
    background: #fff;
    font-size: 12px;
}
.admin-table-card td input[type="text"]:focus,
.admin-table-card td select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(11, 79, 212, .12); outline: 0; }
.admin-table-card td input[type="checkbox"] { width: 17px; height: 17px; margin: 0; accent-color: var(--brand); }

.cell-id b { font-size: 12.5px; }
.cell-center { text-align: center; }
.cell-meta { color: #97a0b2; font-size: 11px; }

.row-actions { display: flex; align-items: center; gap: 6px; }
.row-actions form { margin: 0; }
.row-actions button {
    height: 34px;
    padding: 0 12px;
    border: 1px solid #cfd5e2;
    border-radius: 8px;
    background: #fff;
    color: #4b5568;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}
.row-actions button:hover { border-color: var(--brand); color: var(--brand); }
.row-actions button.primary { border-color: var(--brand); background: var(--brand); color: #fff; }
.row-actions button.primary:hover { background: var(--brand-deep); color: #fff; }
.row-actions button.danger { border-color: #e4b7b7; color: #b3352c; }
.row-actions button.danger:hover { background: #fff3f2; border-color: #d38b8b; color: #b3352c; }

.self-badge { margin-left: 6px; padding: 2px 7px; border-radius: 99px; background: #e9eefb; color: #35508f; font-size: 10px; font-weight: 700; }

/* 사용자 표는 입력칸이 들어가 좁으면 눌린다. 가로 스크롤로 넘긴다. */
.admin-table-card table.user-table { min-width: 980px; }
