/* ===== CSS Variables ===== */
:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #ec4899;
    --dark-color: #0f172a;
    --dark-light: #1e293b;
    --light-color: #f8fafc;
    --gray-color: #64748b;
    --gray-light: #e2e8f0;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.3);
    --border-radius: 12px;
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--light-color);
    color: var(--dark-color);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1,
h2,
h3,
h4 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    line-height: 1.2;
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-normal);
    border: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
}

.btn-secondary {
    background: transparent;
    color: var(--dark-color);
    border: 2px solid var(--dark-color);
}

.btn-secondary:hover {
    background: var(--dark-color);
    color: white;
    transform: translateY(-3px);
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* Action Buttons (Text) */
.btn-text-edit,
.btn-text-delete {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    margin-right: 5px;
    transition: var(--transition-fast);
}

.btn-text-edit {
    background-color: var(--primary-color);
    color: white;
}

.btn-text-edit:hover {
    background-color: var(--primary-dark);
}

.btn-text-delete {
    background-color: var(--gray-light);
    color: var(--danger-color);
}

.btn-text-delete:hover {
    background-color: #fee2e2;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 20px 0;
    transition: var(--transition-normal);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-md);
    padding: 15px 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: transform var(--transition-fast);
}

.nav-logo:hover {
    transform: translateY(-1px);
}

.nav-avatar-wrapper {
    position: relative;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 50%;
}

.nav-logo-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    object-position: 50% 18%;
    border: 2px solid #ffffff;
    box-shadow: 0 0 0 2px var(--primary-color), 0 4px 12px rgba(99, 102, 241, 0.3);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
    display: block;
}

.nav-logo:hover .nav-logo-img {
    transform: scale(1.06);
    box-shadow: 0 0 0 2.5px var(--secondary-color), 0 6px 16px rgba(236, 72, 153, 0.35);
}

.nav-avatar-status {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 12px;
    height: 12px;
    background: #10b981;
    border: 2px solid #ffffff;
    border-radius: 50%;
    box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.4);
}

.nav-logo-brand {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.15;
}

.nav-logo-brand .logo-text,
.logo-text {
    font-family: 'Playfair Display', serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--dark-color);
    letter-spacing: -0.3px;
    white-space: nowrap;
}

.nav-logo-brand .logo-tagline {
    font-family: 'Poppins', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--primary-color);
    letter-spacing: 0.6px;
    text-transform: uppercase;
    margin-top: 3px;
    white-space: nowrap;
}

.logo-accent {
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    gap: 35px;
}

.nav-link {
    font-weight: 500;
    color: var(--dark-color);
    position: relative;
    padding: 5px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition-normal);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 1001;
}

.bar {
    width: 25px;
    height: 3px;
    background: var(--dark-color);
    border-radius: 3px;
    transition: var(--transition-normal);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    overflow: hidden;
    padding-top: 80px;
}

.hero-particles {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.1) 0%, transparent 50%), radial-gradient(circle at 80% 20%, rgba(236, 72, 153, 0.1) 0%, transparent 50%);
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 10px;
    animation: fadeInUp 0.6s ease forwards;
}

.hero-title {
    font-size: 4rem;
    margin-bottom: 10px;
    animation: fadeInUp 0.6s ease 0.1s forwards;
    opacity: 0;
}

.hero-profession {
    font-size: 1.8rem;
    color: var(--gray-color);
    margin-bottom: 20px;
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    animation: fadeInUp 0.6s ease 0.2s forwards;
    opacity: 0;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--gray-color);
    margin-bottom: 30px;
    max-width: 500px;
    animation: fadeInUp 0.6s ease 0.3s forwards;
    opacity: 0;
}

.hero-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.22);
    color: var(--primary-dark);
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    margin-bottom: 15px;
    animation: fadeInUp 0.6s ease forwards;
    backdrop-filter: blur(10px);
}

.badge-pulse {
    width: 8px;
    height: 8px;
    background: var(--success-color);
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.hero-highlights {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 25px;
    animation: fadeInUp 0.6s ease 0.35s forwards;
    opacity: 0;
}

.highlight-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    color: #334155;
    font-weight: 500;
}

.highlight-item i {
    color: var(--primary-color);
    font-size: 1rem;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 12px 24px;
    border-radius: 30px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-normal);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: #ffffff;
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.hero-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    animation: fadeInUp 0.6s ease 0.4s forwards;
    opacity: 0;
}

.hero-image {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeInRight 0.8s ease 0.3s forwards;
    opacity: 0;
}

/* Hero Showcase Card with Zaineb Portrait */
.hero-card-showcase {
    position: relative;
    width: 350px;
    height: 480px;
    margin: 0 auto;
    z-index: 2;
}

.hero-photo-frame {
    width: 100%;
    height: 100%;
    border-radius: 28px;
    overflow: hidden;
    position: relative;
    border: 3px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25), 0 0 40px rgba(99, 102, 241, 0.2);
    background: #1e293b;
}

.hero-profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 12%;
    display: block;
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.hero-card-showcase:hover .hero-profile-img {
    transform: scale(1.03);
}

.hero-photo-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0) 65%, rgba(15, 23, 42, 0.6) 100%);
    pointer-events: none;
}

.hero-floating-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 10px 16px;
    border-radius: 16px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10;
    transition: transform 0.3s ease;
}

.hero-floating-card:hover {
    transform: translateY(-4px);
}

.card-experience {
    top: 25px;
    right: -35px;
    animation: float 4s ease-in-out infinite;
}

.card-pedagogy {
    bottom: 25px;
    left: -40px;
    animation: float 4.5s ease-in-out infinite 1s;
}

.card-students {
    top: 48%;
    left: -45px;
    animation: float 3.8s ease-in-out infinite 0.5s;
}

.hero-floating-card .card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--gradient-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.hero-floating-card .card-info {
    display: flex;
    flex-direction: column;
}

.hero-floating-card .card-val {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--dark-color);
    line-height: 1.2;
}

.hero-floating-card .card-lbl {
    font-size: 0.72rem;
    color: var(--gray-color);
    font-weight: 500;
}

.hero-image-container {
    position: relative;
    width: 350px;
    height: 350px;
}

.hero-shape {
    position: absolute;
    inset: 0;
    background: var(--gradient-primary);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    animation: morphShape 8s ease-in-out infinite;
}

.hero-icon-container {
    position: absolute;
    inset: 20px;
    background: white;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: morphShape 8s ease-in-out infinite;
    box-shadow: var(--shadow-lg);
}

.hero-main-icon {
    font-size: 8rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.floating-icons {
    position: absolute;
    inset: -30px;
}

.floating-icon {
    position: absolute;
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    font-size: 1.5rem;
    color: var(--primary-color);
    animation: float 3s ease-in-out infinite;
}

.icon-1 {
    top: 10%;
    left: -10%;
}

.icon-2 {
    top: 0;
    right: 10%;
    animation-delay: 0.5s;
}

.icon-3 {
    bottom: 10%;
    left: 0;
    animation-delay: 1s;
}

.icon-4 {
    bottom: 0;
    right: 0;
    animation-delay: 1.5s;
}

/* Sections */
.section {
    padding: 100px 0;
}

.section-alt {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.8rem;
    margin-bottom: 15px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--gray-color);
    max-width: 600px;
    margin: 0 auto;
}

/* Page Header */
.page-header {
    padding: 150px 0 60px;
    text-align: center;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.page-header h1 {
    font-size: 3rem;
    margin-bottom: 15px;
}

.page-header p {
    color: var(--gray-color);
    font-size: 1.2rem;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.feature-card {
    background: white;
    padding: 40px 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: var(--transition-normal);
    display: block;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 35px -10px rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.3);
}

.feature-card:hover::before {
    opacity: 1;
}

.card-pill-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(99, 102, 241, 0.09);
    color: var(--primary-color);
    margin-bottom: 15px;
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.25);
    transition: transform var(--transition-normal);
}

.feature-card:hover .feature-icon {
    transform: scale(1.08) rotate(3deg);
}

.feature-title {
    font-size: 1.4rem;
    margin-bottom: 15px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
}

.feature-description {
    color: var(--gray-color);
    margin-bottom: 20px;
}

.feature-link {
    color: var(--primary-color);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: gap var(--transition-fast);
}

.feature-card:hover .feature-link {
    gap: 12px;
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
    align-items: center;
}

.about-image-wrapper {
    position: relative;
    max-width: 400px;
    margin: 0 auto;
}

.about-photo-img {
    width: 100%;
    height: 420px;
    object-fit: cover;
    object-position: 50% 12%;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-xl);
    display: block;
    position: relative;
    z-index: 2;
    border: 3px solid #ffffff;
}

.about-badge-card {
    position: absolute;
    bottom: -18px;
    right: -18px;
    background: white;
    padding: 14px 20px;
    border-radius: 14px;
    box-shadow: 0 15px 35px rgba(15, 23, 42, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 3;
    border: 1px solid rgba(99, 102, 241, 0.15);
}

.about-badge-card i {
    font-size: 2rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.about-badge-card strong {
    display: block;
    font-size: 0.95rem;
    color: var(--dark-color);
    line-height: 1.2;
}

.about-badge-card span {
    font-size: 0.75rem;
    color: var(--gray-color);
}

.about-icon-display {
    width: 100%;
    padding-top: 100%;
    background: var(--gradient-primary);
    border-radius: var(--border-radius);
    position: relative;
    box-shadow: var(--shadow-xl);
}

.about-icon-display i {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 8rem;
    color: white;
}

.about-decoration {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid var(--primary-color);
    border-radius: var(--border-radius);
    top: 20px;
    left: 20px;
    z-index: 1;
}

.about-heading {
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.about-description {
    color: var(--gray-color);
    margin-bottom: 15px;
    font-size: 1.05rem;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.stat-item {
    text-align: center;
    padding: 20px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    font-family: 'Playfair Display', serif;
}

.stat-plus {
    font-size: 2rem;
    color: var(--primary-color);
}

.stat-label {
    display: block;
    color: var(--gray-color);
    font-size: 0.9rem;
    margin-top: 5px;
}

/* Login Section */
.login-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 120px 20px 40px;
}

.login-container {
    background: white;
    padding: 50px 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 450px;
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.login-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
}

.login-icon.teacher {
    background: linear-gradient(135deg, #10b981, #059669);
}

.login-header h1 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.login-header p {
    color: var(--gray-color);
}

.login-form .form-group {
    position: relative;
    margin-bottom: 25px;
}

.login-form input:not([type="checkbox"]) {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid var(--gray-light);
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition-normal);
}

.login-form input:not([type="checkbox"]):focus {
    outline: none;
    border-color: var(--primary-color);
}

.login-form .form-group label {
    position: absolute;
    top: 15px;
    left: 20px;
    color: var(--dark-color);
    font-weight: 500;
    pointer-events: none;
    transition: var(--transition-normal);
    background: white;
    padding: 0 5px;
}

.login-form .form-group input:focus+label,
.login-form .form-group input:not(:placeholder-shown)+label {
    top: -10px;
    font-size: 0.85rem;
    color: var(--primary-color);
}

.login-form input:not([type="checkbox"])::placeholder {
    opacity: 0;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--gray-color);
    z-index: 10;
    transition: var(--transition-fast);
}

.password-toggle:hover {
    color: var(--primary-color);
}

.error-message {
    color: var(--danger-color);
    text-align: center;
    margin-bottom: 15px;
    display: none;
    font-size: 0.9rem;
}

.login-footer {
    text-align: center;
    margin-top: 25px;
    color: var(--gray-color);
}

.login-footer a {
    color: var(--primary-color);
    font-weight: 500;
}

/* Remember Me Checkbox */
.remember-me-group {
    margin-bottom: 20px;
    margin-top: -5px;
}

.remember-me-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    font-size: 0.95rem;
    color: var(--gray-color);
    transition: var(--transition-fast);
}

.remember-me-label:hover {
    color: var(--dark-color);
}

.remember-me-label:hover .remember-me-checkmark {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.remember-me-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.remember-me-checkmark {
    width: 22px;
    height: 22px;
    border: 2px solid var(--gray-light);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.remember-me-checkmark::after {
    content: '';
    width: 6px;
    height: 11px;
    border: solid white;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg) scale(0);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: -2px;
}

.remember-me-label input[type="checkbox"]:checked ~ .remember-me-checkmark {
    background: var(--gradient-primary);
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.remember-me-label input[type="checkbox"]:checked ~ .remember-me-checkmark::after {
    transform: rotate(45deg) scale(1);
}

.remember-me-text {
    font-weight: 500;
}

/* Contact */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 50px;
    align-items: start;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 20px;
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: white;
    flex-shrink: 0;
}

.contact-details h4 {
    font-size: 1.1rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    margin-bottom: 5px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 25px;
    border: 1px solid #888;
    width: 90%;
    max-width: 500px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    position: relative;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* Fix for Modal and Student Section Labels (prevent overlap) */
.modal .form-group label,
.student-section .form-group label {
    position: static !important;
    display: block !important;
    margin-bottom: 8px !important;
    background: transparent !important;
    padding: 0 !important;
    color: var(--dark-color) !important;
    width: auto !important;
    height: auto !important;
    transform: none !important;
    pointer-events: auto !important;
}

/* Checkbox labels inside modals must keep flex display and be clickable */
.modal .form-group div label {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    cursor: pointer !important;
    pointer-events: auto !important;
    user-select: none;
}

.modal .form-group div label input[type="checkbox"] {
    pointer-events: auto !important;
    cursor: pointer !important;
    width: 18px !important;
    height: 18px !important;
    flex-shrink: 0;
    accent-color: var(--primary-color);
}

.contact-details p {
    color: var(--gray-color);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-link {
    width: 45px;
    height: 45px;
    background: var(--dark-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: var(--transition-normal);
}

.social-link:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.contact-form {
    background: white;
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
}

.form-group {
    position: relative;
    margin-bottom: 25px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid var(--gray-light);
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition-normal);
    background: transparent;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group label {
    position: absolute;
    top: 15px;
    left: 20px;
    color: var(--dark-color);
    font-weight: 500;
    pointer-events: none;
    transition: var(--transition-normal);
    background: white;
    padding: 0 5px;
}

.form-group input:focus+label,
.form-group input:not(:placeholder-shown)+label,
.form-group textarea:focus+label,
.form-group textarea:not(:placeholder-shown)+label {
    top: -10px;
    font-size: 0.85rem;
    color: var(--primary-color);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    opacity: 0;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Dashboard Layout */
.dashboard-body {
    background: #f1f5f9;
}

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 260px;
    background: var(--dark-color);
    color: white;
    padding: 0; /* removed top/bottom padding to handle with header/footer */
    z-index: 100;
    transition: var(--transition-normal);
    overflow: hidden; /* no overall scroll, only nav scrolls */
    display: flex;
    flex-direction: column;
}

.sidebar.teacher-sidebar {
    background: linear-gradient(180deg, #0f172a 0%, #1e3a5f 100%);
}

.sidebar-header {
    padding: 40px 25px 30px; /* added 20px top padding previously on full sidebar */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.sidebar-header .logo-text {
    color: white;
    font-size: 2rem;
}

.sidebar-title {
    display: block;
    font-size: 0.85rem;
    color: var(--gray-color);
    margin-top: 5px;
}

.sidebar-section-title {
    padding: 15px 25px 5px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary-color);
    font-weight: 600;
    margin-top: 5px;
}

.sidebar-nav {
    padding: 10px 0;
    flex: 1;
    overflow-y: auto;
}

/* Custom scrollbar for sidebar-nav to make it clean */
.sidebar-nav::-webkit-scrollbar {
    width: 6px;
}
.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}
.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}
.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 25px;
    color: var(--gray-color);
    transition: var(--transition-fast);
}

.sidebar-link:hover,
.sidebar-link.active {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    border-left: 3px solid var(--primary-color);
}

.sidebar-link i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 25px;
    color: var(--gray-color);
    transition: var(--transition-fast);
}

.sidebar-link:hover,
.sidebar-link.active {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-link i {
    font-size: 1.1rem;
    width: 20px;
}

.sidebar-footer {
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
    margin-top: auto;
}

/* Student Cards & Validation */
.students-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.student-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
    overflow: hidden;
}

.student-card.pending {
    border-left: 4px solid var(--warning-color);
}

.student-photo img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--gray-light);
}

.student-info h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: var(--dark-color);
}

.student-info p {
    color: var(--gray-color);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 2px;
}

.student-actions {
    margin-left: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btn-validate {
    background: var(--success-color);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition-fast);
}

.btn-validate:hover {
    background: #059669;
}

.btn-reject {
    background: var(--danger-color);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.btn-reject:hover {
    background: #dc2626;
}

.user-avatar-small img {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    vertical-align: middle;
    margin-right: 10px;
    object-fit: cover;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.user-avatar-small[onclick] {
    cursor: zoom-in;
}

.user-avatar-small[onclick]:hover img {
    transform: scale(1.15);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.class-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: white;
    border-bottom: 1px solid var(--gray-light);
    border-radius: 8px;
    margin-bottom: 10px;
}

.class-item:hover {
    background: #f8fafc;
}

.btn-icon.delete {
    color: var(--danger-color);
}

.section-header-page {
    margin-bottom: 20px;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
    display: inline-block;
}

.section-header-page h2 {
    font-size: 1.5rem;
    color: var(--dark-color);
}

.badge.warning {
    background: #fffbeb;
    color: #d97706;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    margin-left: 5px;
}

.dashboard-main {
    margin-left: 260px;
    min-height: 100vh;
}

.dashboard-header {
    background: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-left h1 {
    font-size: 1.5rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark-color);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-name {
    font-weight: 500;
}

.user-avatar {
    width: 45px;
    height: 45px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.user-avatar.teacher {
    background: linear-gradient(135deg, #10b981, #059669);
}

.dashboard-content {
    padding: 30px;
}

.welcome-banner {
    background: var(--gradient-primary);
    border-radius: var(--border-radius);
    padding: 40px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.welcome-banner.teacher-banner {
    background: linear-gradient(135deg, #10b981, #059669);
}

.welcome-text h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    font-family: 'Poppins', sans-serif;
}

.welcome-icon {
    font-size: 4rem;
    opacity: 0.3;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

/* Detailed Statistics Cards */
.detail-stat-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.detail-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.detail-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    text-align: center;
}

.detail-stat-item {
    background: #f8fafc;
    border-radius: 10px;
    padding: 15px 8px;
    transition: transform 0.2s ease;
}

.detail-stat-item:hover {
    transform: scale(1.05);
}

.detail-stat-number {
    font-size: 1.6rem;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    line-height: 1;
}

.detail-stat-label {
    font-size: 0.78rem;
    color: #666;
    margin-top: 6px;
}

.stat-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.stat-icon.blue {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

.stat-icon.green {
    background: linear-gradient(135deg, #10b981, #059669);
}

.stat-icon.purple {
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
}

.stat-icon.orange {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.stat-info h3 {
    font-size: 1.8rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
}

.stat-info p {
    color: var(--gray-color);
    font-size: 0.9rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 25px;
}

.dashboard-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.card-header {
    padding: 20px 25px;
    border-bottom: 1px solid var(--gray-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h3 {
    font-size: 1.1rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-action {
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 500;
}

.card-content {
    padding: 25px;
}

.course-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid var(--gray-light);
}

.course-item:last-child {
    border-bottom: none;
}

.course-icon {
    width: 45px;
    height: 45px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
}

.course-info {
    flex: 1;
}

.course-info h4 {
    font-size: 0.95rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    margin-bottom: 8px;
}

.progress-bar {
    height: 6px;
    background: var(--gray-light);
    border-radius: 10px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 10px;
}

.news-item {
    display: flex;
    gap: 15px;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-light);
}

.news-item:last-child {
    border-bottom: none;
}

.news-date {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

.news-text {
    color: var(--gray-color);
    font-size: 0.9rem;
}

/* Footer */
.footer {
    background: var(--dark-color);
    color: white;
    padding: 60px 0 30px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-logo .logo-text {
    font-size: 2.5rem;
    color: white;
}

.footer-logo p {
    color: var(--gray-color);
    margin-top: 10px;
}

.footer-links {
    display: flex;
    gap: 30px;
}

.footer-links a {
    color: var(--gray-color);
    transition: var(--transition-fast);
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    color: var(--gray-color);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes morphShape {

    0%,
    100% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }

    50% {
        border-radius: 50% 50% 33% 67% / 55% 27% 73% 45%;
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 3rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}


/* --- DATA TABLES --- */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.data-table th, .data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #edeff2;
}

.data-table th {
    font-weight: 600;
    color: #4a5568;
    background: #f8f9fc;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.data-table tr:hover {
    background: #fcfdfe;
}

/* --- PROFESSIONAL ACTION BUTTONS --- */
.btn-action {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn-action.edit {
    background: #e0e7ff;
    color: #4338ca;
}

.btn-action.edit:hover {
    background: #c7d2fe;
}

.btn-action.delete {
    background: #fee2e2;
    color: #b91c1c;
}

.btn-action.delete:hover {
    background: #fecaca;
}

.text-truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- FLOATING CHATBOT PROFESSIONAL --- */
.chatbot-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    font-family: 'Poppins', sans-serif;
    display: none; /* Hidden by default, toggled via JS based on section */
}

.chatbot-trigger {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.chatbot-trigger:hover {
    transform: scale(1.1);
}

.chatbot-trigger.active i::before {
    content: "\f00d"; /* FontAwesome times */
}

.chatbot-container {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #eef0f2;
    transform-origin: bottom right;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.chatbot-container.active {
    display: flex;
}

.chatbot-header {
    background: var(--gradient-primary);
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.bot-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.chatbot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: #f8fafc;
}

.message {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 15px;
    font-size: 0.9rem;
    line-height: 1.5;
    position: relative;
}

.message.bot {
    align-self: flex-start;
    background: white;
    color: #1e293b;
    border: 1px solid #e2e8f0;
    border-bottom-left-radius: 2px;
}

.message.user {
    align-self: flex-end;
    background: var(--primary-color);
    color: white;
    border-bottom-right-radius: 2px;
}

.chatbot-input {
    padding: 15px;
    background: white;
    border-top: 1px solid #f1f5f9;
    display: flex;
    gap: 10px;
}

.chatbot-input input {
    flex: 1;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 15px;
    outline: none;
    font-size: 0.9rem;
}

.chatbot-input button {
    background: var(--primary-color);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.no-data {
    padding: 30px;
    text-align: center;
    color: #94a3b8;
    font-style: italic;
}

/* ================================================
   CLASSROOM DESIGNER STYLES
   ================================================ */

.designer-class-selector {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px 20px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    flex-wrap: wrap;
}

.designer-class-selector label {
    font-weight: 600;
    color: var(--dark-color);
    white-space: nowrap;
    position: static;
    background: transparent;
    padding: 0;
}

.designer-class-selector select,
.designer-class-selector input[type="text"] {
    padding: 10px 15px;
    border: 2px solid var(--gray-light);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition-fast);
    min-width: 200px;
}

.designer-class-selector select:focus,
.designer-class-selector input[type="text"]:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.designer-workspace {
    display: flex;
    gap: 20px;
    min-height: 600px;
}

/* --- Toolbar --- */
.designer-toolbar {
    width: 180px;
    flex-shrink: 0;
    background: white;
    border-radius: var(--border-radius);
    padding: 20px 15px;
    box-shadow: var(--shadow-md);
    overflow-y: auto;
    max-height: 620px;
}

.designer-toolbar h3 {
    font-size: 0.9rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.designer-toolbar h3 i {
    color: var(--primary-color);
}

.toolbar-items {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.toolbar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: grab;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    background: #f8fafc;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--dark-color);
    user-select: none;
}

.toolbar-item:hover {
    background: #ede9fe;
    border-color: var(--primary-color);
    transform: translateX(3px);
}

.toolbar-item.dragging {
    opacity: 0.5;
    border-color: var(--primary-color);
    transform: scale(0.95);
}

.toolbar-item:active {
    cursor: grabbing;
}

.toolbar-icon {
    width: 30px;
    height: 30px;
    background: var(--gradient-primary);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.8rem;
    flex-shrink: 0;
}

/* --- Quick Layouts --- */
.quick-layouts {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.quick-layout-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border: 2px solid var(--gray-light);
    border-radius: 8px;
    background: white;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--dark-color);
    transition: all 0.2s ease;
    font-family: inherit;
}

.quick-layout-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(99, 102, 241, 0.3);
}

.quick-layout-btn i {
    width: 16px;
    text-align: center;
}

/* --- Canvas Container --- */
.designer-canvas-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.canvas-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-bottom: 1px solid var(--gray-light);
}

.canvas-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--dark-color);
}

.canvas-controls {
    display: flex;
    gap: 6px;
}

.canvas-controls button {
    width: 32px;
    height: 32px;
    border: 1px solid var(--gray-light);
    border-radius: 6px;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    color: var(--gray-color);
    transition: all 0.2s ease;
}

.canvas-controls button:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* --- Canvas --- */
.designer-canvas {
    position: relative;
    width: 100%;
    min-width: 1000px;
    height: 800px;
    background: #fefefe;
    overflow: hidden;
    transform-origin: top left;
    transition: transform 0.2s ease;
}

.designer-canvas.drag-over {
    background: #f0fdf4;
    box-shadow: inset 0 0 0 3px var(--success-color);
}

/* Grid Overlay */
.canvas-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(to right, rgba(99, 102, 241, 0.06) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(99, 102, 241, 0.06) 1px, transparent 1px);
    background-size: 20px 20px;
    pointer-events: none;
    z-index: 0;
}

/* --- Canvas Items --- */
.canvas-item {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    border-radius: 6px;
    cursor: move;
    z-index: 1;
    transition: box-shadow 0.15s ease;
    color: white;
    font-size: 0.7rem;
    user-select: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.canvas-item i {
    font-size: 1.1rem;
    filter: drop-shadow(0 1px 1px rgba(0,0,0,0.2));
}

.canvas-item .item-label {
    font-size: 0.55rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.1;
    max-width: 90%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    text-shadow: 0 1px 1px rgba(0,0,0,0.3);
}

.canvas-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    z-index: 10;
}

.canvas-item.selected {
    box-shadow: 0 0 0 3px white, 0 0 0 5px var(--primary-color), 0 4px 15px rgba(99, 102, 241, 0.4);
    z-index: 20;
}

.canvas-item.selected::after {
    content: '';
    position: absolute;
    inset: -2px;
    border: 2px dashed rgba(255, 255, 255, 0.6);
    border-radius: 8px;
    pointer-events: none;
    animation: selectPulse 1.5s infinite;
}

@keyframes selectPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Multi-selected items */
.canvas-item.multi-selected {
    box-shadow: 0 0 0 3px white, 0 0 0 5px #f59e0b, 0 4px 15px rgba(245, 158, 11, 0.4);
    z-index: 15;
}

.canvas-item.multi-selected::after {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    top: -8px;
    right: -8px;
    width: 18px;
    height: 18px;
    background: #f59e0b;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.5rem;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    pointer-events: none;
    animation: none;
}

/* --- Status Bar --- */
.canvas-status-bar {
    display: flex;
    justify-content: space-between;
    padding: 8px 20px;
    background: #f8fafc;
    border-top: 1px solid var(--gray-light);
    font-size: 0.8rem;
    color: var(--gray-color);
}

/* --- Properties Panel --- */
.designer-properties {
    margin-top: 20px;
    background: white;
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow-md);
    animation: slideUp 0.25s ease;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.designer-properties h3 {
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--dark-color);
}

.designer-properties h3 i {
    color: var(--primary-color);
}

.property-group {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.property-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--dark-color);
    min-width: 65px;
    position: static;
    background: transparent;
    padding: 0;
}

.property-group input[type="text"] {
    flex: 1;
    padding: 8px 12px;
    border: 2px solid var(--gray-light);
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.9rem;
    transition: var(--transition-fast);
}

.property-group input[type="text"]:focus {
    border-color: var(--primary-color);
    outline: none;
}

.property-group input[type="color"] {
    width: 40px;
    height: 34px;
    border: 2px solid var(--gray-light);
    border-radius: 6px;
    cursor: pointer;
    padding: 2px;
}

.property-group input[type="range"] {
    flex: 1;
    accent-color: var(--primary-color);
}

.property-group span {
    font-size: 0.8rem;
    color: var(--gray-color);
    min-width: 40px;
    text-align: right;
}

.btn-delete-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px;
    background: #fef2f2;
    color: var(--danger-color);
    border: 2px solid #fecaca;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    font-family: inherit;
    transition: all 0.2s ease;
    margin-top: 5px;
}

.btn-delete-item:hover {
    background: var(--danger-color);
    color: white;
    border-color: var(--danger-color);
}

/* ================================================
   STUDENT CLASSROOM VIEWER STYLES
   ================================================ */
.horizontal-tabs {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--gray-light);
    padding-bottom: 10px;
}
.horizontal-tabs .tab-btn {
    background: none;
    border: none;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    color: var(--gray-color);
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s ease;
}
.horizontal-tabs .tab-btn:hover {
    background: #f1f5f9;
    color: var(--dark-color);
}
.horizontal-tabs .tab-btn.active {
    background: var(--primary-color);
    color: white;
}

.student-canvas-container {
    width: 100%;
    margin-top: 15px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    overflow-x: auto;
    position: relative;
}
.student-canvas {
    position: relative;
    width: 1000px;
    height: 800px;
    background: #fefefe;
    transform-origin: top left;
}
.student-canvas .canvas-item {
    cursor: default;
}
.student-canvas .canvas-item.chair {
    cursor: pointer;
}
.student-canvas .canvas-item.chair:hover {
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.5);
}
.student-canvas .canvas-item.chair.occupied {
    background-color: #ef4444 !important;
    cursor: not-allowed;
}
.student-canvas .canvas-item.chair.occupied.mine {
    background-color: #22c55e !important;
    cursor: pointer;
}

/* Tooltip on chair hover */
.canvas-item .tooltip-name {
    visibility: hidden;
    background-color: #1e293b;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px 8px;
    position: absolute;
    z-index: 100;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.7rem;
    white-space: nowrap;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}
.canvas-item .tooltip-name::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #1e293b transparent transparent transparent;
}
.canvas-item.occupied:hover .tooltip-name {
    visibility: visible;
    opacity: 1;
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .designer-workspace {
        flex-direction: column;
    }
    .designer-toolbar {
        width: 100%;
        max-height: none;
    }
    .toolbar-items {
        flex-direction: row;
        flex-wrap: wrap;
    }
    .toolbar-item {
        flex: 0 0 auto;
    }
    .quick-layouts {
        flex-direction: row;
        flex-wrap: wrap;
    }
    .designer-canvas {
        height: 600px;
    }
} /* Close media (max-width: 900px) */

/* ================================================
   CHAT SYSTEM STYLES (MESSAGES INTERNES - MESSENGER STYLE)
   ================================================ */
/* Chat Global */
.fb-chat-wrapper {
    display: flex;
    height: 75vh;
    min-height: 550px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-top: 15px;
    border: 1px solid #e4e6eb;
}

/* Sidebar Contacts */
.fb-sidebar {
    width: 320px;
    background: #ffffff;
    border-right: 1px solid #e4e6eb;
    display: flex;
    flex-direction: column;
}
.fb-sidebar-header {
    padding: 15px 20px;
    border-bottom: 1px solid #e4e6eb;
    background: #ffffff;
}
.fb-sidebar-header h2 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
    color: #050505;
}
.fb-contacts-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}
.fb-contact-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease;
    margin-bottom: 5px;
}
.fb-contact-item:hover, .fb-contact-item.active {
    background: #f0f2f5;
}
.fb-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    margin-right: 12px;
    flex-shrink: 0;
    background: #e4e6eb;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}
.fb-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.fb-contact-info {
    flex: 1;
    overflow: hidden;
}
.fb-contact-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: #050505;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.fb-contact-preview {
    font-size: 0.85rem;
    color: #65676b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Main Chat Area */
.fb-chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #ffffff;
}
.fb-chat-header {
    padding: 10px 20px;
    border-bottom: 1px solid #e4e6eb;
    display: flex;
    align-items: center;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}
.fb-header-info {
    display: flex;
    flex-direction: column;
}
.fb-header-name {
    font-weight: 700;
    font-size: 1.1rem;
    color: #050505;
}
.fb-header-status {
    font-size: 0.75rem;
    color: #65676b;
}

/* Messages Area */
.fb-messages-area {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #ffffff;
    display: flex;
    flex-direction: column;
}
.fb-message-row {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
    max-width: 100%;
}
.fb-message-row.sent {
    align-items: flex-end;
}
.fb-message-row.received {
    align-items: flex-start;
}
.fb-bubble {
    max-width: 65%;
    padding: 10px 14px;
    font-size: 0.95rem;
    line-height: 1.4;
    word-wrap: break-word;
    position: relative;
}
/* Mine */
.fb-message-row.sent .fb-bubble {
    background: #0084ff;
    color: #ffffff;
    border-radius: 18px 18px 4px 18px;
}
/* Theirs */
.fb-message-row.received .fb-bubble {
    background: #e4e6eb;
    color: #050505;
    border-radius: 18px 18px 18px 4px;
}
.fb-message-image {
    max-width: 250px;
    max-height: 250px;
    border-radius: 12px;
    cursor: pointer;
    margin-bottom: 5px;
}
.fb-bubble-meta {
    font-size: 0.7rem;
    color: #65676b;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.sent .fb-bubble-meta {
    justify-content: flex-end;
}
.fb-bubble-actions {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity 0.2s;
}
.sent .fb-bubble-actions {
    left: -35px;
}
.fb-message-row:hover .fb-bubble-actions {
    opacity: 1;
}
.fb-bubble-actions button {
    background: #e4e6eb;
    border: none;
    color: #050505;
    cursor: pointer;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}
.fb-bubble-actions button:hover {
    background: #d8dadf;
}

/* Input Area */
.fb-input-area {
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: #ffffff;
}
.fb-input-icons {
    color: #0084ff;
    font-size: 1.4rem;
    cursor: pointer;
    transition: background 0.2s;
    border-radius: 50%;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.fb-input-icons:hover {
    background: #f0f2f5;
}
.fb-input-wrapper {
    flex: 1;
    background: #f0f2f5;
    border-radius: 20px;
    padding: 10px 15px;
    display: flex;
    align-items: center;
}
.fb-input-wrapper input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    font-size: 0.95rem;
}
.fb-send-btn {
    color: #0084ff;
    font-size: 1.4rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

/* Teacher Dashboard Tabs */
.chat-tabs {
    display: flex;
    border-bottom: 2px solid #e4e6eb;
    margin-bottom: 15px;
}
.chat-tab {
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: 600;
    color: #65676b;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}
.chat-tab.active {
    color: #0084ff;
    border-bottom-color: #0084ff;
}
.chat-tab-content {
    display: none;
}
.chat-tab-content.active {
    display: block;
}

/* Surveillance Layout - Full screen for tabs */
.fb-surveillance-container {
    display: flex;
    height: 75vh;
    border: 1px solid #e4e6eb;
    border-radius: 8px;
    background: #ffffff;
}

/* Placeholder */
.fb-placeholder {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #65676b;
    text-align: center;
}
.fb-placeholder i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: #e4e6eb;
}

/* --- RESPONSIVITE MOBILE (CHAT) Android/iOS --- */
@media (max-width: 768px) {
    .fb-chat-wrapper {
        flex-direction: column;
        height: calc(100vh - 160px);
        min-height: 450px;
    }
    .fb-sidebar {
        width: 100%;
        height: auto;
        flex: none;
        border-right: none;
        border-bottom: 1px solid #e4e6eb;
        min-height: 0;
    }
    .fb-sidebar-header {
        padding: 10px 15px;
    }
    .fb-sidebar-header h2 {
        font-size: 1.1rem;
    }
    .fb-contacts-list {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 5px 10px;
    }
    .fb-contact-item {
        flex-direction: column;
        width: 75px;
        flex: 0 0 75px;
        margin-right: 5px;
        margin-bottom: 0;
        text-align: center;
        padding: 5px;
    }
    .fb-avatar {
        margin: 0 auto 5px;
        width: 40px;
        height: 40px;
    }
    .fb-contact-info {
        width: 100%;
    }
    .fb-contact-name {
        font-size: 0.75rem;
        margin-bottom: 0px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .fb-contact-preview {
        display: none;
    }
    
    .fb-chat-main {
        width: 100%;
        flex: 1;
        min-height: 0;
        overflow: hidden; /* Fix Safari flex bug */
    }
    /* Surveillance Fixes */
    .fb-surveillance-container {
        flex-direction: column;
        height: calc(100vh - 160px);
        min-height: 450px;
    }
    .fb-surveillance-container .fb-sidebar {
        width: 100% !important;
        height: auto;
        flex: none;
        min-height: 0;
    }
    .fb-surveillance-container .fb-chat-main {
        width: 100%;
        flex: 1;
        min-height: 0;
        overflow: hidden;
    }
    
    .fb-bubble {
        max-width: 85%;
        font-size: 0.9rem;
        padding: 8px 12px;
    }
    .fb-chat-header {
        padding: 8px 12px;
    }
    .fb-header-name {
        font-size: 1rem;
    }
    .fb-input-area {
        padding: 10px 12px;
    }
    .fb-input-wrapper input {
        font-size: 0.9rem;
    }
}

/* ================================================
   ENHANCED MOBILE RESPONSIVE STYLES
   ================================================ */

/* --- Global Mobile Touch Optimizations --- */
@media (max-width: 768px) {
    /* Prevent zoom on input focus (iOS) */
    input, select, textarea {
        font-size: 16px !important;
    }

    /* Better touch targets */
    a, button, .btn, .sidebar-link, .nav-link {
        -webkit-tap-highlight-color: rgba(99, 102, 241, 0.1);
    }

    /* Sidebar mobile overlay */
    .sidebar {
        transform: translateX(-100%);
        z-index: 200;
        box-shadow: none;
        width: 280px;
    }

    .sidebar.active {
        transform: translateX(0);
        box-shadow: 5px 0 30px rgba(0, 0, 0, 0.3);
    }

    /* Dark overlay when sidebar is open */
    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 199;
    }

    .sidebar-overlay.active {
        display: block;
    }

    .dashboard-main {
        margin-left: 0;
    }

    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
    }

    /* Dashboard header â€” compact */
    .dashboard-header {
        padding: 12px 15px;
    }

    .header-left {
        gap: 10px;
    }

    .header-left h1 {
        font-size: 1rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 180px;
    }

    .user-name {
        display: none;
    }

    .user-avatar {
        width: 38px;
        height: 38px;
        font-size: 0.85rem;
    }

    /* Dashboard content */
    .dashboard-content {
        padding: 15px;
    }

    /* Welcome banner */
    .welcome-banner {
        padding: 20px;
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .welcome-text h2 {
        font-size: 1.3rem;
    }

    .welcome-text p {
        font-size: 0.9rem;
    }

    .welcome-icon {
        font-size: 2.5rem;
    }

    /* Stats grid */
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .stat-card {
        padding: 15px;
        gap: 12px;
    }

    .detail-stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat-icon {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
        border-radius: 10px;
    }

    .stat-info h3 {
        font-size: 1.3rem;
    }

    .stat-info p {
        font-size: 0.75rem;
    }

    /* Dashboard grid */
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    /* Cards */
    .card-content {
        padding: 15px;
    }

    .card-header {
        padding: 15px;
    }

    /* Data tables â€” Card layout on mobile */
    .data-table {
        border: none;
    }

    .data-table thead {
        display: none;
    }

    .data-table tbody tr {
        display: block;
        background: white;
        border-radius: 10px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
        padding: 15px;
        margin-bottom: 12px;
        border: 1px solid var(--gray-light);
    }

    .data-table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 0;
        border-bottom: 1px solid #f1f5f9;
        font-size: 0.9rem;
    }

    .data-table tbody td:last-child {
        border-bottom: none;
        padding-top: 12px;
    }

    .data-table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--dark-color);
        font-size: 0.8rem;
        text-transform: uppercase;
        letter-spacing: 0.03em;
        margin-right: 10px;
        flex-shrink: 0;
    }

    /* Action buttons in tables */
    .data-table .btn-action {
        padding: 8px 14px;
        font-size: 0.85rem;
        min-height: 36px;
    }

    /* Students grid */
    .students-grid-container {
        grid-template-columns: 1fr;
    }

    .student-card {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }

    .student-actions {
        margin-left: 0;
        flex-direction: row;
        width: 100%;
    }

    .student-actions button {
        flex: 1;
    }

    /* Section header page */
    .section-header-page {
        display: flex !important;
        flex-direction: column;
        gap: 10px;
        align-items: flex-start !important;
        width: 100%;
    }

    .section-header-page h2 {
        font-size: 1.2rem;
    }

    /* Modals â€” full width on mobile */
    .modal-content {
        margin: 5% 10px;
        width: calc(100% - 20px);
        max-width: none;
        max-height: 85vh;
        overflow-y: auto;
        padding: 20px 15px;
    }

    .modal .form-row,
    .student-section .form-row {
        flex-direction: column !important;
        gap: 0 !important;
    }

    .modal .form-row .form-group,
    .student-section .form-row .form-group {
        min-width: 100% !important;
    }

    /* Sidebar links â€” larger touch targets */
    .sidebar-link {
        padding: 14px 25px;
        font-size: 0.95rem;
        min-height: 48px;
    }

    /* Horizontal tabs â€” scrollable */
    .horizontal-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        flex-wrap: nowrap;
        gap: 8px;
        padding-bottom: 12px;
    }

    .horizontal-tabs::-webkit-scrollbar {
        display: none;
    }

    .horizontal-tabs .tab-btn {
        white-space: nowrap;
        font-size: 0.9rem;
        padding: 10px 14px;
        min-height: 44px;
    }

    /* Designer section */
    .designer-class-selector {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .designer-class-selector select,
    .designer-class-selector input[type="text"] {
        min-width: 100%;
    }

    .designer-header-actions {
        margin-top: 10px;
    }

    .designer-canvas-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .designer-canvas {
        min-width: 800px;
        height: 500px;
    }

    .designer-properties {
        padding: 15px;
    }

    .property-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .property-group label {
        min-width: auto;
    }

    .property-group input[type="text"],
    .property-group input[type="range"] {
        width: 100%;
    }

    /* Student canvas viewer */
    .student-canvas-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .student-canvas {
        width: 800px;
        height: 600px;
    }

    /* Chatbot â€” larger and bottom sheet on mobile */
    .chatbot-widget {
        bottom: 15px;
        right: 15px;
    }

    .chatbot-container {
        position: fixed;
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        height: 75vh;
        border-radius: 20px 20px 0 0;
        animation: slideUpMobile 0.3s ease-out;
    }

    @keyframes slideUpMobile {
        from { opacity: 0; transform: translateY(100%); }
        to { opacity: 1; transform: translateY(0); }
    }

    .chatbot-trigger {
        width: 56px;
        height: 56px;
        box-shadow: 0 4px 20px rgba(99, 102, 241, 0.5);
    }

    .chatbot-input input {
        font-size: 16px;
        padding: 12px 15px;
    }

    .chatbot-input button {
        width: 44px;
        height: 44px;
    }

    /* Navigation hamburger */
    .hamburger {
        display: flex;
        width: 44px;
        height: 44px;
        align-items: center;
        justify-content: center;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: white;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 25px;
        transition: var(--transition-normal);
        z-index: 1000;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-link {
        font-size: 1.2rem;
        padding: 10px 20px;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: rotate(45deg) translate(5px, 6px);
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -6px);
    }

    /* Hero section */
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 0 15px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-description {
        margin: 0 auto 30px;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-image-container {
        width: 250px;
        height: 250px;
    }

    .hero-main-icon {
        font-size: 5rem;
    }

    .floating-icon {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }

    /* Sections */
    .section {
        padding: 60px 0;
    }

    .section-title {
        font-size: 2rem;
    }

    .section-subtitle {
        font-size: 1rem;
    }

    .section-header {
        margin-bottom: 30px;
    }

    /* Features */
    .features-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .feature-card {
        padding: 25px 20px;
    }

    /* About */
    .about-content,
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .about-image-wrapper {
        max-width: 250px;
    }

    .about-icon-display i {
        font-size: 5rem;
    }

    .about-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .stat-item {
        padding: 12px 8px;
    }

    .stat-number {
        font-size: 1.8rem;
    }

    .stat-plus {
        font-size: 1.3rem;
    }

    .stat-label {
        font-size: 0.75rem;
    }

    /* Page header */
    .page-header {
        padding: 120px 15px 40px;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .page-header p {
        font-size: 1rem;
    }

    /* Login */
    .login-section {
        padding: 100px 15px 30px;
    }

    .login-container {
        padding: 30px 20px;
    }

    .login-icon {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }

    .login-header h1 {
        font-size: 1.6rem;
    }

    /* Contact form */
    .contact-form {
        padding: 25px 20px;
    }

    /* Footer */
    .footer {
        padding: 40px 0 20px;
    }

    .footer-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
        padding-bottom: 25px;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }

    .footer-bottom {
        padding-top: 20px;
    }

    .footer-bottom p {
        font-size: 0.85rem;
    }

    /* Quick actions */
    .quick-actions {
        grid-template-columns: 1fr;
    }

    /* Class items */
    .class-item {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}

/* --- Extra Small Screens (â‰¤480px) --- */
@media (max-width: 480px) {
    .hero {
        padding-top: 70px;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .hero-profession {
        font-size: 1.1rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .hero-buttons .btn {
        width: 100%;
        justify-content: center;
    }

    .hero-image-container {
        width: 200px;
        height: 200px;
    }

    .hero-main-icon {
        font-size: 4rem;
    }

    .about-stats {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .stat-item {
        display: flex;
        align-items: center;
        gap: 10px;
        text-align: left;
        padding: 12px 15px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .btn {
        padding: 12px 24px;
        font-size: 0.9rem;
    }

    .section-title {
        font-size: 1.6rem;
    }

    .welcome-text h2 {
        font-size: 1.1rem;
    }

    .login-container {
        padding: 25px 15px;
    }

    .login-header h1 {
        font-size: 1.4rem;
    }

    .contact-form {
        padding: 20px 15px;
    }

    /* Badge in sidebar */
    .badge.warning {
        font-size: 0.7rem;
        padding: 2px 6px;
    }

    .dashboard-header h1 {
        font-size: 0.95rem;
    }
}

/* --- Safe area support for notched phones --- */
@supports (padding-top: env(safe-area-inset-top)) {
    .navbar,
    .dashboard-header {
        padding-top: max(15px, env(safe-area-inset-top));
    }

    .footer-bottom {
        padding-bottom: max(20px, env(safe-area-inset-bottom));
    }

    .chatbot-widget {
        bottom: max(15px, env(safe-area-inset-bottom));
    }

    .sidebar {
        padding-top: max(20px, env(safe-area-inset-top));
    }
}

/* --- Real-time Notification Badge --- */
.unread-badge {
    display: none;
    background: linear-gradient(135deg, #ff4757, #ff6b81);
    color: white;
    border-radius: 20px;
    padding: 2px 7px;
    font-size: 0.75rem;
    font-weight: 700;
    min-width: 22px;
    text-align: center;
    margin-left: auto;
    box-shadow: 0 4px 10px rgba(255, 71, 87, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.3);
    text-shadow: 0 1px 1px rgba(0,0,0,0.2);
    animation: badgePulse 2s infinite cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

@keyframes badgePulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(255, 71, 87, 0.7);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 6px rgba(255, 71, 87, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(255, 71, 87, 0);
    }
}

.sidebar-link .unread-badge {
    margin-left: 10px;
}

/* --- FIXES FOR BROKEN STYLES --- */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--gray-light);
}

.data-table th {
    font-weight: 600;
    color: var(--gray-color);
    font-size: 0.85rem;
}

.badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.badge.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.badge.warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}

.badge.danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

.badge.info {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
}

/* Action buttons for tables (courses, devoirs) */
.btn-action {
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
}

.btn-action.edit {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
}

.btn-action.edit:hover {
    background: var(--primary-color);
    color: white;
}

.btn-action.delete {
    background: rgba(239, 68, 68, 0.08);
    color: var(--danger-color);
}

.btn-action.delete:hover {
    background: var(--danger-color);
    color: white;
}

.quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.quick-action-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: var(--light-color);
    border-radius: var(--border-radius);
    color: var(--dark-color);
    font-weight: 500;
    transition: var(--transition-fast);
}

.quick-action-btn:hover {
    background: var(--gradient-primary);
    color: white;
}
/* --- LIGNES DES LISTES (COULEURS ALTERNÉES ET REMARQUABLES) --- */

/* 1. Lignes des Cours (Bleu alterné) */
#courses-body tr:nth-child(odd), 
#student-courses-body tr:nth-child(odd) {
    background-color: #dbeafe !important; /* Bleu clair */
}
#courses-body tr:nth-child(even), 
#student-courses-body tr:nth-child(even) {
    background-color: #bfdbfe !important; /* Bleu un peu plus intense */
}
#courses-body tr:hover, 
#student-courses-body tr:hover {
    background-color: #93c5fd !important;
}

/* 2. Lignes des Devoirs / Soumissions (Vert alterné) */
#devoirs-body tr:nth-child(odd), 
#student-devoirs-body tr:nth-child(odd),
#soumissions-body tr:nth-child(odd) {
    background-color: #dcfce7 !important; /* Vert clair */
}
#devoirs-body tr:nth-child(even), 
#student-devoirs-body tr:nth-child(even),
#soumissions-body tr:nth-child(even) {
    background-color: #bbf7d0 !important; /* Vert un peu plus intense */
}
#devoirs-body tr:hover, 
#student-devoirs-body tr:hover,
#soumissions-body tr:hover {
    background-color: #86efac !important;
}

#active-students-body tr:nth-child(odd) {
    background-color: #f3e8ff !important; /* Violet clair */
}
#active-students-body tr:nth-child(even) {
    background-color: #e9d5ff !important; /* Violet un peu plus intense */
}
#active-students-body tr:hover {
    background-color: #d8b4fe !important;
}

/* ================================================
   TRAINING MODULE STYLES
   ================================================ */

/* --- Course Selector Card --- */
.training-selector-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    margin-bottom: 20px;
}

.training-selector-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 25px 30px;
    background: linear-gradient(135deg, #f0f0ff 0%, #fdf2f8 100%);
    border-bottom: 1px solid var(--gray-light);
}

.training-selector-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.training-selector-header h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 3px;
    color: var(--dark-color);
}

.training-selector-header p {
    color: var(--gray-color);
    font-size: 0.9rem;
    margin: 0;
}

.training-selector-body {
    padding: 20px 30px 25px;
}

.training-selector-body select {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--gray-light);
    border-radius: 10px;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    color: var(--dark-color);
    background: white;
    cursor: pointer;
    transition: border-color 0.2s ease;
    appearance: auto;
}

.training-selector-body select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* --- Course Info --- */
.training-course-info {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 16px 20px;
    background: rgba(99, 102, 241, 0.06);
    border-left: 4px solid var(--primary-color);
    border-radius: 8px;
    margin-bottom: 20px;
    animation: fadeInUp 0.3s ease;
}

.training-course-info > i {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-top: 2px;
}

.training-course-info strong {
    display: block;
    margin-bottom: 4px;
    color: var(--dark-color);
}

.training-course-info p {
    color: var(--gray-color);
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.5;
}

/* --- Exercise Types Panel --- */
.training-types-panel {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    padding: 25px;
    margin-bottom: 25px;
    animation: fadeInUp 0.4s ease;
}

.training-types-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.training-types-header h4 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.training-live-score {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    padding: 8px 18px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    color: #92400e;
    display: flex;
    align-items: center;
    gap: 6px;
}

.training-score-pct {
    font-weight: 400;
    font-size: 0.85rem;
    opacity: 0.8;
}

.training-types-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.training-type-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 10px;
    background: var(--light-color);
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-family: 'Poppins', sans-serif;
}

.training-type-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    background: white;
}

.training-type-card:active {
    transform: translateY(-1px);
}

.training-type-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: white;
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
    transition: transform 0.3s ease;
}

.training-type-card:hover .training-type-icon {
    transform: scale(1.1);
}

.training-type-label {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--dark-color);
}

.training-type-card small {
    color: var(--gray-color);
    font-size: 0.75rem;
}

/* --- Loading State --- */
.training-loading {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
}

.training-loading p {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-top: 20px;
}

.training-loading small {
    color: var(--gray-color);
    display: block;
    margin-top: 5px;
}

.training-loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--gray-light);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- Empty State --- */
.training-empty {
    text-align: center;
    padding: 50px 20px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
}

.training-empty i {
    font-size: 3rem;
    color: var(--gray-light);
    margin-bottom: 15px;
}

.training-empty p {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark-color);
}

.training-empty small {
    color: var(--gray-color);
    display: block;
    margin-top: 5px;
}

/* --- Exercise Card --- */
.training-exercise-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: fadeInUp 0.4s ease;
}

.training-progress-bar {
    height: 5px;
    background: var(--gray-light);
    width: 100%;
}

.training-progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    transition: width 0.5s ease;
    border-radius: 0 3px 3px 0;
}

.training-exercise-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px 0;
}

.training-type-badge {
    padding: 5px 14px;
    border-radius: 50px;
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.training-counter {
    color: var(--gray-color);
    font-size: 0.9rem;
    font-weight: 500;
}

.training-question {
    padding: 20px 25px;
}

.training-question h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.training-question p {
    font-size: 1.1rem;
    color: var(--dark-color);
    line-height: 1.6;
    font-weight: 500;
}

/* --- QCM Options --- */
.training-options {
    padding: 0 25px 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.training-option-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
    padding: 14px 18px;
    background: var(--light-color);
    border: 2px solid var(--gray-light);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
}

.training-option-btn:hover {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.04);
    transform: translateX(4px);
}

.training-option-letter {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: white;
    border: 2px solid var(--gray-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--dark-color);
    font-size: 0.9rem;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.training-option-btn:hover .training-option-letter {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.training-option-text {
    flex: 1;
    color: var(--dark-color);
}

.training-option-btn.correct {
    border-color: var(--success-color);
    background: rgba(16, 185, 129, 0.08);
    animation: pulseCorrect 0.5s ease;
}

.training-option-btn.correct .training-option-letter {
    background: var(--success-color);
    border-color: var(--success-color);
    color: white;
}

.training-option-btn.wrong {
    border-color: var(--danger-color);
    background: rgba(239, 68, 68, 0.06);
    animation: pulseWrong 0.5s ease;
}

.training-option-btn.wrong .training-option-letter {
    background: var(--danger-color);
    border-color: var(--danger-color);
    color: white;
}

@keyframes pulseCorrect {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

@keyframes pulseWrong {
    0% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
    100% { transform: translateX(0); }
}

.training-options.answered .training-option-btn {
    cursor: default;
    pointer-events: none;
}

/* --- Vrai / Faux Buttons --- */
.training-vf-buttons {
    display: flex;
    gap: 15px;
    padding: 0 25px 10px;
}

.training-vf-btn {
    flex: 1;
    padding: 20px;
    border-radius: 12px;
    border: 2px solid var(--gray-light);
    background: var(--light-color);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.training-vf-btn i {
    font-size: 2rem;
}

.training-vf-btn.vrai {
    color: var(--success-color);
}

.training-vf-btn.vrai:hover {
    border-color: var(--success-color);
    background: rgba(16, 185, 129, 0.06);
    transform: scale(1.03);
}

.training-vf-btn.faux {
    color: var(--danger-color);
}

.training-vf-btn.faux:hover {
    border-color: var(--danger-color);
    background: rgba(239, 68, 68, 0.06);
    transform: scale(1.03);
}

.training-vf-btn.correct {
    border-color: var(--success-color) !important;
    background: rgba(16, 185, 129, 0.12) !important;
    animation: pulseCorrect 0.5s ease;
}

.training-vf-btn.wrong {
    border-color: var(--danger-color) !important;
    background: rgba(239, 68, 68, 0.1) !important;
    animation: pulseWrong 0.5s ease;
}

.training-vf-buttons.answered .training-vf-btn {
    cursor: default;
    pointer-events: none;
}

/* --- Text Input (Trous & Libre) --- */
.training-trous-input,
.training-libre-input {
    padding: 0 25px 15px;
}

.training-text-input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--gray-light);
    border-radius: 10px;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    transition: border-color 0.2s ease;
    margin-bottom: 12px;
}

.training-text-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.training-text-input.correct {
    border-color: var(--success-color);
    background: rgba(16, 185, 129, 0.04);
}

.training-text-input.wrong {
    border-color: var(--danger-color);
    background: rgba(239, 68, 68, 0.04);
}

.training-textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--gray-light);
    border-radius: 10px;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    resize: vertical;
    min-height: 100px;
    transition: border-color 0.2s ease;
}

.training-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* --- Feedback --- */
.training-feedback {
    margin: 10px 25px 15px;
    padding: 18px 20px;
    border-radius: 10px;
    animation: fadeInUp 0.3s ease;
}

.training-feedback.correct {
    background: rgba(16, 185, 129, 0.08);
    border-left: 4px solid var(--success-color);
}

.training-feedback.wrong {
    background: rgba(239, 68, 68, 0.06);
    border-left: 4px solid var(--danger-color);
}

.training-feedback.info {
    background: rgba(99, 102, 241, 0.06);
    border-left: 4px solid var(--primary-color);
}

.training-feedback-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 8px;
}

.training-feedback.correct .training-feedback-header {
    color: var(--success-color);
}

.training-feedback.wrong .training-feedback-header {
    color: var(--danger-color);
}

.training-feedback.info .training-feedback-header {
    color: var(--primary-color);
}

.training-explanation {
    color: var(--gray-color);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-top: 6px;
}

/* --- Self Evaluation (Open Questions) --- */
.training-self-eval {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--gray-light);
}

.training-self-eval p {
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.training-self-eval-btns {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.training-eval-btn {
    padding: 8px 18px;
    border-radius: 8px;
    border: 2px solid var(--gray-light);
    background: white;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.training-eval-btn.correct-btn:hover {
    border-color: var(--success-color);
    color: var(--success-color);
}

.training-eval-btn.partial-btn:hover {
    border-color: var(--warning-color);
    color: var(--warning-color);
}

.training-eval-btn.wrong-btn:hover {
    border-color: var(--danger-color);
    color: var(--danger-color);
}

/* --- Next Button --- */
.training-actions {
    padding: 10px 25px 25px;
    text-align: right;
}

.training-next-btn {
    animation: fadeInUp 0.3s ease;
}

/* --- Results Screen --- */
.training-results-card {
    text-align: center;
    padding: 50px 30px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    animation: fadeInUp 0.5s ease;
}

.training-results-emoji {
    font-size: 4rem;
    margin-bottom: 10px;
    animation: bounceIn 0.6s ease;
}

@keyframes bounceIn {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); opacity: 1; }
}

.training-results-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: var(--dark-color);
    margin-bottom: 15px;
}

.training-results-score {
    font-size: 3rem;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
}

.training-results-pct {
    font-size: 1.2rem;
    color: var(--gray-color);
    margin-bottom: 20px;
}

.training-results-bar {
    width: 80%;
    max-width: 400px;
    height: 12px;
    background: var(--gray-light);
    border-radius: 10px;
    margin: 15px auto 25px;
    overflow: hidden;
}

.training-results-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 1s ease;
}

.training-results-course {
    color: var(--gray-color);
    font-size: 0.95rem;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.training-results-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 25px;
}

.training-results-review {
    border-top: 1px solid var(--gray-light);
    padding-top: 20px;
}

.training-review-toggle {
    background: none;
    border: none;
    color: var(--primary-color);
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: opacity 0.2s ease;
}

.training-review-toggle:hover {
    opacity: 0.7;
}

.training-review-item {
    text-align: left;
    padding: 15px;
    margin-top: 12px;
    background: var(--light-color);
    border-radius: 8px;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .training-types-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .training-selector-header {
        padding: 18px 20px;
    }
    
    .training-selector-body {
        padding: 15px 20px 20px;
    }
    
    .training-question p {
        font-size: 1rem;
    }
    
    .training-vf-buttons {
        flex-direction: column;
    }
    
    .training-results-score {
        font-size: 2.5rem;
    }

    .training-types-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .training-types-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .training-type-card.training-type-mix {
        grid-column: span 2;
    }

    .training-exercise-header,
    .training-question,
    .training-options,
    .training-feedback,
    .training-actions {
        padding-left: 15px;
        padding-right: 15px;
    }

    .training-self-eval-btns {
        flex-direction: column;
    }
}

/* =========================================================================
   🎓 FIX : MODULE ENTRAINEMENT IA (STUDENT DASHBOARD)
   ========================================================================= */

.training-selector-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    padding: 25px;
    margin-bottom: 25px;
    border: 1px solid var(--gray-light);
}

.training-selector-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--gray-light);
    padding-bottom: 20px;
}

.training-selector-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
}

.training-selector-header h3 {
    margin-bottom: 5px;
    font-size: 1.5rem;
    color: var(--dark-color);
}

.training-selector-header p {
    color: var(--gray-color);
    margin: 0;
    font-size: 0.95rem;
}

.training-selector-body select {
    width: 100%;
    padding: 15px;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    font-size: 1rem;
    color: var(--dark-color);
    background: #f8fafc;
    cursor: pointer;
    transition: var(--transition-normal);
}

.training-selector-body select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

/* Info Cours Sélectionné */
.training-course-info {
    background: linear-gradient(to right, #f8fafc, #edf2f8);
    border-left: 4px solid var(--primary-color);
    padding: 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
}

.training-course-info i {
    font-size: 2rem;
    color: var(--primary-color);
}

.training-course-info strong {
    display: block;
    font-size: 1.2rem;
    color: var(--dark-color);
    margin-bottom: 5px;
}

.training-course-info p {
    margin: 0;
    color: var(--gray-color);
    font-size: 0.9rem;
}

/* Types d'exercices */
.training-types-panel {
    background: white;
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    margin-bottom: 30px;
}

.training-types-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.training-types-header h4 {
    font-size: 1.3rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.training-live-score {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-dark);
    padding: 8px 15px;
    border-radius: 50px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.training-types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.training-type-card {
    background: var(--light-color);
    border: 1px solid var(--gray-light);
    border-radius: 12px;
    padding: 25px 15px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-normal);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
    width: 100%;
}

.training-type-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.training-type-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    background: white;
    border-color: transparent;
}

.training-type-card:hover::before {
    transform: scaleX(1);
}

.training-type-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: white;
    margin-bottom: 10px;
    box-shadow: var(--shadow-md);
}

.training-type-label {
    font-weight: 700;
    color: var(--dark-color);
    font-size: 1.1rem;
}

.training-type-card small {
    color: var(--gray-color);
}

/* ===== CODE DIRECTE (Teacher Dashboard) ===== */
.btn-direct-code {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    font-family: 'Poppins', sans-serif;
    white-space: nowrap;
}

.btn-direct-code:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
    background: linear-gradient(135deg, #d97706, #b45309);
}

.btn-direct-code i {
    font-size: 0.7rem;
}

.direct-code-display {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border: 2px solid #86efac;
    border-radius: 8px;
    padding: 5px 10px;
    animation: codeAppear 0.4s ease;
}

@keyframes codeAppear {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.direct-code-value {
    font-family: 'Courier New', Courier, monospace;
    font-weight: 800;
    font-size: 0.95rem;
    letter-spacing: 2px;
    color: #166534;
    user-select: all;
}

.direct-code-clear {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: #fecaca;
    color: #dc2626;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.65rem;
    transition: var(--transition-fast);
    flex-shrink: 0;
}

.direct-code-clear:hover {
    background: #dc2626;
    color: white;
    transform: scale(1.1);
}

/* ===== ESPACE PASSANT ===== */
.passant-container {
    max-width: 550px !important;
}

.passant-icon {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
}

.passant-form {
    margin-bottom: 20px;
}

.passant-input-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.passant-code-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.passant-input-icon {
    position: absolute;
    left: 18px;
    color: var(--gray-color);
    font-size: 1.1rem;
    z-index: 2;
}

.passant-code-input-wrapper input {
    width: 100%;
    padding: 18px 20px 18px 50px;
    border: 3px solid var(--gray-light);
    border-radius: var(--border-radius);
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-align: center;
    text-transform: uppercase;
    transition: var(--transition-normal);
    background: #f8fafc;
}

.passant-code-input-wrapper input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
    background: white;
}

.passant-code-input-wrapper input::placeholder {
    opacity: 0.4;
    letter-spacing: 2px;
}

.passant-hint {
    margin-top: 15px;
    padding: 12px 16px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #1e40af;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.passant-hint i {
    margin-top: 2px;
    color: #3b82f6;
    flex-shrink: 0;
}

/* Passant Result */
.passant-result {
    margin-top: 25px;
    animation: fadeInUp 0.5s ease;
}

.passant-result-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow-lg);
}

.passant-result-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f1f5f9;
}

.passant-result-icon {
    width: 55px;
    height: 55px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: white;
    flex-shrink: 0;
}

.passant-result-icon.cours {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
}

.passant-result-icon.devoir {
    background: linear-gradient(135deg, #ec4899, #db2777);
}

.passant-result-type {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gray-color);
}

.passant-result-title {
    font-size: 1.3rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    margin-top: 2px;
}

.passant-result-details {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 15px;
}

.passant-detail {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: #f1f5f9;
    border-radius: 20px;
    font-size: 0.82rem;
    color: var(--gray-color);
    font-weight: 500;
}

.passant-detail i {
    font-size: 0.75rem;
    color: var(--primary-color);
}

.passant-result-desc {
    color: var(--gray-color);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 20px;
    padding: 12px;
    background: #fafafa;
    border-radius: 8px;
    border-left: 3px solid var(--primary-color);
}

.passant-download-btn {
    margin-top: 5px;
    font-size: 1.05rem;
    padding: 16px 32px;
}

/* Passant Error */
.passant-error {
    margin-top: 20px;
    animation: fadeInUp 0.3s ease;
}

.passant-error-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    color: #991b1b;
}

.passant-error-card i {
    font-size: 1.2rem;
    color: #dc2626;
    flex-shrink: 0;
}

.passant-error-card p {
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.5;
}

/* Mobile adjustments for passant */
@media (max-width: 768px) {
    .passant-code-input-wrapper input {
        font-size: 1.1rem;
        letter-spacing: 2px;
        padding: 15px 15px 15px 45px;
    }

    .passant-result-header {
        flex-direction: column;
        text-align: center;
    }

    .passant-result-details {
        justify-content: center;
    }
}

/* ============================================================
   MODULE PROJETS — WIZARD 3 ÉTAPES
   ============================================================ */

/* Wrapper principal */
.proj-wizard-wrap {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(99,102,241,0.08);
    overflow: hidden;
}

/* ── STEPS BAR ─────────────────────────────────────────────── */
.proj-wiz-steps-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 40px 0;
    gap: 0;
    background: linear-gradient(135deg, #f8fafc, #eef2ff);
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 28px;
}

.proj-wiz-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: default;
    transition: 0.3s;
}

.proj-wiz-circle {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    transition: 0.3s;
    border: 3px solid #e2e8f0;
}

.proj-wiz-label {
    font-size: 0.8rem;
    color: #94a3b8;
    font-weight: 500;
    transition: 0.3s;
    white-space: nowrap;
}

.proj-wiz-step.active .proj-wiz-circle {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    border-color: #6366f1;
    box-shadow: 0 4px 15px rgba(99,102,241,0.35);
    transform: scale(1.1);
}

.proj-wiz-step.active .proj-wiz-label {
    color: #6366f1;
    font-weight: 600;
}

.proj-wiz-step.done .proj-wiz-circle {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    border-color: #10b981;
}

.proj-wiz-step.done .proj-wiz-label {
    color: #10b981;
}

.proj-wiz-connector {
    flex: 1;
    height: 3px;
    background: #e2e8f0;
    max-width: 100px;
    margin: 0 8px;
    margin-bottom: 28px;
    border-radius: 3px;
    transition: 0.4s;
}

.proj-wiz-connector.done {
    background: linear-gradient(90deg, #10b981, #6366f1);
}

/* ── PANELS ─────────────────────────────────────────────────── */
.proj-wiz-panel {
    display: none;
    padding: 36px 40px 28px;
    animation: projPanelIn 0.35s ease;
}

.proj-wiz-panel.active {
    display: block;
}

@keyframes projPanelIn {
    from { opacity: 0; transform: translateX(20px); }
    to   { opacity: 1; transform: translateX(0); }
}

.proj-wiz-panel-head {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f1f5f9;
}

.proj-wiz-panel-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(99,102,241,0.25);
}

.proj-wiz-panel-head h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.15rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 4px;
}

.proj-wiz-panel-head p {
    font-size: 0.88rem;
    color: #64748b;
    margin: 0;
}

/* ── CHAMPS FORMULAIRE ──────────────────────────────────────── */
.proj-wiz-fields {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 28px;
}

.proj-wiz-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.proj-wiz-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.proj-wiz-group label {
    font-size: 0.88rem;
    font-weight: 600;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 7px;
}

.req-star { color: #ef4444; }

.proj-wiz-group input,
.proj-wiz-group select,
.proj-wiz-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    color: #0f172a;
    background: #fafafa;
    transition: 0.2s;
    resize: vertical;
}

.proj-wiz-group input:focus,
.proj-wiz-group select:focus,
.proj-wiz-group textarea:focus {
    outline: none;
    border-color: #6366f1;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}

.proj-wiz-full { grid-column: 1 / -1; }

/* ── NAVIGATION WIZARD ──────────────────────────────────────── */
.proj-wiz-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
}

.proj-wiz-btn-next,
.proj-wiz-btn-prev,
.proj-wiz-btn-save {
    padding: 11px 28px !important;
    font-size: 0.9rem !important;
    border-radius: 50px !important;
    font-weight: 600 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.btn-success {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    color: #fff !important;
    border: none !important;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(16,185,129,0.3);
    transition: 0.2s;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16,185,129,0.4);
}

/* ── ÉQUIPE — CARTES ÉLÈVES ─────────────────────────────────── */
.proj-team-rules {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: linear-gradient(135deg, #eef2ff, #f0fdf4);
    border: 1px solid #c7d2fe;
    border-radius: 10px;
    padding: 14px 18px;
    font-size: 0.88rem;
    color: #3730a3;
    margin-bottom: 4px;
}

.proj-team-rules i { font-size: 1.1rem; color: #6366f1; margin-top: 2px; }

.proj-team-empty,
.proj-team-loading {
    text-align: center;
    padding: 40px;
    color: #94a3b8;
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.proj-team-empty i { font-size: 2rem; }

/* Alias: conteneur de cartes élèves */
.proj-team-cards {
    min-height: 120px;
    padding: 4px 0;
}

/* Groupe pleine largeur dans la grille wizard */
.proj-wiz-group.proj-wiz-full {
    grid-column: 1 / -1;
}

.proj-student-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
}

.proj-student-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: #fafafa;
    transition: 0.2s;
    position: relative;
}

.proj-student-card.selected {
    border-color: #6366f1;
    background: #f0f0ff;
    box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}

.proj-student-card.already-assigned {
    opacity: 0.6;
    background: #f8f8f8;
    border-color: #e2e8f0;
    cursor: not-allowed;
}

.psc-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
}

.psc-info { flex: 1; min-width: 0; }

.psc-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.psc-class { font-size: 0.78rem; color: #64748b; }

.psc-badge-taken {
    font-size: 0.72rem;
    color: #ef4444;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
}

.psc-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* Checkbox stylisée */
.psc-check-wrap {
    cursor: pointer;
    position: relative;
    display: block;
}

.psc-check-wrap input { display: none; }

.psc-checkmark {
    width: 28px;
    height: 28px;
    border: 2px solid #cbd5e1;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    background: #fff;
    transition: 0.2s;
    font-size: 0.85rem;
}

.psc-check-wrap input:checked ~ .psc-checkmark {
    background: #6366f1;
    border-color: #6366f1;
    color: #fff;
}

/* Bouton capitaine */
.captain-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #e2e8f0;
    background: #fff;
    color: #cbd5e1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: 0.2s;
}

.captain-btn:not(:disabled):hover {
    border-color: #f59e0b;
    color: #f59e0b;
    background: #fffbeb;
}

.captain-btn.selected {
    border-color: #f59e0b;
    background: #fef3c7;
    color: #d97706;
    box-shadow: 0 0 0 3px rgba(245,158,11,0.2);
}

.captain-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* ── PHASES / ÉTAPES ────────────────────────────────────────── */
.proj-phases-topbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.proj-phases-hint {
    font-size: 0.87rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 7px;
    flex: 1;
}

.proj-phases-hint i { color: #f59e0b; }

.proj-add-phase-btn {
    padding: 10px 20px !important;
    font-size: 0.85rem !important;
    border-radius: 50px !important;
    white-space: nowrap;
}

.proj-phase-block {
    border: 2px solid #e2e8f0;
    border-left: 5px solid #6366f1;
    border-radius: 12px;
    margin-bottom: 16px;
    overflow: hidden;
    background: #fafbff;
    transition: box-shadow 0.2s;
}

.proj-phase-block:hover { box-shadow: 0 4px 16px rgba(99,102,241,0.1); }

.proj-phase-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: linear-gradient(135deg, #eef2ff, #fafbff);
    border-bottom: 1px solid #e2e8f0;
}

.proj-phase-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.proj-phase-title {
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: #334155;
    margin: 0;
    flex: 1;
}

.proj-phase-del-btn {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 0.95rem;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.proj-phase-del-btn:hover { background: #fee2e2; }

.proj-phase-body {
    padding: 18px 18px 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.proj-phase-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 14px;
}

.proj-phase-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.proj-phase-group label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 6px;
}

.proj-phase-group input,
.proj-phase-group textarea {
    padding: 10px 13px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.88rem;
    background: #fff;
    transition: 0.2s;
    resize: vertical;
}

.proj-phase-group input:focus,
.proj-phase-group textarea:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}

.proj-phase-full { grid-column: 1 / -1; }

.proj-phase-file-zone {
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.proj-phase-file-zone label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 7px;
}

.proj-phase-file-zone input[type="file"] {
    font-size: 0.85rem;
}

.phase-file-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.phase-file-chip {
    background: #e0e7ff;
    color: #3730a3;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.phase-file-error {
    color: #ef4444;
    font-size: 0.82rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ── MODAL DÉTAILS PROJET ───────────────────────────────────── */
.proj-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.55);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease;
    backdrop-filter: blur(4px);
}

.proj-modal-box {
    background: #fff;
    border-radius: 20px;
    width: 100%;
    max-width: 720px;
    max-height: 88vh;
    overflow-y: auto;
    box-shadow: 0 25px 60px rgba(0,0,0,0.25);
    animation: projModalIn 0.3s ease;
}

@keyframes projModalIn {
    from { opacity:0; transform: scale(0.95) translateY(20px); }
    to   { opacity:1; transform: scale(1) translateY(0); }
}

.proj-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 24px 28px 18px;
    border-bottom: 1px solid #f1f5f9;
    background: linear-gradient(135deg, #eef2ff, #fafbff);
    border-radius: 20px 20px 0 0;
}

.proj-modal-header h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.proj-modal-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #94a3b8;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.proj-modal-close:hover { background: #fee2e2; color: #ef4444; }

.proj-modal-body { padding: 24px 28px; }

.proj-detail-section {
    margin-bottom: 24px;
}

.proj-detail-section h4 {
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.proj-detail-section p {
    color: #334155;
    font-size: 0.9rem;
    line-height: 1.7;
}

.proj-detail-team {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.proj-detail-member {
    padding: 6px 14px;
    border-radius: 20px;
    background: #e0e7ff;
    color: #3730a3;
    font-size: 0.82rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.proj-detail-member.captain {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.proj-detail-phase {
    border: 1px solid #e2e8f0;
    border-left: 4px solid #8b5cf6;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 10px;
    background: #fafbff;
}

.proj-detail-phase-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.proj-detail-phase-num {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.proj-detail-date {
    font-size: 0.78rem;
    color: #64748b;
    background: #f1f5f9;
    padding: 3px 9px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-left: auto;
}

.proj-detail-phase p { font-size: 0.85rem; color: #475569; margin: 0; }

.proj-detail-files {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.proj-detail-files span {
    background: #f3f4f6;
    color: #374151;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.78rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ── ANIMATION TOAST ────────────────────────────────────────── */
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(60px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ── RESPONSIVE TABLETTE ────────────────────────────────────── */
@media (max-width: 1024px) {
    .proj-phase-row { grid-template-columns: 2fr 1fr; }
    .proj-phase-row .proj-phase-group:last-child { grid-column: 1 / -1; }
}

/* ── RESPONSIVE MOBILE ──────────────────────────────────────── */
@media (max-width: 768px) {
    .proj-wiz-steps-bar { padding: 20px 16px 16px; }
    .proj-wiz-panel { padding: 20px 16px; }
    .proj-wiz-row { grid-template-columns: 1fr; }
    .proj-student-grid { grid-template-columns: 1fr; }
    .proj-phase-row { grid-template-columns: 1fr !important; }
    .proj-phase-row .proj-phase-group:last-child { grid-column: 1; }
    .proj-wiz-connector { max-width: 40px; }
    .proj-wiz-label { font-size: 0.7rem; }
    .proj-wiz-circle { width: 40px; height: 40px; font-size: 1rem; }
    .proj-phases-topbar { flex-direction: column; }
    .proj-wiz-nav { flex-direction: column; gap: 10px; }
    .proj-wiz-nav button { width: 100%; justify-content: center; }
    .proj-modal-box { border-radius: 12px; }
    .proj-modal-header, .proj-modal-body { padding: 16px; }
}

/* ============================================================
   MODULE COPIE PROJET
   ============================================================ */

/* Bannière de présentation du projet source */
.copy-source-banner {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: linear-gradient(135deg, #eef2ff, #f0fdf4);
    border: 1px solid #c7d2fe;
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 24px;
}

.copy-source-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(99,102,241,0.25);
}

.copy-source-info { flex: 1; min-width: 0; }

.copy-source-title {
    font-weight: 700;
    font-size: 1.05rem;
    color: #1e293b;
    margin-bottom: 4px;
}

.copy-source-desc {
    font-size: 0.85rem;
    color: #475569;
    line-height: 1.5;
    margin-bottom: 8px;
}

.copy-source-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.copy-source-meta span {
    font-size: 0.78rem;
    color: #6366f1;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Sections de la modale copie */
.copy-section {
    margin-bottom: 20px;
}

.copy-section-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 8px;
}

.copy-section-label i { color: #6366f1; }

/* Règles équipe dans la copie */
.copy-team-rules {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 0.84rem;
    color: #78350f;
    margin-top: 8px;
}

.copy-team-rules i { color: #d97706; margin-top: 2px; flex-shrink: 0; }

/* Boutons d'action bas de modale copie */
.copy-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 20px;
    margin-top: 8px;
    border-top: 1px solid #f1f5f9;
}

.copy-actions .btn {
    padding: 11px 24px;
    font-size: 0.9rem;
    border-radius: 50px;
}

@media (max-width: 600px) {
    .copy-source-banner { flex-direction: column; }
    .copy-actions { flex-direction: column; }
    .copy-actions .btn { width: 100%; justify-content: center; }
}

/* ============================================================
   MODULE MODIFICATION PROJET
   ============================================================ */

.edit-modal-box {
    max-width: 860px !important;
}

/* Section dans la modale édition */
.edit-section {
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid #f1f5f9;
}

.edit-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
}

.edit-section-title {
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    color: #166534;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.edit-section-title i { color: #16a34a; }

/* Barre titre + bouton (étapes) */
.edit-section-title-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 10px;
}

.edit-section-title-bar .edit-section-title {
    margin-bottom: 0;
}

/* Grille champs édition */
.edit-fields-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 16px;
    margin-bottom: 14px;
}

.edit-field-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.edit-field-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 6px;
}

.edit-field-group input,
.edit-field-group select,
.edit-field-group textarea {
    width: 100%;
    padding: 11px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    color: #0f172a;
    background: #fafafa;
    transition: 0.2s;
    resize: vertical;
}

.edit-field-group input:focus,
.edit-field-group select:focus,
.edit-field-group textarea:focus {
    outline: none;
    border-color: #16a34a;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(22,163,74,0.1);
}

/* Liste fichiers existants dans les phases éditables */
.edit-phase-files-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 28px;
}

@media (max-width: 768px) {
    .edit-fields-row { grid-template-columns: 1fr; }
    .edit-section-title-bar { flex-direction: column; align-items: flex-start; }
}

/* ==============================================================
   STUDENT PROJECTS MODULE
   ============================================================== */

/* --- Project Card --- */
.sp-project-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    border: 1px solid #e2e8f0;
    margin-bottom: 25px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}
.sp-project-card:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}

/* --- Project Header --- */
.sp-project-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 25px 25px 15px;
    gap: 15px;
    border-bottom: 1px solid #f1f5f9;
}
.sp-project-title-area h3 {
    font-size: 1.25rem;
    color: var(--dark-color);
    margin-bottom: 8px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
}
.sp-project-title-area h3 i {
    color: var(--primary-color);
    margin-right: 8px;
}
.sp-project-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* --- Progress Ring --- */
.sp-progress-ring {
    position: relative;
    width: 56px;
    height: 56px;
    flex-shrink: 0;
}
.sp-progress-ring svg {
    width: 56px;
    height: 56px;
    transform: rotate(-90deg);
}
.sp-progress-bg {
    fill: none;
    stroke: #e2e8f0;
    stroke-width: 3;
}
.sp-progress-fill {
    fill: none;
    stroke: var(--primary-color);
    stroke-width: 3;
    stroke-linecap: round;
    transition: stroke-dasharray 0.6s ease;
}
.sp-progress-ring span {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* --- Project Description --- */
.sp-project-desc {
    padding: 0 25px 15px;
    color: var(--gray-color);
    font-size: 0.92rem;
    line-height: 1.6;
}

/* --- Team Section --- */
.sp-team-section {
    padding: 15px 25px;
    border-top: 1px solid #f1f5f9;
    border-bottom: 1px solid #f1f5f9;
    background: #fafbfc;
}
.sp-team-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 10px;
}
.sp-team-title i { color: var(--primary-color); margin-right: 6px; }
.sp-team-list {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.sp-team-member {
    background: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    color: #475569;
    border: 1px solid #e2e8f0;
    font-weight: 500;
    transition: all 0.2s;
}
.sp-team-member.captain {
    background: #fef3c7;
    border-color: #fbbf24;
    color: #92400e;
    font-weight: 600;
}
.sp-team-member.captain i {
    color: #f59e0b;
    font-size: 0.7rem;
}
.sp-team-member.me {
    border-color: var(--primary-color);
    background: #eef2ff;
    color: var(--primary-dark);
}

/* --- Phases Section --- */
.sp-phases-section {
    padding: 20px 25px 25px;
}
.sp-phases-title {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 15px;
}
.sp-phases-title i { color: var(--primary-color); margin-right: 6px; }

/* --- Phase Card --- */
.sp-phase-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 15px 18px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
}
.sp-phase-card.active {
    border-color: var(--success-color);
    background: #f0fdf4;
}
.sp-phase-card.future {
    border-color: #cbd5e1;
    background: #f8fafc;
    opacity: 0.8;
}
.sp-phase-card.past {
    border-color: #fde68a;
    background: #fefce8;
}

/* --- Phase Header --- */
.sp-phase-header {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.sp-phase-num {
    width: 30px;
    height: 30px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
}
.sp-phase-card.active .sp-phase-num { background: var(--success-color); }
.sp-phase-card.past .sp-phase-num { background: #f59e0b; }
.sp-phase-card.future .sp-phase-num { background: #94a3b8; }

.sp-phase-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}
.sp-phase-info strong {
    font-size: 0.9rem;
    color: var(--dark-color);
    font-family: 'Poppins', sans-serif;
}
.sp-phase-dates {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-left: auto;
}
.sp-phase-dates span {
    font-size: 0.75rem;
    color: #64748b;
    background: white;
    padding: 3px 10px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}
.sp-phase-dates span i {
    margin-right: 4px;
    font-size: 0.7rem;
}

/* --- Phase Description --- */
.sp-phase-desc {
    margin-top: 10px;
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.5;
    padding-left: 42px;
}

/* --- Phase Upload Zone (Captain) --- */
.sp-phase-upload {
    margin-top: 12px;
    padding: 15px;
    padding-left: 42px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.sp-btn-upload {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--primary-color), #818cf8);
    color: white;
    border: none;
    border-radius: 10px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}
.sp-btn-upload:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}
.sp-upload-hint {
    font-size: 0.75rem;
    color: #94a3b8;
}

/* --- Phase Submission (Captain - Sent) --- */
.sp-phase-submission {
    margin-top: 12px;
    padding: 12px 15px;
    margin-left: 42px;
    background: white;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.sp-submission-status {
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}
.sp-submission-status.sent {
    color: var(--success-color);
}
.sp-submission-status.received {
    color: var(--primary-color);
}
.sp-submission-file {
    font-size: 0.8rem;
    color: #475569;
}
.sp-submission-file small {
    color: #94a3b8;
    margin-left: 4px;
}
.sp-submission-date {
    font-size: 0.75rem;
    color: #94a3b8;
}
.sp-btn-reupload {
    margin-left: auto;
    padding: 6px 14px;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.8rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}
.sp-btn-reupload:hover {
    background: #e2e8f0;
    color: var(--dark-color);
}

/* --- Phase Download (Non-captain) --- */
.sp-btn-download {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.8rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    margin-left: auto;
}
.sp-btn-download:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* --- Phase Waiting (Non-captain, no file yet) --- */
.sp-phase-waiting {
    margin-top: 10px;
    padding: 12px 15px;
    margin-left: 42px;
    background: #fffbeb;
    border: 1px dashed #fbbf24;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    color: #92400e;
}
.sp-phase-waiting i {
    font-size: 1rem;
    color: #f59e0b;
    flex-shrink: 0;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .sp-project-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .sp-progress-ring {
        align-self: flex-end;
        margin-top: -40px;
    }
    .sp-phase-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .sp-phase-dates {
        margin-left: 42px;
    }
    .sp-phase-upload,
    .sp-phase-submission,
    .sp-phase-waiting {
        margin-left: 0;
    }
    .sp-phase-desc {
        padding-left: 0;
    }
    .sp-phase-submission {
        flex-direction: column;
        align-items: flex-start;
    }
    .sp-btn-reupload {
        margin-left: 0;
    }
}

/* --- Locked badge (non-modifiable submission) --- */
.sp-submission-locked {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #ef4444;
    background: #fef2f2;
    padding: 3px 10px;
    border-radius: 6px;
    border: 1px solid #fecaca;
    margin-left: auto;
}
.sp-submission-locked i {
    font-size: 0.7rem;
}

/* Phase note badge (student view) */
.sp-phase-note {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0 12px;
}
.sp-phase-note i {
    font-size: 0.8rem;
}
.sp-phase-note strong {
    font-size: 1rem;
}

/* Info banner (group work notice) */
.sp-info-banner {
    display: flex;
    gap: 16px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #eff6ff, #e0f2fe);
    border: 1px solid #93c5fd;
    border-left: 4px solid #3b82f6;
    border-radius: 10px;
    margin-bottom: 20px;
    align-items: flex-start;
}
.sp-info-banner-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    color: #fff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}
.sp-info-banner-content {
    flex: 1;
}
.sp-info-banner-content > strong {
    display: block;
    color: #1e40af;
    font-size: 0.9rem;
    margin-bottom: 8px;
}
.sp-info-banner-content > strong i {
    margin-right: 4px;
}
.sp-info-banner-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.sp-info-banner-content ul li {
    font-size: 0.82rem;
    color: #334155;
    line-height: 1.5;
}
.sp-info-banner-content ul li i {
    width: 16px;
    text-align: center;
    margin-right: 6px;
    color: #3b82f6;
    font-size: 0.75rem;
}

/* --- Downloadable project file button --- */
.sp-file-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    color: #2563eb;
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid #bfdbfe;
    transition: all 0.2s ease;
    cursor: pointer;
}
.sp-file-download-btn:hover {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}
.sp-file-download-btn i {
    font-size: 0.7rem;
}

/* Non-downloadable file badge (old format without Base64) */
.sp-file-nodata-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #fff7ed;
    color: #c2410c;
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid #fed7aa;
    cursor: help;
}
.sp-file-nodata-badge i {
    font-size: 0.75rem;
    color: #ea580c;
}
.sp-file-nodata-badge small {
    font-size: 0.65rem;
    opacity: 0.8;
}

/* ==============================================
   PROJETS REÇUS — CARDS SOUMISSIONS (TEACHER)
   ============================================== */
.projet-soumission-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.projet-soumission-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    border-color: #cbd5e1;
}
.projet-soum-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-bottom: 1px solid #e2e8f0;
}
.projet-soum-title {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.projet-soum-title strong {
    color: var(--dark-color);
    font-size: 0.95rem;
}
.projet-soum-date {
    font-size: 0.8rem;
    color: #94a3b8;
    white-space: nowrap;
}
.projet-soum-body {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.projet-soum-team {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.projet-soum-team-label {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 600;
    white-space: nowrap;
    padding-top: 3px;
}
.projet-soum-members {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.projet-soum-member {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.78rem;
    padding: 3px 10px;
    border-radius: 20px;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}
.projet-soum-member.captain {
    background: #fef3c7;
    color: #92400e;
    border-color: #fde68a;
    font-weight: 600;
}
.projet-soum-actions {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
    padding-top: 10px;
    border-top: 1px dashed #e2e8f0;
}
.projet-soum-file {
    flex: 1;
    min-width: 200px;
}
.projet-soum-note {
    flex-shrink: 0;
}

/* Button action styles for the cards */
.btn-action.primary {
    background: linear-gradient(135deg, #6366f1, #818cf8);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.btn-action.primary:hover {
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    transform: translateY(-1px);
}
.btn-action.success {
    background: #10b981;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.btn-action.info {
    background: #3b82f6;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

@media (max-width: 768px) {
    .projet-soum-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    .projet-soum-actions {
        flex-direction: column;
        align-items: flex-start;
    }
    .projet-soum-team {
        flex-direction: column;
    }
}

/* ===================================================
   COURSE PREVIEW CARD GRID - Student Dashboard
   =================================================== */

.courses-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    padding: 5px;
}

.course-preview-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 1px solid rgba(226, 232, 240, 0.8);
    position: relative;
}

.course-preview-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(99, 102, 241, 0.15), 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: rgba(99, 102, 241, 0.3);
}

.course-preview-card:active {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.12);
}

/* Thumbnail Area */
.course-preview-thumb {
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: linear-gradient(135deg, #f8fafc, #eef2ff);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
}

.course-preview-thumb canvas.course-pdf-canvas,
.course-preview-thumb img.course-pdf-canvas {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.course-preview-thumb img.course-img-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.course-preview-card:hover .course-img-thumb {
    transform: scale(1.05);
}

/* Overlay on hover */
.course-preview-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 220px;
    background: linear-gradient(180deg, transparent 50%, rgba(99, 102, 241, 0.08) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    border-radius: 16px 16px 0 0;
}

.course-preview-card:hover::after {
    opacity: 1;
}

/* Loading State */
.course-preview-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: #94a3b8;
    font-size: 0.85rem;
}

.course-preview-loading i {
    font-size: 1.8rem;
    color: #6366f1;
    opacity: 0.5;
}

/* Fallback Thumbnail */
.course-preview-fallback {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px;
    text-align: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(145deg, #f8fafc 0%, #eef2ff 50%, #f5f3ff 100%);
}

.course-preview-fallback i {
    font-size: 3.5rem;
    opacity: 0.7;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.course-preview-fallback span {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
    max-width: 180px;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Info Section */
.course-preview-info {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.course-preview-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.course-preview-date {
    font-size: 0.78rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 5px;
}

.course-preview-date i {
    font-size: 0.7rem;
}

.course-preview-format {
    font-size: 0.7rem !important;
    padding: 3px 8px !important;
    border-radius: 6px !important;
}

.course-preview-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: color 0.25s ease;
}

.course-preview-card:hover .course-preview-title {
    color: #6366f1;
}

.course-preview-desc {
    font-size: 0.95rem;
    color: #475569;
    font-weight: 600;
    margin: 0;
    line-height: 1.45;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Download Hint */
.course-preview-action {
    margin-top: 4px;
    padding-top: 10px;
    border-top: 1px solid #f1f5f9;
}

.course-preview-dl-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: #6366f1;
    font-weight: 500;
    opacity: 0.7;
    transition: all 0.25s ease;
}

.course-preview-card:hover .course-preview-dl-hint {
    opacity: 1;
    transform: translateX(4px);
}

.course-preview-dl-hint i {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

.course-preview-card:hover .course-preview-dl-hint i {
    animation: bounceDown 0.6s ease infinite;
}

@keyframes bounceDown {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(3px); }
}

/* Empty State */
.courses-empty-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #94a3b8;
    gap: 15px;
    background: #f8fafc;
    border-radius: 16px;
    border: 2px dashed #e2e8f0;
}

.courses-empty-state i {
    font-size: 3rem;
    opacity: 0.3;
}

.courses-empty-state p {
    font-size: 1rem;
    margin: 0;
}

/* Responsive */
@media (max-width: 640px) {
    .courses-card-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .course-preview-thumb {
        height: 180px;
    }

    .course-preview-card::after {
        height: 180px;
    }
}

@media (min-width: 641px) and (max-width: 900px) {
    .courses-card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1400px) {
    .courses-card-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* =========================================================
   FOOTER & RESPONSIVE RULES FOR BRANDING AND HERO
   ========================================================= */

.footer {
    background: var(--dark-color);
    color: white;
    padding: 70px 0 30px;
    position: relative;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    gap: 40px;
}

.footer-logo-brand {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.footer-logo-img {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    object-position: 50% 15%;
    border: 2px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.footer-logo-brand .logo-text {
    font-size: 1.5rem;
    color: #ffffff;
    font-family: 'Playfair Display', serif;
}

.footer-tagline {
    font-size: 0.8rem;
    color: var(--primary-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 2px 0 0 0 !important;
}

.footer-mission {
    font-size: 0.9rem;
    color: #94a3b8;
    max-width: 360px;
    line-height: 1.6;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 20px 30px;
    max-width: 600px;
}

.footer-links a {
    color: #94a3b8;
    font-size: 0.95rem;
    transition: var(--transition-fast);
}

.footer-links a:hover {
    color: #ffffff;
    transform: translateX(2px);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    color: #64748b;
    font-size: 0.9rem;
}

/* --- Responsive Adjustments for Navbar and Hero --- */
@media (max-width: 992px) {
    .hero-card-showcase {
        width: 320px;
        height: 440px;
    }
    .card-experience {
        right: -20px;
    }
    .card-pedagogy {
        left: -20px;
    }
    .card-students {
        left: -20px;
    }
}

@media (max-width: 768px) {
    .nav-logo {
        gap: 10px;
    }
    .nav-avatar-wrapper {
        width: 42px;
        height: 42px;
    }
    .nav-logo-brand .logo-text {
        font-size: 1.15rem;
    }
    .nav-logo-brand .logo-tagline {
        font-size: 0.65rem;
    }
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }
    .hero-highlights {
        align-items: center;
    }
    .hero-buttons {
        justify-content: center;
    }
    .hero-card-showcase {
        width: 290px;
        height: 390px;
        margin-top: 20px;
    }
    .hero-floating-card {
        padding: 8px 12px;
        gap: 8px;
    }
    .hero-floating-card .card-icon {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
    .hero-floating-card .card-val {
        font-size: 0.85rem;
    }
    .hero-floating-card .card-lbl {
        font-size: 0.65rem;
    }
    .card-students {
        display: none;
    }
    .about-content {
        grid-template-columns: 1fr;
    }
    .about-photo-img {
        height: 320px;
    }
    .about-badge-card {
        right: 0;
        bottom: -15px;
        padding: 10px 14px;
    }
    .footer-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 30px;
    }
}

@media (max-width: 480px) {
    .nav-logo-brand .logo-tagline {
        display: none;
    }
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }
    .hero-buttons .btn {
        width: 100%;
        justify-content: center;
    }
    .card-experience {
        right: -10px;
    }
    .card-pedagogy {
        left: -10px;
    }
}

