:root {
    --sidebar-width: 250px;
    --sidebar-bg: #2c3e50;
    --sidebar-text: #ecf0f1;
    --sidebar-hover: #34495e;
    --sidebar-active: #1abc9c;
}

body {
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    min-height: calc(100vh - 56px);
    background-color: var(--sidebar-bg);
    transition: margin-left 0.3s;
    flex-shrink: 0;
}

.sidebar .nav-link {
    color: var(--sidebar-text);
    padding: 0.75rem 1.25rem;
    border-radius: 0;
}

.sidebar .nav-link:hover {
    background-color: var(--sidebar-hover);
}

.sidebar .nav-link.active {
    background-color: var(--sidebar-active);
    color: white;
}

.sidebar .nav-section-header {
    color: #95a5a6;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 1rem 1.25rem 0.25rem;
}


.sidebar .nav-sub-item .nav-link {
    padding-left: 2rem;
    font-size: 0.9rem;
}

.content-wrapper {
    flex: 1;
    min-width: 0;
}

.sidebar-collapsed .sidebar {
    margin-left: calc(var(--sidebar-width) * -1);
}

.top-navbar {
    z-index: 1030;
}

/* Collapsible nav sections */
.sidebar .nav-details-wrapper {
    list-style: none;
    padding: 0;
}

.sidebar details > summary {
    color: #95a5a6;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 1rem 1.25rem 0.25rem;
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar details > summary::-webkit-details-marker,
.sidebar details > summary::marker {
    display: none;
}

.sidebar details > summary::after {
    content: '▶';
    font-size: 0.55rem;
    opacity: 0.6;
}

.sidebar details[open] > summary::after {
    content: '▼';
}

/* Nested ERP Data details inherits from parent but uses sub-header sizing */
.sidebar details details > summary {
    color: #7f8c8d;
    font-size: 0.7rem;
    padding: 0.75rem 1.25rem 0.1rem 1.75rem;
}

/* ─────────────────────────────────────────────────────────────
   Account / login pages
   ───────────────────────────────────────────────────────────── */

.auth-page {
    min-height: 100vh;
    display: flex;
    background: #f6f8fa;
}

.auth-hero {
    flex: 1 1 50%;
    display: none;
    position: relative;
    color: #ecf0f1;
    background: linear-gradient(135deg, #2c3e50 0%, #1abc9c 100%);
    overflow: hidden;
    padding: 3rem;
}

@media (min-width: 992px) {
    .auth-hero { display: flex; flex-direction: column; justify-content: space-between; }
}

.auth-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.08) 0, transparent 40%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.05) 0, transparent 40%);
    pointer-events: none;
}

.auth-hero > * { position: relative; z-index: 1; }

.auth-hero-brand {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.auth-hero-brand-mark {
    width: 32px;
    height: 32px;
}

.auth-hero-art {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 2rem 0;
}

.auth-hero-art svg {
    width: 100%;
    max-width: 420px;
    height: auto;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.25));
}

.auth-hero-tagline {
    max-width: 32rem;
}

.auth-hero-tagline h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.auth-hero-tagline p {
    opacity: 0.85;
    margin: 0;
}

.auth-form-pane {
    flex: 1 1 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
}

.auth-card {
    width: 100%;
    max-width: 26rem;
}

.auth-card-mobile-brand {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
    font-weight: 600;
    color: #2c3e50;
    letter-spacing: 0.04em;
}

@media (min-width: 992px) {
    .auth-card-mobile-brand { display: none; }
}

.auth-card h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.auth-card .auth-subtitle {
    color: #6c757d;
    margin-bottom: 1.75rem;
}

.auth-card .form-control {
    padding: 0.65rem 0.85rem;
}

.auth-card .btn-primary {
    background: #1abc9c;
    border-color: #1abc9c;
    padding: 0.65rem;
    font-weight: 500;
}

.auth-card .btn-primary:hover,
.auth-card .btn-primary:focus {
    background: #16a085;
    border-color: #16a085;
}

.auth-card .btn-outline-secondary {
    padding: 0.65rem;
    font-weight: 500;
    border-color: #ced4da;
    color: #2c3e50;
}

.auth-card .btn-outline-secondary:hover {
    background: #f6f8fa;
    color: #2c3e50;
    border-color: #adb5bd;
}

.auth-divider {
    display: flex;
    align-items: center;
    color: #adb5bd;
    font-size: 0.85rem;
    margin: 1.25rem 0;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e9ecef;
}

.auth-divider::before { margin-right: 0.75rem; }
.auth-divider::after  { margin-left: 0.75rem; }

.auth-back-link {
    display: block;
    text-align: center;
    margin-top: 1.25rem;
    color: #6c757d;
    font-size: 0.9rem;
    text-decoration: none;
}

.auth-back-link:hover { color: #1abc9c; }
