/* Common CSS for Admin, Teacher, and Student Areas */
/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* CSS Variables for consistent colors */
:root {
    --primary-color: #2563eb; /* Modern blue */
    --secondary-color: #1f2937; /* Dark gray */
    --success-color: #10b981; /* Green */
    --warning-color: #f59e0b; /* Amber */
    --danger-color: #ef4444; /* Red */
    --light-bg: #ffffff;
    --white: #ffffff;
    --gray-50: #f9fafb;
    --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;
    --text-color: #111827;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --border-radius: 8px;
    --transition: all 0.2s ease;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--gray-50);
    color: var(--text-color);
    line-height: 1.6;
    font-size: 14px;
    font-weight: 400;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Sidebar Styles - Modern Light Design */
.sidebar {
    background: var(--white);
    color: var(--text-color);
    width: 280px;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    padding: 32px 24px;
    z-index: 1000;
    box-shadow: var(--shadow);
    border-right: 1px solid var(--border-color);
}

.sidebar h2 {
    margin-bottom: 32px;
    color: var(--text-color);
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.025em;
}

.sidebar nav ul {
    list-style: none;
}

.sidebar nav ul li {
    margin: 4px 0;
}

.sidebar nav ul li a {
    color: var(--gray-600);
    text-decoration: none;
    display: block;
    padding: 12px 16px;
    border-radius: var(--border-radius);
    transition: var(--transition);
    font-weight: 500;
    font-size: 14px;
}

.sidebar nav ul li a:hover,
.sidebar nav ul li a.active {
    background: var(--gray-100);
    color: var(--text-color);
    transform: translateX(4px);
}

/* Watermark styling for the last navigation item */
.sidebar nav ul li:last-child {
    margin-top: auto;
    padding-top: 24px;
    text-align: center;
    font-size: 12px;
    color: var(--gray-400);
    font-weight: 400;
    opacity: 0.7;
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
    margin-top: 32px;
}

/* Main Content */
.main-content {
    margin-left: 280px;
    padding: 32px;
    min-height: 100vh;
    background: var(--gray-50);
}

/* Header */
.header {
    background: var(--white);
    padding: 32px;
    border-radius: var(--border-radius);
    margin-bottom: 32px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.header h1 {
    color: var(--text-color);
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.025em;
}

.header p {
    color: var(--gray-600);
    font-size: 16px;
    font-weight: 400;
}

/* Cards */
.card {
    background: var(--white);
    padding: 24px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow);
}

.card h3 {
    margin-bottom: 16px;
    color: var(--text-color);
    font-size: 18px;
    font-weight: 600;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 8px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--white);
    padding: 24px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    text-align: center;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.stat-card:hover {
    box-shadow: var(--shadow);
}

.stat-card h3 {
    color: var(--gray-600);
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-card .number {
    font-size: 2.5em;
    font-weight: 700;
    color: var(--text-color);
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    background: var(--white);
    border: 1px solid var(--border-color);
}

table th,
table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

table th {
    background: var(--gray-50);
    font-weight: 600;
    color: var(--text-color);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

table tbody tr {
    transition: var(--transition);
}

table tbody tr:hover {
    background: var(--gray-50);
}

table tbody tr:nth-child(even) {
    background: var(--gray-50);
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color);
    font-size: 14px;
}

input,
select,
textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 14px;
    color: var(--text-color);
    background: var(--white);
    transition: var(--transition);
    font-family: inherit;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

input::placeholder,
textarea::placeholder {
    color: var(--gray-400);
}

textarea[readonly] {
    background: var(--gray-50);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    text-align: center;
    min-width: 100px;
    font-family: inherit;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover {
    background: #059669;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-warning {
    background: var(--warning-color);
    color: white;
}

.btn-warning:hover {
    background: #d97706;
}

/* Badges */
.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    display: inline-block;
}

.badge-primary {
    background: var(--primary-color);
    color: white;
}

.badge-success {
    background: var(--success-color);
    color: white;
}

.badge-warning {
    background: var(--warning-color);
    color: white;
}

.badge-danger {
    background: var(--danger-color);
    color: white;
}

/* Tabs */
.tabs {
    display: flex;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
    background: var(--white);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.tab {
    padding: 16px 24px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
    font-weight: 500;
    flex: 1;
    text-align: center;
    font-size: 14px;
}

.tab:hover {
    background: var(--gray-50);
}

.tab.active {
    border-bottom-color: var(--primary-color);
    color: var(--primary-color);
    background: var(--gray-50);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Question Cards for Grading */
.question-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.question-card h4 {
    color: var(--text-color);
    margin-bottom: 16px;
    font-size: 16px;
    font-weight: 600;
}

.answer-section {
    margin-bottom: 16px;
    padding: 12px;
    border-radius: var(--border-radius);
}

.student-answer {
    background: #f0f9ff;
    border: 1px solid #0ea5e9;
}

.correct-answer {
    background: #f0fdf4;
    border: 1px solid #10b981;
}

.points-input {
    width: 80px;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 14px;
}

/* Success and Error Messages */
.success {
    color: var(--success-color);
    margin: 16px 0;
    padding: 16px;
    background: #ecfdf5;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--success-color);
    font-weight: 500;
}

.error {
    color: var(--danger-color);
    margin: 16px 0;
    padding: 16px;
    background: #fef2f2;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--danger-color);
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        width: 240px;
    }

    .main-content {
        margin-left: 240px;
        padding: 24px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .header h1 {
        font-size: 28px;
    }

    .card,
    .stat-card {
        padding: 20px;
    }

    table th,
    table td {
        padding: 12px;
        font-size: 13px;
    }

    .btn {
        padding: 10px 20px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }

    .main-content {
        margin-left: 0;
        padding: 16px;
    }

    .tabs {
        flex-direction: column;
    }

    .tab {
        border-bottom: 1px solid var(--border-color);
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-5 { margin-bottom: 20px; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-5 { margin-top: 20px; }

.p-0 { padding: 0; }
.p-1 { padding: 4px; }
.p-2 { padding: 8px; }
.p-3 { padding: 12px; }
.p-4 { padding: 16px; }
.p-5 { padding: 20px; }

/* Specific Student Area Styles */
.subject-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    color: white;
    font-size: 12px;
    font-weight: 500;
    margin-right: 8px;
}

.performance-excellent {
    color: var(--success-color);
    font-weight: 600;
}

.performance-good {
    color: var(--warning-color);
    font-weight: 600;
}

.performance-poor {
    color: var(--danger-color);
    font-weight: 600;
}

.performance-pending {
    color: var(--gray-500);
    font-style: italic;
}

.urgent {
    background: #fffbeb !important;
    border-left: 4px solid var(--warning-color);
}

/* Button Groups */
.btn-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-group .btn {
    flex: 1;
    min-width: 120px;
}

/* Grid Layouts */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.grid-auto {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Focus States for Accessibility */
.btn:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .sidebar,
    .btn,
    .tabs {
        display: none !important;
    }

    .main-content {
        margin-left: 0;
    }

    .card,
    .header {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}




















/* Login-spezifischer Container ohne Sidebar-Margin */
.login-content {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    margin: 0 auto;
    max-width: 800px;
}
.clean-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

/* Carddesign */
.clean-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 20px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    margin-bottom: 16px;
}

.clean-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.clean-subject-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 20px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

/* Farbiger Rand der komplett durchgeht */
.clean-subject-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--subject-color, var(--primary-color));
}

.clean-subject-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Kopfbereich */
.subject-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.subject-color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

/* Beschreibung */
.subject-desc {
    color: var(--gray-600);
    font-size: 14px;
    margin: 12px 0 16px;
}

/* Footer */
.subject-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.performance-label {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-color);
}

.no-perf {
    font-size: 13px;
    color: var(--gray-500);
}

/* Farben für Leistungswerte */
.performance-value.performance-excellent {
    color: var(--success-color);
    font-weight: 600;
}

.performance-value.performance-good {
    color: var(--warning-color);
    font-weight: 600;
}

.performance-value.performance-poor {
    color: var(--danger-color);
    font-weight: 600;
}

/* Status Classes for Exams and Assignments */
.status-upcoming {
    color: var(--warning-color);
    font-weight: 600;
    font-size: 14px;
}

.status-active {
    color: var(--success-color);
    font-weight: 600;
    font-size: 14px;
}

.status-expired {
    color: var(--gray-500);
    font-weight: 600;
    font-size: 14px;
}

.status-completed {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 14px;
}

/* Status Badges for Submissions */
.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-graded {
    background: var(--success-color);
    color: var(--white);
}

.status-pending {
    background: var(--warning-color);
    color: var(--white);
}

