:root {
    --bg-color: #0f172a;
    --card-bg: #1e293b;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --secondary: #64748b;
    --success: #10b981;
    --danger: #ef4444;
    --border: #334155;
    --input-bg: #0f172a;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.5;
}

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

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

h1 {
    font-weight: 600;
    font-size: 1.5rem;
}

h2 {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-main);
}

.status-badge {
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-badge.pending {
    background: var(--secondary);
    color: white;
}

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

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

.card {
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border);
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.card-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.2);
}

.card-body {
    padding: 20px;
}

.control-group {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.grid-form {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    align-items: end;
}

.form-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-item.full-width {
    grid-column: span 4;
}

.form-actions {
    grid-column: span 4;
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}

label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

input,
select,
textarea {
    background: var(--input-bg);
    border: 1px solid var(--border);
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    width: 100%;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

button.btn {
    padding: 8px 16px;
    border-radius: 6px;
    border: none;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 0.9rem;
}

button.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

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

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

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

.btn.secondary:hover:not(:disabled) {
    background: #475569;
}

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

.btn.success:hover:not(:disabled) {
    background: #059669;
}

.btn.danger {
    background: var(--danger);
    color: white;
    padding: 4px 8px;
    font-size: 0.8rem;
}

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

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

th,
td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    color: var(--text-muted);
    font-weight: 500;
}

.options-row {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checkbox-label input {
    width: auto;
}

.select-inline {
    display: flex;
    align-items: center;
    gap: 8px;
}

.select-inline select {
    width: auto;
}

.log-console {
    background: #000;
    color: #00ff00;
    font-family: 'Courier New', monospace;
    padding: 15px;
    border-radius: 6px;
    height: 200px;
    overflow-y: auto;
    font-size: 0.85rem;
    white-space: pre-wrap;
}

.hidden {
    display: none;
}

.progress-bar {
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin-top: 15px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    width: 50%;
    animation: indeterminate 1.5s infinite linear;
}

@keyframes indeterminate {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(200%);
    }
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 12px;
    width: 400px;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 10px;
}

.modal.hidden {
    display: none;
}

/* =========================================
   Professional Sidebar Layout Styles
   ========================================= */

.dashboard-body {
    background-color: #0f172a;
    /* Midnight Blue Dark */
    overflow: hidden;
    /* Prevent body scroll, use inner scroll */
    height: 100vh;
}

.app-shell {
    display: flex;
    height: 100vh;
    width: 100%;
}

/* Sidebar Styles */
.sidebar {
    width: 260px;
    background-color: #1e293b;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.sidebar-header {
    height: 70px;
    display: flex;
    align-items: center;
    padding: 0 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo-icon {
    font-size: 1.5rem;
    margin-right: 12px;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: -0.025em;
    color: white;
}

.logo-subtitle {
    font-size: 0.75rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sidebar-nav {
    flex: 1;
    padding: 24px 16px;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: #94a3b8;
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 4px;
    transition: all 0.2s ease;
    font-size: 0.95rem;
    font-weight: 500;
}

.nav-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: white;
}

.nav-item.active {
    background-color: rgba(59, 130, 246, 0.1);
    /* Primary subtle */
    color: #60a5fa;
    /* Primary Light */
}

.nav-icon {
    margin-right: 12px;
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.nav-divider {
    height: 1px;
    background-color: rgba(255, 255, 255, 0.05);
    margin: 16px 0;
}

.nav-section-label {
    padding: 0 16px;
    margin-bottom: 8px;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #64748b;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.user-profile {
    display: flex;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.2);
    padding: 12px;
    border-radius: 12px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    color: white;
    margin-right: 12px;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: white;
}

.user-role {
    font-size: 0.75rem;
    color: #10b981;
    /* Success Green */
}

/* Main Content Styles */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background-color: #0f172a;
}

.top-bar {
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background-color: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    z-index: 10;
}

.breadcrumb {
    font-size: 0.9rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 8px;
}

.crumb-current {
    color: #f1f5f9;
    font-weight: 500;
}

.date-display {
    font-size: 0.9rem;
    color: #94a3b8;
    text-transform: capitalize;
}

.content-wrapper {
    flex: 1;
    overflow-y: auto;
    padding: 32px;
}

.dashboard-hero {
    margin-bottom: 40px;
}

.dashboard-hero h1 {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin-bottom: 8px;
}

.dashboard-hero p {
    color: #94a3b8;
    font-size: 1.1rem;
}

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

.stat-card {
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.1);
}

.stat-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 16px;
}

.stat-icon-wrapper.teachers {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

.stat-icon-wrapper.courses {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}

.stat-icon-wrapper.classrooms {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
}

.stat-icon-wrapper.schedules {
    background: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
}

.stat-content {
    margin-bottom: 12px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    line-height: 1;
    display: block;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.85rem;
    color: #94a3b8;
    font-weight: 500;
}

.stat-trend {
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.stat-trend.success {
    color: #10b981;
}

.stat-trend.neutral {
    color: #64748b;
}

/* Quick Access Section in Dashboard */
.quick-access-section h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: white;
    margin-bottom: 24px;
}

.quick-access-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.quick-card {
    display: flex;
    flex-direction: column;
    padding: 24px;
    border-radius: 16px;
    text-decoration: none;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.quick-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    opacity: 0;
    transition: opacity 0.2s;
}

.quick-card:hover {
    transform: translateY(-4px);
    background: #252e42;
}

.quick-card:hover::before {
    opacity: 1;
}

.quick-card-icon {
    font-size: 2rem;
    margin-bottom: 16px;
}

.quick-card h3 {
    color: white;
    font-size: 1.1rem;
    margin-bottom: 6px;
}

.quick-card p {
    color: #94a3b8;
    font-size: 0.9rem;
}

/* Gradients for Quick Cards icons/details */
.primary-gradient .quick-card-icon {
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.secondary-gradient .quick-card-icon {
    background: linear-gradient(135deg, #a78bfa, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.warning-gradient .quick-card-icon {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* =========================================
   Mobile / Responsive Styles
   ========================================= */

/* Hamburger Button */
.hamburger-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    margin-right: 16px;
    padding: 4px;
}

/* Overlay for mobile sidebar */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 90;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(2px);
}

.sidebar-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

/* Media Query for Mobile Devices */
@media (max-width: 768px) {
    .app-shell {
        position: relative;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100%;
        transform: translateX(-100%);
        z-index: 100;
        box-shadow: 4px 0 15px rgba(0, 0, 0, 0.5);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        width: 100%;
    }

    .hamburger-btn {
        display: block;
    }

    .top-bar {
        padding: 0 16px;
    }

    .top-bar-left {
        display: flex;
        align-items: center;
    }

    .content-wrapper {
        padding: 16px;
    }

    .dashboard-hero h1 {
        font-size: 1.5rem;
    }

    .dashboard-hero p {
        font-size: 0.95rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .quick-access-grid {
        grid-template-columns: 1fr;
    }

    .nav-grid {
        grid-template-columns: 1fr;
    }
}