/* ============================================================
   Sistema de Avaliações — SENAI-SP
   Design System & Styles
   Paleta: Laranja SENAI #E84910 + Azul Escuro #1B3A5C
   ============================================================ */

/* ---- Google Fonts Import ---- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ============================================================
   CSS Custom Properties (Design Tokens)
   ============================================================ */
:root {
    /* Paleta SENAI */
    --senai-orange: #E84910;
    --senai-orange-dark: #C73D0D;
    --senai-orange-light: #FF6B35;
    --senai-orange-glow: rgba(232, 73, 16, 0.15);
    --senai-blue: #1B3A5C;
    --senai-blue-dark: #0F2440;
    --senai-blue-light: #2A5580;

    /* Neutros */
    --bg-primary: #F5F6FA;
    --bg-secondary: #FFFFFF;
    --bg-dark: #0F1923;
    --surface: #FFFFFF;
    --surface-hover: #F8F9FC;
    --surface-active: #F0F1F5;

    /* Texto */
    --text-primary: #1A1A2E;
    --text-secondary: #6B7280;
    --text-muted: #9CA3AF;
    --text-inverse: #FFFFFF;

    /* Status */
    --success: #10B981;
    --success-bg: rgba(16, 185, 129, 0.1);
    --warning: #F59E0B;
    --warning-bg: rgba(245, 158, 11, 0.1);
    --error: #EF4444;
    --error-bg: rgba(239, 68, 68, 0.1);
    --info: #3B82F6;
    --info-bg: rgba(59, 130, 246, 0.1);

    /* Borders */
    --border: #E5E7EB;
    --border-light: #F3F4F6;
    --border-focus: var(--senai-orange);

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    --shadow-glow: 0 0 20px rgba(232, 73, 16, 0.2);

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;

    /* Radii */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Z-Index Scale */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-modal-backdrop: 400;
    --z-modal: 500;
    --z-toast: 600;
    --z-timer: 700;
}

/* ============================================================
   Reset & Base
   ============================================================ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: var(--senai-orange);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--senai-orange-dark);
}

code,
pre {
    font-family: var(--font-mono);
    font-size: 0.875em;
}

pre {
    background: var(--bg-dark);
    color: #E2E8F0;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    overflow-x: auto;
    line-height: 1.7;
}

code {
    background: rgba(232, 73, 16, 0.08);
    color: var(--senai-orange-dark);
    padding: 0.15em 0.4em;
    border-radius: 4px;
    font-weight: 500;
}

pre code {
    background: none;
    color: inherit;
    padding: 0;
    border-radius: 0;
    font-weight: 400;
}

::selection {
    background: var(--senai-orange);
    color: white;
}

/* ============================================================
   Login Page
   ============================================================ */
.login-page {
    display: flex;
    min-height: 100vh;
    /* Degradê radial expandido, com raio branco de 30% cobrindo o texto abaixo da logo */
    background: radial-gradient(circle at 28% 50%, #FFFFFF 0%, rgba(255, 255, 255, 0.95) 30%, rgba(27, 58, 92, 0.8) 65%, var(--senai-blue-dark) 100%);
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 80%;
    height: 200%;
    background: radial-gradient(circle, rgba(232, 73, 16, 0.08) 0%, transparent 70%);
    animation: loginGlow 8s ease-in-out infinite alternate;
}

@keyframes loginGlow {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(-5%, 5%) scale(1.1);
    }
}

.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

/* ============================================================
   Horizontal / Split-screen Login Layout
   ============================================================ */
.login-horizontal-container {
    display: flex;
    width: 100%;
    max-width: 1100px;
    margin: auto;
    padding: 2rem;
    gap: 3rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.login-left-panel {
    flex: 1.1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-inverse);
    padding: 2rem;
    animation: fadeInRight 0.6s ease-out;
    background: transparent;
    /* Transparente para usar o fundo da página */
}

.login-right-panel {
    flex: 0.9;
    display: flex;
    justify-content: center;
    animation: fadeInLeft 0.6s ease-out;
    width: 100%;
    max-width: 500px;
}

.login-large-logo-wrapper {
    background: transparent;
    /* Div invisível */
    border: none;
    box-shadow: none;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0rem;
    max-width: 500px;
    width: 100%;
    transition: transform var(--transition-base);
}

.login-large-logo-wrapper:hover {
    transform: scale(1.1);
    /* Efeito suave de zoom ao passar o mouse */
}

.logo-img-large {
    max-width: 100%;
    height: auto;
    max-height: 380px;
    /* Logo ainda maior */
    object-fit: contain;
}

.login-welcome-text h2 {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 0rem;
    letter-spacing: -0.03em;
    color: var(--senai-blue-dark);
    /* Azul escuro do SENAI para contraste no fundo branco */
}

.login-welcome-text p {
    font-size: 1.1rem;
    color: var(--senai-blue-light);
    /* Azul médio do SENAI para contraste no fundo branco */
    font-weight: 500;
}

.login-text-animate {
    animation: textRevealUp 0.8s cubic-bezier(0.25, 1, 0.5, 1) both;
}

@keyframes textRevealUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Keyframes */
@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsividade do Layout Horizontal */
@media (max-width: 850px) {
    .login-horizontal-container {
        flex-direction: column;
        gap: 1.5rem;
        padding: 1.5rem;
    }

    .login-left-panel {
        padding: 2rem 1rem;
        flex: none;
        width: 100%;
        background: transparent;
        /* Mantém transparente */
    }

    .login-page {
        /* No mobile, o degradê radial é centrado no topo com maior raio (35%) para cobrir texto debaixo da logo */
        background: radial-gradient(circle at 50% 28%, #FFFFFF 0%, rgba(255, 255, 255, 0.95) 35%, rgba(27, 58, 92, 0.8) 70%, var(--senai-blue-dark) 100%);
    }

    .login-right-panel {
        width: 100%;
        flex: none;
    }

    .login-large-logo-wrapper {
        margin-bottom: 1.5rem;
        max-width: 420px;
    }

    .logo-img-large {
        max-height: 200px;
    }

    .login-welcome-text h2 {
        font-size: 1.75rem;
    }

    .login-welcome-text p {
        font-size: 0.95rem;
    }
}

.login-card {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-xl);
    padding: 3rem 2.5rem;
    width: 100%;
    box-shadow: var(--shadow-xl), 0 0 60px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo .logo-icon {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, var(--senai-orange), var(--senai-orange-light));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 2rem;
    color: white;
    font-weight: 800;
    box-shadow: 0 8px 24px rgba(232, 73, 16, 0.3);
}

.logo-container-img {
    margin: 0 auto 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 100%;
}

.logo-img-login {
    max-width: 100%;
    height: auto;
    max-height: 80px;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.08));
    transition: transform var(--transition-base);
}

.logo-img-login:hover {
    transform: scale(1.03);
}

.logo-img-header {
    height: 32px;
    max-width: 160px;
    object-fit: contain;
    transition: transform var(--transition-fast);
}

.logo-img-header:hover {
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .logo-img-header {
        max-width: 110px;
        height: 28px;
    }
}

.login-logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.login-logo .subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.login-info {
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border);
}

.login-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0;
    font-size: 0.85rem;
}

.login-info-row:not(:last-child) {
    border-bottom: 1px solid var(--border-light);
}

.login-info-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.login-info-value {
    color: var(--text-primary);
    font-weight: 600;
    text-align: right;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-size: 0.9375rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
    line-height: 1.4;
    position: relative;
    overflow: hidden;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: linear-gradient(135deg, var(--senai-orange), var(--senai-orange-dark));
    color: white;
    box-shadow: 0 4px 14px rgba(232, 73, 16, 0.35);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(232, 73, 16, 0.45);
    transform: translateY(-1px);
    color: white;
}

.btn-secondary {
    background: var(--senai-blue);
    color: white;
    box-shadow: 0 4px 14px rgba(27, 58, 92, 0.25);
}

.btn-secondary:hover {
    background: var(--senai-blue-dark);
    color: white;
}

.btn-outline {
    background: transparent;
    color: var(--senai-orange);
    border: 2px solid var(--senai-orange);
}

.btn-outline:hover {
    background: var(--senai-orange);
    color: white;
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    background: var(--surface-hover);
    color: var(--text-primary);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.0625rem;
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn-google {
    background: white;
    color: #374151;
    border: 2px solid var(--border);
    font-weight: 600;
    padding: 0.875rem 1.5rem;
}

.btn-google:hover {
    border-color: #4285F4;
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.2);
    color: #374151;
}

.btn-google svg {
    width: 20px;
    height: 20px;
}

.login-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    color: var(--text-muted);
    font-size: 0.8125rem;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.dev-login-buttons {
    display: flex;
    gap: 0.75rem;
}

.login-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.login-author {
    font-weight: 600;
    color: var(--text-secondary);
}

/* ============================================================
   Assessment Page Layout
   ============================================================ */
.assessment-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    grid-template-rows: auto 1fr;
    min-height: 100vh;
    gap: 0;
}

/* Timer Header */
.timer-header {
    grid-column: 1 / -1;
    background: var(--senai-blue-dark);
    color: white;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: var(--z-timer);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.timer-header .header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.timer-header .header-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 0.9375rem;
}

.timer-header .header-logo .logo-mark {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--senai-orange), var(--senai-orange-light));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 800;
}

.timer-header .assessment-name {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
}

.timer-display {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.timer-clock {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 0.25rem 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.15);
    min-width: 120px;
    text-align: center;
}

.timer-clock.warning {
    color: var(--warning);
    border-color: rgba(245, 158, 11, 0.4);
    background: rgba(245, 158, 11, 0.1);
    animation: timerPulse 1s ease-in-out infinite;
}

.timer-clock.danger {
    color: var(--error);
    border-color: rgba(239, 68, 68, 0.4);
    background: rgba(239, 68, 68, 0.1);
    animation: timerPulse 0.5s ease-in-out infinite;
}

@keyframes timerPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

.timer-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.save-indicator {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    gap: 0.35rem;
    transition: color var(--transition-fast);
}

.save-indicator.saving {
    color: var(--warning);
}

.save-indicator.saved {
    color: var(--success);
}

.save-indicator.offline {
    color: var(--warning);
    font-weight: 600;
}

.save-indicator.syncing {
    color: var(--senai-blue-light);
    animation: pulse 1.5s infinite;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
}

.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    background: var(--senai-orange);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75rem;
    color: white;
    overflow: hidden;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Sidebar */
.assessment-sidebar {
    background: var(--surface);
    border-right: 1px solid var(--border);
    padding: 1.5rem;
    overflow-y: auto;
    height: calc(100vh - 52px);
    position: sticky;
    top: 52px;
}

.sidebar-title {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.question-nav {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.question-nav-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem 0.75rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    border: 1px solid transparent;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.question-nav-item:hover {
    background: var(--surface-hover);
    color: var(--text-primary);
}

.question-nav-item.active {
    background: var(--senai-orange-glow);
    border-color: var(--senai-orange);
    color: var(--senai-orange);
    font-weight: 600;
}

.question-nav-item.answered {
    color: var(--success);
}

.question-nav-item.answered::after {
    content: '✓';
    margin-left: auto;
    font-size: 0.75rem;
    font-weight: 700;
}

.question-nav-number {
    width: 24px;
    height: 24px;
    border-radius: var(--radius-full);
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6875rem;
    font-weight: 700;
    flex-shrink: 0;
    transition: all var(--transition-fast);
}

.question-nav-item.active .question-nav-number {
    background: var(--senai-orange);
    color: white;
}

.question-nav-item.answered .question-nav-number {
    background: var(--success);
    color: white;
}

.question-nav-type {
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.6;
}

.sidebar-section-label {
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    padding: 1rem 0 0.5rem;
    margin-top: 0.5rem;
    border-top: 1px solid var(--border-light);
}

.sidebar-progress {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}

.progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--bg-primary);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--senai-orange), var(--senai-orange-light));
    border-radius: var(--radius-full);
    transition: width var(--transition-base);
}

.sidebar-actions {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Main Content */
.assessment-main {
    padding: 2rem 3rem;
    overflow-y: auto;
    max-width: 900px;
}

.question-card {
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.question-card.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.question-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.question-number-badge {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.125rem;
    color: white;
}

.question-number-badge.practical {
    background: linear-gradient(135deg, var(--senai-orange), var(--senai-orange-dark));
}

.question-number-badge.theoretical {
    background: linear-gradient(135deg, var(--senai-blue), var(--senai-blue-dark));
}

.question-meta {
    flex: 1;
}

.question-meta h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.question-meta-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag {
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.tag-module {
    background: var(--info-bg);
    color: var(--info);
}

.tag-practical {
    background: var(--senai-orange-glow);
    color: var(--senai-orange);
}

.tag-theoretical {
    background: rgba(27, 58, 92, 0.1);
    color: var(--senai-blue);
}

.tag-points {
    background: var(--success-bg);
    color: var(--success);
}

.question-description {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.75;
}

.question-description h4 {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--senai-blue);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.question-description ul,
.question-description ol {
    padding-left: 1.5rem;
    margin: 0.75rem 0;
}

.question-description li {
    margin-bottom: 0.35rem;
}

/* Code Editor */
.code-editor-container {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-md);
}

.code-editor-toolbar {
    background: var(--senai-blue-dark);
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.code-editor-toolbar .toolbar-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.code-editor-toolbar .toolbar-dots {
    display: flex;
    gap: 6px;
}

.code-editor-toolbar .toolbar-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.toolbar-dot.red {
    background: #FF5F57;
}

.toolbar-dot.yellow {
    background: #FFBD2E;
}

.toolbar-dot.green {
    background: #28C840;
}

.code-editor-toolbar .toolbar-filename {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    margin-left: 0.5rem;
}

.code-editor-toolbar .toolbar-right {
    display: flex;
    gap: 0.5rem;
}

.btn-run-tests {
    background: var(--success);
    color: white;
    border: none;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    transition: all var(--transition-fast);
}

.btn-run-tests:hover {
    background: #059669;
    transform: translateY(-1px);
}

.code-editor-wrapper {
    min-height: 250px;
}

.code-editor-wrapper .CodeMirror {
    height: auto;
    min-height: 250px;
    font-family: var(--font-mono);
    font-size: 14px;
    line-height: 1.6;
}

/* Test Results */
.test-results {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.test-results-header {
    background: var(--bg-primary);
    padding: 0.625rem 1rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
}

.test-results-summary {
    font-family: var(--font-mono);
    font-size: 0.75rem;
}

.test-result-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    border-bottom: 1px solid var(--border-light);
    transition: background var(--transition-fast);
}

.test-result-item:last-child {
    border-bottom: none;
}

.test-result-icon {
    width: 20px;
    height: 20px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6875rem;
    flex-shrink: 0;
    font-weight: 700;
}

.test-result-icon.pass {
    background: var(--success-bg);
    color: var(--success);
}

.test-result-icon.fail {
    background: var(--error-bg);
    color: var(--error);
}

.test-result-icon.pending {
    background: var(--bg-primary);
    color: var(--text-muted);
}

.test-result-description {
    flex: 1;
    color: var(--text-secondary);
}

/* Multiple Choice (Theoretical) */
.options-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.option-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    user-select: none;
}

.option-item:hover {
    border-color: var(--senai-orange);
    background: var(--senai-orange-glow);
}

.option-item.selected {
    border-color: var(--senai-orange);
    background: var(--senai-orange-glow);
    box-shadow: 0 0 0 1px var(--senai-orange);
}

.option-radio {
    width: 20px;
    height: 20px;
    border-radius: var(--radius-full);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
    transition: all var(--transition-fast);
}

.option-item.selected .option-radio {
    border-color: var(--senai-orange);
    background: var(--senai-orange);
}

.option-item.selected .option-radio::after {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: var(--radius-full);
    background: white;
}

.option-key {
    font-weight: 700;
    color: var(--senai-blue);
    min-width: 24px;
    font-size: 0.875rem;
}

.option-text {
    flex: 1;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--text-primary);
}

/* Question Navigation Buttons */
.question-nav-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

/* ============================================================
   Submitted Page
   ============================================================ */
.submitted-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--senai-blue-dark) 0%, var(--senai-blue) 100%);
    padding: 2rem;
}

.submitted-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: 3rem;
    max-width: 480px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.6s ease-out;
}

.submitted-icon {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-full);
    background: var(--success-bg);
    color: var(--success);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2.5rem;
    animation: checkBounce 0.5s ease-out 0.3s both;
}

@keyframes checkBounce {
    0% {
        transform: scale(0);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

.submitted-card h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.submitted-card p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.submitted-card .warning-text {
    color: var(--warning);
    font-weight: 600;
    font-size: 0.875rem;
    margin-top: 1.5rem;
    padding: 0.75rem;
    background: var(--warning-bg);
    border-radius: var(--radius-sm);
}

.submitted-card .exit-info-box {
    margin-top: 1.5rem;
    padding: 0.85rem;
    background: var(--info-bg);
    border-radius: var(--radius-sm);
    border-left: 4px solid var(--info);
    text-align: center;
}

.submitted-card .exit-info-box p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.submitted-card .exit-info-box kbd {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.85em;
    font-weight: 700;
    padding: 0.15rem 0.4rem;
}


/* ============================================================
   Admin Dashboard
   ============================================================ */
.admin-layout {
    min-height: 100vh;
}

.admin-header {
    background: var(--senai-blue-dark);
    color: white;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.admin-header .header-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.admin-header h1 {
    font-size: 1.125rem;
    font-weight: 700;
}

.admin-header .assessment-badge {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 500;
}

.admin-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    transition: all var(--transition-fast);
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
}

.stat-card.orange .stat-value {
    color: var(--senai-orange);
}

.stat-card.blue .stat-value {
    color: var(--senai-blue);
}

.stat-card.green .stat-value {
    color: var(--success);
}

.stat-card.yellow .stat-value {
    color: var(--warning);
}

/* Table */
.table-container {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.table-header h2 {
    font-size: 1rem;
    font-weight: 700;
}

.table-actions {
    display: flex;
    gap: 0.5rem;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    text-align: left;
    padding: 0.75rem 1.25rem;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
}

.data-table td {
    padding: 0.875rem 1.25rem;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:hover td {
    background: var(--surface-hover);
}

.student-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.student-avatar {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background: var(--senai-orange);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75rem;
    flex-shrink: 0;
    overflow: hidden;
}

.student-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.student-name {
    font-weight: 600;
    color: var(--text-primary);
}

.student-email {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

.status-badge.submitted {
    background: var(--info-bg);
    color: var(--info);
}

.status-badge.graded {
    background: var(--success-bg);
    color: var(--success);
}

.status-badge.in-progress {
    background: var(--warning-bg);
    color: var(--warning);
}

.status-badge.auto-submitted {
    background: var(--error-bg);
    color: var(--error);
}

.score-display {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.9375rem;
}

/* ============================================================
   Admin Submission View
   ============================================================ */
.submission-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.submission-student-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.submission-student-avatar {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-full);
    background: var(--senai-orange);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    overflow: hidden;
}

.submission-student-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.submission-student-details h2 {
    font-size: 1.25rem;
    font-weight: 700;
}

.submission-student-details p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.submission-meta {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.submission-meta-item {
    text-align: center;
    padding: 0.75rem 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.submission-meta-item .label {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.submission-meta-item .value {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 0.25rem;
}

.submission-question {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: box-shadow var(--transition-fast);
}

.submission-question:hover {
    box-shadow: var(--shadow-md);
}

.submission-question-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.grading-form {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    margin-top: 1rem;
    flex-wrap: wrap;
}

.grading-form label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.grading-form input[type="number"] {
    width: 80px;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 0.875rem;
    text-align: center;
    transition: border-color var(--transition-fast);
}

.grading-form input[type="number"]:focus {
    outline: none;
    border-color: var(--senai-orange);
    box-shadow: 0 0 0 3px var(--senai-orange-glow);
}

.grading-form input[type="text"],
.grading-form textarea {
    flex: 1;
    min-width: 200px;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 0.8125rem;
    transition: border-color var(--transition-fast);
    resize: vertical;
}

.grading-form input[type="text"]:focus,
.grading-form textarea:focus {
    outline: none;
    border-color: var(--senai-orange);
    box-shadow: 0 0 0 3px var(--senai-orange-glow);
}

.student-code-display {
    background: var(--bg-dark);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin: 1rem 0;
}

.student-code-display pre {
    margin: 0;
    border-radius: 0;
}

.student-answer-display {
    padding: 1rem;
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    margin: 1rem 0;
}

.correct-answer {
    color: var(--success);
    font-weight: 600;
}

.incorrect-answer {
    color: var(--error);
    font-weight: 600;
}

/* Audit Log */
.audit-log {
    margin-top: 2rem;
}

.audit-log h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.audit-list {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.audit-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.625rem 1rem;
    font-size: 0.8125rem;
    border-bottom: 1px solid var(--border-light);
}

.audit-item:last-child {
    border-bottom: none;
}

.audit-time {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    flex-shrink: 0;
    min-width: 140px;
}

.audit-action {
    font-weight: 600;
    min-width: 120px;
    flex-shrink: 0;
}

.audit-action.login {
    color: var(--info);
}

.audit-action.assessment_started {
    color: var(--senai-orange);
}

.audit-action.submitted {
    color: var(--success);
}

.audit-action.auto_submitted {
    color: var(--warning);
}

.audit-action.tab_switch {
    color: var(--error);
}

.audit-details {
    color: var(--text-secondary);
}

/* ============================================================
   Flash Messages / Toasts
   ============================================================ */
.flash-message {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.flash-message.error {
    background: var(--error-bg);
    color: var(--error);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.flash-message.success {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

/* ============================================================
   Modal
   ============================================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal-backdrop);
    padding: 2rem;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--surface);
    border-radius: var(--radius-xl);
    padding: 2rem;
    max-width: 500px;
    width: 100%;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.3s ease-out;
}

.modal h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.modal p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

/* ============================================================
   Print Styles
   ============================================================ */
@media print {

    .timer-header,
    .admin-header,
    .assessment-sidebar,
    .sidebar-actions,
    .question-nav-buttons,
    .btn,
    .no-print {
        display: none !important;
    }

    body {
        background: white;
        color: black;
        font-size: 11pt;
    }

    .assessment-layout {
        display: block;
    }

    .assessment-main {
        padding: 0;
        max-width: 100%;
    }

    .question-card {
        display: block !important;
        page-break-inside: avoid;
        margin-bottom: 1.5rem;
        border: 1px solid #ccc;
        padding: 1rem;
    }

    .submission-question {
        page-break-inside: avoid;
    }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1024px) {
    .assessment-layout {
        grid-template-columns: 1fr;
    }

    .assessment-sidebar {
        display: none;
        position: fixed;
        top: 52px;
        left: 0;
        width: 280px;
        height: calc(100vh - 52px);
        z-index: var(--z-fixed);
        box-shadow: var(--shadow-xl);
    }

    .assessment-sidebar.mobile-open {
        display: block;
    }

    .assessment-main {
        padding: 1.5rem;
    }

    .timer-header {
        padding: 0.5rem 1rem;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .timer-clock {
        font-size: 1.25rem;
    }
}

@media (max-width: 640px) {
    .login-card {
        padding: 2rem 1.5rem;
    }

    .question-nav-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }

    .question-nav-buttons .btn {
        width: 100%;
    }

    .submission-header {
        flex-direction: column;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dev-login-buttons {
        flex-direction: column;
    }
}

/* ============================================================
   Scrollbar Customization
   ============================================================ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ============================================================
   Utilities
   ============================================================ */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-muted {
    color: var(--text-muted);
}

.text-success {
    color: var(--success);
}

.text-error {
    color: var(--error);
}

.text-warning {
    color: var(--warning);
}

.font-mono {
    font-family: var(--font-mono);
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.gap-1 {
    gap: 0.5rem;
}

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.hidden {
    display: none;
}

/* ============================================================
   Premium Modal / Dialog Styles
   ============================================================ */
.premium-modal {
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    max-width: 550px;
    width: 90%;
    box-shadow: var(--shadow-xl), 0 20px 40px rgba(0, 0, 0, 0.15);
    background: var(--surface);
    color: var(--text-primary);
    overflow: visible;
    position: relative;
    outline: none;
}

.premium-modal::backdrop {
    background: rgba(15, 25, 35, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: premiumBackdropFadeIn 0.3s ease-out forwards;
}

.premium-modal[open] {
    animation: premiumModalSlideUp 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes premiumBackdropFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes premiumModalSlideUp {
    from {
        transform: translateY(40px) scale(0.95);
        opacity: 0;
    }

    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.premium-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.premium-modal-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.premium-modal-title h3 {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--senai-blue-dark);
    letter-spacing: -0.02em;
}

.premium-modal-icon {
    font-size: 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.premium-modal-close {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--text-secondary);
    line-height: 1;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.premium-modal-close:hover {
    background: var(--error-bg);
    border-color: var(--error);
    color: var(--error);
    transform: rotate(90deg);
}

.premium-modal-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.premium-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.col-span-2 {
    grid-column: span 2;
}

.form-label {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--senai-blue-light);
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 0.75rem;
    font-size: 1rem;
    pointer-events: none;
    color: var(--text-muted);
}

.form-input {
    width: 100%;
    padding: 0.75rem 0.75rem 0.75rem 2.25rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: all var(--transition-base);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);
}

.form-input:hover {
    border-color: var(--text-muted);
}

.form-input:focus {
    outline: none;
    border-color: var(--senai-orange);
    background: var(--bg-secondary);
    box-shadow: 0 0 0 4px var(--senai-orange-glow), var(--shadow-sm);
}

.form-help-text {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.15rem;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.form-help-text::before {
    content: 'ℹ️';
    font-size: 0.75rem;
}

.premium-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}

.premium-modal-footer .btn {
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 700;
}

.premium-modal-footer .btn-save {
    background: linear-gradient(135deg, var(--senai-orange), var(--senai-orange-dark));
    border: none;
    color: white;
    box-shadow: 0 4px 12px var(--senai-orange-glow);
}

.premium-modal-footer .btn-save:hover {
    box-shadow: 0 6px 18px rgba(232, 73, 16, 0.35);
    transform: translateY(-1px);
}

.premium-modal-footer .btn-save:active {
    transform: translateY(1px);
}

/* Responsividade do Grid do Form */
@media (max-width: 480px) {
    .premium-form-grid {
        grid-template-columns: 1fr;
    }

    .col-span-2 {
        grid-column: span 1;
    }

    .premium-modal {
        padding: 1.5rem;
    }
}

/* ============================================================
   Print Styles
   ============================================================ */
@media print {
    body {
        background: white !important;
        color: black !important;
        font-size: 11pt !important;
    }

    .admin-header,
    .no-print,
    .btn,
    .grading-form,
    .audit-log,
    .sidebar-actions,
    .admin-layout::before {
        display: none !important;
    }

    .admin-layout,
    .admin-content {
        margin: 0 !important;
        padding: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        display: block !important;
    }

    .submission-header {
        border-bottom: 2px solid #000 !important;
        padding-bottom: 1rem !important;
        margin-bottom: 2rem !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    .submission-question {
        page-break-inside: avoid !important;
        border: 1px solid #ccc !important;
        border-radius: 6px !important;
        padding: 1.5rem !important;
        margin-bottom: 2rem !important;
        background: transparent !important;
    }

    pre,
    code,
    .student-code-display,
    .model-code-display pre {
        background: #f5f5f5 !important;
        color: #000 !important;
        border: 1px solid #ddd !important;
        white-space: pre-wrap !important;
        word-wrap: break-word !important;
        overflow: visible !important;
        max-height: none !important;
    }

    .evaluation-criteria {
        background: #fafafa !important;
        border: 1px solid #ddd !important;
        color: black !important;
        padding: 1rem !important;
    }

    .tag {
        border: 1px solid #ccc !important;
        background: transparent !important;
        color: black !important;
    }
}


/* Modais / Dialogs */
dialog {
    margin: auto;
    max-height: 90vh;
    max-width: 90vw;
    overflow-y: auto;
    border: none;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    background: var(--surface);
    color: var(--text-primary);
}

dialog::backdrop {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

/* ==========================================================================
   Bloqueio Visual para Dispositivos Móveis (Anti-Tablet/Touch)
   ========================================================================== */
@media (hover: none) and (pointer: coarse) {
    body::before {
        content: "Acesso Restrito: Computadores obrigatórios. Celulares e tablets não são permitidos para a realização desta avaliação prática.";
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: #f8f9fa;
        z-index: 999999;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        padding: 3rem;
        font-family: var(--font-sans);
        font-size: 1.5rem;
        font-weight: 800;
        color: #d32f2f;
        line-height: 1.5;
    }

    body>* {
        display: none !important;
    }
}

/* ============================================================
   Efeito de Digitação — Página de Login
   ============================================================ */

.typing-messages-container {
    margin-top: 0rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
    padding: 0 1rem;
    gap: 2px;
}

.typing-message {
    font-size: 0.95rem;
    color: rgba(161, 113, 201, 0.85);
    font-weight: 500;
    letter-spacing: -0.01em;
    line-height: 1.5;
    text-align: center;
    margin: 0;
    font-style: italic;
}

.typing-cursor {
    font-size: 1.1rem;
    color: var(--senai-orange);
    font-weight: 300;
    animation: blinkCursor 0.7s step-end infinite;
}

@keyframes blinkCursor {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

@media (max-width: 480px) {
    .typing-messages-container {
        display: none;
    }
}


.anim-clipboard {
    position: relative;
    width: 200px;
}

.anim-clipboard-clip {
    width: 60px;
    height: 16px;
    background: linear-gradient(135deg, #9CA3AF, #6B7280);
    border-radius: 4px 4px 0 0;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.anim-clipboard-clip::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 8px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

.anim-clipboard-body {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 0 0 12px 12px;
    padding: 20px 16px 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.6);
    position: relative;
    z-index: 1;
    margin-top: -4px;
    backdrop-filter: blur(10px);
}

.anim-question {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    opacity: 0;
    transform: translateX(-10px);
    animation: slideInQuestion 0.5s ease-out forwards;
}

.anim-q1 {
    animation-delay: 0.5s;
}

.anim-q2 {
    animation-delay: 1.0s;
}

.anim-q3 {
    animation-delay: 1.5s;
}

.anim-q4 {
    animation-delay: 2.0s;
}

.anim-checkbox {
    width: 18px;
    height: 18px;
    border: 2px solid #D1D5DB;
    border-radius: 4px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    background: white;
}

.anim-checkbox svg {
    width: 12px;
    height: 12px;
    opacity: 0;
}

.anim-checkbox.checked {
    border-color: var(--senai-orange);
    background: rgba(232, 73, 16, 0.08);
}

.anim-checkbox.checked svg {
    opacity: 1;
}

.anim-checkbox.checked .anim-check-path {
    stroke-dasharray: 20;
    stroke-dashoffset: 20;
    animation: drawCheck 0.4s ease-out forwards;
}

.anim-q1 .anim-checkbox.checked .anim-check-path {
    animation-delay: 0.8s;
}

.anim-q2 .anim-checkbox.checked .anim-check-path {
    animation-delay: 1.3s;
}

.anim-checkbox.checking {
    border-color: var(--senai-orange);
    background: rgba(232, 73, 16, 0.05);
    animation: pulseCheckbox 1.5s ease-in-out infinite 2.0s;
}

.anim-checkbox.checking svg {
    opacity: 0;
    animation: fadeInCheck 0.3s ease-out 3.0s forwards;
}

.anim-checkbox.checking .anim-check-path {
    stroke-dasharray: 20;
    stroke-dashoffset: 20;
    animation: drawCheck 0.4s ease-out 3.0s forwards;
}

.anim-text-line {
    height: 8px;
    background: linear-gradient(90deg, #E5E7EB, #F3F4F6);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.anim-text-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    animation: shimmerLine 2s ease-in-out infinite;
}

.anim-progress-bar {
    height: 6px;
    background: #E5E7EB;
    border-radius: 3px;
    margin-top: 16px;
    overflow: hidden;
}

.anim-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--senai-orange), var(--senai-orange-light));
    border-radius: 3px;
    animation: fillProgress 3.5s ease-out 0.5s forwards;
    box-shadow: 0 0 8px rgba(232, 73, 16, 0.3);
}

.anim-progress-text {
    font-size: 0.65rem;
    color: #9CA3AF;
    text-align: right;
    margin-top: 4px;
    font-weight: 600;
}

.anim-progress-pct {
    color: var(--senai-orange);
    font-weight: 700;
}

/* Lápis animado */
.anim-pencil {
    position: absolute;
    right: -20px;
    bottom: 40px;
    animation: writePencil 4s ease-in-out infinite;
    transform-origin: bottom center;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
}

/* Keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInQuestion {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes drawCheck {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes fadeInCheck {
    to {
        opacity: 1;
    }
}

@keyframes pulseCheckbox {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(232, 73, 16, 0.2);
    }

    50% {
        box-shadow: 0 0 0 4px rgba(232, 73, 16, 0.1);
    }
}

@keyframes fillProgress {
    0% {
        width: 0%;
    }

    30% {
        width: 25%;
    }

    55% {
        width: 50%;
    }

    80% {
        width: 65%;
    }

    100% {
        width: 75%;
    }
}

@keyframes shimmerLine {
    0% {
        left: -100%;
    }

    50% {
        left: 100%;
    }

    100% {
        left: 100%;
    }
}

@keyframes writePencil {

    0%,
    100% {
        transform: translate(0, 0) rotate(-5deg);
    }

    15% {
        transform: translate(-8px, -15px) rotate(-10deg);
    }

    30% {
        transform: translate(-2px, -30px) rotate(-3deg);
    }

    50% {
        transform: translate(-10px, -45px) rotate(-8deg);
    }

    70% {
        transform: translate(-4px, -55px) rotate(-5deg);
    }

    85% {
        transform: translate(-6px, -45px) rotate(-7deg);
    }
}

/* Responsivo: esconder animação em telas muito pequenas */
@media (max-width: 480px) {
    .assessment-animation {
        display: none;
    }
}