/**
 * Admin Stylesheet
 * LMS System - Admin Panel
 */

/* ===================================
   Admin Layout
=================================== */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
    background: var(--bg-main);
}

/* ===================================
   Sidebar
=================================== */
.admin-sidebar {
    width: 260px;
    background: linear-gradient(180deg, #0f172a 0%, #020617 100%);
    color: var(--text-white);
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    overflow-y: auto;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    box-shadow: 4px 0 20px rgba(30, 64, 175, 0.15);
}

.sidebar-header {
    padding: var(--spacing-xl) var(--spacing-lg);
    border-bottom: 1px solid rgba(96, 165, 250, 0.1);
    background: rgba(30, 64, 175, 0.1);
}

.sidebar-brand {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-white);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: 0.5px;
}



.sidebar-menu {
    list-style: none;
    padding: var(--spacing-md) 0;
}

.sidebar-menu li {
    margin-bottom: 4px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 14px var(--spacing-lg);
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    gap: 14px;
    margin: 2px 10px;
    border-radius: 30px;
    position: relative;
    font-weight: 500;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: rgba(30, 64, 175, 0.2);
    color: var(--text-white);
    transform: translateX(5px);
}

.sidebar-menu a:hover::before,
.sidebar-menu a.active::before {
    height: 70%;
}

.sidebar-menu a.active {
    background: rgba(59, 130, 246, 0.25);
    font-weight: 600;
}

.sidebar-menu i {
    width: 20px;
    text-align: center;
}

/* Mobile Sidebar Toggle */
.sidebar-toggle {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    background: var(--primary-gradient);
    color: var(--text-white);
    border: none;
    padding: 10px 15px;
    border-radius: 30px;
    cursor: pointer;
    z-index: 1001;
    box-shadow: var(--shadow-md);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

/* ===================================
   Main Content
=================================== */
.admin-main {
    flex: 1;
    margin-left: 260px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===================================
   Topbar
=================================== */
.admin-topbar {
    background: var(--bg-white);
    border-bottom: 1px solid #e2e8f0;
    padding: var(--spacing-md) var(--spacing-xl);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(30, 64, 175, 0.05);
}

.topbar-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.user-info {
    text-align: right;
    line-height: 18px;
}

.user-name {
    font-weight: 600;
    color: var(--text-primary);
    display: block;
    font-size: 14px;
}

.user-role {
    font-size: 12px;
    color: var(--text-secondary);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-white);
    font-weight: 600;
    font-size: 18px;
}

/* ===================================
   Content Area
=================================== */
.admin-content {
    padding: 40px;
    background: #f7f7f7;
    min-height: calc(100vh - 80px);
}

.page-header {
    margin-bottom: var(--spacing-xl);
}

.page-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 5px;
    animation: fadeInDown 0.6s ease;
}

.page-breadcrumb {
    display: flex;
    list-style: none;
    gap: var(--spacing-sm);
    color: var(--text-secondary);
    font-size: 14px;
}

.page-breadcrumb li + li:before {
    content: "/";
    margin-right: var(--spacing-sm);
}

.page-breadcrumb a {
    color: var(--text-secondary);
}

.page-breadcrumb a:hover {
    color: var(--primary-color);
}

/* ===================================
   Dashboard Stats Cards
=================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 32px;
    margin-bottom: var(--spacing-xl);
}

.stat-card {
    background: var(--bg-white);
    border-radius: 30px;
    padding: var(--spacing-lg);
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
   
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: var(--primary-gradient);
    opacity: 0.05;
    border-radius: 50%;
    transform: translate(30%, -30%);
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: var(--spacing-md);
    position: relative;
    z-index: 1;
}

.stat-icon.primary { 
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.1), rgba(59, 130, 246, 0.1));
    color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.2);
}

.stat-icon.success { 
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.1));
    color: var(--success);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.stat-icon.warning { 
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(217, 119, 6, 0.1));
    color: var(--warning);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
}

.stat-icon.danger { 
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(220, 38, 38, 0.1));
    color: var(--danger);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.stat-number {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
    position: relative;
    z-index: 1;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

/* ===================================
   Data Table Actions
=================================== */
.table-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
    gap: var(--spacing-md);
}

.search-box {
    position: relative;
    flex: 1;
    max-width: 300px;
}

.search-box input {
    width: 100%;
    padding-left: 40px;
    border-radius: 30px;
}

.search-box i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.table-action-buttons {
    display: flex;
    gap: var(--spacing-sm);
}

/* ===================================
   Action Buttons in Table
=================================== */
.action-buttons {
    display: flex;
    gap: var(--spacing-sm);
}

.btn-icon {
    padding: 10px 14px;
    border-radius: 30px;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 14px;
}

.btn-icon:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.btn-icon.btn-edit {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(30, 64, 175, 0.1));
    color: var(--info);
}

.btn-icon.btn-edit:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(30, 64, 175, 0.2));
}

.btn-icon.btn-delete {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(220, 38, 38, 0.1));
    color: var(--danger);
}

.btn-icon.btn-delete:hover {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(220, 38, 38, 0.2));
}

.btn-icon.btn-view {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.1));
    color: var(--success);
}

.btn-icon.btn-view:hover {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(5, 150, 105, 0.2));
}

/* ===================================
   Login Page
=================================== */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-gradient);
    padding: var(--spacing-lg);
    position: relative;
    overflow: hidden;
}

.login-wrapper::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.login-wrapper::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    animation: float 8s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(30px); }
}

.login-box {
    background: var(--bg-white);
    border-radius: var(--card-radius);
    padding: var(--spacing-xl) 40px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
    backdrop-filter: blur(10px);
}

.login-logo {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.login-logo h1 {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--spacing-sm);
    font-weight: 700;
}

.login-logo p {
    color: var(--text-secondary);
    margin: 0;
    font-weight: 500;
}

.login-box .btn {
    width: 100%;
}

/* ===================================
   Empty State
=================================== */
.empty-state {
    text-align: center;
    padding: 60px var(--spacing-lg);
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 17px;
    margin-bottom: 0;
    opacity: 0.3;
}

.empty-state h3 {
    margin-bottom: var(--spacing-sm);
}

/* ===================================
   File Upload Area
=================================== */
.file-upload-area {
    border: 2px dashed #cbd5e1;
    border-radius: 30px;
    padding: var(--spacing-xl);
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.file-upload-area:hover {
    border-color: var(--primary-color);
    background: rgba(30, 64, 175, 0.03);
}

.file-upload-area i {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
}

.file-list {
    margin-top: var(--spacing-lg);
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md);
    background: var(--bg-main);
    border-radius: 30px;
    margin-bottom: var(--spacing-sm);
}

.file-info {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.file-info i {
    font-size: 24px;
    color: var(--primary-color);
}

.file-name {
    font-weight: 500;
}

.file-size {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ===================================
   Responsive Design
=================================== */
@media (max-width: 768px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }
    
    .admin-sidebar.active {
        transform: translateX(0);
    }
    
    .sidebar-overlay.active {
        display: block;
    }
    
    .sidebar-toggle {
        display: block;
    }
    
    .admin-main {
        margin-left: 0;
    }
    
    .admin-content {
        padding: var(--spacing-lg);
    }
    
    .topbar-title {
        font-size: 18px;
    }
    
    .user-info {
        display: none;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .table-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box {
        max-width: 100%;
    }
    
    .table-responsive {
        overflow-x: auto;
    }
    
    table {
        font-size: 14px;
    }
    
    th, td {
        padding: var(--spacing-sm);
    }
}