:root {
    --sidebar-width: 250px;
    --brand-color: #2563eb;
    --sidebar-bg: #111827;
    --sidebar-fg: #cbd5e1;
    --sidebar-active-bg: #1f2937;
}

body {
    background-color: #f3f4f6;
    font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
    background: var(--sidebar-bg);
    color: var(--sidebar-fg);
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    overflow-y: auto;
    z-index: 1030;
    transition: transform 0.2s ease-in-out;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1.25rem 1.25rem;
    font-size: 1.15rem;
    font-weight: 600;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-nav {
    padding: 0.75rem 0.5rem 2rem;
    display: flex;
    flex-direction: column;
}

.sidebar-nav .nav-heading {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6b7280;
    padding: 1rem 0.75rem 0.25rem;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    color: var(--sidebar-fg);
    padding: 0.55rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.92rem;
}

.sidebar-nav .nav-link:hover {
    background: var(--sidebar-active-bg);
    color: #fff;
}

.sidebar-nav .nav-link.active {
    background: var(--brand-color);
    color: #fff;
}

.main-wrapper {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    padding: 0.75rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 1020;
}

.topbar-title {
    font-weight: 600;
    font-size: 1.05rem;
    color: #111827;
}

.content-area {
    padding: 1.5rem;
    flex: 1;
}

.stat-card {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    background: #fff;
    padding: 1.1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    height: 100%;
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #fff;
    flex-shrink: 0;
}

.stat-card .stat-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: #111827;
}

.stat-card .stat-label {
    font-size: 0.8rem;
    color: #6b7280;
}

.card-panel {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1.25rem;
}

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
}

.auth-card {
    background: #fff;
    border-radius: 0.75rem;
    padding: 2.5rem;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.25);
}

.low-stock-row {
    background-color: #fff7ed !important;
}

.out-of-stock-row {
    background-color: #fef2f2 !important;
}

@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-wrapper {
        margin-left: 0;
    }
}

@media print {
    .sidebar, .topbar {
        display: none !important;
    }

    .main-wrapper {
        margin-left: 0 !important;
    }
}
