:root {
    --ink: #172027;
    --body: #52616a;
    --muted: #7b8990;
    --line: #dde5e9;
    --paper: #ffffff;
    --soft: #f4f7f6;
    --teal: #0b7f78;
    --blue: #176b8f;
    --amber: #d79728;
    --danger: #b42318;
    --shadow: 0 18px 48px rgba(23, 32, 39, 0.1);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--soft);
    font-family: Arial, "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;
    line-height: 1.55;
    letter-spacing: 0;
}

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

button,
input,
select,
textarea {
    font: inherit;
    letter-spacing: 0;
}

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

.admin-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 22px;
    color: #dbe6e8;
    background: #171b1f;
}

.admin-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
}

.admin-brand span,
.login-mark {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    border-radius: 8px;
    color: #fff;
    background: linear-gradient(135deg, var(--teal), var(--blue));
    font-weight: 800;
}

.admin-sidebar nav {
    display: grid;
    gap: 4px;
    overflow-y: auto;
}

.admin-sidebar nav a,
.admin-sidebar-foot a {
    padding: 10px 12px;
    border-radius: 6px;
    color: #b8c4c8;
    font-weight: 700;
}

.admin-sidebar nav a:hover,
.admin-sidebar nav a.is-active,
.admin-sidebar-foot a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.admin-sidebar-foot {
    display: grid;
    gap: 4px;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.admin-shell {
    min-width: 0;
}

.admin-topbar {
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 30px;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
}

.admin-topbar span,
.panel-head span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.admin-topbar strong {
    display: block;
    font-size: 24px;
}

.admin-topbar p {
    margin: 0;
    color: var(--body);
}

.admin-main {
    padding: 30px;
}

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

.stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 20px;
}

.stat-card,
.admin-panel {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    box-shadow: var(--shadow);
}

.stat-card {
    padding: 24px;
}

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

.stat-card strong {
    display: block;
    margin-top: 10px;
    font-size: 38px;
    line-height: 1;
}

.stat-card.accent {
    color: #fff;
    border-color: var(--teal);
    background: linear-gradient(135deg, var(--teal), var(--blue));
}

.stat-card.accent span {
    color: rgba(255, 255, 255, 0.82);
}

.two-columns,
.content-layout,
.inquiry-layout {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
}

.admin-panel {
    padding: 24px;
    min-width: 0;
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.panel-head h2 {
    margin: 0;
    font-size: 22px;
    letter-spacing: 0;
}

.panel-head a {
    color: var(--blue);
    font-weight: 800;
}

.admin-list {
    display: grid;
    gap: 10px;
}

.admin-list a,
.inquiry-list a {
    display: grid;
    gap: 4px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.admin-list span,
.inquiry-list span,
.admin-table small {
    color: var(--muted);
    font-size: 13px;
}

.empty,
.empty-state {
    color: var(--muted);
}

.login-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 20px;
    background:
        linear-gradient(135deg, rgba(23, 32, 39, 0.88), rgba(11, 127, 120, 0.68)),
        url("/assets/images/about-01.jpg") center / cover;
}

.login-card {
    width: min(420px, 100%);
    display: grid;
    gap: 16px;
    padding: 34px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.24);
}

.login-card h1 {
    margin: 0;
    font-size: 30px;
}

.login-card p {
    margin: 0 0 8px;
    color: var(--body);
}

label {
    display: grid;
    gap: 7px;
    color: var(--ink);
    font-size: 14px;
    font-weight: 800;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid #cbd6da;
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    padding: 12px 13px;
    outline: none;
}

textarea {
    resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(11, 127, 120, 0.12);
}

.login-card button,
.admin-button {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 8px;
    color: #fff;
    background: var(--teal);
    padding: 11px 18px;
    font-weight: 800;
    cursor: pointer;
}

.admin-button.secondary {
    color: var(--blue);
    background: rgba(23, 107, 143, 0.1);
}

.admin-button.danger {
    background: var(--danger);
}

.admin-alert {
    padding: 14px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-weight: 700;
}

.admin-alert p {
    margin: 0;
}

.admin-alert.success {
    color: #0b5c3d;
    background: #e8f6ef;
}

.admin-alert.error {
    color: var(--danger);
    background: #fff0ee;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.settings-panel,
.edit-panel {
    display: grid;
    gap: 16px;
}

.settings-panel .wide {
    grid-column: 1 / -1;
}

.slim-grid {
    grid-template-columns: 160px 1fr;
    align-items: end;
}

.check-label {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.check-label input {
    width: auto;
}

.admin-table-wrap {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
}

.admin-table th,
.admin-table td {
    padding: 14px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.admin-table th {
    color: var(--muted);
    font-size: 13px;
}

.admin-table td strong,
.admin-table td small {
    display: block;
}

.table-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.table-actions a,
.table-actions button {
    border: 0;
    background: transparent;
    color: var(--blue);
    font-weight: 800;
    cursor: pointer;
    padding: 0;
}

.table-actions button {
    color: var(--danger);
}

.inquiry-list {
    display: grid;
    gap: 10px;
    max-height: calc(100vh - 190px);
    overflow-y: auto;
}

.inquiry-list a.is-unread {
    border-color: rgba(11, 127, 120, 0.45);
    background: #f2fbf8;
}

.inquiry-list a.is-active {
    outline: 3px solid rgba(11, 127, 120, 0.16);
}

.inquiry-list p {
    margin: 0;
    color: var(--body);
}

.detail-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 0 0 20px;
}

.detail-list div {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.detail-list dt {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.detail-list dd {
    margin: 4px 0 0;
    color: var(--ink);
    overflow-wrap: anywhere;
}

.message-box {
    min-height: 220px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--body);
    background: #fbfcfc;
    white-space: normal;
}

.detail-actions {
    display: flex;
    gap: 10px;
    margin-top: 18px;
}

.empty-state {
    min-height: 360px;
    display: grid;
    place-content: center;
    text-align: center;
}

@media (max-width: 1080px) {
    .admin-body {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        position: static;
        height: auto;
    }

    .admin-sidebar nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .stats-grid,
    .two-columns,
    .content-layout,
    .inquiry-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .admin-main,
    .admin-topbar,
    .admin-sidebar {
        padding: 18px;
    }

    .admin-sidebar nav,
    .form-grid,
    .slim-grid,
    .detail-list {
        grid-template-columns: 1fr;
    }

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

    .panel-head,
    .admin-topbar,
    .detail-actions {
        align-items: flex-start;
        flex-direction: column;
    }
}
