/* ===== VARIABLES ===== */
:root {
    --primary: #4361ee;
    --primary-dark: #3a56d4;
    --secondary: #7209b7;
    --success: #4cc9f0;
    --info: #4895ef;
    --warning: #f72585;
    --danger: #e63946;
    --light: #f8f9fa;
    --dark: #212529;
    --sidebar-width: 280px;
    --header-height: 70px;
}

/* ===== BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

/* ===== LOGIN & REGISTER STYLES ===== */
.login-body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    max-width: 400px;
    width: 100%;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: none;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.login-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.login-card .card-header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.login-card .card-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: rotate(45deg);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.login-card .card-header h4 {
    margin: 0;
    font-weight: 600;
    font-size: 1.5rem;
}

.login-card .card-body {
    padding: 2rem;
}

.form-control {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 12px 15px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(67, 97, 238, 0.25);
    background: white;
    transform: translateY(-2px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    border-radius: 10px;
    padding: 12px 20px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.4);
    background: linear-gradient(135deg, var(--primary-dark), var(--secondary));
}

/* ===== MAIN LAYOUT STYLES ===== */
.main-wrapper {
    min-height: 100vh;
    background: #f8f9fa;
}

/* ===== HEADER STYLES ===== */
.navbar {
    background: linear-gradient(135deg, var(--primary), var(--secondary)) !important;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    padding: 0.8rem 0;
    height: var(--header-height);
    border: none;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: white !important;
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar-brand i {
    font-size: 1.8rem;
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: white !important;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.dropdown-menu {
    border: none;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 10px;
    margin-top: 10px;
}

.dropdown-item {
    border-radius: 10px;
    padding: 10px 15px;
    margin: 2px 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dropdown-item:hover {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    transform: translateX(5px);
}

/* ===== SIDEBAR STYLES ===== */
.sidebar {
    background: linear-gradient(180deg, #2c3e50, #34495e);
    color: white;
    min-height: calc(100vh - var(--header-height));
    box-shadow: 3px 0 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: var(--header-height);
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 15px 20px;
    margin: 5px 15px;
    border-radius: 12px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.sidebar .nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: var(--primary);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.sidebar .nav-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.sidebar .nav-link:hover::before {
    transform: scaleY(1);
}

.sidebar .nav-link.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3);
    transform: translateX(5px);
}

.sidebar .nav-link.active::before {
    transform: scaleY(1);
}

.sidebar .nav-link i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

/* ===== MAIN CONTENT STYLES ===== */
.main-content {
    background: #f8f9fa;
    min-height: calc(100vh - var(--header-height));
    padding: 2rem;
}

.content-header {
    background: white;
    border-radius: 20px;
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    border: none;
}

.content-header h1 {
    color: #2c3e50;
    font-weight: 700;
    margin: 0;
    font-size: 1.8rem;
}

/* ===== CARD STYLES ===== */
.card {
    border: none;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.card-header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 1.5rem 2rem;
    font-weight: 600;
    font-size: 1.1rem;
}

.card-body {
    padding: 2rem;
}

/* ===== STATS CARD STYLES ===== */
.stats-card {
    border: none;
    border-radius: 20px;
    color: white;
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
}

.stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stats-card:hover::before {
    opacity: 1;
}

.stats-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.stats-card .card-body {
    position: relative;
    z-index: 2;
    padding: 2rem;
}

.stats-card .card-title {
    font-size: 0.9rem;
    font-weight: 600;
    opacity: 0.9;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stats-card h2 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0;
}

.stats-card i {
    font-size: 2.5rem;
    opacity: 0.8;
}

/* ===== TABLE STYLES ===== */
.table {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.table th {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 1rem 1.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.8rem;
}

.table td {
    padding: 1rem 1.5rem;
    vertical-align: middle;
    border-color: #f1f3f4;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(67, 97, 238, 0.02);
}

.table-hover tbody tr:hover {
    background-color: rgba(67, 97, 238, 0.1);
    transform: scale(1.01);
    transition: all 0.2s ease;
}

/* ===== BADGE STYLES ===== */
.badge {
    padding: 0.5rem 1rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===== BUTTON STYLES ===== */
.btn {
    border-radius: 10px;
    padding: 10px 20px;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.8rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.btn-success {
    background: linear-gradient(135deg, #4cc9f0, #4895ef);
}

.btn-danger {
    background: linear-gradient(135deg, #e63946, #f72585);
}

.btn-warning {
    background: linear-gradient(135deg, #ff9e00, #ff6b00);
}

.btn-info {
    background: linear-gradient(135deg, #4895ef, #4361ee);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* ===== FORM STYLES ===== */
.form-label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.form-select {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 12px 15px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(67, 97, 238, 0.25);
}

/* ===== ALERT STYLES ===== */
.alert {
    border: none;
    border-radius: 15px;
    padding: 1rem 1.5rem;
    font-weight: 500;
}

.alert-success {
    background: linear-gradient(135deg, #4cc9f0, #4895ef);
    color: white;
}

.alert-danger {
    background: linear-gradient(135deg, #e63946, #f72585);
    color: white;
}

/* ===== PROGRESS BAR STYLES ===== */
.progress {
    height: 10px;
    border-radius: 10px;
    background: #e9ecef;
    overflow: hidden;
}

.progress-bar {
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

/* ===== RESPONSIVE STYLES ===== */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        top: var(--header-height);
        left: -100%;
        width: var(--sidebar-width);
        height: calc(100vh - var(--header-height));
        z-index: 1000;
        transition: left 0.3s ease;
    }

    .sidebar.show {
        left: 0;
    }

    .main-content {
        margin-left: 0;
        padding: 1rem;
    }

    .stats-card .card-body {
        padding: 1.5rem;
    }

    .stats-card h2 {
        font-size: 1.8rem;
    }

    .stats-card i {
        font-size: 2rem;
    }

    .content-header {
        padding: 1rem 1.5rem;
    }

    .content-header h1 {
        font-size: 1.5rem;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--secondary));
}
