/* Global Styles */

/* Base Styles */
.main-content {
    padding: 20px;
    background-color: #f5f7fa;
    min-height: calc(100vh - 70px);
}

.dashboard-header {
    margin-bottom: 30px;
}

.dashboard-header h1 {
    color: #2c3e50;
    font-size: 28px;
    margin-bottom: 5px;
}

.welcome-message {
    color: #7f8c8d;
    font-size: 16px;
}

/* Overview Cards */
.dashboard-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.overview-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.overview-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.overview-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 20px;
    color: white;
}

.student-card .overview-icon { background-color: #3498db; }
.material-card .overview-icon { background-color: #2ecc71; }
.quiz-card .overview-icon { background-color: #e74c3c; }
.lab-card .overview-icon { background-color: #9b59b6; }

.overview-content h3 {
    font-size: 24px;
    margin: 0;
    color: #2c3e50;
}

.overview-content p {
    margin: 5px 0 0;
    color: #7f8c8d;
    font-size: 14px;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.dashboard-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.card-header {
    padding: 15px 20px;
    border-bottom: 1px solid #ecf0f1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h2 {
    font-size: 18px;
    margin: 0;
    color: #2c3e50;
    display: flex;
    align-items: center;
}

.card-header h2 i {
    margin-right: 10px;
    color: #7f8c8d;
}

.btn-view-all {
    color: #3498db;
    text-decoration: none;
    font-size: 14px;
    display: flex;
    align-items: center;
}

.btn-view-all:hover {
    text-decoration: underline;
}

.btn-view-all i {
    margin-left: 5px;
    font-size: 12px;
}

.card-body {
    padding: 15px 20px;
}

/* Student Items */
.student-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #ecf0f1;
}

.student-item:last-child {
    border-bottom: none;
}

.student-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 15px;
    background-color: #ecf0f1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.student-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-placeholder {
    font-weight: bold;
    color: #7f8c8d;
}

.student-details {
    flex: 1;
}

.student-details h4 {
    margin: 0 0 3px;
    font-size: 15px;
    color: #2c3e50;
}

.join-date {
    font-size: 12px;
    color: #95a5a6;
}

.btn-view-profile {
    color: #3498db;
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    padding: 5px;
}

/* Material Items */
.material-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #ecf0f1;
}

.material-item:last-child {
    border-bottom: none;
}

.material-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    color: #3498db;
    font-size: 16px;
}

.material-details {
    flex: 1;
}

.material-details h4 {
    margin: 0 0 3px;
    font-size: 15px;
    color: #2c3e50;
}

.material-desc {
    margin: 0 0 3px;
    font-size: 13px;
    color: #7f8c8d;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.material-date {
    font-size: 12px;
    color: #95a5a6;
}

.material-actions {
    display: flex;
}

.btn-edit {
    color: #3498db;
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    padding: 5px;
}

/* Quiz Items */
.quiz-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #ecf0f1;
}

.quiz-item:last-child {
    border-bottom: none;
}

.quiz-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    color: #e74c3c;
    font-size: 16px;
}

.quiz-details {
    flex: 1;
}

.quiz-details h4 {
    margin: 0 0 3px;
    font-size: 15px;
    color: #2c3e50;
}

.quiz-desc {
    margin: 0 0 3px;
    font-size: 13px;
    color: #7f8c8d;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.quiz-date {
    font-size: 12px;
    color: #95a5a6;
}

.quiz-actions {
    display: flex;
}

.btn-results {
    color: #2ecc71;
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    padding: 5px;
    margin-left: 5px;
}

/* Card Footers */
.card-footer {
    padding: 15px 20px;
    border-top: 1px solid #ecf0f1;
    text-align: center;
}

.btn-add {
    display: inline-flex;
    align-items: center;
    padding: 8px 15px;
    background-color: #3498db;
    color: white;
    border-radius: 5px;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.btn-add:hover {
    background-color: #2980b9;
}

.btn-add i {
    margin-right: 5px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .dashboard-overview {
        grid-template-columns: 1fr 1fr;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .dashboard-overview {
        grid-template-columns: 1fr;
    }
}

:root {
    --primary-color: #4e73df;
    --primary-dark: #2e59d9;
    --secondary-color: #1cc88a;
    --danger-color: #e74a3b;
    --warning-color: #f6c23e;
    --info-color: #36b9cc;
    --dark-color: #5a5c69;
    --light-color: #f8f9fc;
    --gray-color: #dddfeb;
    --white: #ffffff;
    --black: #000000;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #f5f7fb;
    color: #333;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--white);
}

.btn-secondary:hover {
    background-color: #17a673;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-danger {
    background-color: var(--danger-color);
    color: var(--white);
}

.btn-danger:hover {
    background-color: #d62c1a;
}

.btn-block {
    display: block;
    width: 100%;
}

/* Alert Styles */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Header Styles */
.main-header {
    background-color: var(--white);
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.logo img {
    height: 40px;
    margin-right: 10px;
}

.main-nav ul {
    display: flex;
    list-style: none;
}

.main-nav ul li {
    margin-left: 20px;
}

.main-nav ul li a {
    font-weight: 500;
    padding: 5px 0;
    position: relative;
}

.main-nav ul li a:hover {
    color: var(--primary-color);
}

.main-nav ul li a:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.main-nav ul li a:hover:after {
    width: 100%;
}

.mobile-menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

.mobile-menu {
    display: none;
    background-color: var(--white);
    padding: 15px;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
}

.mobile-menu ul {
    list-style: none;
}

.mobile-menu ul li {
    margin-bottom: 10px;
}

.mobile-menu ul li a {
    display: block;
    padding: 8px 0;
}

/* Footer Styles */
.main-footer {
    background-color: var(--white);
    padding: 50px 0 20px;
    margin-top: 50px;
    box-shadow: 0 -0.15rem 1.75rem 0 rgba(58, 59, 69, 0.1);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-col h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--dark-color);
}

.footer-col p {
    margin-bottom: 15px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--gray-color);
    color: var(--dark-color);
    transition: all 0.3s ease;
}

.social-links a:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li i {
    margin-right: 10px;
    color: var(--primary-color);
    width: 20px;
    text-align: center;
}

.newsletter-form {
    display: flex;
    margin-top: 15px;
}

.newsletter-form input {
    flex: 1;
    padding: 10px;
    border: 1px solid var(--gray-color);
    border-radius: 4px 0 0 4px;
    outline: none;
}

.newsletter-form button {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 0 15px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

.newsletter-form button:hover {
    background-color: var(--primary-dark);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid var(--gray-color);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 15px;
}

/* Sidebar Styles */
.sidebar {
    width: 250px;
    background-color: var(--white);
    position: fixed;
    top: 70px;
    bottom: 0;
    left: 0;
    z-index: 99;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    transition: all 0.3s ease;
    overflow-y: auto;
}

.sidebar-profile {
    padding: 20px;
    border-bottom: 1px solid var(--gray-color);
    text-align: center;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    margin: 0 auto 15px;
    border-radius: 50%;
    overflow: hidden;
    background-color: var(--gray-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    color: var(--dark-color);
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-info h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.profile-info p {
    font-size: 0.9rem;
    color: var(--dark-color);
}

.sidebar-nav {
    padding: 15px 0;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav ul li a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: var(--dark-color);
    transition: all 0.3s ease;
}

.sidebar-nav ul li a:hover {
    background-color: var(--light-color);
    color: var(--primary-color);
}

.sidebar-nav ul li a.active {
    background-color: rgba(78, 115, 223, 0.1);
    color: var(--primary-color);
    border-left: 3px solid var(--primary-color);
}

.sidebar-nav ul li a i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

/* Main Content Styles */
.main-content {
    margin-left: 250px;
    padding: 30px;
    min-height: calc(100vh - 70px);
}

.dashboard-header {
    margin-bottom: 30px;
}

.dashboard-header h1 {
    font-size: 1.8rem;
    margin-bottom: 5px;
    color: var(--dark-color);
}

.dashboard-header p {
    color: var(--dark-color);
    opacity: 0.8;
}

/* Card Styles */
.card {
    background-color: var(--white);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.1);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h2 {
    font-size: 1.3rem;
    color: var(--dark-color);
}

/* Grid Layouts */
.grid {
    display: grid;
    gap: 20px;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-auto {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark-color);
}

.form-group input, 
.form-group select, 
.form-group textarea {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--gray-color);
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus, 
.form-group select:focus, 
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 30px;
}

/* Badge Styles */
.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.badge-primary {
    background-color: rgba(78, 115, 223, 0.1);
    color: var(--primary-color);
}

.badge-secondary {
    background-color: rgba(28, 200, 138, 0.1);
    color: var(--secondary-color);
}

.badge-danger {
    background-color: rgba(231, 74, 59, 0.1);
    color: var(--danger-color);
}

.badge-warning {
    background-color: rgba(246, 194, 62, 0.1);
    color: var(--warning-color);
}

.badge-info {
    background-color: rgba(54, 185, 204, 0.1);
    color: var(--info-color);
}

/* Avatar Styles */
.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    background-color: var(--gray-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--dark-color);
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-lg {
    width: 80px;
    height: 80px;
    font-size: 2rem;
}

/* Table Styles */
.table-container {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--white);
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.table th, .table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--gray-color);
}

.table th {
    background-color: var(--light-color);
    font-weight: 600;
    color: var(--dark-color);
}

.table tr:hover {
    background-color: rgba(78, 115, 223, 0.05);
}

/* Responsive Styles */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    .main-nav {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .mobile-menu.active {
        display: block;
    }
    
    .grid-2, .grid-3 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .form-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 10px;
    }
}