:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --bg-body: #f3f4f6;
    --bg-card: #ffffff;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --sidebar-width: 260px;
    --header-height: 64px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --btn-min-height: 44px;
    --safe-padding: 1rem;
    --login-gradient: linear-gradient(135deg, #2563eb 0%, #10b981 100%);
}

/* 1. RESET & FUNDAMENTALS (Mobile-First) */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    /* Melhora toque no mobile */
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.5;
    overflow-x: hidden;
    min-height: 100vh;
}

/* 2. LAYOUT ESTRUTURAL (Base Mobile) */

/* Sidebar oculto por padrão (Mobile) */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-card);
    border-right: 1px solid var(--border-color);
    position: fixed;
    height: 100%;
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar.active {
    transform: translateX(0);
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.15);
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 990;
    display: none;
    backdrop-filter: blur(2px);
}

/* Header Fixo e Responsivo */
.header {
    height: var(--header-height);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--safe-padding);
    position: sticky;
    top: 0;
    z-index: 500;
}

#menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--btn-min-height);
    height: var(--btn-min-height);
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-main);
}

.main-content {
    flex: 1;
    margin-left: 0;
    display: flex;
    flex-direction: column;
    min-width: 0;
    /* Impede quebra de layout por conteúdo largo */
}

/* 3. COMPONENTES (Fluidez) */

.p-2rem {
    padding: var(--safe-padding);
}

/* Grid de Cards - 1 coluna por padrão */
.grid-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.card-title {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.card-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-main);
}

/* Botões e Inputs Touch-Friendly */
.btn-primary,
.btn-secondary,
.form-control,
select,
.nav-item {
    min-height: var(--btn-min-height);
    font-size: 1rem;
    /* Evita zoom automático no iOS */
    padding: 0.5rem 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    /* Botões full-width no mobile por padrão */
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
}

.btn-icon {
    width: var(--btn-min-height);
    padding: 0;
}

/* 4. TABELAS ADAPTÁVEIS (Transformam em Cards no Mobile) */
.table-container {
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.table-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.table-header h3 {
    font-size: 1rem;
}

/* Mobile Table Rules */
table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    display: none;
}

/* Esconde cabeçalho da tabela no mobile */

tr {
    display: block;
    border-bottom: 4px solid var(--bg-body);
    padding: 0.2rem 0;
}

td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 1rem;
    border-bottom: 1px solid #f8fafc;
    text-align: right;
    font-size: 0.9rem;
}

td:last-child {
    border-bottom: none;
}

/* Adiciona legendas via pseudo-elementos */
td::before {
    content: attr(data-label);
    font-weight: 700;
    color: var(--text-muted);
    font-size: 0.7rem;
    text-transform: uppercase;
    text-align: left;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.user-info-text {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

#bot-status {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.6rem;
    color: var(--success);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.9;
}

.welcome-text {
    font-size: 0.9rem;
    font-weight: 800;
    color: #1e293b;
    text-transform: uppercase;
    white-space: nowrap;
}

#header-user-avatar {
    width: 38px;
    height: 38px;
    background: var(--login-gradient);
    color: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

/* 5. BREAKPOINTS (Aprimoramentos para Telas Maiores) */

/* TABLETS E DESKTOPS PEQUENOS (>= 768px) */
@media (min-width: 768px) {
    :root {
        --safe-padding: 2rem;
    }

    .grid-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .btn-primary,
    .btn-secondary {
        width: auto;
    }
}

@media (max-width: 767px) {
    #page-title {
        display: none !important;
    }

    .header {
        justify-content: space-between !important;
        padding: 0 15px !important;
    }

    .user-profile {
        flex: 1;
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        margin-left: 10px;
    }

    .user-profile>span#bot-status {
        display: none !important;
        /* Já que vamos colocar dentro da info */
    }

    .user-profile>div {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0 !important;
    }

    #header-user-avatar {
        order: 2;
        width: 34px !important;
        height: 34px !important;
        font-size: 0.9rem !important;
        border-radius: 10px !important;
        margin-left: auto;
    }

    /* Ocultar o status do bot no mobile se estiver apertado, ou diminuir */
    #bot-status {
        font-size: 0.5rem !important;
        margin-bottom: -2px;
    }

    #header-user-name {
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
        display: inline-block;
        white-space: nowrap;
        vertical-align: bottom;
        font-weight: 500 !important;
    }

    .user-profile span[style*="font-weight: 800"] {
        font-weight: 700 !important;
        /* Menos peso no subtítulo se necessário */
    }

    /* TURMAS DASHBOARD MOBILE (CARDS) */
    .mobile-turmas-list {
        display: flex;
        flex-direction: column;
        gap: 16px;
        padding: 10px 0;
    }

    .turma-card-mobile {
        background: white;
        border-radius: 16px;
        padding: 16px;
        border: 1px solid #eef2f7;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
        position: relative;
        transition: all 0.2s;
    }

    .turma-card-mobile:active {
        transform: scale(0.98);
    }

    .t-card-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        margin-bottom: 12px;
    }

    .t-card-title-group {
        display: flex;
        align-items: baseline;
        gap: 8px;
        flex: 1;
        overflow: hidden;
    }

    .t-card-name {
        font-size: 1.1rem;
        font-weight: 800;
        color: #2563eb;
        white-space: nowrap;
    }

    .t-card-subject {
        font-size: 0.9rem;
        font-weight: 500;
        color: #4b5563;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .t-card-body {
        display: flex;
        justify-content: space-between;
        align-items: flex-end;
    }

    .t-card-stats {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .t-card-stat-item {
        font-size: 0.85rem;
        color: #6b7280;
        font-weight: 500;
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .t-card-stat-item i {
        color: #2563eb;
        width: 14px;
    }

    /* Grupos de Botão Registro/Ações */
    .t-card-action-group {
        display: flex;
        align-items: center;
        background: #28a745;
        border-radius: 8px;
        padding: 2px;
    }

    .t-btn-registro {
        background: transparent;
        color: white;
        border: none;
        padding: 6px 12px;
        font-weight: 700;
        font-size: 0.85rem;
        display: flex;
        align-items: center;
        gap: 6px;
        cursor: pointer;
    }

    .t-btn-dots-toggle {
        background: rgba(255, 255, 255, 0.1);
        color: white;
        border: none;
        padding: 6px 8px;
        border-radius: 4px;
        cursor: pointer;
        border-left: 1px solid rgba(255, 255, 255, 0.2);
    }

    /* Menu Dropdown Flutuante */
    .t-dropdown-menu {
        position: absolute;
        right: 16px;
        top: 45px;
        background: white;
        border-radius: 12px;
        z-index: 10000;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
        border: 1px solid #eef2f7;
        width: 180px;
        overflow: hidden;
        display: none;
        transform-origin: top right;
        transition: all 0.2s;
        animation: menuFadeIn 0.2s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    }

    .t-dropdown-menu.active {
        display: block;
    }

    .t-dropdown-item {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 12px 16px;
        color: #374151;
        font-weight: 500;
        text-decoration: none;
        font-size: 0.9rem;
        border-bottom: 1px solid #f9fafb;
    }

    .t-dropdown-item:active {
        background: #f3f4f6;
    }

    .t-dropdown-item i {
        width: 16px;
        font-size: 0.9rem;
        color: #2563eb;
    }

    .t-dropdown-item.text-danger i {
        color: #ef4444;
    }

    .t-dropdown-item.text-danger {
        color: #ef4444;
    }

    @keyframes menuFadeIn {
        from {
            opacity: 0;
            transform: scale(0.9) translateY(-10px);
        }

        to {
            opacity: 1;
            transform: scale(1) translateY(0);
        }
    }

    /* CARDS DE HISTÓRICO DE AULAS (REGISTRO_AULA MOBILE) */
    .lesson-card-mobile {
        background: white;
        border-radius: 12px;
        margin-bottom: 20px;
        border: 1px solid #eef2f7;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
        overflow: hidden;
        position: relative;
    }

    .l-card-header {
        background: #f8fafc;
        padding: 10px 15px;
        border-bottom: 1px solid #f1f5f9;
        display: flex;
        align-items: center;
        gap: 8px;
        justify-content: space-between;
    }

    .l-header-info {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .l-date {
        font-weight: 700;
        color: #334155;
        font-size: 0.95rem;
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .l-date i {
        color: #64748b;
        font-size: 0.85rem;
    }

    .badge-qty {
        background: #eff6ff;
        color: #2563eb;
        padding: 2px 10px;
        border-radius: 8px;
        font-weight: 700;
        font-size: 0.75rem;
        border: 1px solid #dbeafe;
    }

    .badge-term {
        background: #f1f5f9;
        color: #475569;
        padding: 2px 10px;
        border-radius: 8px;
        font-weight: 700;
        font-size: 0.75rem;
    }

    .l-card-body {
        padding: 15px;
        position: relative;
        border-left: 5px solid #2563eb;
    }

    .l-title {
        font-size: 1.05rem;
        font-weight: 800;
        color: #1e293b;
        line-height: 1.4;
        margin-bottom: 10px;
        padding-right: 60px;
    }

    .badge-absences {
        position: absolute;
        right: 15px;
        top: 15px;
        display: flex;
        align-items: center;
        background: #fef2f2;
        border: 1px solid #fee2e2;
        border-radius: 8px;
        padding: 2px 8px;
    }

    .badge-absences.has-absences {
        background: #fee2e2;
        border-color: #fecaca;
    }

    .at-count-text {
        color: #ef4444;
        font-weight: 700;
        font-size: 0.8rem;
        margin-right: 6px;
    }

    .at-count-circle {
        background: #ef4444;
        color: white;
        width: 18px;
        height: 18px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.7rem;
        font-weight: 800;
    }

    .l-metodologia-label {
        font-size: 0.75rem;
        font-weight: 700;
        color: #1e293b;
        margin-bottom: 4px;
        display: block;
    }

    .l-metodologia-text {
        font-size: 0.82rem;
        color: #64748b;
        line-height: 1.4;
        margin-bottom: 8px;
    }

    .skills-container {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        margin-bottom: 12px;
    }

    .skill-tag {
        background: #eff6ff;
        color: #2563eb;
        border: 1px solid #dbeafe;
        padding: 2px 8px;
        border-radius: 6px;
        font-size: 0.75rem;
        font-weight: 600;
        display: flex;
        align-items: center;
        gap: 4px;
    }

    .skill-tag i {
        font-size: 0.65rem;
        opacity: 0.7;
    }

    .l-expand-btn {
        background: none;
        border: none;
        padding: 0;
        color: #2563eb;
        font-weight: 700;
        font-size: 0.85rem;
        display: flex;
        align-items: center;
        gap: 6px;
        cursor: pointer;
        text-decoration: none;
    }

    .l-details-content {
        display: none;
        padding-top: 15px;
        border-top: 1px solid #f1f5f9;
        margin-top: 12px;
        font-size: 0.85rem;
        color: #475569;
        line-height: 1.6;
    }

    .l-details-content.active {
        display: block;
    }

    /* Dropdown do Histórico */
    .l-dropdown {
        position: absolute;
        right: 8px;
        top: 50%;
        transform: translateY(-50%);
    }

    .l-actions-menu {
        position: absolute;
        right: 0;
        top: 100%;
        margin-top: 5px;
        background: white;
        border-radius: 12px;
        z-index: 10001;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
        border: 1px solid #eef2f7;
        width: 150px;
        display: none;
    }

    .l-actions-menu.active {
        display: block;
    }
}

/* DESKTOPS (>= 1024px) */
@media (min-width: 1024px) {
    .sidebar {
        transform: translateX(0);
    }

    /* Sidebar sempre visível */

    .main-content {
        margin-left: var(--sidebar-width);
    }

    #menu-toggle {
        display: none;
    }

    /* Esconde hambúrguer no PC */

    .grid-cards {
        grid-template-columns: repeat(4, 1fr);
    }

    /* Restaura visual de tabela tradicional no Computador */
    thead {
        display: table-header-group;
    }

    tr {
        display: table-row;
    }

    td {
        display: table-cell;
        text-align: left;
        border-bottom: 1px solid var(--border-color);
    }

    td::before {
        display: none;
    }
}

/* 6. CLASSES AUXILIARES */
/* Força visualização horizontal (tabela real) mesmo no mobile */
.table-horizontal {
    display: table !important;
}

.table-horizontal thead {
    display: table-header-group !important;
}

.table-horizontal tr {
    display: table-row !important;
    border-bottom: 1px solid var(--border-color) !important;
}

.table-horizontal td,
.table-horizontal th {
    display: table-cell !important;
    text-align: left !important;
    padding: 12px 15px !important;
    border-bottom: 1px solid var(--border-color) !important;
}

.table-horizontal td::before {
    display: none !important;
}

.badge {
    padding: 0.25rem 0.6rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

/* Sidebar Nav */
.brand {
    padding: 1.5rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border-color);
}

.brand img {
    max-width: 100%;
    height: auto;
    display: block;
    cursor: pointer;
}

.nav-menu {
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-item {
    color: var(--text-muted);
    text-decoration: none;
    justify-content: flex-start;
}

.nav-item:hover,
.nav-item.active {
    background: #eff6ff;
    color: var(--primary-color);
}

.nav-item i {
    margin-right: 0.75rem;
    width: 20px;
    text-align: center;
}

.nav-group-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: #94a3b8;
    font-weight: 700;
    padding: 0.5rem 1rem;
    margin-top: 1rem;
}

/* 7. FORMULÁRIOS E GRIDS FLUIDOS */
.registration-container {
    padding: var(--safe-padding);
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .form-grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }

    .form-grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

.form-grid-responsive {
    display: grid;
    grid-template-columns: 2fr 1.5fr 1fr;
    gap: 8px;
}

@media (max-width: 480px) {
    .form-grid-responsive .form-label {
        font-size: 0.75rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        margin-bottom: 4px !important;
    }

    .form-grid-responsive .form-control {
        padding: 8px 4px !important;
        font-size: 0.8rem;
    }
}

@media (min-width: 768px) {
    .form-grid-responsive {
        grid-template-columns: 2fr 1fr 1fr;
        gap: 20px;
    }
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-main);
}

.form-control {
    width: 100%;
    border: 1px solid var(--border-color);
    padding: 0.75rem;
    border-radius: 8px;
    background: #fff;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

/* Ajustes para a Tabela de Frequência dentro do formulário */
.attendance-table {
    margin-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.attendance-row-mobile {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.attendance-controls-mobile {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.label-pill {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-weight: 500;
}

.label-pill input[type="checkbox"] {
    display: none;
}

.label-pill.active-warning {
    background: var(--warning);
    color: #fff;
    border-color: var(--warning);
}

.label-pill.active-primary {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* 8. MODAIS RESPONSIVOS */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: var(--safe-padding);
    backdrop-filter: blur(4px);
}

.modal-content {
    background: var(--bg-card);
    border-radius: 16px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    animation: modalSlideUp 0.3s ease-out;
}

@keyframes modalSlideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 1.25rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.125rem;
}

.modal-body {
    padding: 1.25rem;
}

.modal-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.btn-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    padding: 0.5rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-close:hover {
    color: var(--danger);
}

/* 9. UTILITÁRIOS PARA TABELAS LARGAS */
.horizontal-scroll-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
    background: var(--bg-card);
    margin-bottom: 1rem;
}

.table-matrix {
    min-width: 1200px;
    /* Garante que a matriz tenha espaço para scroll */
    border-collapse: collapse;
}

.sticky-col {
    position: sticky;
    left: 0;
    background: var(--bg-card);
    z-index: 10;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.05);
}

thead .sticky-col {
    z-index: 20;
}

@media (max-width: 767px) {

    .table-matrix td,
    .table-matrix th {
        padding: 0.5rem !important;
        font-size: 0.8rem !important;
        text-align: center !important;
    }

    .table-matrix td:first-child,
    .table-matrix th:first-child {
        text-align: left !important;
    }

    .page-header-responsive {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 15px !important;
        padding: 15px 20px !important;
    }

    .page-header-responsive .btn-primary {
        width: 100% !important;
        justify-content: center;
    }
}

/* 10. PREMIUM LOGIN SCREEN */
.login-wrapper {
    display: flex;
    height: 100vh;
    width: 100vw;
    align-items: center;
    justify-content: center;
    background: var(--bg-body);
    background-image:
        radial-gradient(at 0% 0%, rgba(37, 99, 235, 0.1) 0, transparent 50%),
        radial-gradient(at 100% 100%, rgba(16, 185, 129, 0.1) 0, transparent 50%);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
    padding: 1.5rem;
}

.login-card {
    width: 100%;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 3rem 2.5rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.5);
    text-align: center;
    animation: loginFadeIn 0.6s ease-out;
}

@keyframes loginFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-logo-section {
    margin-bottom: 2.5rem;
}

.login-logo {
    max-width: 220px;
    height: auto;
    /* Removido drop-shadow para evitar borda retangular se o PNG não for 100% transparente */
    animation: logoFloat 3s ease-in-out infinite;
    mix-blend-mode: multiply;
    /* Tenta misturar se o fundo do logo for branco e o card for quase branco */
}

@keyframes logoFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

.login-card form {
    text-align: left;
}

.login-card .form-group {
    margin-bottom: 1.5rem;
}

.login-card label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-main);
}

.login-card .form-control {
    background: #f8fafc;
    border: 1.5px solid var(--border-color);
    transition: all 0.2s;
}

.login-card .form-control:focus {
    background: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.login-card .btn-primary {
    margin-top: 1rem;
    background: var(--login-gradient);
    border: none;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 6px rgba(37, 99, 235, 0.2);
}

.login-card .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(37, 99, 235, 0.3);
}

.login-error-msg {
    color: var(--danger);
    margin-top: 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    display: none;
    padding: 0.75rem;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 8px;
}

.neuro-text {
    color: #2b7de9 !important;
    font-weight: 800 !important;
}

.difficulty-text {
    color: #f59e0b !important;
    /* Laranja do var(--warning) */
    font-weight: 700 !important;
    font-style: italic;
}

/* 11. UTILITÁRIOS PARA IMPRESSÃO */
.print-only {
    display: none;
}

@media print {
    .no-print {
        display: none !important;
    }

    .print-only {
        display: block !important;
    }
}