/* =========================================================
   IPESK NEXT
   User Area Common Style
   Clean Corporate Blue Theme
   ========================================================= */


/* =========================================================
   ROOT
   ========================================================= */

:root {

    /* Brand */
    --navy: #172b4d;
    --navy2: #203b62;

    --blue: #006ff2;
    --blue-hover: #005fd1;
    --blue-soft: #eef6ff;

    /* Point */
    --cyan: #159bd7;
    --teal: #168c82;

    /* Status */
    --green: #16856b;
    --red: #d64b4b;
    --orange: #c57919;

    /* Legacy color variables */
    --violet: #667085;
    --coral: #d64b4b;
    --amber: #c57919;

    /* Text */
    --text: #253342;
    --text-2: #475467;
    --muted: #758195;
    --light-text: #98a2b3;

    /* UI */
    --line: #e2e8ee;
    --line-soft: #edf1f4;

    --soft: #f7f9fb;
    --soft-blue: #f4f8fd;

    --white: #ffffff;
}


/* =========================================================
   BASE
   ========================================================= */

html,
body,
button,
input,
select,
textarea {

    font-family:
        "Pretendard",
        "Noto Sans KR",
        "Malgun Gothic",
        sans-serif;
}


* {
    box-sizing: border-box;
}


body {

    margin: 0;

    color: var(--text);

    background: #ffffff;

    font-size: 14px;

    word-break: keep-all;

    -webkit-font-smoothing: antialiased;
}


/* =========================================================
   PAGE
   ========================================================= */

.user-page {

    min-height: calc(100vh - 80px);

    background: #ffffff;
}


.user-layout {

    width: min(1500px, 100%);

    min-height: calc(100vh - 80px);

    display: grid;

    grid-template-columns:
        230px
        minmax(0, 1fr);

    margin: 0 auto;

    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);

    background: #ffffff;
}


/* =========================================================
   SIDEBAR
   ========================================================= */

.user-sidebar {

    border-right: 1px solid var(--line);

    background: #f7f9fb;
}


/* =========================================================
   SIDEBAR USER
   ========================================================= */

.user-side-user {

    min-height: 88px;

    display: flex;

    align-items: center;

    gap: 13px;

    padding: 18px 20px;

    border-bottom: 1px solid var(--line);

    background: #ffffff;
}


.user-side-avatar {

    width: 44px;
    height: 44px;

    display: flex;

    align-items: center;
    justify-content: center;

    flex: 0 0 44px;

    border-radius: 50%;

    color: var(--blue);

    font-size: 16px;

    background: var(--blue-soft);
}


.user-side-user strong {

    display: block;

    color: var(--navy);

    font-size: 14px;
    font-weight: 700;
}


.user-side-user span {

    display: block;

    margin-top: 4px;

    color: var(--light-text);

    font-size: 11px;
}


/* =========================================================
   SIDEBAR NAV
   ========================================================= */

.user-side-nav {

    padding: 14px 0 30px;
}


.user-side-menu {

    position: relative;

    min-height: 54px;

    display: flex;

    align-items: center;

    gap: 13px;

    padding: 0 20px;

    color: #526579;

    font-size: 14px;
    font-weight: 600;

    text-decoration: none;

    transition:
        color .18s ease,
        background .18s ease;
}


.user-side-menu:hover {

    color: var(--blue);

    background: #f0f6fc;
}


.user-side-menu > i {

    width: 21px;

    color: #748ca2;

    font-size: 15px;

    text-align: center;

    transition: color .18s ease;
}


.user-side-menu:hover > i {

    color: var(--blue);
}


.user-side-menu-text {

    display: flex;

    flex-direction: column;

    line-height: 1.2;
}


.user-side-menu-text small {

    margin-top: 4px;

    color: #9aa8b5;

    font-size: 10px;
    font-weight: 500;
}


/* =========================================================
   SIDEBAR ACTIVE
   ========================================================= */

.user-side-menu.active {

    color: var(--blue);

    background: var(--blue-soft);

    box-shadow: none;
}


.user-side-menu.active::before {

    content: "";

    position: absolute;

    left: 0;

    top: 10px;
    bottom: 10px;

    width: 3px;

    border-radius: 0 3px 3px 0;

    background: var(--blue);
}


.user-side-menu.active > i {

    color: var(--blue);
}


.user-side-menu.active small {

    color: #6685a3;
}


/* =========================================================
   SIDEBAR SUB MENU
   ========================================================= */

.user-side-sub {

    padding: 5px 0 8px;

    background: #f2f5f8;
}


.user-side-sub a {

    position: relative;

    min-height: 40px;

    display: flex;

    align-items: center;

    padding:
        0
        15px
        0
        55px;

    color: #718294;

    font-size: 13px;
    font-weight: 500;

    text-decoration: none;

    transition:
        color .18s ease,
        background .18s ease;
}


.user-side-sub a::before {

    content: "";

    position: absolute;

    left: 38px;

    width: 4px;
    height: 4px;

    border-radius: 50%;

    background: #aab6c1;
}


.user-side-sub a:hover {

    color: var(--blue);

    background: #ffffff;
}


.user-side-sub a.current {

    color: var(--blue);

    font-weight: 700;

    background: #ffffff;
}


.user-side-sub a.current::before {

    background: var(--blue);
}


/* =========================================================
   CONTENT
   ========================================================= */

.user-content {

    min-width: 0;

    padding:
        30px
        32px
        45px;

    background: #ffffff;
}


/* =========================================================
   PAGE HEADER
   ========================================================= */

.user-head {

    position: relative;

    display: flex;

    align-items: center;

    gap: 16px;

    min-height: 96px;

    padding: 20px 24px;

    margin-bottom: 22px;

    overflow: hidden;

    border: 1px solid #e0e7ee;

    border-radius: 10px;

    background: #f7faff;
}


/*
 * 기존 장식 제거
 */

.user-head::after {

    display: none;
}


.user-head-icon {

    width: 48px;
    height: 48px;

    display: flex;

    align-items: center;
    justify-content: center;

    flex: 0 0 48px;

    border-radius: 12px;

    color: var(--blue);

    font-size: 19px;

    background: #e9f3ff;

    box-shadow: none;
}


.user-head-text {

    position: relative;

    z-index: 1;
}


.user-head h1 {

    margin: 0;

    color: var(--navy);

    font-size: 24px;
    font-weight: 800;

    letter-spacing: -0.6px;
}


.user-head p {

    margin: 6px 0 0;

    color: var(--muted);

    font-size: 13px;

    line-height: 1.6;
}


/* =========================================================
   GRID
   ========================================================= */

.grid {

    display: grid;

    gap: 18px;
}


.grid-4 {

    grid-template-columns:
        repeat(4, 1fr);
}


.grid-3 {

    grid-template-columns:
        repeat(3, 1fr);
}


.grid-2 {

    grid-template-columns:
        repeat(2, 1fr);
}


.main-side {

    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        300px;

    gap: 20px;

    align-items: start;
}


/* =========================================================
   CARD
   ========================================================= */

.card {

    overflow: hidden;

    border: 1px solid var(--line);

    border-radius: 10px;

    background: #ffffff;

    box-shadow: none;
}


.card-head {

    min-height: 52px;

    display: flex;

    align-items: center;
    justify-content: space-between;

    padding: 0 18px;

    border-bottom: 1px solid var(--line-soft);

    background: #ffffff;
}


.card-head h2,
.card-head h3 {

    margin: 0;

    color: var(--navy);

    font-size: 15px;
    font-weight: 700;
}


.card-head a {

    color: #70879a;

    font-size: 12px;

    text-decoration: none;
}


.card-head a:hover {

    color: var(--blue);
}


.card-body {

    padding: 18px;
}


/* =========================================================
   STAT CARD
   ========================================================= */

.stat {

    padding: 18px;

    border: 1px solid var(--line);

    border-radius: 10px;

    background: #ffffff;

    transition:
        border-color .18s ease,
        box-shadow .18s ease,
        transform .18s ease;
}


.stat:hover {

    border-color: #cbd9e6;

    box-shadow:
        0 8px 24px
        rgba(28, 55, 80, .06);

    transform: translateY(-1px);
}


.stat-top {

    display: flex;

    align-items: center;
    justify-content: space-between;
}


/*
 * 아이콘 색상을 과도하게 다르게 하지 않고
 * 같은 Blue 계열로 통일
 */

.stat-icon {

    width: 40px;
    height: 40px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 11px;

    color: var(--blue);

    font-size: 16px;

    background: var(--blue-soft);
}


.stat:nth-child(2) .stat-icon {

    color: #177f89;

    background: #edf8f8;
}


.stat:nth-child(3) .stat-icon {

    color: #526e9e;

    background: #f0f4fa;
}


.stat:nth-child(4) .stat-icon {

    color: #5e7489;

    background: #f2f5f7;
}


.stat strong {

    display: block;

    margin-top: 13px;

    color: var(--navy);

    font-size: 25px;
    font-weight: 800;
}


.stat span {

    color: var(--muted);

    font-size: 12px;
}


/* =========================================================
   LIST
   ========================================================= */

.list {

    margin: 0;

    padding: 0;

    list-style: none;
}


.list li {

    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 15px;

    padding: 14px 0;

    border-bottom: 1px solid var(--line-soft);
}


.list li:last-child {

    border-bottom: 0;
}


.list-main {

    min-width: 0;
}


.list-title {

    display: block;

    color: #344d63;

    font-size: 14px;
    font-weight: 700;

    text-decoration: none;
}


a.list-title:hover {

    color: var(--blue);
}


.list-desc {

    display: block;

    margin-top: 5px;

    overflow: hidden;

    color: #82909d;

    font-size: 12px;

    white-space: nowrap;

    text-overflow: ellipsis;
}


.meta {

    color: #8d9aa6;

    font-size: 11px;
}


/* =========================================================
   BADGE
   ========================================================= */

.badge {

    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-height: 24px;

    padding: 0 8px;

    border-radius: 5px;

    font-size: 11px;
    font-weight: 650;
}


/* 일반 / 정보 */

.blue {

    color: #0065c8;

    background: #edf5ff;
}


/* 진행 / 정상 */

.teal {

    color: #087a67;

    background: #eaf7f3;
}


/* 일반 분류
   기존 violet 클래스명은 유지하지만
   실제 색상은 중성화
 */

.violet {

    color: #5f6b7a;

    background: #f0f2f5;
}


/* 중요 / 필수 */

.coral {

    color: #c74343;

    background: #fff0f0;
}


/* 주의 */

.amber {

    color: #a36718;

    background: #fff5e7;
}


/* =========================================================
   FORM
   ========================================================= */

.form-grid {

    display: grid;

    grid-template-columns:
        repeat(
            2,
            minmax(0, 1fr)
        );

    gap: 17px;
}


.field label {

    display: block;

    margin-bottom: 7px;

    color: #526579;

    font-size: 12px;
    font-weight: 700;
}


.field input,
.field select,
.field textarea {

    width: 100%;

    min-height: 44px;

    padding: 10px 13px;

    border: 1px solid #d7dfe7;

    border-radius: 7px;

    color: #354a5f;

    background: #ffffff;

    font-size: 13px;

    outline: none;

    transition:
        border-color .18s ease,
        box-shadow .18s ease;
}


.field input::placeholder,
.field textarea::placeholder {

    color: #a2adb8;
}


.field textarea {

    min-height: 110px;

    resize: vertical;
}


.field input:hover,
.field select:hover,
.field textarea:hover {

    border-color: #bcc9d5;
}


.field input:focus,
.field select:focus,
.field textarea:focus {

    border-color: var(--blue);

    box-shadow:
        0 0 0 3px
        rgba(0, 111, 242, .08);
}


/* =========================================================
   TOOLBAR / SEARCH
   ========================================================= */

.toolbar {

    display: flex;

    gap: 10px;

    align-items: end;

    padding: 16px;

    margin-bottom: 16px;

    border: 1px solid var(--line);

    border-radius: 10px;

    background: #f8fafc;
}


.toolbar .field {

    flex: 1;
}


.toolbar .field.small {

    flex: 0 0 160px;
}


/* =========================================================
   BUTTON
   ========================================================= */

.btn {

    height: 42px;

    display: inline-flex;

    align-items: center;
    justify-content: center;

    gap: 7px;

    padding: 0 17px;

    border: 1px solid #d1dbe4;

    border-radius: 7px;

    color: #34495d;

    background: #ffffff;

    font-size: 12px;
    font-weight: 700;

    text-decoration: none;

    cursor: pointer;

    transition:
        border-color .18s ease,
        color .18s ease,
        background .18s ease,
        box-shadow .18s ease;
}


.btn:hover {

    border-color: #aebfce;

    color: var(--blue);

    background: #f8fafc;
}


.btn.primary {

    border-color: var(--blue);

    color: #ffffff;

    background: var(--blue);
}


.btn.primary:hover {

    border-color: var(--blue-hover);

    color: #ffffff;

    background: var(--blue-hover);

    box-shadow:
        0 5px 12px
        rgba(0, 111, 242, .15);
}


.btn.danger {

    border-color: #e7b4b4;

    color: #bd4c4c;

    background: #ffffff;
}


.btn.danger:hover {

    border-color: #d98383;

    color: #ae3d3d;

    background: #fff6f6;
}


.actions {

    display: flex;

    justify-content: flex-end;

    gap: 9px;

    margin-top: 20px;
}


/* =========================================================
   PROGRESS
   ========================================================= */

.progress {

    height: 7px;

    overflow: hidden;

    border-radius: 10px;

    background: #e7edf2;
}


.progress > span {

    display: block;

    height: 100%;

    border-radius: inherit;

    background: var(--blue);
}


/* =========================================================
   TABLE
   ========================================================= */

.table-wrap {

    overflow: auto;
}


.table {

    width: 100%;

    border-collapse: collapse;
}


.table th {

    padding: 12px 10px;

    border-bottom: 1px solid #dfe6ec;

    color: #66788a;

    background: #f7f9fb;

    font-size: 12px;
    font-weight: 700;

    text-align: left;
}


.table td {

    padding: 14px 10px;

    border-bottom: 1px solid var(--line-soft);

    color: #52677a;

    font-size: 13px;
}


.table tbody tr {

    transition: background .15s ease;
}


.table tbody tr:hover {

    background: #fafcff;
}


.table tr:last-child td {

    border-bottom: 0;
}


/* =========================================================
   NOTICE
   ========================================================= */

.notice-unread {

    background: #f4f9ff;
}


.notice-dot {

    width: 7px;
    height: 7px;

    flex: 0 0 7px;

    border-radius: 50%;

    background: var(--blue);
}


/* =========================================================
   SETTINGS
   ========================================================= */

.setting-row {

    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 20px;

    padding: 17px 0;

    border-bottom: 1px solid var(--line-soft);
}


.setting-row:last-child {

    border-bottom: 0;
}


.setting-row strong {

    display: block;

    color: #3f566b;

    font-size: 14px;
}


.setting-row p {

    margin: 5px 0 0;

    color: #82909d;

    font-size: 12px;

    line-height: 1.6;
}


/* =========================================================
   SWITCH
   ========================================================= */

.switch {

    position: relative;

    width: 44px;
    height: 24px;

    flex: 0 0 44px;
}


.switch input {

    display: none;
}


.switch span {

    position: absolute;

    inset: 0;

    border-radius: 20px;

    background: #d1d9e0;

    cursor: pointer;

    transition: background .2s ease;
}


.switch span::after {

    content: "";

    position: absolute;

    width: 18px;
    height: 18px;

    left: 3px;
    top: 3px;

    border-radius: 50%;

    background: #ffffff;

    box-shadow:
        0 1px 4px
        rgba(30, 50, 70, .18);

    transition: transform .2s ease;
}


.switch input:checked + span {

    background: var(--blue);
}


.switch input:checked + span::after {

    transform: translateX(20px);
}


/* =========================================================
   EMPTY
   ========================================================= */

.empty {

    padding: 55px 20px;

    color: #82909d;

    text-align: center;
}


/* =========================================================
   RESPONSIVE - TABLET
   ========================================================= */

@media (max-width: 1100px) {

    .grid-4 {

        grid-template-columns:
            repeat(2, 1fr);
    }


    .main-side {

        grid-template-columns: 1fr;
    }


    .user-layout {

        grid-template-columns:
            210px
            minmax(0, 1fr);
    }

}


/* =========================================================
   RESPONSIVE - MOBILE
   ========================================================= */

@media (max-width: 760px) {

    .user-layout {

        display: block;

        border: 0;
    }


    .user-sidebar {

        border-right: 0;

        border-bottom:
            1px solid
            var(--line);
    }


    .user-side-user {

        display: none;
    }


    .user-side-nav {

        display: flex;

        overflow-x: auto;

        padding: 0;

        background: #ffffff;
    }


    .user-side-menu {

        min-width: max-content;

        min-height: 52px;

        flex: 0 0 auto;

        padding: 0 15px;
    }


    .user-side-menu.active::before {

        left: 12px;
        right: 12px;

        top: auto;
        bottom: 0;

        width: auto;
        height: 3px;

        border-radius:
            3px
            3px
            0
            0;
    }


    .user-side-sub {

        display: none;
    }


    .user-content {

        padding:
            18px
            15px
            35px;
    }


    .grid-4,
    .grid-3,
    .grid-2,
    .form-grid {

        grid-template-columns: 1fr;
    }


    .toolbar {

        display: block;
    }


    .toolbar .field {

        margin-bottom: 10px;
    }


    .toolbar .field.small {

        width: 100%;

        flex: none;
    }


    .user-head {

        min-height: 88px;

        padding: 17px 18px;
    }


    .user-head-icon {

        width: 44px;
        height: 44px;

        flex-basis: 44px;
    }


    .user-head h1 {

        font-size: 21px;
    }

}