@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #a5b4fc;
    --secondary: #f97316;
    --secondary-light: #fdba74;
    --dark: #1e293b;
    --light: #f8fafc;
    --gray: #64748b;
    --gray-light: #e2e8f0;
    --gray-dark: #334155;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --border-radius: 12px;
    --card-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}
.dark-mode {
    --primary: #818cf8;
    --primary-dark: #6366f1;
    --primary-light: #c7d2fe;
    --secondary: #fb923c;
    --secondary-light: #fed7aa;
    --dark: #f8fafc;
    --light: #0f172a;
    --gray: #94a3b8;
    --gray-light: #334155;
    --gray-dark: #cbd5e1;
    --success: #34d399;
    --warning: #fbbf24;
    --danger: #f87171;
    --card-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    
    background-color: #1e293b;
    color: #f8fafc;
}

.dark-mode .card,
.dark-mode .modal-content,
.dark-mode .notification ,
.dark-mode .stat-card {
    background-color: #0f172a;
    color: #f8fafc;
}

.dark-mode .form-control {
    background-color: #1e293b;
    color: #f8fafc;
    border-color: #334155;
}

.dark-mode .form-control:focus
 {
    background-color: #1e293b;
}

.dark-mode .data-table th {
    background-color: #1e293b;
}

.dark-mode .data-table tr:hover {
    background-color: #1e293b;
}

.dark-mode .app-header,
.dark-mode .card-header,
.dark-mode .modal-header,
.dark-mode .modal-footer,
.dark-mode .settings-option,
.dark-mode .settings-section-title,
.dark-mode .tabs-nav {
    border-color: #334155;
}

.dark-mode .tab-btn {
    color: #94a3b8;
}

.dark-mode .tab-btn:hover,
.dark-mode .tab-btn.active {
    color: #818cf8;
}

.dark-mode .tab-select {
    background-color: #1e293b;
    color: #f8fafc;
    border-color: #334155;
}

.dark-mode .json-preview {
    background-color: #0f172a;
    color: #f8fafc;
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: #f1f5f9;
    color: var(--dark);
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 0;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--gray-light);
    flex-wrap: wrap;
    gap: 20px;
}

.app-title {
    display: flex;
    align-items: center;
    gap: 15px;
}

.app-logo {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
}

.app-title h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--dark);
    margin: 0;
}

.app-title p {
    font-size: 0.9rem;
    color: var(--gray);
    margin: 0;
}

.app-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.06);
}

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

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

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

.btn-outline:hover {
    background-color: rgba(99, 102, 241, 0.1);
}

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

.btn-success:hover {
    background-color: #0d9668;
}

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

.btn-warning:hover {
    background-color: #d97706;
}

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

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

.btn-icon {
    width: 20px;
    height: 20px;
}

/* Tabs Navigation */
.tabs-container {
    margin-bottom: 30px;
}

.tabs-nav {
    display: flex;
    gap: 10px;
    border-bottom: 1px solid var(--gray-light);
    overflow-x: auto;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE and Edge */
    padding-bottom: 1px;
}

.tabs-nav::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, Opera */
}

.tab-btn {
    padding: 12px 20px;
    font-weight: 500;
    color: var(--gray);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    position: relative;
}

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

.tab-btn.active {
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
}

.tab-btn .badge {
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s ease forwards;
}

.tab-content.active {
    display: block;
}

/* Mobile Tab Dropdown */
.tab-dropdown {
    display: none;
    margin-bottom: 20px;
}

.tab-select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--gray-light);
    border-radius: 8px;
    font-size: 0.95rem;
    background-color: white;
    color: var(--dark);
}

@media (max-width: 768px) {
    .tabs-nav {
        display: none;
    }

    .tab-dropdown {
        display: block;
    }
}

.card {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    overflow: hidden;
    height: fit-content;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 30px;
}

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

.card-header {
    padding: 20px;
    border-bottom: 1px solid var(--gray-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-title-icon {
    width: 24px;
    height: 24px;
    color: var(--primary);
}

.card-body {
    padding: 20px;
}

.form-group {
    margin-bottom: 20px;
}

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

.form-control {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--gray-light);
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    background-color: var(--light);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
    background-color: white;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

@media (max-width: 576px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.data-actions {
    display: flex;
    gap: 10px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--gray-light);
    flex-wrap: wrap;
}

.search-container {
    margin-bottom: 20px;
}

.search-options {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.search-option {
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-option input[type="radio"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
}

.search-option label {
    font-size: 0.9rem;
    color: var(--gray-dark);
}

.search-box {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 200px;
    padding: 10px 12px;
    padding-left: 40px;
    border: 1px solid var(--gray-light);
    border-radius: 8px;
    font-size: 0.95rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 12px center;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 700px;
}

.data-table th {
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--gray-dark);
    background-color: #f1f5f9;
    border-bottom: 1px solid var(--gray-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
}

.data-table td {
    padding: 14px 16px;
    font-size: 0.95rem;
    border-bottom: 1px solid var(--gray-light);
    vertical-align: middle;
}

.data-table tr:hover {
    background-color: #f1f5f9;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.table-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.table-btn {
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.badge-primary {
    background-color: rgba(99, 102, 241, 0.1);
    color: var(--primary);
}

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

.badge-warning {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.badge-danger {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.empty-state {
    padding: 60px 20px;
    text-align: center;
}

.empty-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    color: var(--gray);
}

.empty-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--gray-dark);
    margin-bottom: 10px;
}

.empty-description {
    font-size: 0.95rem;
    color: var(--gray);
    margin-bottom: 20px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    margin: 20px;
}

.modal.show .modal-content {
    transform: translateY(0);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--gray-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--dark);
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray);
    width: 24px;
    height: 24px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid var(--gray-light);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.json-preview {
    background-color: #1e293b;
    color: #e2e8f0;
    padding: 15px;
    border-radius: 8px;
    font-family: monospace;
    white-space: pre-wrap;
    max-height: 300px;
    overflow-y: auto;
    font-size: 0.9rem;
}

.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    background-color: white;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
    max-width: 400px;
}

.notification.show {
    transform: translateY(0);
    opacity: 1;
}

.notification-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.notification-message {
    font-size: 0.85rem;
    color: var(--gray);
}

.notification.success .notification-icon {
    color: var(--success);
}

.notification.success .notification-title {
    color: var(--success);
}

.notification.error .notification-icon {
    color: var(--danger);
}

.notification.error .notification-title {
    color: var(--danger);
}

.student-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    background-color: rgba(99, 102, 241, 0.1);
    color: var(--primary);
}

/* Animation classes */
.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.slide-in {
    animation: slideIn 0.5s ease forwards;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.subjects-cell {
    max-width: 200px;
}

.subjects-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.subject-tag {
    display: inline-block;
    padding: 3px 10px;
    background-color: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    border-radius: 12px;
    font-size: 0.8rem;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.subject-tag:hover {
    background-color: rgba(99, 102, 241, 0.2);
}

.text-muted {
    color: var(--gray);
    font-style: italic;
    font-size: 0.9rem;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    padding: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.stat-icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

.stat-icon.purple {
    background-color: var(--primary);
}

.stat-icon.orange {
    background-color: var(--secondary);
}

.stat-icon.green {
    background-color: var(--success);
}

.stat-icon.blue {
    background-color: #0ea5e9;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--gray);
}

/* Settings Tab */
.settings-section {
    margin-bottom: 30px;
}

.settings-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--gray-light);
}

.settings-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid var(--gray-light);
}

.settings-option:last-child {
    border-bottom: none;
}

.settings-option-label {
    font-weight: 500;
}

.settings-option-description {
    font-size: 0.9rem;
    color: var(--gray);
    margin-top: 5px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--gray-light);
    transition: .4s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.toggle-slider {
    background-color: var(--primary);
}

input:checked+.toggle-slider:before {
    transform: translateX(26px);
}

/* Profile Tab */
.profile-header {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background-color: var(--gray-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: 700;
    color: var(--gray);
    flex-shrink: 0;
}

.profile-info {
    flex: 1;
    min-width: 200px;
}

.profile-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.profile-role {
    font-size: 1rem;
    color: var(--gray);
    margin-bottom: 15px;
}

.profile-stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.profile-stat {
    padding-right: 20px;
    border-right: 1px solid var(--gray-light);
}

.profile-stat:last-child {
    border-right: none;
    padding-right: 0;
}

.profile-stat-value {
    font-size: 1.2rem;
    font-weight: 600;
}

.profile-stat-label {
    font-size: 0.8rem;
    color: var(--gray);
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .app-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .app-actions {
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    .card-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .profile-stats {
        justify-content: center;
    }
}

@media (max-width: 576px) {

    .form-actions,
    .data-actions {
        flex-direction: column;
    }

    .form-actions .btn,
    .data-actions .btn {
        width: 100%;
    }

    .search-box {
        flex-direction: column;
    }

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

    .modal-footer {
        flex-direction: column;
    }

    .modal-footer .btn {
        width: 100%;
    }
}