/* Teacher Panel - Bootstrap 5.3 Clean Design */

/* Custom CSS Variables for Pastel Light Theme */
:root {
    --teacher-primary: #6366f1;
    --teacher-secondary: #8b5cf6;
    --teacher-success: #10b981;
    --teacher-info: #06b6d4;
    --teacher-warning: #f59e0b;
    --teacher-danger: #ef4444;
    --teacher-light: #f8fafc;
    --teacher-dark: #1e293b;
    
    /* Pastel Colors */
    --teacher-pastel-blue: #dbeafe;
    --teacher-pastel-purple: #e9d5ff;
    --teacher-pastel-green: #d1fae5;
    --teacher-pastel-yellow: #fef3c7;
    --teacher-pastel-pink: #fce7f3;
    --teacher-pastel-orange: #fed7aa;
    
    /* Background Colors */
    --teacher-bg-primary: #ffffff;
    --teacher-bg-secondary: #f1f5f9;
    --teacher-bg-light: #f8fafc;
    
    /* Text Colors */
    --teacher-text-primary: #1e293b;
    --teacher-text-secondary: #64748b;
    --teacher-text-muted: #94a3b8;
    
    /* Border Colors */
    --teacher-border-light: #e2e8f0;
    --teacher-border-medium: #cbd5e1;
    
    /* Shadow */
    --teacher-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --teacher-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --teacher-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

/* Body and Layout */
body {
    background-color: var(--teacher-bg-secondary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--teacher-text-primary);
    line-height: 1.6;
}

/* Main Container */
.teacher-container {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--teacher-pastel-blue) 0%, var(--teacher-pastel-purple) 100%);
}

/* Dashboard Header */
.teacher-header {
    background: var(--teacher-bg-primary);
    border-bottom: 1px solid var(--teacher-border-light);
    box-shadow: var(--teacher-shadow-sm);
    padding: 1rem 0;
}

.teacher-header h1 {
    color: var(--teacher-text-primary);
    font-weight: 600;
    margin: 0;
}

.teacher-header .breadcrumb {
    background: transparent;
    margin: 0;
    padding: 0;
}

/* Stats Cards */
.teacher-stats-card {
    background: var(--teacher-bg-primary);
    border: 1px solid var(--teacher-border-light);
    border-radius: 12px;
    box-shadow: var(--teacher-shadow-md);
    transition: all 0.3s ease;
    overflow: hidden;
}

.teacher-stats-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--teacher-shadow-lg);
}

.teacher-stats-card .card-body {
    padding: 1.5rem;
}

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

.teacher-stats-icon.primary {
    background: var(--teacher-pastel-blue);
    color: var(--teacher-primary);
}

.teacher-stats-icon.success {
    background: var(--teacher-pastel-green);
    color: var(--teacher-success);
}

.teacher-stats-icon.warning {
    background: var(--teacher-pastel-yellow);
    color: var(--teacher-warning);
}

.teacher-stats-icon.info {
    background: var(--teacher-pastel-pink);
    color: var(--teacher-info);
}

.teacher-stats-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--teacher-text-primary);
    margin: 0;
}

.teacher-stats-label {
    color: var(--teacher-text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    margin: 0;
}

/* Content Cards */
.teacher-content-card {
    background: var(--teacher-bg-primary);
    border: 1px solid var(--teacher-border-light);
    border-radius: 12px;
    box-shadow: var(--teacher-shadow-md);
    margin-bottom: 1.5rem;
}

.teacher-content-card .card-header {
    background: var(--teacher-bg-light);
    border-bottom: 1px solid var(--teacher-border-light);
    border-radius: 12px 12px 0 0 !important;
    padding: 1rem 1.5rem;
}

.teacher-content-card .card-title {
    color: var(--teacher-text-primary);
    font-weight: 600;
    margin: 0;
    font-size: 1.125rem;
}

.teacher-content-card .card-body {
    padding: 1.5rem;
}

/* Buttons */
.btn-teacher-primary {
    background: var(--teacher-primary);
    border-color: var(--teacher-primary);
    color: white;
    font-weight: 500;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.btn-teacher-primary:hover {
    background: #4f46e5;
    border-color: #4f46e5;
    color: white;
    transform: translateY(-1px);
}

.btn-teacher-secondary {
    background: var(--teacher-secondary);
    border-color: var(--teacher-secondary);
    color: white;
    font-weight: 500;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.btn-teacher-secondary:hover {
    background: #7c3aed;
    border-color: #7c3aed;
    color: white;
    transform: translateY(-1px);
}

/* Quick Actions */
.teacher-quick-actions {
    display: grid;
    gap: 1rem;
}

.teacher-quick-action {
    background: var(--teacher-bg-primary);
    border: 1px solid var(--teacher-border-light);
    border-radius: 12px;
    padding: 1.5rem;
    text-decoration: none;
    color: var(--teacher-text-primary);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.teacher-quick-action:hover {
    color: var(--teacher-text-primary);
    transform: translateY(-2px);
    box-shadow: var(--teacher-shadow-lg);
    text-decoration: none;
}

.teacher-quick-action-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.teacher-quick-action-content h6 {
    margin: 0;
    font-weight: 600;
    color: var(--teacher-text-primary);
}

.teacher-quick-action-content p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--teacher-text-secondary);
}

/* Responsive Grid */
@media (min-width: 768px) {
    .teacher-quick-actions {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1200px) {
    .teacher-quick-actions {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Sidebar */
.teacher-sidebar {
    background: var(--teacher-bg-primary);
    border-right: 1px solid var(--teacher-border-light);
    box-shadow: var(--teacher-shadow-sm);
    min-height: 100vh;
}

@media (min-width: 768px) {
    .teacher-sidebar {
        display: block;
        position: sticky;
        top: 0;
        align-self: flex-start;
        max-height: 100vh;
        overflow-y: auto;
    }
}

.teacher-nav-link {
    color: var(--teacher-text-secondary);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin: 0.25rem 0;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.teacher-nav-link:hover,
.teacher-nav-link.active {
    background: var(--teacher-pastel-blue);
    color: var(--teacher-primary);
    text-decoration: none;
}

/* Utilities */
.teacher-text-primary { color: var(--teacher-text-primary) !important; }
.teacher-text-secondary { color: var(--teacher-text-secondary) !important; }
.teacher-text-muted { color: var(--teacher-text-muted) !important; }

.teacher-bg-primary { background-color: var(--teacher-bg-primary) !important; }
.teacher-bg-secondary { background-color: var(--teacher-bg-secondary) !important; }
.teacher-bg-light { background-color: var(--teacher-bg-light) !important; }

.teacher-border { border-color: var(--teacher-border-light) !important; }
.teacher-border-medium { border-color: var(--teacher-border-medium) !important; }

.teacher-shadow-sm { box-shadow: var(--teacher-shadow-sm) !important; }
.teacher-shadow-md { box-shadow: var(--teacher-shadow-md) !important; }
.teacher-shadow-lg { box-shadow: var(--teacher-shadow-lg) !important; }

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.teacher-fade-in {
    animation: fadeInUp 0.6s ease-out;
}

/* Mobile Responsive */
@media (max-width: 767.98px) {
    html,
    body.teacher-container {
        overflow-x: hidden;
        max-width: 100%;
    }

    .teacher-shell {
        overflow-x: hidden;
        max-width: 100%;
    }

    body.teacher-sidebar-open {
        overflow: hidden;
    }

    .teacher-sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.5);
        z-index: 1040;
        pointer-events: none;
    }

    body.teacher-sidebar-open .teacher-sidebar-overlay {
        display: block;
        pointer-events: auto;
    }

    .teacher-shell > .row {
        margin-left: 0;
        margin-right: 0;
    }

    .teacher-shell > .row > .teacher-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        flex: 0 0 auto;
        width: min(280px, 88vw);
        max-width: 88vw;
        height: 100vh;
        max-height: 100vh;
        overflow-y: auto;
        display: flex !important;
        flex-direction: column;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        margin: 0;
        padding: 0;
        z-index: 1045;
        box-shadow: 4px 0 24px rgba(15, 23, 42, 0.2);
    }

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

    body.teacher-sidebar-open .teacher-main-content {
        pointer-events: none;
    }

    body.teacher-sidebar-open #teacherSidebarToggle {
        pointer-events: auto;
    }

    .teacher-main-content {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .teacher-mobile-menu-btn {
        width: 44px;
        height: 44px;
        padding: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .teacher-header {
        gap: 0.75rem;
    }

    .teacher-header__title-wrap {
        width: 100%;
    }

    .teacher-header h1 {
        font-size: 1.25rem;
        word-break: break-word;
    }

    .teacher-header .breadcrumb {
        flex-wrap: wrap;
        font-size: 0.875rem;
    }

    .teacher-header__toolbar {
        width: 100%;
        justify-content: flex-start !important;
        gap: 0.5rem !important;
    }

    .teacher-header__toolbar .btn,
    .teacher-header__toolbar .dropdown > .btn {
        min-height: 44px;
    }

    .teacher-stats-card {
        margin-bottom: 1rem;
    }
    
    .teacher-content-card {
        margin-bottom: 1rem;
        overflow: hidden;
    }

    .teacher-content-card .card-header {
        flex-direction: column;
        align-items: stretch !important;
        gap: 0.75rem;
    }

    .teacher-content-card .card-header > .d-flex {
        flex-wrap: wrap;
        gap: 0.5rem;
        width: 100%;
    }

    .teacher-content-card .card-header .btn {
        min-height: 44px;
    }
    
    .teacher-quick-actions {
        grid-template-columns: 1fr;
    }

    .teacher-content > .row > [class*="col-"],
    .teacher-content .card-body > .row > [class*="col-"],
    .teacher-content form.row > [class*="col-"],
    .teacher-main-content form.row > [class*="col-"] {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .teacher-content .table-responsive,
    .teacher-main-content .table-responsive {
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .teacher-content .table,
    .teacher-main-content .table {
        margin-bottom: 0;
    }

    .teacher-content .btn,
    .teacher-main-content .btn,
    .teacher-content .btn-group .btn,
    .teacher-main-content .btn-group .btn {
        min-height: 44px;
    }

    .teacher-content .btn-group,
    .teacher-main-content .btn-group {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .teacher-content .input-group,
    .teacher-main-content .input-group,
    .teacher-content .form-select,
    .teacher-main-content .form-select,
    .teacher-content .form-control,
    .teacher-main-content .form-control {
        max-width: 100%;
    }
}
