/* Master CSS for Student Panel */

:root {
    /* Color Variables */
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #0ea5e9;
    --accent-color: #06b6d4;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --dark-blue: #1e293b;
    --light-blue: #f0f9ff;
    --gray-50: #f8fafc;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    /* Typography */
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    
    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.375rem;
    --radius-lg: 0.5rem;
    --radius-xl: 1rem;
    --radius-2xl: 1rem;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--gray-100);
    color: var(--gray-800);
    line-height: 1.5;
}

/* Sidebar Styles */
.sidebar {
    width: 220px;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    background-color: #2c3e50;
    color: white;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: all 0.3s ease;
    overflow: hidden;
    padding: 10px 0;
}

.sidebar-header {
    padding: 10px;
    text-align: center;
    margin-bottom: 0;
}

.sidebar-header h2 {
    text-align: center;
    color: #1abc9c;
    font-size: 1.2rem;
    margin: 0;
    padding: 0;
}

.sidebar-nav {
    flex: 1;
    padding: 10px 0;
}

.nav-section {
    margin-bottom: 10px;
}

.nav-section-title {
    font-size: 0.7rem;
    font-weight: 600;
    color: #1abc9c;
    padding: 0 10px;
    margin-bottom: 5px;
    letter-spacing: 0.05em;
}

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

.sidebar-nav ul li {
    margin-bottom: 2px;
}

.sidebar-nav ul li a {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    color: #ecf0f1;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    gap: 8px;
}

.nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    font-size: 0.85rem;
    text-align: center;
    color: #ecf0f1;
    transition: all 0.3s ease;
}

.sidebar-nav ul li a:hover {
    background-color: #34495e;
    color: #1abc9c;
    padding-left: 15px;
}

.sidebar-nav ul li a.active {
    background-color: #34495e;
    color: #1abc9c;
    border-left: 3px solid #1abc9c;
}

.sidebar-footer {
    padding: 10px;
    border-top: 1px solid #34495e;
}

.logout-btn {
    display: flex;
    align-items: center;
    color: #e74c3c;
    text-decoration: none;
    font-size: 0.85rem;
    gap: 8px;
    transition: all 0.3s ease;
    padding: 8px 10px;
    border-radius: 4px;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    position: fixed;
    top: var(--spacing-md);
    right: var(--spacing-md);
    z-index: 1001;
    background: #2c3e50;
    color: white;
    padding: var(--spacing-sm);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid #34495e;
}

.menu-toggle i {
    font-size: 1.25rem;
    color: white;
}

.menu-toggle:hover {
    background: #34495e;
}

/* Responsive Sidebar */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .sidebar {
        transform: translateX(-100%);
        box-shadow: var(--shadow-lg);
        width: 50px;
        padding: 8px 0;
    }

    .sidebar-header {
        padding: 8px;
    }

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

    .nav-section {
        margin-bottom: 8px;
    }

    .nav-section-title {
        padding: 0 8px;
        margin-bottom: 4px;
    }

    .sidebar-nav ul li a {
        padding: 8px;
    }

    .sidebar-footer {
        padding: 8px;
    }

    .logout-btn {
        padding: 8px;
    }

    .nav-section-title {
        display: none;
    }

    .sidebar-nav ul li a span {
        display: none;
    }

    .sidebar.active {
        width: 220px;
    }

    .sidebar.active .nav-section-title {
        display: block;
    }

    .sidebar.active ul li a span {
        display: inline-block;
    }

    .sidebar.active .sidebar-header {
        padding: 8px;
    }

    .sidebar.active .sidebar-nav ul li a {
        padding: 8px;
    }

    .logout-btn span {
        display: none;
    }

    .sidebar.active .logout-btn span {
        display: inline-block;
    }

    .container {
        margin-left: 50px;
    }

    .sidebar.active + .container {
        margin-left: 220px;
    }
}

/* Container Styles */
.container {
    width: calc(100% - 220px);
    margin-left: 220px;
    padding: 2rem;
    min-height: 100vh;
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .container {
        width: 100%;
        margin-left: 0;
        padding: 1rem;
    }

    .sidebar.active + .container {
        margin-left: 50px;
        width: calc(100% - 50px);
    }
}

/* Cards */
.card {
    background-color: white;
    padding: 25px; /* Space inside the card */
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    margin-bottom: 20px; /* Space below each card */
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.card h4 {
    font-size: 22px;
    color: #333;
    margin-bottom: 15px;
}

.card p {
    color: #666;
    margin: 10px 0;
}

.card a {
    color: #1E90FF;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
}

.card a:hover {
    color: #FFD700;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.stat-card {
    background: white;
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.stat-card .card-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: var(--spacing-sm);
}

.stat-card h3 {
    font-size: 0.9rem;
    color: var(--gray-500);
    margin-bottom: var(--spacing-xs);
}

.stat-card p {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gray-800);
}

/* Table Styles */
.styled-table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--spacing-md) 0;
}

.styled-table th,
.styled-table td {
    padding: var(--spacing-md);
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

.styled-table th {
    background: var(--gray-50);
    color: var(--gray-700);
    font-weight: 600;
    font-size: 0.9rem;
}

.styled-table tr:hover {
    background: var(--gray-50);
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

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

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

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

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

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

/* Form Styles */
.form-group {
    margin-bottom: var(--spacing-md);
}

.form-label {
    display: block;
    margin-bottom: var(--spacing-xs);
    color: var(--gray-700);
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Badge Styles */
.badge {
    display: inline-flex;
    align-items: center;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    font-weight: 500;
}

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

.badge-warning {
    background: var(--warning-color);
    color: white;
}

.badge-success {
    background: var(--success-color);
    color: white;
}

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

/* Quick Links */
.quick-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.quick-link {
    background: white;
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--gray-700);
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid var(--gray-200);
}

.quick-link:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.quick-link i {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
    color: var(--primary-color);
}

/* Upcoming Tests Styles */
.test-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    border: 1px solid var(--gray-200);
    margin-bottom: var(--spacing-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.test-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

.test-icon {
    width: 48px;
    height: 48px;
    background: var(--light-blue);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.25rem;
}

.test-details h4 {
    color: var(--gray-800);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
}

.test-date {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    color: var(--gray-500);
    font-size: 0.875rem;
}

.test-date i {
    color: var(--primary-color);
    font-size: 0.875rem;
}

.test-status {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
}

.status-upcoming {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
}

.status-today {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.status-past {
    background: var(--gray-100);
    color: var(--gray-500);
}

/* Live Classes Styles */
.classes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
}

.class-card {
    background: white;
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.class-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.class-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
}

.class-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: var(--spacing-sm);
}

.class-info {
    color: var(--gray-600);
    margin: var(--spacing-xs) 0;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.class-info i {
    color: var(--primary-color);
    width: 16px;
}

.timer {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: var(--spacing-md) 0;
    padding: var(--spacing-sm);
    background: var(--light-blue);
    border-radius: var(--radius-md);
    text-align: center;
}

.timer.started {
    color: var(--success-color);
    background: rgba(16, 185, 129, 0.1);
}

.timer.ended {
    color: var(--gray-500);
    background: var(--gray-100);
}

/* Course Materials Styles */
.materials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
}

.material-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.material-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.material-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.material-title i {
    color: var(--danger-color);
    font-size: 1.25rem;
}

.course-badge {
    background: var(--primary-color);
    color: white;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-xl);
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-sm);
}

.course-badge i {
    font-size: 12px;
}

.description-text {
    color: var(--gray-600);
    font-size: 0.875rem;
    line-height: 1.5;
    margin: var(--spacing-sm) 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.material-footer {
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Common Components */
.join-link, .download-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    background: var(--primary-color);
    color: white;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.join-link:hover, .download-btn:hover {
    background: var(--primary-dark);
}

.upload-date {
    color: var(--gray-500);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.upload-date i {
    color: var(--primary-color);
}

/* Empty States */
.no-tests, .no-classes, .no-materials {
    text-align: center;
    padding: var(--spacing-xl);
    color: var(--gray-500);
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.no-tests i, .no-classes i, .no-materials i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: var(--spacing-sm);
}

/* Form Elements */
.course-filter select {
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-300);
    font-size: 0.875rem;
    min-width: 200px;
    background-color: white;
    cursor: pointer;
    font-family: var(--font-sans);
}

.course-filter select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Messages */
.error-message, .info-message {
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

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

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

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .container {
        margin-left: 0px;
    }

    .sidebar.active + .container {
        margin-left: 0px;
    }

    .materials-grid, .classes-grid {
        grid-template-columns: 1fr;
    }

    .test-card, .material-card {
        flex-direction: column;
        gap: var(--spacing-md);
    }

    .test-status, .material-footer {
        width: 100%;
        justify-content: center;
    }

    .material-footer {
        flex-direction: column;
        gap: var(--spacing-md);
    }
}

/* Notices List Styles */
.notices-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.notice-item {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1rem;
    transition: all 0.3s ease;
}

.notice-item:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

.notice-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.notice-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.notice-date {
    font-size: 0.875rem;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.notice-content {
    color: #4b5563;
    line-height: 1.5;
    font-size: 0.95rem;
}

.no-data-message {
    text-align: center;
    padding: 2rem;
    color: #6b7280;
}

.no-data-message i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #9ca3af;
}

.no-data-message p {
    font-size: 1.1rem;
    margin: 0;
}

/* Utility Classes */
.mb-4 {
    margin-bottom: 1rem;
}

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.gap-4 {
    gap: 1rem;
} 