.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 40;
    display: flex;
    width: var(--sidebar-width);
    height: 100vh;
    flex-direction: column;
    padding: 20px 18px;
    overflow-y: auto;
    color: #ffffff;
    background:
        radial-gradient(circle at 72% 10%, rgba(3, 153, 127, 0.28), transparent 34%),
        linear-gradient(180deg, #00483f 0%, var(--sidebar-dark) 100%);
    transition: transform 0.24s ease;
}

.sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 28px;
    margin-bottom: 38px;
}

.brand-mark {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.brand-mark strong {
    overflow: hidden;
    font-size: 14px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.brand-mark span {
    color: #4ade80;
    font-size: 10px;
    font-weight: 800;
}

.sidebar-close {
    width: 24px;
    height: 24px;
    padding: 0;
    color: #d9fff6;
    background: transparent;
    border: 0;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-title {
    margin: 0 0 6px 2px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 11px;
    font-weight: 700;
}

.nav-title:not(:first-child) {
    margin-top: 26px;
}

.nav-link {
    display: flex;
    align-items: center;
    height: 42px;
    gap: 12px;
    padding: 0 14px;
    color: rgba(255, 255, 255, 0.92);
    border-radius: 8px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.nav-link i {
    width: 15px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    text-align: center;
}

.nav-link span {
    font-size: 14px;
    font-weight: 700;
}

.nav-link:hover,
.nav-link.active {
    background: linear-gradient(90deg, #039a7d 0%, #02ae82 100%);
    transform: translateX(2px);
}

.nav-group {
    display: block;
}

.nav-group summary {
    list-style: none;
}

.nav-group summary::-webkit-details-marker {
    display: none;
}

.nav-parent {
    position: relative;
    padding-right: 32px;
}

.nav-parent::after {
    position: absolute;
    top: 50%;
    right: 13px;
    color: rgba(255, 255, 255, 0.72);
    font-family: "Font Awesome 6 Free";
    font-size: 10px;
    font-weight: 900;
    content: "\f078";
    transform: translateY(-50%) rotate(-90deg);
    transition: transform 0.2s ease;
}

.nav-group[open] .nav-parent::after {
    transform: translateY(-50%) rotate(0);
}

.sub-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 4px 0 6px 27px;
    padding-left: 13px;
    border-left: 1px solid rgba(255, 255, 255, 0.14);
}

.sub-nav a {
    display: flex;
    align-items: center;
    min-height: 30px;
    padding: 6px 10px;
    color: rgba(255, 255, 255, 0.76);
    border-radius: 7px;
    font-size: 13px;
    font-weight: 500;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.sub-nav a:hover,
.sub-nav a.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.11);
    transform: translateX(2px);
}

/* jslee 20260722-42 게시판 사이트별 2단 하위 메뉴의 간격과 활성 표시 구성 */
.board-sub-nav {
    gap: 2px;
}

.nav-subgroup summary {
    position: relative;
    padding: 8px 28px 8px 16px;
    color: rgba(255, 255, 255, 0.78);
    cursor: pointer;
    list-style: none;
}

.nav-subgroup summary::-webkit-details-marker {
    display: none;
}

.nav-subgroup summary::after {
    position: absolute;
    top: 50%;
    right: 14px;
    content: "\f107";
    font-family: "Font Awesome 6 Free";
    font-size: 10px;
    font-weight: 900;
    transform: translateY(-50%);
}

.nav-subgroup[open] summary::after {
    transform: translateY(-50%) rotate(180deg);
}

.nav-subgroup > div {
    display: grid;
    gap: 2px;
    padding: 0 0 4px 12px;
}

.nav-subgroup > div a {
    padding-left: 22px;
}

.sidebar-promo {
    margin-top: auto;
    padding: 22px 12px 14px;
    text-align: center;
    background: linear-gradient(180deg, rgba(7, 112, 99, 0.75), rgba(4, 83, 76, 0.66));
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
}

.promo-illust {
    position: relative;
    width: 82px;
    height: 70px;
    margin: 0 auto 12px;
    color: #d9fff6;
}

.promo-illust .fa-file-lines {
    position: absolute;
    top: 16px;
    left: 25px;
    font-size: 38px;
}

.promo-illust .plus-one,
.promo-illust .plus-two {
    position: absolute;
    display: grid;
    width: 22px;
    height: 22px;
    place-items: center;
    color: var(--primary);
    background: #eafffb;
    border-radius: 50%;
    font-size: 11px;
}

.promo-illust .plus-one {
    top: 28px;
    left: 4px;
}

.promo-illust .plus-two {
    top: 8px;
    right: 8px;
}

.sidebar-promo strong {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 800;
}

.sidebar-promo p {
    margin: 0 0 14px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 11px;
    line-height: 1.5;
}

.sidebar-promo button {
    width: 100%;
    height: 36px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.46);
    border-radius: 7px;
    font-size: 12px;
    font-weight: 800;
}

.dashboard-footer {
    margin-top: 12px;
    padding: 18px 20px;
    color: #6b7280;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
}

.dashboard-footer p {
    margin: 0;
    font-size: 12px;
    line-height: 1.8;
}

.dashboard-footer p:last-child {
    color: #4b5563;
    font-weight: 700;
}

.main {
    width: calc(100% - var(--sidebar-width));
    min-width: 0;
    margin-left: var(--sidebar-width);
    transition: width 0.24s ease, margin-left 0.24s ease;
}

.page-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: grid;
    min-height: var(--header-height);
    grid-template-columns: minmax(220px, 1fr) auto auto;
    align-items: center;
    gap: 20px;
    padding: 14px 24px 13px;
    background: rgba(245, 247, 251, 0.96);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(10px);
}

.title-block {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.menu-toggle {
    display: grid;
    width: 24px;
    height: 24px;
    flex: 0 0 auto;
    place-items: center;
    color: #26313d;
    background: transparent;
    border: 0;
    font-size: 18px;
}

.title-block h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 900;
    line-height: 1.1;
}

.title-block p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 13px;
    white-space: nowrap;
}

.search-area {
    display: grid;
    grid-template-columns: 136px 122px 154px 154px 52px;
    gap: 10px;
    align-items: center;
}

.search-area select,
.search-area input {
    width: 100%;
    height: 36px;
    padding: 0 14px;
    color: var(--text);
    background: #ffffff;
    border: 1px solid var(--line-strong);
    border-radius: 5px;
    outline: none;
}

.search-area select {
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, #111827 50%), linear-gradient(135deg, #111827 50%, transparent 50%);
    background-position: calc(100% - 17px) 15px, calc(100% - 12px) 15px;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}

.date-field {
    position: relative;
    display: block;
}

.date-field input {
    padding-right: 36px;
}

.date-field i {
    position: absolute;
    top: 50%;
    right: 13px;
    color: #111827;
    font-size: 13px;
    transform: translateY(-50%);
}

.search-btn {
    height: 36px;
    color: #ffffff;
    background: var(--primary);
    border: 0;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 800;
    transition: background 0.2s ease;
}

.search-btn:hover {
    background: #005f50;
}

.profile-menu {
    position: relative;
}

.profile-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0;
    background: transparent;
    border: 0;
}

.profile-photo {
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    background:
        radial-gradient(circle at 50% 25%, #f0c0a3 0 21%, transparent 22%),
        radial-gradient(circle at 50% 78%, #1b2d42 0 34%, transparent 35%),
        linear-gradient(135deg, #f4eee6, #cfd8e3);
    border: 2px solid #ffffff;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
}

.profile-toggle strong,
.profile-toggle small {
    display: block;
    text-align: left;
}

.profile-toggle strong {
    font-size: 13px;
    font-weight: 900;
}

.profile-toggle small {
    color: var(--muted);
    font-size: 11px;
}

.profile-toggle i {
    color: var(--muted);
    font-size: 11px;
}

.profile-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 130px;
    padding: 6px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow-hover);
}

.profile-dropdown a {
    display: block;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 13px;
}

.profile-dropdown a:hover {
    background: var(--primary-soft);
}

.dashboard {
    padding: 18px 24px 22px;
}

.sidebar-backdrop {
    display: none;
}

body.sidebar-collapsed .sidebar {
    transform: translateX(-102%);
}

body.sidebar-collapsed .main {
    width: 100%;
    margin-left: 0;
}

@media (max-width: 1439px) {
    :root {
        --sidebar-width: 214px;
    }

    .page-header {
        grid-template-columns: minmax(170px, 1fr) auto auto;
        gap: 14px;
        padding-inline: 18px;
    }

    .search-area {
        grid-template-columns: 126px 116px 142px 142px 50px;
        gap: 8px;
    }

    .dashboard {
        padding-inline: 18px;
    }
}

@media (max-width: 1190px) {
    .page-header {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .search-area {
        width: 100%;
        grid-template-columns: repeat(4, minmax(0, 1fr)) 70px;
    }

    .profile-menu {
        position: absolute;
        top: 16px;
        right: 18px;
    }

    .title-block {
        padding-right: 190px;
    }
}

@media (max-width: 1023px) {
    .sidebar {
        width: 280px;
        transform: translateX(-102%);
        transition: transform 0.24s ease;
    }

    body.sidebar-open .sidebar {
        transform: translateX(0);
    }

    body.sidebar-open {
        overflow: hidden;
    }

    body.sidebar-collapsed .sidebar {
        transform: translateX(-102%);
    }

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 35;
        display: block;
        pointer-events: none;
        background: rgba(15, 23, 42, 0);
        transition: background 0.24s ease;
    }

    body.sidebar-open .sidebar-backdrop {
        pointer-events: auto;
        background: rgba(15, 23, 42, 0.42);
    }

    .main {
        width: 100%;
        margin-left: 0;
    }

    .page-header {
        position: relative;
    }

    .search-area {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .search-btn {
        grid-column: span 2;
    }
}

@media (max-width: 767px) {
    .page-header {
        gap: 14px;
        min-height: auto;
        padding: 14px;
    }

    .title-block {
        padding-right: 0;
    }

    .title-block h1 {
        font-size: 22px;
    }

    .dashboard-footer {
        padding: 16px 14px;
        text-align: left;
    }

    .title-block p {
        white-space: normal;
    }

    .profile-menu {
        position: static;
        width: 100%;
    }

    .profile-toggle {
        width: 100%;
        justify-content: flex-start;
        padding: 8px 10px;
        background: #ffffff;
        border: 1px solid var(--line);
        border-radius: 8px;
    }

    .profile-toggle i {
        margin-left: auto;
    }

    .search-area {
        grid-template-columns: 1fr;
    }

    .search-btn {
        grid-column: auto;
    }

    .dashboard {
        padding: 14px;
    }
}

@media (max-width: 480px) {
    .sidebar {
        width: min(86vw, 280px);
    }
}
