/* ==========================================================================
   KALIMAT & SHAREK MASTER CSS (v2.0.0)
   Centralised UI Components for all Educational Tools & Homepage
   - Update: Integrated Kalimat Homepage (v2) styles to eliminate inline CSS.
   - Update: Fixed corrupted SVG strings and merged .theme-student.
   ========================================================================== */

/* --- 1. Brand Variables & Core Palette --- */
:root {
    /* Kalimat Core Tools */
    --brand-primary: #06b6d4;       /* Cyan 500 */
    --brand-primary-hover: #0891b2; /* Cyan 600 */
    --brand-primary-light: rgba(6, 182, 212, 0.1);
    --brand-bg-light: #ecfeff;      /* Cyan 50 */

    /* Homepage Extended Palette */
    --k-cyan-50: #ecfeff; --k-cyan-100: #cffafe; --k-cyan-300: #67e8f9; --k-cyan-400: #22d3ee; --k-cyan-500: #06b6d4; --k-cyan-600: #0891b2;
    --k-indigo-50: #eef2ff; --k-indigo-100: #e0e7ff; --k-indigo-300: #a5b4fc; --k-indigo-400: #818cf8; --k-indigo-500: #6366f1; --k-indigo-600: #4f46e5; --k-indigo-800: #3730a3; --k-indigo-900: #312e81;
    --k-slate-50: #f8fafc; --k-slate-100: #f1f5f9; --k-slate-200: #e2e8f0; --k-slate-300: #cbd5e1; --k-slate-400: #94a3b8; --k-slate-500: #64748b; --k-slate-600: #475569; --k-slate-700: #334155; --k-slate-800: #1e293b; --k-slate-900: #0f172a;
    --k-emerald-50: #ecfdf5; --k-emerald-100: #d1fae5; --k-emerald-400: #34d399; --k-emerald-500: #10b981; --k-emerald-600: #059669;
    --k-amber-50: #fffbeb; --k-amber-100: #fef3c7; --k-amber-400: #fbbf24; --k-amber-500: #f59e0b; --k-amber-600: #d97706; --k-amber-950: #451a03;
    --k-rose-50: #fff1f2; --k-rose-100: #ffe4e6; --k-rose-500: #f43f5e; --k-rose-600: #e11d48;
    --k-red-400: #f87171; --k-red-500: #ef4444;
    --k-purple-50: #faf5ff; --k-purple-100: #f3e8ff; --k-purple-500: #a855f7; --k-purple-600: #9333ea;
    --k-blue-100: #dbeafe; --k-blue-500: #3b82f6; --k-blue-600: #2563eb;
}

/* Kalimat Student Override (Indigo) */
.theme-student {
    --brand-primary: #6366f1;       /* Indigo 500 */
    --brand-primary-hover: #4f46e5; /* Indigo 600 */
    --brand-primary-light: rgba(99, 102, 241, 0.12);
    --brand-bg-light: #e0e7ff;      /* Indigo 50 */
}

/* Sharek Override (Blue) */
.theme-sharek {
    --brand-primary: #00aeef;       /* Sharek Custom Blue */
    --brand-primary-hover: #0096ce; /* Slightly darker */
    --brand-primary-light: rgba(0, 174, 239, 0.1);
    --brand-bg-light: #e5f7fd;      /* Light tint */
}

/* --- 2. Base Typography & Global Layout --- */
body {
    font-family: 'Inter', 'Poppins', sans-serif;
    background-color: #f8fafc; /* Slate 50 */
    color: #1e293b; /* Slate 800 */
}

.native-text { font-family: 'Poppins', sans-serif !important; }

[lang="ar"], .arabic-text {
    font-family: 'Noto Kufi Arabic', 'Amiri', sans-serif;
    direction: rtl !important;
    text-align: right !important;
}

.scripture-display-text {
    font-family: 'Amiri', serif;
    line-height: 1.8;
}

/* Primary Mode Typography Overrides */
.primary-mode { font-family: 'Fredoka', 'Poppins', sans-serif !important; }
.primary-mode .arabic-text { font-family: 'Noto Kufi Arabic', sans-serif; font-weight: 700; }

.bidi-text-container { unicode-bidi: plaintext; text-align: start; }

/* --- 3. Core UI Components (Shared) --- */
.glass-card {
    background: white;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.input-field {
    width: 100% !important;
    min-height: 3.5rem !important;
    padding: 0 1rem !important;
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 1rem;
    outline: none;
    transition: all 0.2s ease-in-out;
    display: flex;
    align-items: center;
    font-weight: 600;
    color: #334155;
}

.input-field:focus {
    border-color: var(--brand-primary) !important;
    box-shadow: 0 0 0 4px var(--brand-primary-light) !important;
    background-color: #ffffff;
}

textarea.input-field {
    padding: 1.25rem !important;
    min-height: 150px !important;
    line-height: 1.8;
    resize: vertical;
}

select.input-field {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.25rem;
    padding-right: 3rem !important;
}

.btn-brand {
    background-color: var(--brand-primary);
    color: white;
    transition: all 0.2s ease-in-out;
}
.btn-brand:hover {
    background-color: var(--brand-primary-hover);
}

.btn-main-action {
    padding: 1.25rem;
    border-radius: 1.25rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: white;
}
.btn-generate { background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-hover) 100%); }
.btn-slides { background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%); }
.btn-main-action:hover { transform: scale(1.02); filter: brightness(1.1); }
.btn-main-action:active { transform: scale(0.98); }

.multi-pill {
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    padding: 0.6rem 1rem;
    background: white;
    font-size: 0.85rem;
    font-weight: 700;
    color: #64748b;
}
.multi-pill.active {
    background-color: var(--brand-primary);
    color: white;
    border-color: var(--brand-primary-hover);
    box-shadow: 0 4px 12px var(--brand-primary-light);
}

/* Virtual Keyboard (Shared) */
.kb-key {
    width: 2.8rem;
    height: 2.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    font-family: 'Noto Kufi Arabic', sans-serif;
    font-weight: bold;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.1s;
    box-shadow: 0 2px 0 #e2e8f0;
}
.kb-key:hover { background: var(--brand-bg-light); border-color: var(--brand-primary); transform: translateY(-1px); }
.kb-key:active { transform: translateY(1px); box-shadow: none; }

/* File Upload Zone (Shared) */
.upload-zone {
    transition: all 0.3s ease;
    border: 2px dashed #cbd5e1;
    border-radius: 1rem;
    background-color: #f9fafb;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 120px;
}
.upload-zone:hover {
    border-color: var(--brand-primary);
    background-color: var(--brand-bg-light);
}

/* --- 4. Animations & Utilities --- */
@keyframes spin-custom {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.animate-spin-custom { animation: spin-custom 1s linear infinite; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; border-radius: 4px; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
.chat-scroll::-webkit-scrollbar { width: 6px; }

#debug-panel { display: none; position: fixed; bottom: 0; left: 0; right: 0; background: #0f172a; color: #10b981; padding: 12px; font-family: 'Courier New', monospace; font-size: 11px; z-index: 9999; max-height: 200px; overflow-y: auto; border-top: 2px solid #1e293b; }


/* --- 5. FRONT PAGE (HOMEPAGE) SPECIFIC CSS --- */
.k-home-wrapper { font-family: 'Inter', sans-serif; background-color: var(--k-slate-50); color: var(--k-slate-700); overflow-x: hidden; width: 100%; box-sizing: border-box; line-height: 1.5; }
.k-home-wrapper * { box-sizing: border-box; }
.k-poppins { font-family: 'Poppins', sans-serif; }
.k-section { padding: 4rem 1.5rem; width: 100%; max-width: 80rem; margin: 0 auto; }
.k-text-balance { text-wrap: balance; }

@keyframes k-blob { 0% { transform: translate(0px, 0px) scale(1); } 33% { transform: translate(30px, -50px) scale(1.1); } 66% { transform: translate(-20px, 20px) scale(0.9); } 100% { transform: translate(0px, 0px) scale(1); } }
.k-animate-blob { animation: k-blob 10s infinite alternate; }
.k-delay-2000 { animation-delay: 2s; }
.k-delay-4000 { animation-delay: 4s; }
@keyframes k-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }
.k-animate-pulse { animation: k-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }
@keyframes k-spin { to { transform: rotate(360deg); } }
.k-animate-spin { animation: k-spin 1s linear infinite; }

.k-hero { position: relative; padding: 6rem 1.5rem 8rem; text-align: center; overflow: hidden; background: var(--k-slate-900); border-radius: 0 0 4rem 4rem; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25); width: 100%; }
.k-hero-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.k-hero-blob-1 { position: absolute; top: -10%; left: -10%; width: 24rem; height: 24rem; background: var(--k-cyan-500); border-radius: 50%; mix-blend-mode: screen; filter: blur(100px); opacity: 0.4; }
.k-hero-blob-2 { position: absolute; top: 20%; right: -10%; width: 31rem; height: 31rem; background: var(--k-indigo-600); border-radius: 50%; mix-blend-mode: screen; filter: blur(120px); opacity: 0.4; }
.k-hero-blob-3 { position: absolute; bottom: -20%; left: 20%; width: 37rem; height: 37rem; background: #c026d3; border-radius: 50%; mix-blend-mode: screen; filter: blur(150px); opacity: 0.3; }
.k-hero-grid { position: absolute; inset: 0; background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTAgMGg0MHY0MEgwVjB6bTIwIDIwaDIwdjIwSDIwdi0yMHptLTIwIDBWMGgyMHYyMEgwem0wIDIwaDIwdi0yMEgwdjIwem0yMC0yMFYwaDIwdjIwSDIweiIgZmlsbD0iI2ZmZmZmZiIgZmlsbC1vcGFjaXR5PSIwLjAyIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4='); opacity: 0.2; }
.k-hero-content { position: relative; z-index: 10; display: flex; flex-direction: column; align-items: center; }
.k-hero-badge { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.5rem 1rem; border-radius: 9999px; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); backdrop-filter: blur(12px); margin-bottom: 2rem; }
.k-hero-title { font-size: 3rem; font-weight: 900; color: white; line-height: 1.1; margin-bottom: 1.5rem; letter-spacing: -0.025em; text-shadow: 0 4px 6px rgba(0,0,0,0.1); }
@media(min-width: 768px) { .k-hero-title { font-size: 4.5rem; } }
.k-text-gradient { background: linear-gradient(to right, var(--k-cyan-400), var(--k-indigo-300)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; font-style: italic; display: inline-block; }
.k-hero-desc { font-size: 1.125rem; color: var(--k-slate-300); max-width: 56rem; margin: 0 auto 2.5rem; line-height: 1.625; font-weight: 500; }
@media(min-width: 768px) { .k-hero-desc { font-size: 1.25rem; } }
.k-hero-checks { display: flex; flex-direction: column; gap: 1rem; justify-content: center; align-items: center; font-size: 0.6875rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.1em; color: var(--k-slate-800); margin-bottom: 3rem; }
@media(min-width: 640px) { .k-hero-checks { flex-direction: row; } }
.k-check-pill { background: white; padding: 0.75rem 1.5rem; border-radius: 9999px; box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1); display: flex; align-items: center; gap: 0.5rem; transition: transform 0.2s; cursor: default; }
.k-check-pill:hover { transform: translateY(-4px); }
.k-privacy-banner { width: 100%; max-width: 28rem; margin: 0 auto; background: rgba(15, 23, 42, 0.5); backdrop-filter: blur(24px); border: 1px solid var(--k-slate-700); box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25); padding: 1.25rem; border-radius: 1.5rem; display: flex; align-items: center; justify-content: center; gap: 1.25rem; transition: border-color 0.3s; }
.k-privacy-banner:hover { border-color: rgba(16, 185, 129, 0.5); }
.k-arena-wrap { padding: 4rem 1.5rem; position: relative; z-index: 20; margin-top: -2.5rem; width: 100%; }
.k-arena-card { background: linear-gradient(to bottom right, var(--k-indigo-600), var(--k-blue-600), var(--k-cyan-500)); border-radius: 3rem; padding: 2.5rem; color: white; box-shadow: 0 20px 50px -12px rgba(79,70,229,0.5); overflow: hidden; display: flex; flex-direction: column; gap: 3rem; border: 4px solid white; position: relative; max-width: 80rem; margin: 0 auto; }
@media(min-width: 768px) { .k-arena-card { flex-direction: row; padding: 4rem; align-items: center; } }
.k-arena-content { position: relative; z-index: 10; flex: 1; }
.k-arena-title { font-size: 2.25rem; font-weight: 900; margin-bottom: 1rem; letter-spacing: -0.025em; line-height: 1; }
@media(min-width: 768px) { .k-arena-title { font-size: 3.75rem; } }
.k-arena-desc { font-size: 1.125rem; font-weight: 500; color: var(--k-blue-100); margin-bottom: 2rem; line-height: 1.625; max-width: 42rem; }
.k-arena-actions { display: flex; flex-direction: column; gap: 1rem; }
@media(min-width: 640px) { .k-arena-actions { flex-direction: row; } }
.k-btn-arena-white { background: white; color: var(--k-indigo-900); padding: 1rem 2rem; border-radius: 1rem; font-weight: 900; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; transition: all 0.2s; box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1); display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; text-decoration: none; }
.k-btn-arena-white:hover { background: var(--k-cyan-50); }
.k-btn-arena-dark { background: var(--k-indigo-900); color: white; border: 2px solid var(--k-indigo-500); padding: 1rem 2rem; border-radius: 1rem; font-weight: 900; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; transition: all 0.2s; box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1); display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; text-decoration: none; }
.k-btn-arena-dark:hover { background: var(--k-indigo-800); }
.k-arena-mockup-wrap { position: relative; z-index: 10; flex: 1; display: none; justify-content: center; width: 100%; perspective: 1000px; }
@media(min-width: 768px) { .k-arena-mockup-wrap { display: flex; } }
.k-arena-mockup { background: var(--k-slate-900); border-radius: 2.5rem; padding: 1.5rem; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5); transform: rotate(-2deg); transition: transform 0.5s; width: 100%; max-width: 24rem; border-top: 4px solid var(--k-slate-700); height: 380px; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.k-arena-mockup:hover { transform: rotate(0deg); }
.k-grid-container { display: grid; grid-template-columns: 1fr; gap: 2rem; width: 100%; }
@media(min-width: 768px) { .k-grid-container { grid-template-columns: repeat(2, 1fr); } }
@media(min-width: 1024px) { .k-grid-container { grid-template-columns: repeat(3, 1fr); } }
.k-app-card { background: white; padding: 2rem; border-radius: 2.5rem; border: 1px solid var(--k-slate-200); box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.k-app-card:hover { transform: translateY(-8px); box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1); border-color: var(--k-cyan-200); }
.k-app-icon { width: 3.5rem; height: 3.5rem; border-radius: 1rem; display: flex; align-items: center; justify-content: center; margin-bottom: 1.5rem; font-size: 1.5rem; }
.k-process-section { padding: 5rem 1.5rem; width: 100%; }
.k-process-card { background: var(--k-slate-900); color: white; border-radius: 4rem; overflow: hidden; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25); position: relative; width: 100%; max-width: 80rem; margin: 0 auto; padding: 3rem 1.5rem; }
@media(min-width: 768px) { .k-process-card { padding: 4rem 3rem; } }
.k-process-stage { width: 100%; height: 220px; background: rgba(30, 41, 59, 0.4); border-radius: 2.5rem; border: 1px solid rgba(51, 65, 85, 0.5); margin-bottom: 4rem; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(12px); box-shadow: inset 0 2px 4px rgba(0,0,0,0.06); }
.k-process-grid { display: grid; grid-template-columns: 1fr; gap: 3rem; text-align: center; width: 100%; }
@media(min-width: 768px) { .k-process-grid { grid-template-columns: repeat(3, 1fr); } }
.k-step-number { -webkit-text-stroke: 2px rgba(34, 211, 238, 0.6); color: transparent; position: absolute; top: -2rem; left: 50%; transform: translateX(-50%); font-size: 4.5rem; font-weight: 900; transition: all 0.5s; }
.k-cta-card { background: linear-gradient(to right, var(--k-cyan-500), var(--k-indigo-500)); border-radius: 3rem; overflow: hidden; padding: 2.5rem 1.5rem; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25); text-align: center; width: 100%; max-width: 80rem; margin: 0 auto; position: relative; }
@media(min-width: 768px) { .k-cta-card { padding: 4rem; } }
.k-btn-cta { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; background: var(--k-cyan-300); color: var(--k-slate-900); font-weight: 900; padding: 1.25rem 2.5rem; border-radius: 1rem; box-shadow: 0 0 30px rgba(103,232,249,0.5); transition: all 0.2s; font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.1em; text-decoration: none; }
.k-btn-cta:hover { background: white; transform: translateY(-2px); }
.k-diff-grid { display: grid; grid-template-columns: 1fr; gap: 4rem; align-items: center; width: 100%; }
@media(min-width: 1024px) { .k-diff-grid { grid-template-columns: repeat(2, 1fr); } }
.k-tag { font-size: 0.625rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.2em; margin-bottom: 0.5rem; display: block; }
.k-h2 { font-size: 1.875rem; font-weight: 900; color: var(--k-slate-800); margin-bottom: 2rem; line-height: 1.1; letter-spacing: -0.025em; }
@media(min-width: 768px) { .k-h2 { font-size: 3rem; } }
.transition-all { transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 500ms; }
.opacity-0 { opacity: 0; } .opacity-40 { opacity: 0.4; } .opacity-100 { opacity: 1; }
.scale-95 { transform: scale(0.95); } .scale-100 { transform: scale(1); } .scale-105 { transform: scale(1.05); }
.translate-y-10 { transform: translateY(2.5rem); } .translate-y-0 { transform: translateY(0); }
.pointer-events-none { pointer-events: none; }


/* --- 6. Tool-Specific Components --- */

/* [TOOL] MFL WORKSHEET GENERATOR */
.worksheet-section { page-break-inside: avoid; margin-bottom: 3.5rem; }

/* [TOOL] E.P.I. RESOURCE BUILDER */
.epi-table { width: 100%; border-collapse: collapse; border-radius: 1rem; overflow: hidden; border: 2px solid #cbd5e1; table-layout: fixed; }
.epi-table th { background-color: var(--brand-bg-light); color: var(--brand-primary-hover); font-weight: 800; text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.05em; padding: 1rem; border: 2px solid #cbd5e1; }
.epi-table td { border: 2px solid #cbd5e1; padding: 1.25rem; vertical-align: top; text-align: center; background-color: #ffffff; }
.chunk-box { padding-bottom: 1rem; margin-bottom: 1rem; border-bottom: 1px dashed #e2e8f0; }
.chunk-box:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

/* [TOOL] GRADING RUBRIC */
.rubric-table { width: 100%; border-collapse: collapse; border-radius: 1rem; overflow: hidden; }
.rubric-table th, .rubric-table td { border: 1px solid #e2e8f0; padding: 1.25rem; vertical-align: top; }
.rubric-table th { background-color: #f8fafc; font-weight: 800; text-transform: uppercase; font-size: 0.7rem; letter-spacing: 0.05em; color: #64748b; }

/* [TOOL] RS WORKSHEET */
.color-word { font-size: 5rem; color: white; -webkit-text-stroke: 3px #cbd5e1; text-align: center; font-weight: 900; display: block; margin: 1.5rem 0; font-family: 'Noto Kufi Arabic', sans-serif; }

/* [TOOL] LESSON PLAN GENERATOR */
.bilingual-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
@media (max-width: 768px) { .bilingual-grid { grid-template-columns: 1fr; gap: 1rem; } }

/* [TOOL] MFL LISTENING COMPREHENSION */
.quiz-option { display: block; padding: 1.25rem; border: 2px solid #e2e8f0; border-radius: 1.25rem; margin-bottom: 0.75rem; cursor: pointer; transition: all 0.2s; background: white; font-weight: 600; color: #475569; }
.quiz-option:hover { background-color: #f8fafc; border-color: #cbd5e1; }
.quiz-option.correct { background-color: #f0fdf4 !important; border-color: #22c55e !important; color: #166534 !important; }
.quiz-option.incorrect { background-color: #fef2f2 !important; border-color: #ef4444 !important; color: #991b1b !important; }

/* [TOOL] MFL SCHEME OF WORK MAPPER */
.week-card { border-left: 6px solid var(--brand-primary); transition: transform 0.2s; }
.vocab-badge { background-color: #f1f5f9; color: #475569; padding: 4px 12px; border-radius: 8px; font-size: 0.75rem; font-weight: 700; display: inline-block; border: 1px solid #e2e8f0; }

/* [TOOL] MFL TEXT ANALYSER */
.step-item { position: relative; padding-left: 2.5rem; padding-bottom: 1.5rem; }
.step-item::before { content: ''; position: absolute; left: 0.75rem; top: 0; bottom: 0; width: 2px; background: #e2e8f0; }
.step-item:last-child::before { display: none; }
.step-dot { position: absolute; left: 0; top: 0.25rem; width: 1.5rem; height: 1.5rem; background: var(--brand-primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; font-size: 0.65rem; font-weight: bold; z-index: 10; }

.mindmap { padding: 2rem 2rem 3rem 2rem; border: 1px solid #e5e7eb; border-radius: 1.5rem; background: #fafafa; overflow: auto; text-align: center; white-space: nowrap; }
.mindmap-tree, .mindmap-tree ul, .mindmap-tree li { margin: 0; padding: 0; list-style-type: none; position: relative; }
.mindmap-tree { display: inline-block; vertical-align: top; }
.mindmap-tree ul { display: flex; justify-content: center; padding-top: 20px; position: relative; }
.mindmap-tree li { float: left; text-align: center; list-style-type: none; position: relative; padding: 20px 10px 0 10px; transition: all 0.5s; }
.mindmap-tree li::before, .mindmap-tree li::after { content: ''; position: absolute; top: 0; right: 50%; border-top: 2px solid var(--brand-primary); width: 50%; height: 20px; }
.mindmap-tree li::after { right: auto; left: 50%; border-left: 2px solid var(--brand-primary); }
.mindmap-tree li:only-child::after, .mindmap-tree li:only-child::before { display: none; }
.mindmap-tree li:only-child { padding-top: 0; }
.mindmap-tree li:first-child::before, .mindmap-tree li:last-child::after { border: 0 none; }
.mindmap-tree li:last-child::before { border-right: 2px solid var(--brand-primary); border-radius: 0 5px 0 0; }
.mindmap-tree li:first-child::after { border-radius: 5px 0 0 0; }
.mindmap-tree ul ul::before { content: ''; position: absolute; top: 0; left: 50%; border-left: 2px solid var(--brand-primary); width: 0; height: 20px; }
.mindmap-node { padding: 0.75rem 1.25rem; text-decoration: none; color: #1f2937; background-color: #ffffff; border: 2px solid var(--brand-primary); display: inline-block; border-radius: 0.75rem; min-width: 120px; max-width: 200px; white-space: normal; box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1); transition: all 0.3s; font-size: 0.85rem; position: relative; z-index: 10; }
.mindmap-node.center { background-color: var(--brand-primary); color: white; font-weight: bold; font-size: 1rem; padding: 1rem; }
.mindmap-node:hover { transform: scale(1.05); background: var(--brand-bg-light); z-index: 20; }

/* [TOOL] MFL STUDENT REPORT WRITER */
.report-paper { background: #fff; padding: 3rem; border: 1px solid #e2e8f0; box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1); font-family: 'Times New Roman', serif; line-height: 1.8; color: #000; font-size: 1.1rem; }

/* [TOOL] MFL SMART CORRECTOR & WRITING FEEDBACK ASSISTANT */
.focus-pill { cursor: pointer; transition: all 0.2s ease-in-out; }
.focus-pill.active { background-color: var(--brand-primary); color: white; border-color: var(--brand-primary-hover); box-shadow: 0 4px 10px var(--brand-primary-light); }
.focus-pill:not(.active) { background-color: #f8fafc; color: #475569; border-color: #e2e8f0; }
.focus-pill:hover:not(.active) { background-color: #f1f5f9; border-color: #cbd5e1; }
.diff-deleted { color: #ef4444; text-decoration: line-through; background-color: #fee2e2; padding: 0 4px; border-radius: 4px; margin: 0 2px; }
.diff-inserted { color: #10b981; background-color: #d1fae5; padding: 0 4px; border-radius: 4px; margin: 0 2px; font-weight: 700; }
.report-section-title { border-left: 4px solid var(--brand-primary); padding-left: 1rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.85rem; color: #475569; margin-bottom: 1.5rem; display: flex; align-items: center; gap: 0.5rem; }

/* [TOOL] MFL LESSON TEMPLATE FILLER */
.lesson-sheet { background: white; padding: 3rem; border-radius: 0.5rem; box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1); max-width: 1100px; margin: 0 auto; }
.mirror-table { width: 100%; border-collapse: collapse; border: 3px solid #1e293b; table-layout: fixed; }
.mirror-table td { border: 2px solid #cbd5e1; padding: 1.25rem; vertical-align: top; word-wrap: break-word; overflow-wrap: break-word; }
.header-bg { background-color: #f8fafc; border-bottom: 3px solid #1e293b !important; }
.cell-label { font-size: 0.65rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.12em; color: var(--brand-primary); display: block; margin-bottom: 0.5rem; line-height: 1.2; }
.cell-content { font-size: 0.9rem; line-height: 1.6; color: #1e293b; font-weight: 500; }

/* [TOOL] MFL TEACHER TRAINING BOARD */
.form-select-fix { 
    min-height: 4.25rem !important; 
    padding: 0.75rem 1.5rem !important; 
    background-color: #ffffff; 
    border: 2px solid #cbd5e1 !important; 
    border-radius: 1.5rem !important; 
    width: 100% !important; 
    display: block !important;
    font-size: 1.125rem !important;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    color: #1e293b;
}
.form-select-fix:focus { border-color: var(--brand-primary) !important; outline: none; box-shadow: 0 0 0 4px var(--brand-primary-light); }
.training-card { transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.training-card:hover { transform: translateY(-6px); border-color: var(--brand-primary); box-shadow: 0 20px 25px -5px var(--brand-primary-light); }

/* [DASHBOARD] TEACHER HUB / ACTIVITY LOGGER */
.nav-link { transition: all 0.2s; border-bottom: 3px solid transparent; }
.nav-link.active { border-bottom-color: var(--brand-primary); color: var(--brand-primary); }

/* Remove underlines completely from dashboard cards */
.tool-card, .tool-card:hover { text-decoration: none !important; }

.stat-bar-bg { background-color: #f1f5f9; border-radius: 9999px; height: 8px; width: 100%; overflow: hidden; }
.stat-bar-fill { background-color: var(--brand-primary); height: 100%; border-radius: 9999px; transition: width 1s ease-out; }

.item-checkbox {
    width: 1.25rem; height: 1.25rem; border-radius: 0.35rem; border: 2px solid #cbd5e1;
    cursor: pointer; appearance: none; display: inline-block; vertical-align: middle;
    background-color: #fff; transition: all 0.2s;
}
/* Fixed corrupted SVG string */
.item-checkbox:checked {
    background-color: var(--brand-primary); border-color: var(--brand-primary);
    background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e");
}

.filter-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 1rem center; background-size: 1rem;
}

/* --- 7. Unified Print Styles --- */
@media print {
    .no-print { display: none !important; }
    body { background-color: #fff !important; height: auto; min-height: 0; }
    .glass-card { box-shadow: none !important; border: 1px solid #eee !important; padding: 0; }
    
    #outputSection, #outputContainer { display: block !important; }
    .chat-scroll { overflow: visible; height: auto; }
    
    /* EPI Print */
    .epi-table { border: 2px solid #000; }
    .epi-table th, .epi-table td { border: 1px solid #000; }
    .page-break-before { page-break-before: always; }
    .page-break-avoid { page-break-inside: avoid; }

    /* RS Print */
    .color-word { -webkit-text-stroke: 3px #000; }
    
    /* Lesson Plan Print */
    .bilingual-grid { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 1rem !important; }
    .plan-section { page-break-inside: avoid; border-bottom: 1px solid #eee; padding-bottom: 1rem; margin-bottom: 1rem; }

    /* Listening Print */
    .print-transcript { display: block !important; border-top: 2px dashed #e2e8f0; padding-top: 2rem; margin-top: 2rem; }

    /* Worksheet Generator Print */
    .worksheet-tool-body * { visibility: hidden; }
    .worksheet-tool-body #outputContainer, 
    .worksheet-tool-body #outputContainer * { visibility: visible; }
    .worksheet-tool-body #outputContainer { position: absolute; left: 0; top: 0; width: 100%; margin: 0; padding: 0; }
    #answerKey { display: block !important; visibility: visible !important; border-top: 2px dashed #000; padding-top: 2rem; }
    .page-break { page-break-before: always; }

    /* Report Writer Print */
    .report-paper { border: none; box-shadow: none; padding: 0; width: 100%; margin: 0; }

    /* Template Filler Print */
    .lesson-sheet { border: none; box-shadow: none; width: 100%; max-width: none; padding: 0; }
    .mirror-table { border: 3px solid #000; }
    .mirror-table td { border: 2px solid #000; }
}