﻿
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --primary-light: #e0e7ff;
    --primary-dark: #4f46e5;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --success: #10b981;
    --success-light: #d1fae5;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --danger: #ef4444;
    --info: #3b82f6;
    --info-light: #dbeafe;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-md: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --radius: 1rem;
    --radius-md: 0.75rem;
    --radius-lg: 1.25rem;
    --transition: all 0.2s ease;
}

body {
    font-family: 'Inter', sans-serif;
    background: #f0f2f5;
    color: var(--gray-800);
    overflow-x: hidden;
}

/* navbar */
.navbar {
    background: white;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 40;
    backdrop-filter: blur(8px);
    background: rgba(255,255,255,0.9);
    border-bottom: 1px solid var(--gray-200);
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0.75rem 1.2rem;
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand img {
    max-width: 140px;
    height: auto;
    display: block;
}

/* profile dropdown */
.profile-dropdown {
    position: relative;
    display: inline-block;
}

.profile-trigger {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: var(--gray-100);
    padding: 0.5rem 1rem 0.5rem 1.2rem;
    border-radius: 40px;
    font-weight: 500;
    color: var(--gray-700);
    cursor: pointer;
    border: 1px solid var(--gray-200);
    transition: var(--transition);
}

    .profile-trigger:hover {
        background: var(--gray-200);
    }

    .profile-trigger i:last-child {
        font-size: 0.8rem;
        color: var(--gray-600);
    }

.dropdown-menu {
    position: absolute;
    top: 120%;
    right: 0;
    background: white;
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.25s ease;
    z-index: 50;
    border: 1px solid var(--gray-200);
    padding: 0.5rem;
}

    .dropdown-menu.show {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.75rem 1rem;
    color: var(--gray-700);
    text-decoration: none;
    border-radius: 0.75rem;
    transition: var(--transition);
}

    .dropdown-item:hover {
        background: var(--gray-100);
        color: var(--primary-dark);
    }

    .dropdown-item i {
        width: 20px;
        color: var(--gray-500);
    }

/* mobile sidebar toggle (hamburger) */
.sidebar-toggle {
    background: white;
    border: 1px solid var(--gray-300);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--gray-700);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    margin-right: 0.75rem;
}

    .sidebar-toggle:hover {
        background: var(--gray-100);
    }

/* dashboard layout */
.dashboard-layout {
    display: flex;
    max-width: 1600px;
    margin: 1.5rem auto 0;
    padding: 0 1.5rem;
    gap: 1.5rem;
    position: relative;
}

/* SIDEBAR — now with white background, box to right, slide behavior */
.sidebar {
    width: 300px;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1rem 0.5rem;
    height: fit-content;
    position: sticky;
    top: 88px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--gray-200);
    flex-shrink: 0;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1.2rem;
    margin: 0.2rem 0.5rem;
    border-radius: 0.75rem;
    color: var(--gray-700);
    font-weight: 500;
    text-decoration: none;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

    .sidebar-link i {
        width: 24px;
        font-size: 1.2rem;
        color: var(--gray-500);
        transition: var(--transition);
    }

    .sidebar-link:hover {
        background: var(--primary-light);
        color: #4f46e5;
        transform: translateX(4px);
    }

        .sidebar-link:hover i {
            color: #4f46e5;
        }

    .sidebar-link.active {
        background: var(--primary-gradient);
        color: white;
        box-shadow: 0 10px 20px -5px rgba(99,102,241,0.4);
    }

        .sidebar-link.active i {
            color: white;
        }

.logout-btn {
    margin-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
    padding-top: 1.2rem;
    border-radius: 0;
}

/* main content */
.dashboard-main {
    flex: 1;
    min-width: 0;
}

/* stat cards */
.stats-grid-6 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.2rem;
    margin-bottom: 2rem;
}

.admin-stat-card {
    background: white;
    padding: 1.5rem 1rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    border: 1px solid var(--gray-200);
}

    .admin-stat-card::after {
        content: '';
        position: absolute;
        inset: 0;
        background: var(--primary-gradient);
        opacity: 0;
        transition: opacity 0.4s ease;
        pointer-events: none;
        z-index: 0;
    }

    .admin-stat-card:hover {
        transform: translateY(-6px);
        box-shadow: var(--shadow-lg);
        border-color: transparent;
    }

        .admin-stat-card:hover::after {
            opacity: 0.03;
        }

.admin-stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.6rem;
    box-shadow: 0 8px 14px -4px rgba(99,102,241,0.3);
    transition: var(--transition);
}

.admin-stat-card:hover .admin-stat-icon {
    transform: scale(1.05) rotate(2deg);
}

.admin-stat-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--gray-900);
}

.admin-stat-label {
    color: var(--gray-600);
    font-size: 0.9rem;
    margin-top: 0.25rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.admin-stat-change {
    font-size: 0.75rem;
    margin-top: 0.75rem;
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--gray-100);
    padding: 0.2rem 0.6rem;
    border-radius: 30px;
    width: fit-content;
}

.positive {
    color: var(--success);
}

.negative {
    color: var(--danger);
}

/* cards */
.card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    border: 1px solid var(--gray-200);
    transition: var(--transition);
}

    .card:hover {
        box-shadow: var(--shadow-md);
    }

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

    .card-header h3 {
        font-size: 1.2rem;
        font-weight: 600;
        color: var(--gray-800);
    }

.badge {
    padding: 0.3rem 0.8rem;
    border-radius: 40px;
    font-size: 0.8rem;
    font-weight: 600;
    background: var(--gray-200);
    color: var(--gray-700);
}

.badge-warning {
    background: var(--warning-light);
    color: #b45309;
}

.badge-success {
    background: var(--success-light);
    color: #065f46;
}

.badge-info {
    background: var(--info-light);
    color: #1e40af;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.7rem 1.4rem;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    background: white;
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    border: none;
    box-shadow: 0 8px 14px -8px #6366f1;
}

    .btn-primary:hover {
        box-shadow: 0 12px 20px -8px #4f46e5;
        transform: scale(1.02);
    }

.btn-outline-primary {
    background: transparent;
    border: 1.5px solid #6366f1;
    color: #4f46e5;
}

    .btn-outline-primary:hover {
        background: var(--primary-light);
        border-color: #4f46e5;
    }

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
}

.responsive-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.pending-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--gray-200);
    transition: var(--transition);
}

    .pending-item:hover {
        background: var(--gray-50);
        padding-left: 0.5rem;
        padding-right: 0.5rem;
        border-radius: 0.75rem;
    }

.activity-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    text-align: center;
}

.activity-item h3 {
    font-size: 1.8rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 700;
}

.page-content{
    margin-bottom: 2rem;
}

/* overlay for mobile */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(2px);
    z-index: 44;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

    .sidebar-overlay.active {
        opacity: 1;
        visibility: visible;
    }

/* animations */
@keyframes fadeSlide {
    0% {
        opacity: 0;
        transform: translateY(8px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.admin-stat-card {
    animation: fadeSlide 0.4s ease backwards;
}

/* ========== RESPONSIVE (MOBILE) ========== */
@media (max-width: 1024px) {
    .sidebar {
        width: 280px;
    }
}

@media (max-width: 768px) {
    .sidebar-toggle {
        display: inline-flex;
    }

    .navbar-container {
        justify-content: flex-start;
        gap: 0.5rem;
    }

    .navbar-brand {
        margin-right: auto;
    }
    /* sidebar becomes absolute panel, slides from left */
    .sidebar {
        position: fixed;
        top: 70px;
        left: 1rem;
        z-index: 45;
        transform: translateX(-120%);
        width: 280px;
        max-width: calc(100% - 2rem);
        background: white;
        box-shadow: var(--shadow-lg);
        transition: transform 0.3s ease;
        height: auto;
        max-height: calc(100vh - 100px);
        overflow-y: auto;
        border-radius: 1.5rem;
    }

        .sidebar.open {
            transform: translateX(0);
        }

    .dashboard-layout {
        padding: 0 1rem;
    }

    .stats-grid-6 {
        grid-template-columns: repeat(2, 1fr);
    }

    .responsive-grid {
        grid-template-columns: 1fr;
    }

    .grid-2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .stats-grid-6 {
        grid-template-columns: 1fr;
    }

    .profile-trigger span {
        display: none; /* hide name on very small, keep icon */
    }

    .profile-trigger i:last-child {
        display: none;
    }

    .profile-trigger {
        padding: 0.5rem;
    }

    .navbar-brand img {
        max-width: 110px;
    }
}

/* Dropdown container */
.sidebar-dropdown .submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

/* Show dropdown */
.sidebar-dropdown.open .submenu {
    max-height: 500px;
}

/* Sub links */
.sidebar-sublink {
    display: block;
    padding: 8px 0;
    font-size: 14px;
    color: #6b7280;
    text-decoration: none;
    transition: 0.2s;
}

    .sidebar-sublink:hover {
        color: #6366f1;
    }

    .sidebar-sublink.active {
        color: #6366f1;
        font-weight: 600;
    }

/* Rotate arrow */
.dropdown-icon {
    float: right;
    transition: transform 0.3s ease;
    font-size: 13px !important;
}

.sidebar-dropdown.open .dropdown-icon {
    transform: rotate(180deg);
}



/* =====     DASHBOARD HEADER COMPONENT ===== */
.dashboard-header {
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: var(--radius);
    padding: 1rem 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

/* Decorative Elements */
.header-decor {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    pointer-events: none;
}

.decor-1 {
    top: -20px;
    right: -20px;
    width: 150px;
    height: 150px;
}

.decor-2 {
    bottom: -30px;
    left: -30px;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.05);
}

/* Header Content */
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    position: relative;
    z-index: 2;
}

/* Left Side */
.header-left {
    flex: 1;
}

.header-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

    .header-title i {
        margin-right: 10px;
        opacity: 0.9;
    }

.header-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 1rem;
}

/* Date Pill */
.date-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.5rem 1.2rem;
    border-radius: 40px;
    font-size: 0.9rem;
    font-weight: 500;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: fit-content;
}

    .date-pill i {
        font-size: 0.9rem;
        opacity: 0.9;
    }

/* Breadcrumb Navigation */
.breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    background: white;
    padding: 0.5rem 0.8rem;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.breadcrumb-home {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--gray-100, #f3f4f6);
    border-radius: 50%;
    color: var(--primary-dark, #4f46e5);
    transition: all 0.3s ease;
    text-decoration: none;
}

    .breadcrumb-home:hover {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        transform: scale(1.05);
    }

    .breadcrumb-home i {
        font-size: 1rem;
    }

.breadcrumb-separator {
    color: var(--gray-400, #9ca3af);
    font-size: 0.7rem;
    margin: 0 0.2rem;
}

.breadcrumb-current {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 0.4rem 1.2rem;
    border-radius: 30px;
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.3);
}

    .breadcrumb-current i {
        font-size: 0.9rem;
    }

.quick-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--gray-100, #f3f4f6);
    border: none;
    border-radius: 50%;
    color: var(--gray-600, #4b5563);
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 0.2rem;
}

    .quick-action-btn:hover {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        transform: rotate(90deg);
    }

/* Header Wave */
.header-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 10px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

/* ===== STATS GRID COMPONENT ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.stat-card {
    background: white;
    border-radius: 15px;
    padding: 1.2rem;
    border: 1px solid var(--gray-200, #e5e7eb);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

    .stat-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
        border-color: transparent;
    }

/* Stat Icons */
.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
    flex-shrink: 0;
}

/* Stat Details */
.stat-details {
    flex: 1;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--gray-600, #4b5563);
    margin-bottom: 0.2rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-800, #1f2937);
    line-height: 1.2;
    margin-bottom: 0.3rem;
}

/* Trend Indicators */
.stat-trend {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 30px;
    background: var(--gray-100, #f3f4f6);
}

.trend-up {
    color: #10b981;
}

.trend-down {
    color: #ef4444;
}

.stat-trend i {
    font-size: 0.6rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .dashboard-header {
        padding: 1.2rem;
    }

    .header-title {
        font-size: 1.8rem;
    }

    .breadcrumb-nav {
        width: 100%;
        justify-content: space-between;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .breadcrumb-nav {
        width: 100%;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .date-pill {
        width: 100%;
        justify-content: center;
    }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
   
    .stat-label {
        color: #9ca3af;
    }

    .stat-value {
        color: #374151;
    }

    .stat-trend {
        background: #374151;
    }

    .quick-action-btn,
    .breadcrumb-home {
        background: #6765f2;
        color: #ffffff;
    }
}


.count-status {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 0.75rem;
}


