@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/variable/pretendardvariable.css");

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", "Malgun Gothic", sans-serif;
    background: #f3f5f7;
    color: #1c2733;
}

a {
    color: #0f4a8a;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.topbar {
    align-items: center;
    background: #11283e;
    color: #fff;
    display: grid;
    gap: 12px;
    grid-template-columns: auto 1fr auto;
    padding: 12px 20px;
}

.brand {
    font-size: 18px;
    font-weight: 700;
}

.top-nav {
    display: flex;
    gap: 14px;
}

.top-nav a {
    color: #d6e9ff;
}

.top-nav-logout-form {
    margin: 0;
}

.top-nav-logout-button {
    background: transparent;
    border: 0;
    color: #d6e9ff;
    cursor: pointer;
    font: inherit;
    padding: 0;
}

.top-nav-logout-button:hover {
    opacity: 1;
    text-decoration: underline;
}

.user-menu {
    position: relative;
}

.user-menu-button {
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(209, 228, 250, 0.35);
    border-radius: 999px;
    color: #e6f2ff;
    display: inline-flex;
    font-size: 14px;
    font-weight: 700;
    gap: 8px;
    padding: 6px 12px;
}

.user-menu-button:hover {
    background: rgba(255, 255, 255, 0.16);
    opacity: 1;
}

.user-menu-button:focus-visible {
    box-shadow: 0 0 0 3px rgba(152, 196, 244, 0.35);
    outline: none;
}

.user-menu-caret {
    font-size: 11px;
}

.user-menu-panel {
    background: #ffffff;
    border: 1px solid #d2deea;
    border-radius: 10px;
    box-shadow: 0 14px 30px rgba(12, 35, 61, 0.2);
    min-width: 180px;
    padding: 8px;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    z-index: 20;
}

.user-menu-panel a,
.user-menu-logout-button {
    border-radius: 8px;
    color: #1d3550;
    display: block;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 10px;
    text-align: left;
    width: 100%;
}

.user-menu-panel a:hover,
.user-menu-logout-button:hover {
    background: #edf5ff;
    opacity: 1;
    text-decoration: none;
}

.user-menu-logout-form {
    margin: 0;
}

.user-menu-logout-button {
    background: transparent;
    border: 0;
    cursor: pointer;
}

.layout {
    display: grid;
    grid-template-columns: 272px 1fr;
    min-height: calc(100vh - 56px);
}

.sidebar {
    background: linear-gradient(165deg, #1f385b 0%, #102744 55%, #0b1f36 100%);
    border-right: 1px solid rgba(159, 188, 220, 0.22);
    color: #e7f0fb;
    overflow-y: auto;
    padding: 0;
}

.sidebar-title {
    color: #9db9d6;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    margin: 0 0 14px;
    text-transform: uppercase;
}

.menu-list,
.submenu-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.menu-item {
    margin: 0;
}

.menu-link-anchor,
.menu-link-label,
.menu-toggle {
    align-items: center;
    background: transparent;
    border: 0;
    border-bottom: 1px solid rgba(175, 201, 230, 0.1);
    color: #eef5ff;
    display: flex;
    font-size: 17px;
    font-weight: 600;
    justify-content: space-between;
    min-height: 52px;
    padding: 0 14px;
    transition: all 0.15s ease;
    width: 100%;
}

.menu-toggle {
    cursor: pointer;
    text-align: left;
}

.menu-link-anchor:hover,
.menu-toggle:hover {
    background: rgba(120, 160, 206, 0.16);
    text-decoration: none;
}

.menu-toggle[aria-expanded="true"] {
    background: linear-gradient(90deg, rgba(93, 141, 201, 0.92) 0%, rgba(66, 114, 173, 0.86) 100%);
    border-bottom-color: rgba(132, 180, 236, 0.45);
    color: #ffffff;
}

.menu-toggle-icon {
    color: rgba(219, 234, 252, 0.72);
    display: inline-block;
    font-size: 18px;
    transition: transform 0.18s ease;
}

.menu-toggle[aria-expanded="true"] .menu-toggle-icon {
    color: #eff6ff;
    transform: rotate(90deg);
}

.menu-link-text,
.menu-toggle-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.menu-link-icon {
    color: rgba(219, 234, 252, 0.72);
    display: inline-block;
    font-size: 18px;
    line-height: 1;
}

.submenu-list {
    background: rgba(8, 25, 44, 0.48);
    margin: 0;
    padding: 8px 0 10px;
}

.submenu-list li {
    margin: 0;
}

.submenu-link,
.submenu-link-label {
    color: #deebfa;
    display: block;
    font-size: 16px;
    font-weight: 500;
    min-height: 46px;
    padding: 10px 14px 10px 34px;
}

.submenu-link:hover {
    background: rgba(116, 160, 208, 0.18);
    color: #f2f8ff;
    text-decoration: none;
}

.submenu-link.active {
    background: rgba(102, 151, 204, 0.28);
    color: #ffffff;
    font-weight: 600;
}

.content {
    min-width: 0;
    padding: 24px;
}

.messages {
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
}

.messages li {
    background: #d8f1df;
    border-radius: 6px;
    padding: 10px 12px;
}

.messages li.error {
    background: #ffd9d9;
}

.messages li.success {
    background: #d8f1df;
}

.section-header {
    align-items: center;
    display: flex;
    justify-content: space-between;
}

.button-link,
button {
    background: #0f4a8a;
    border: 0;
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    display: inline-block;
    padding: 8px 12px;
}

.button-row {
    align-items: center;
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.button-secondary {
    background: #4f6a86;
}

.button-danger {
    background: #b53434;
}

.button-row form {
    margin: 0;
}

.button-link:hover,
button:hover {
    opacity: 0.92;
    text-decoration: none;
}

table {
    background: #fff;
    border-collapse: collapse;
    border-radius: 8px;
    margin-top: 16px;
    width: 100%;
}

th,
td {
    border-bottom: 1px solid #dde4eb;
    padding: 10px 12px;
    text-align: left;
}

.form-card {
    background: #fff;
    border-radius: 8px;
    max-width: 100%;
    padding: 20px;
}

.form-card > button[type="submit"] {
    margin-top: 10px;
}

.form-row {
    margin-bottom: 14px;
}

.form-row label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="date"],
input.date-input-modern,
select,
textarea {
    border: 1px solid #c7d3de;
    border-radius: 6px;
    padding: 8px 10px;
    width: 100%;
}

input[type="date"],
input.date-input-modern {
    appearance: none;
    background: linear-gradient(180deg, #ffffff 0%, #f2f7fd 100%);
    border: 1px solid #b5cbe1;
    border-radius: 10px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.75),
        0 1px 2px rgba(16, 43, 72, 0.08);
    color: #17324d;
    font-weight: 600;
    letter-spacing: 0.01em;
    min-height: 42px;
    padding: 8px 40px 8px 12px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

input[type="date"]:hover,
input.date-input-modern:hover {
    border-color: #8aaecd;
    background: linear-gradient(180deg, #ffffff 0%, #ebf4ff 100%);
}

input[type="date"]:focus,
input.date-input-modern:focus {
    border-color: #2b6cb0;
    box-shadow: 0 0 0 4px rgba(43, 108, 176, 0.14);
    outline: none;
}

input[type="date"]::-webkit-date-and-time-value {
    text-align: left;
}

input[type="date"]::-webkit-datetime-edit {
    color: #17324d;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    border-radius: 6px;
    cursor: pointer;
    opacity: 0.88;
    padding: 3px;
    transition: background-color 0.16s ease, opacity 0.16s ease;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
    background-color: rgba(42, 103, 168, 0.12);
    opacity: 1;
}

.flatpickr-calendar {
    background: #ffffff;
    border: 1px solid #c7d7ea;
    border-radius: 16px;
    box-shadow: 0 18px 40px rgba(18, 47, 79, 0.2);
    font-family: "Pretendard Variable", "SUIT Variable", "Noto Sans KR", "Malgun Gothic", sans-serif;
    padding: 8px 10px 10px;
    width: 356px;
}

.flatpickr-calendar.arrowTop::before,
.flatpickr-calendar.arrowTop::after {
    display: none;
}

.flatpickr-months {
    align-items: center;
    padding: 4px 2px 10px;
}

.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
    border-radius: 10px;
    color: #2d547a;
    height: 34px;
    padding: 8px;
    top: 8px;
    width: 34px;
}

.flatpickr-months .flatpickr-prev-month:hover,
.flatpickr-months .flatpickr-next-month:hover {
    background: #ecf4ff;
    color: #1f466f;
}

.flatpickr-current-month {
    font-size: 20px;
    font-weight: 800;
    height: 34px;
    left: 42px;
    line-height: 1.2;
    padding-top: 2px;
    text-align: left;
}

.flatpickr-current-month .cur-month,
.flatpickr-current-month .numInputWrapper {
    color: #17324d;
    font-size: 20px;
    font-weight: 800;
}

.flatpickr-weekdays {
    margin-bottom: 6px;
}

span.flatpickr-weekday {
    color: #466483;
    font-size: 13px;
    font-weight: 700;
}

.flatpickr-days {
    width: 100%;
}

.flatpickr-day {
    border-radius: 10px;
    color: #20374f;
    font-size: 15px;
    font-weight: 600;
    height: 42px;
    line-height: 42px;
    margin: 1px 0;
    max-width: 42px;
}

.flatpickr-day.today {
    border-color: #87add3;
    color: #1e4e7d;
}

.flatpickr-day:hover {
    background: #ebf4ff;
    border-color: transparent;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
    background: linear-gradient(180deg, #245fa1 0%, #1d4f84 100%);
    border-color: #1d4f84;
    box-shadow: 0 6px 14px rgba(29, 79, 132, 0.28);
    color: #ffffff;
}

.flatpickr-day.flatpickr-disabled,
.flatpickr-day.flatpickr-disabled:hover {
    color: #9fb1c4;
}

.flatpickr-time {
    border-top: 1px solid #e0ebf7;
    margin-top: 6px;
    padding-top: 7px;
}

.flatpickr-time input {
    color: #204060;
    font-weight: 700;
}

input[type="file"] {
    background: linear-gradient(180deg, #ffffff 0%, #f4f8fd 100%);
    border: 1px solid #c2d4e6;
    border-radius: 10px;
    color: #2c4056;
    min-height: 42px;
    padding: 5px;
    width: 100%;
}

input[type="file"]:hover {
    border-color: #97b6d3;
    background: linear-gradient(180deg, #ffffff 0%, #edf5ff 100%);
}

input[type="file"]:focus,
input[type="file"]:focus-visible {
    border-color: #2b6cb0;
    box-shadow: 0 0 0 4px rgba(43, 108, 176, 0.14);
    outline: none;
}

input[type="file"]::file-selector-button {
    background: linear-gradient(180deg, #f8fbff 0%, #e5eef9 100%);
    border: 1px solid #b6cbe0;
    border-radius: 8px;
    color: #204060;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    margin-right: 10px;
    padding: 8px 12px;
    transition: background-color 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

input[type="file"]::file-selector-button:hover {
    background: linear-gradient(180deg, #f0f7ff 0%, #dce9f9 100%);
    border-color: #89aacf;
}

input[type="file"]::file-selector-button:active {
    transform: translateY(1px);
}

.login-body {
    align-items: center;
    background:
        radial-gradient(1200px 500px at -10% -20%, rgba(21, 57, 104, 0.18) 0%, rgba(21, 57, 104, 0) 65%),
        radial-gradient(900px 520px at 110% 120%, rgba(34, 80, 140, 0.15) 0%, rgba(34, 80, 140, 0) 65%),
        linear-gradient(180deg, #f4f6fb 0%, #edf1f7 100%);
    display: flex;
    font-family: "Pretendard Variable", "SUIT Variable", "Noto Sans KR", "Malgun Gothic", sans-serif;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
}

.login-shell {
    width: min(460px, 100%);
}

.login-card {
    background: #fff;
    border: 1px solid #e0e5ee;
    border-radius: 18px;
    box-shadow: 0 18px 36px rgba(25, 40, 65, 0.12);
    padding: 34px 34px 28px;
    width: 100%;
}

.login-header {
    margin-bottom: 24px;
}

.login-eyebrow {
    color: #3f5a80;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
    margin: 0 0 10px;
}

.login-card h1 {
    color: #14233f;
    font-size: 44px;
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1.08;
    margin: 0;
}

.login-description {
    color: #2f3f58;
    font-size: 19px;
    font-weight: 600;
    line-height: 1.45;
    margin: 14px 0 0;
}

.login-form {
    display: grid;
    gap: 18px;
}

.login-alert {
    background: #fff2f2;
    border: 1px solid #f1c6c6;
    border-radius: 12px;
    color: #a31f1f;
    font-size: 13px;
    padding: 10px 12px;
}

.login-alert p {
    margin: 0;
}

.login-field label {
    color: #1f2d45;
    display: block;
    font-size: 18px;
    font-weight: 800;
    margin: 0 0 10px;
}

.login-field input[type="text"],
.login-field input[type="password"] {
    background: #f3f5f9;
    border: 1px solid #d4dae5;
    border-radius: 12px;
    color: #1e2b42;
    font-size: 20px;
    font-weight: 600;
    height: 62px;
    padding: 0 16px;
    width: 100%;
}

.login-field input::placeholder {
    color: #98a5b7;
    font-weight: 500;
}

.login-field input:focus {
    border-color: #1e3f7b;
    box-shadow: 0 0 0 4px rgba(34, 72, 136, 0.16);
    outline: none;
}

.password-input-wrap {
    position: relative;
}

.password-input-wrap input {
    padding-right: 78px;
}

.password-toggle {
    background: transparent;
    border: 0;
    color: #587092;
    font-size: 14px;
    font-weight: 700;
    height: 100%;
    padding: 0 16px;
    position: absolute;
    right: 0;
    top: 0;
}

.password-toggle:hover {
    opacity: 1;
    text-decoration: underline;
}

.login-submit {
    background: linear-gradient(180deg, #163b89 0%, #132f71 100%);
    border: 1px solid #10295f;
    border-radius: 12px;
    color: #ffffff;
    font-size: 24px;
    font-weight: 800;
    height: 64px;
    letter-spacing: -0.02em;
    margin-top: 8px;
    padding: 0 16px;
}

.login-submit:hover {
    opacity: 1;
    transform: translateY(-1px);
}

.field-error {
    color: #b11f1f;
    font-size: 13px;
    font-weight: 600;
    margin: 8px 2px 0;
}

.password-help ul {
    margin: 8px 0 0;
    padding-left: 20px;
}

.password-help li {
    margin: 4px 0;
}

.login-links {
    display: flex;
    gap: 14px;
    justify-content: flex-end;
    margin-top: 18px;
}

.login-links a {
    color: #4c5f7b;
    font-size: 15px;
    font-weight: 700;
}

.login-links a:hover {
    color: #1d3f77;
}

@media (max-width: 520px) {
    .login-card {
        border-radius: 14px;
        padding: 24px 18px 20px;
    }

    .login-card h1 {
        font-size: 34px;
    }

    .login-description {
        font-size: 15px;
    }

    .login-field label {
        font-size: 16px;
    }

    .login-field input[type="text"],
    .login-field input[type="password"],
    .login-submit {
        font-size: 18px;
        height: 56px;
    }
}

.muted {
    color: #93a6ba;
}

.menu-cards {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.menu-card {
    background: #fff;
    border: 1px solid #dde4eb;
    border-radius: 8px;
    padding: 14px;
}

.field-inline-two {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid-two {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.upload-card {
    background: #f8fbff;
    border: 1px solid #d7e5f2;
    border-radius: 10px;
    padding: 12px;
}

.upload-card h3 {
    margin: 0 0 10px;
}

.preview-box {
    background: #fff;
    border: 1px dashed #b8cfe4;
    border-radius: 8px;
    margin-top: 10px;
    max-height: 200px;
    overflow: auto;
    padding: 10px;
}

.preview-box strong {
    color: #375777;
    display: block;
    font-size: 13px;
    margin-bottom: 8px;
}

.preview-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.preview-list li {
    border-bottom: 1px solid #edf2f8;
    font-size: 13px;
    padding: 4px 0;
    word-break: break-all;
}

.preview-list li:last-child {
    border-bottom: 0;
}

.board-page-size-form {
    align-items: center;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin: 10px 0 12px;
}

.board-page-size-form label {
    font-size: 14px;
    font-weight: 600;
}

.board-page-size-form select {
    max-width: 140px;
}

.board-pagination {
    align-items: center;
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 14px;
}

.board-pagination a,
.board-pagination strong {
    background: #fff;
    border: 1px solid #cfdceb;
    border-radius: 6px;
    min-width: 34px;
    padding: 6px 10px;
    text-align: center;
}

.board-pagination strong {
    background: #0f4a8a;
    border-color: #0f4a8a;
    color: #fff;
}

.board-post-content {
    min-height: 240px;
}

.board-comments {
    margin-top: 20px;
}

.board-comment-form {
    margin-top: 10px;
}

.board-comment-list {
    margin-top: 14px;
}

.board-comment-item {
    margin-bottom: 12px;
}

.board-comment-meta {
    align-items: center;
    color: #4d5f73;
    display: flex;
    font-size: 13px;
    gap: 8px;
    margin-bottom: 8px;
}

.board-comment-content {
    margin-bottom: 8px;
    white-space: pre-wrap;
    word-break: break-word;
}

.board-reply-box {
    margin-top: 8px;
}

.board-reply-form {
    margin-top: 8px;
}

.board-reply-item {
    background: #f8fbff;
    border: 1px solid #dce8f5;
    border-radius: 8px;
    margin-top: 10px;
    padding: 10px;
}

.modern-table-wrap.board-table-wrap {
    max-height: none;
    overflow: visible;
}

.modern-table-wrap.board-table-wrap .modern-table {
    width: 100%;
}

.result-table-wrap {
    margin-top: 14px;
    max-height: 420px;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: auto;
    width: 100%;
}

.result-table-wrap table {
    margin-top: 0;
}

.modern-table-wrap {
    border: 1px solid #d7e2ed;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(18, 50, 84, 0.08);
    max-height: 560px;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: auto;
    width: 100%;
}

.modern-table {
    background: #fff;
    border-collapse: separate;
    border-spacing: 0;
    margin: 0;
    min-width: 100%;
    width: max-content;
}

.modern-table.purchase-table {
    table-layout: auto;
}

.modern-table thead th {
    background: linear-gradient(180deg, #f7fbff 0%, #edf4fb 100%);
    border-bottom: 1px solid #cfdeec;
    color: #23486d;
    font-size: 13px;
    font-weight: 700;
    padding: 10px 12px;
    position: sticky;
    text-align: left;
    top: 0;
    white-space: nowrap;
    z-index: 1;
}

.modern-table td {
    border-bottom: 1px solid #ebf1f7;
    font-size: 13px;
    max-width: 260px;
    overflow: hidden;
    padding: 9px 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.modern-table tbody tr:hover td {
    background: #f6fbff;
}

.modern-table tbody tr.is-selected td {
    background: #e8f2ff;
}

.modern-table .select-col {
    text-align: center;
    width: 64px;
}

.modern-table .radio-cell {
    text-align: center;
}

.modern-table .radio-cell input[type="radio"] {
    accent-color: #0f4a8a;
    cursor: pointer;
    height: 16px;
    width: 16px;
}

.mail-template-panel {
    margin-top: 18px;
}

.mail-template-cards {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    margin-top: 10px;
}

.mail-template-card {
    background: #fff;
    border: 1px solid #d8e2ee;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(16, 42, 67, 0.08);
    padding: 12px;
}

.mail-template-card h3 {
    color: #1e466f;
    font-size: 15px;
    margin: 0 0 10px;
}

.mail-template-card label {
    color: #3f556b;
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin: 8px 0 4px;
}

.mail-template-field-header {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin: 8px 0 4px;
}

.mail-template-field-header label {
    margin: 0;
}

.mail-copy-button {
    background: #f0f6ff;
    border: 1px solid #c8daef;
    border-radius: 6px;
    color: #1f4f7a;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
}

.mail-copy-button:hover {
    background: #e4f0ff;
}

.mail-template-card textarea {
    background: #f8fbff;
    border: 1px solid #d4dfea;
    border-radius: 8px;
    box-sizing: border-box;
    color: #1b2d40;
    font-family: "Noto Sans KR", "Malgun Gothic", sans-serif;
    font-size: 12px;
    line-height: 1.5;
    padding: 8px;
    resize: vertical;
    width: 100%;
}

@media (max-width: 900px) {
    .layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        order: 2;
    }

    .menu-link-anchor,
    .menu-link-label,
    .menu-toggle {
        font-size: 18px;
    }

    .submenu-list {
        margin: 0;
        padding: 8px 0 10px;
    }

    .menu-cards {
        grid-template-columns: 1fr;
    }

    .field-inline-two,
    .form-grid-two {
        grid-template-columns: 1fr;
    }

    .flatpickr-calendar {
        max-width: 96vw;
        width: min(356px, 96vw);
    }

    .flatpickr-day {
        height: 40px;
        line-height: 40px;
        max-width: 40px;
    }
}
