:root {
    --bg: #f5f7fb;
    --card: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --line: #e5e7eb;
    --primary: #2563eb;
    --danger: #dc2626;
    --radius: 16px;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        "Noto Sans KR",
        Arial,
        sans-serif;

    background: var(--bg);
    color: var(--text);
}

input,
button,
select,
textarea {
    font: inherit;
}

a {
    color: inherit;
    text-decoration: none;
}

.login-page {
    min-height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;
}

.login-box {
    width: 100%;
    max-width: 420px;

    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);

    padding: 34px;

    box-shadow: var(--shadow);
}

.login-title {
    margin: 0;
    font-size: 28px;
    font-weight: 800;
}

.login-description {
    margin: 8px 0 28px;
    color: var(--muted);
    font-size: 14px;
}

.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    margin-bottom: 7px;

    font-size: 14px;
    font-weight: 700;
}

.form-input {
    width: 100%;
    height: 48px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    padding: 0 13px;
    background: #fff;
}

.form-input:focus {
    outline: none;
    border-color: #6b7280;

    box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.08);
}

.form-input {
    line-height: 46px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: auto;
    min-height: 44px;

    padding: 0 16px;

    border: 0;
    border-radius: 10px;

    cursor: pointer;

    font-weight: 700;

    text-decoration: none;
}

.login-box .btn,
.content-card form > .btn {
    width: 100%;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    opacity: 0.92;
}

.error-message {
    margin-bottom: 18px;

    padding: 12px 14px;

    border-radius: 10px;

    background: #fef2f2;
    color: var(--danger);

    font-size: 14px;
}

/* 모바일 */
@media (max-width: 600px) {

    .login-page {
        align-items: flex-start;
        padding-top: 60px;
    }

    .login-box {
        padding: 24px 20px;
        border-radius: 14px;
    }

    .login-title {
        font-size: 24px;
    }

}

/* =========================================================
   ADMIN
========================================================= */

.admin-layout {
    min-height: 100vh;
}


/* 상단 */

.admin-header {
    position: fixed;

    top: 0;
    left: 0;
    right: 0;

    height: 64px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 24px;

    background: #ffffff;

    border-bottom: 1px solid var(--line);

    z-index: 100;
}

.admin-logo {
    font-size: 18px;
    font-weight: 800;

    letter-spacing: 0.04em;
}

.admin-user {
    display: flex;
    align-items: center;

    gap: 14px;
}

.admin-user-name {
    font-size: 14px;
    font-weight: 600;
}

.admin-logout {
    font-size: 13px;

    color: var(--muted);
}


/* 왼쪽 메뉴 */

.admin-sidebar {
    position: fixed;

    top: 64px;
    bottom: 0;
    left: 0;

    width: 220px;

    padding: 20px 14px;

    background: #ffffff;

    border-right: 1px solid var(--line);
}

.admin-menu {
    display: flex;
    flex-direction: column;

    gap: 5px;
}

.admin-menu-item {
    display: block;

    padding: 11px 14px;

    border-radius: 9px;

    font-size: 14px;
    font-weight: 600;

    color: #4b5563;
}

.admin-menu-item:hover {
    background: #f3f4f6;
}

.admin-menu-item.active {
    background: #111827;

    color: #ffffff;
}


/* 본문 */

.admin-content {
    margin-left: 220px;

    padding: 96px 30px 40px;
}

.admin-page-header {
    margin-bottom: 24px;
}

.admin-page-title {
    margin: 0;

    font-size: 28px;
    font-weight: 800;
}

.admin-page-description {
    margin: 7px 0 0;

    color: var(--muted);

    font-size: 14px;
}


/* 대시보드 */

.dashboard-grid {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 18px;
}

.dashboard-card {
    min-height: 150px;

    padding: 22px;

    background: #ffffff;

    border: 1px solid var(--line);

    border-radius: 14px;

    box-shadow: var(--shadow);

    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease;
}

a.dashboard-card:hover {
    transform: translateY(-2px);

    box-shadow:
        0 14px 35px rgba(0, 0, 0, 0.09);
}

.dashboard-card-title {
    font-size: 18px;
    font-weight: 800;
}

.dashboard-card-description {
    margin-top: 8px;

    font-size: 14px;

    color: var(--muted);
}

.dashboard-card.disabled {
    opacity: 0.55;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 768px) {

    .admin-header {
        height: 58px;

        padding: 0 15px;
    }

    .admin-user-name {
        display: none;
    }


    /*
     * 모바일에서는 왼쪽 사이드바를
     * 상단 아래 가로 메뉴로 변경
     */

    .admin-sidebar {
        position: fixed;

        top: 58px;
        left: 0;
        right: 0;

        width: auto;
        height: auto;

        bottom: auto;

        padding: 8px 10px;

        border-right: 0;
        border-bottom: 1px solid var(--line);

        overflow-x: auto;

        z-index: 90;
    }

    .admin-menu {
        flex-direction: row;

        min-width: max-content;
    }

    .admin-menu-item {
        padding: 9px 12px;
    }


    .admin-content {
        margin-left: 0;

        padding:
            132px
            12px
            30px;
    }

    .admin-page-title {
        font-size: 22px;
    }


    .dashboard-grid {
        grid-template-columns: 1fr;

        gap: 12px;
    }

    .dashboard-card {
        min-height: auto;

        padding: 18px;
    }

}

/* =========================================================
   COMMON CONTENT
========================================================= */

.content-card {
    background: #ffffff;

    border: 1px solid var(--line);
    border-radius: 14px;

    padding: 22px;

    box-shadow: var(--shadow);
}

.content-card-title {
    margin: 0 0 20px;

    font-size: 18px;
}


/* =========================================================
   USER MANAGEMENT
========================================================= */

.user-layout {
    display: grid;

    grid-template-columns:
        minmax(280px, 340px)
        minmax(0, 1fr);

    gap: 18px;

    align-items: start;
}


.success-message {
    margin-bottom: 18px;

    padding: 12px 14px;

    border-radius: 10px;

    background: #ecfdf5;
    color: #047857;

    font-size: 14px;
}


.table-responsive {
    width: 100%;

    overflow-x: auto;
}


.data-table {
    width: 100%;

    border-collapse: collapse;

    min-width: 700px;
}


.data-table th,
.data-table td {
    padding: 12px 14px;

    text-align: left;

    border-bottom: 1px solid var(--line);

    font-size: 14px;

    white-space: nowrap;
}


.data-table th {
    background: #f9fafb;

    font-size: 13px;
    font-weight: 700;

    color: #4b5563;
}


.data-table tbody tr:hover {
    background: #fafafa;
}


.status-active {
    color: #047857;

    font-weight: 700;
}


.status-disabled {
    color: #9ca3af;
}


/* 모바일 */

@media (max-width: 768px) {

    .user-layout {
        grid-template-columns: 1fr;
    }

    .user-create-card,
    .user-list-card {
        width: 100%;
    }

}

/* =========================================================
   MANAGER
========================================================= */

.manager-layout {
    min-height: 100vh;
}


.manager-header {
    height: 64px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 28px;

    background: #ffffff;

    border-bottom: 1px solid var(--line);
}


.manager-logo {
    font-size: 18px;
    font-weight: 800;

    letter-spacing: 0.04em;
}


.manager-user {
    display: flex;
    align-items: center;

    gap: 14px;
}


.manager-user-name {
    font-size: 14px;
    font-weight: 600;
}


.manager-logout {
    font-size: 13px;

    color: var(--muted);
}


.manager-content {
    width: min(1100px, calc(100% - 40px));

    margin: 0 auto;

    padding: 40px 0;
}


.manager-page-header {
    margin-bottom: 26px;
}


.manager-page-title {
    margin: 0;

    font-size: 28px;
    font-weight: 800;
}


.manager-page-description {
    margin: 7px 0 0;

    color: var(--muted);

    font-size: 14px;
}


/* 메뉴 */

.manager-menu-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 18px;
}


.manager-menu-card {
    min-height: 180px;

    padding: 26px;

    background: #ffffff;

    border: 1px solid var(--line);
    border-radius: 16px;

    box-shadow: var(--shadow);

    cursor: pointer;

    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease;
}


.manager-menu-card:hover {
    transform: translateY(-2px);

    box-shadow:
        0 14px 35px rgba(0, 0, 0, 0.09);
}


.manager-menu-icon {
    margin-bottom: 18px;

    font-size: 28px;
}


.manager-menu-title {
    font-size: 19px;
    font-weight: 800;
}


.manager-menu-description {
    margin-top: 7px;

    color: var(--muted);

    font-size: 14px;
}


/* 모바일 */

@media (max-width: 768px) {

    .manager-header {
        height: 58px;

        padding: 0 15px;
    }

    .manager-logo {
        font-size: 15px;
    }

    .manager-user-name {
        display: none;
    }


    .manager-content {
        width: calc(100% - 20px);

        padding: 24px 0;
    }


    .manager-page-title {
        font-size: 22px;
    }


    .manager-menu-grid {
        grid-template-columns: 1fr;

        gap: 12px;
    }


    .manager-menu-card {
        min-height: auto;

        padding: 20px;
    }


    .manager-menu-icon {
        margin-bottom: 12px;

        font-size: 24px;
    }

}

.btn-center {
    display: flex;
    margin: 0 auto;
}

/* =========================================================
   COMMON LIST SEARCH
========================================================= */

.list-search {
    display: flex;
    align-items: center;

    gap: 8px;

    margin-bottom: 18px;
}

.list-search-form {
    display: flex;
    align-items: center;

    width: 100%;
    /* max-width: 520px; */

    background: #ffffff;

    border: 1px solid var(--line);
    border-radius: 12px;

    overflow: hidden;

    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}

.list-search-form:focus-within {
    border-color: #cbd5e1;

    box-shadow:
        0 0 0 3px
        rgba(15, 23, 42, 0.05);
}

.list-search-input {
    flex: 1;

    min-width: 0;
    height: 44px;

    padding: 0 14px;

    border: 0;
    outline: 0;

    background: transparent;

    color: var(--text);

    font-size: 14px;
}

.list-search-input::placeholder {
    color: #9ca3af;
}

.list-search-submit {
    flex: 0 0 auto;

    height: 34px;

    margin-right: 5px;
    padding: 0 14px;

    border: 0;
    border-radius: 8px;

    background: #111827;
    color: #ffffff;

    font-size: 13px;
    font-weight: 700;

    cursor: pointer;
}

.list-search-submit:hover {
    background: #1f2937;
}

.list-search-clear {
    flex: 0 0 auto;

    color: var(--muted);

    font-size: 13px;

    text-decoration: none;
}

.list-search-clear:hover {
    color: var(--text);
}


/* =========================================================
   COMMON PAGINATION
========================================================= */

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 5px;

    margin-top: 24px;
}

.pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 36px;
    height: 36px;

    padding: 0 10px;

    border: 1px solid transparent;
    border-radius: 9px;

    background: transparent;

    color: #4b5563;

    font-size: 13px;
    font-weight: 600;

    text-decoration: none;

    transition:
        background 0.15s ease,
        color 0.15s ease,
        border-color 0.15s ease;
}

.pagination-link:hover {
    background: #f3f4f6;

    color: var(--text);
}

.pagination-link.is-active {
    background: #111827;
    color: #ffffff;
}

.pagination-link.is-disabled {
    color: #c4c7cd;

    pointer-events: none;
}

.pagination-arrow {
    padding: 0 12px;

    font-weight: 500;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 768px) {

    .list-search {
        margin-bottom: 14px;
    }

    .list-search-form {
        max-width: none;
    }

    .list-search-input {
        height: 42px;

        font-size: 13px;
    }

    .list-search-submit {
        height: 32px;

        padding: 0 12px;

        font-size: 12px;
    }

    .pagination {
        gap: 3px;

        margin-top: 20px;
    }

    .pagination-link {
        min-width: 34px;
        height: 34px;

        padding: 0 8px;

        font-size: 12px;
    }

    .pagination-arrow {
        padding: 0 9px;
    }

}

/* =========================================================
   COMMON HEADER HOME
========================================================= */

.app-home-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    color: inherit;
    font-weight: inherit;
    text-decoration: none;
}

.app-home-link:hover {
    opacity: 0.75;
}

/* =========================================================
   PAGE BREADCRUMB
========================================================= */

.page-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 8px;

    margin: 0;

    font-size: 22px;
    font-weight: 800;
}

.page-breadcrumb-link {
    color: var(--text);

    text-decoration: none;

    transition: opacity .15s ease;
}

.page-breadcrumb-link:hover {
    opacity: .65;
}

.page-breadcrumb-separator {
    color: #cbd5e1;

    font-size: 17px;
    font-weight: 500;
}

.page-breadcrumb-current {
    color: var(--text);
}


@media (max-width: 700px) {

    .page-breadcrumb {
        gap: 6px;

        font-size: 19px;
    }

    .page-breadcrumb-separator {
        font-size: 14px;
    }

}

.app-account-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: inherit;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.app-account-link:hover {
    opacity: .72;
}

.app-account-icon {
    display: none;
    line-height: 1;
}

@media (max-width: 768px) {
    .app-account-icon {
        display: inline;
    }

    .app-account-text {
        display: none;
    }
}

.manager-my-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 32px;
    padding: 0 11px;

    border: 1px solid #dfe3e8;
    border-radius: 8px;

    background: #fff;
    color: #374151;

    font-size: 13px;
    font-weight: 700;

    text-decoration: none;
    white-space: nowrap;
}

.manager-my-button:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

@media (max-width: 700px) {
    .manager-my-button {
        min-height: 30px;
        padding: 0 8px;
        font-size: 12px;
    }
}

/* =========================================================
   COMMON PAGE HEADER
========================================================= */

.app-page-header {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;

    margin-bottom: 22px;
    padding: 20px 22px;

    border: 1px solid #e2e8f0;
    border-radius: 14px;

    background:
        linear-gradient(
            135deg,
            #ffffff 0%,
            #f8fafc 65%,
            #f1f5f9 100%
        );

    box-shadow:
        0 3px 12px rgba(15, 23, 42, .04);

    overflow: hidden;
}


/* 좌측 포인트 바 */

.app-page-header::before {
    content: '';

    position: absolute;
    left: 0;
    top: 14px;
    bottom: 14px;

    width: 4px;

    border-radius: 0 4px 4px 0;

    background: #2563eb;
}


.app-page-header-main {
    min-width: 0;
    padding-left: 6px;
}


.app-page-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;

    margin: 0;

    color: #0f172a;

    font-size: 25px;
    font-weight: 850;
    line-height: 1.25;

    letter-spacing: -.4px;
}


.app-page-description {
    margin: 7px 0 0;

    color: #64748b;

    font-size: 13px;
    line-height: 1.5;
}


.app-page-actions {
    display: flex;
    align-items: center;
    gap: 8px;

    flex: 0 0 auto;
}


/* breadcrumb */

.app-page-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;

    margin: 0;

    color: #0f172a;

    font-size: 22px;
    font-weight: 850;
    line-height: 1.3;
}


.app-page-breadcrumb a {
    color: inherit;
    text-decoration: none;
}


.app-page-breadcrumb a:hover {
    opacity: .65;
}


.app-page-breadcrumb-separator {
    color: #cbd5e1;

    font-size: 16px;
    font-weight: 500;
}


@media (max-width: 768px) {

    .app-page-header {
        align-items: flex-start;

        margin-bottom: 16px;
        padding: 16px 15px;

        border-radius: 12px;
    }


    .app-page-header::before {
        top: 12px;
        bottom: 12px;
    }


    .app-page-header-main {
        padding-left: 5px;
    }


    .app-page-title {
        gap: 6px;

        font-size: 21px;
    }


    .app-page-description {
        margin-top: 5px;

        font-size: 12px;
    }


    .app-page-breadcrumb {
        gap: 5px;

        font-size: 19px;
    }


    .app-page-breadcrumb-separator {
        font-size: 14px;
    }
}