﻿/* ===== 기본 스타일 (Blazor 템플릿 기본값) ===== */
html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus,
.form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3Lncz... ) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

code {
    color: #c02d76;
}

/* ===== 여기부터 레이아웃 & 사이드바 ===== */
html, body {
    height: 100%;
    margin: 0;
    overflow: hidden; /* ✅ 전체 페이지 스크롤 방지 */
}

.app-layout {
    display: flex;
    height: 100vh; /* ✅ 화면 전체 높이 */
}

/* 사이드바 */
.sidebar {
    width: 240px;
    height: 100vh;
    overflow-y: auto; /* 사이드바 스크롤 */
    overflow-x: hidden; /* 가로 스크롤 방지 */
    background-color: #2a2d31;
    color: #fff;
    padding: 0 12px;
    flex-shrink: 0;
}

.sidebar-title {
    font-weight: 800;
    font-size: 1.25rem;
    margin: 10px 4px 16px;
    color: #fff;
}

.nav-sep {
    margin: 14px 4px 6px;
    font-size: .95rem;
    font-weight: 700;
    color: #fff;
}

ul.nav.flex-column {
    display: flex;
    flex-direction: column;
    row-gap: 8px;
    padding: 8px 0;
    margin: 0;
    width: 100%;
}

.nav-item {
    margin: 0 !important;
    padding: 0 !important;
    font-size: .9rem;
}

    .nav-item ::deep a {
        display: flex;
        align-items: center;
        gap: 10px;
        height: 44px;
        padding: 0 12px;
        border-radius: 12px;
        color: #d7d7d7 !important;
        text-decoration: none !important;
    }

        .nav-item ::deep a:hover {
            background: rgba(255,255,255,.10);
            color: #fff !important;
        }

        .nav-item ::deep a.active {
            background: rgba(255,255,255,.18);
            color: #fff !important;
            font-weight: 600;
        }

        .nav-item ::deep a.nav-btn {
            justify-content: flex-start;
            height: 48px;
            border-radius: 14px;
            font-weight: 700;
        }

/* 메인 콘텐츠 */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow-y: auto; /* 본문 스크롤 */
    background: #f5f6f8;
}

.header {
    flex-shrink: 0;
    padding: .5rem 1rem;
    background: #fff;
    border-bottom: 1px solid #ddd;
}

.page-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

/* 스크롤바 */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,.2);
    border-radius: 3px;
}
