:root {
    --primary: #0d6efd;
    --sidebar-width: 260px;
    --sidebar-bg: #1e3a5f;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: #f0f4f8;
    min-height: 100vh;
}

/* Auth */
.auth-body {
    background: url('../login.jpg') no-repeat center center fixed;
    background-size: cover;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.auth-body::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.4);
    z-index: 1;
}

.auth-wrapper {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 440px;
    padding: 1.5rem;
}

.auth-card {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 2.5rem 2.25rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.auth-logo {
    width: 64px; height: 64px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
}

/* Layout */
.wrapper { display: flex; min-height: 100vh; }
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 1000;
    overflow-y: auto;
    transition: transform 0.3s;
}
.sidebar-header { padding: 1.25rem; border-bottom: 1px solid rgba(255,255,255,0.1); }
.sidebar-nav { list-style: none; padding: 0.75rem 0; margin: 0; }
.sidebar-nav li a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    transition: all 0.2s;
}
.sidebar-nav li a:hover,
.sidebar-nav li a.active {
    background: rgba(255,255,255,0.1);
    color: #fff;
}
.sidebar-nav li a.active { border-left: 3px solid #fff; }
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.page-content { flex: 1; padding: 1.5rem; }

/* Stats */
.stat-card {
    border-radius: 10px;
    padding: 1.25rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.stat-card .stat-icon { font-size: 2rem; opacity: 0.8; }
.stat-card .stat-info h3 { margin: 0; font-size: 1.75rem; font-weight: 700; }
.stat-card .stat-info p { margin: 0; opacity: 0.9; font-size: 0.875rem; }

.card-stat {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: transform 0.2s;
}
.card-stat:hover { transform: translateY(-2px); }
.report-card:hover { box-shadow: 0 4px 16px rgba(13,110,253,0.15); }

.customer-photo { width: 120px; height: 120px; object-fit: cover; border: 3px solid var(--primary); }

.payment-summary .d-flex { padding: 0.35rem 0; }

/* Print */
@media print {
    .sidebar, .navbar, .no-print, .footer, .btn { display: none !important; }
    .main-content { margin-left: 0 !important; }
}

@media (max-width: 991.98px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.show { transform: translateX(0); }
    .main-content { margin-left: 0; }
}

/* Dashboard KPI Card Gradients */
.bg-gradient-primary {
    background: linear-gradient(135deg, #1e3a5f 0%, #0d6efd 100%) !important;
}
.bg-gradient-success {
    background: linear-gradient(135deg, #15803d 0%, #22c55e 100%) !important;
}
.bg-gradient-info {
    background: linear-gradient(135deg, #0369a1 0%, #0ea5e9 100%) !important;
}
.bg-gradient-warning {
    background: linear-gradient(135deg, #eab308 0%, #fef08a 100%) !important;
}

/* Dashboard card hover effect */
.row.g-3.mb-4 a:hover .card {
    transform: translateY(-4px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.15) !important;
}
.row.g-3.mb-4 .card {
    transition: all 0.25s ease-in-out;
}

/* Bottom Navigation (App screen) */
.bottom-nav {
    display: none;
    z-index: 1050;
}

@media (max-width: 767.98px) {
    .bottom-nav {
        display: block !important;
    }
    body {
        padding-bottom: 75px !important; /* Leave space for bottom nav */
    }
    /* Hide desktop sidebar entirely on phones */
    .sidebar {
        display: none !important;
    }
    .main-content {
        margin-left: 0 !important;
    }
    /* Hide top toggle button if not needed */
    #sidebarToggle {
        display: none !important;
    }
}
