/* EYNova web shell — "Classic Professional" navy palette over a fixed-sidebar admin layout.
   Palette and structure adapted from the 1st-round design mockups (classic_professional)
   and the PearlDental.Admin sidebar pattern. Plain CSS (no SCSS pipeline in this repo). */

:root {
    /* Navy primary (Classic Professional) */
    --primary-300: #5A6A94;
    --primary-500: #3D5082;
    --primary-700: #1A2753;
    --primary-900: #0E152E;

    --accent: #4DD2C0;          /* teal accent for active/markers */
    --neutral-50: #FAFAFA;
    --neutral-100: #F5F6F8;
    --neutral-200: #EDEEF2;
    --neutral-300: #E0E2E9;
    --neutral-500: #9AA0AD;
    --neutral-700: #5B6170;
    --neutral-900: #1F2430;

    --sidebar-width: 264px;
    --header-height: 60px;

    /* Korean-first system font stack (no external font CDN) */
    --font-family: 'Malgun Gothic', '맑은 고딕', 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', sans-serif;
}

html {
    font-size: 15px;
}

body {
    margin: 0;
    font-family: var(--font-family);
    background: var(--neutral-100);
    color: var(--neutral-900);
    line-height: 1.6;
}

/* ===== Shell ===== */
.app-shell {
    min-height: 100vh;
}

.app-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--primary-700) 0%, var(--primary-900) 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    z-index: 1040;
}

.sidebar-brand {
    height: var(--header-height);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0 1.25rem;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.2px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.sidebar-brand .brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.12);
    color: var(--accent);
    font-size: 1rem;
}

.brand-accent {
    color: var(--accent);
}

.sidebar-nav {
    padding: 0.75rem 0 1.5rem;
}

.nav-section {
    padding: 1rem 1.5rem 0.35rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.45);
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.6rem 1.5rem;
    color: rgba(255, 255, 255, 0.82);
    text-decoration: none;
    font-size: 0.92rem;
    border-left: 3px solid transparent;
    transition: background 0.15s ease, color 0.15s ease;
}

.sidebar-nav .nav-link i {
    font-size: 1.05rem;
    width: 1.2rem;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-nav a.nav-link:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.sidebar-nav .nav-link.active {
    background: rgba(77, 210, 192, 0.12);
    color: #fff;
    border-left-color: var(--accent);
    font-weight: 600;
}

.sidebar-nav .nav-link.disabled {
    color: rgba(255, 255, 255, 0.4);
    cursor: default;
}

.nav-badge {
    margin-left: auto;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.7);
}

/* ===== Main ===== */
.app-main {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-header {
    height: var(--header-height);
    background: #fff;
    border-bottom: 1px solid var(--neutral-300);
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 1030;
}

.header-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--primary-700);
}

.header-meta {
    margin-left: auto;
    font-size: 0.8rem;
    color: var(--neutral-500);
}

.sidebar-toggle {
    display: none;
    border: 0;
    background: transparent;
    font-size: 1.4rem;
    color: var(--primary-700);
    padding: 0;
    line-height: 1;
    cursor: pointer;
}

.app-content {
    flex: 1;
    padding: 2rem 1.75rem;
    max-width: 1100px;
    width: 100%;
}

.app-footer {
    padding: 1rem 1.75rem;
    border-top: 1px solid var(--neutral-300);
    color: var(--neutral-500);
    font-size: 0.8rem;
}

.app-footer a {
    color: var(--primary-500);
}

/* ===== Page surface helpers (used by Index/Reverse headers) ===== */
.page-card {
    background: #fff;
    border: 1px solid var(--neutral-300);
    border-radius: 12px;
    padding: 1.75rem;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.page-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--primary-700);
    margin-bottom: 0.35rem;
}

.page-subtitle {
    color: var(--neutral-700);
    margin-bottom: 0;
}

.btn-primary {
    background-color: var(--primary-500);
    border-color: var(--primary-500);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--primary-700);
    border-color: var(--primary-700);
}

.btn-success {
    background-color: #00766A;
    border-color: #00766A;
}

a {
    color: var(--primary-500);
}

.form-control:focus,
.form-check-input:focus {
    border-color: var(--primary-300);
    box-shadow: 0 0 0 0.2rem rgba(61, 80, 130, 0.15);
}

.form-check-input:checked {
    background-color: var(--primary-500);
    border-color: var(--primary-500);
}

/* ===== Responsive: sidebar slides over content under 992px ===== */
.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(14, 21, 46, 0.45);
    z-index: 1035;
}

@media (max-width: 991.98px) {
    .app-sidebar {
        transform: translateX(-100%);
        transition: transform 0.25s ease;
    }
    .app-shell.sidebar-open .app-sidebar {
        transform: translateX(0);
    }
    .app-shell.sidebar-open .sidebar-backdrop {
        display: block;
    }
    .app-main {
        margin-left: 0;
    }
    .sidebar-toggle {
        display: inline-flex;
        align-items: center;
    }
}
