/* 
 * Moodle MCP - Design System (Inspired by Datix Dashboard)
 * Paleta de cores vibrantes, sombras suaves e tipografia moderna.
 */

:root {
    /* EscolaSync Official Design System (Teal Palette) */
    --es-teal: #0d9488;
    --es-teal-hover: #0f766e;
    --es-teal-light: #f0fdfa;
    --es-teal-border: #ccfbf1;
    --es-cyan: #0ea5e9;
    --es-cyan-light: #e0f2fe;
    --es-slate-dark: #1e293b;
    --es-slate-mid: #64748b;
    --es-slate-light: #94a3b8;
    --es-border: #e2e8f0;
    --es-bg: #f8fafc;
    --es-white: #ffffff;

    --es-success: #10b981;
    --es-success-bg: #d1fae5;
    --es-danger: #ef4444;
    --es-danger-bg: #fee2e2;
    --es-warning: #f59e0b;
    --es-warning-bg: #fef3c7;
    --es-info: #3b82f6;
    --es-info-bg: #dbeafe;

    --es-shadow-card: 0 2px 8px rgba(30, 41, 59, 0.06);
    --es-shadow: 0 4px 16px rgba(13, 148, 136, 0.12);
    --es-shadow-lg: 0 10px 30px rgba(13, 148, 136, 0.16);

    --es-radius: 12px;
    --es-radius-sm: 8px;
    --es-radius-lg: 16px;
    --es-radius-full: 9999px;

    /* Aliases de retrocompatibilidade para componentes legados --ef-* */
    --ef-primary: var(--es-teal);
    --ef-primary-soft: var(--es-teal-light);
    --ef-primary-hover: var(--es-teal-hover);
    --ef-bg: var(--es-bg);
    --ef-card-bg: var(--es-white);
    --ef-text-main: var(--es-slate-dark);
    --ef-text-muted: var(--es-slate-mid);
    --ef-border: var(--es-border);
    --ef-success: var(--es-success);
    --ef-danger: var(--es-danger);
    --ef-warning: var(--es-warning);
    --ef-info: var(--es-info);
    --ef-shadow: var(--es-shadow-card);
    --ef-radius: var(--es-radius);
    --ef-radius-sm: var(--es-radius-sm);
}

/* Unified Data Table System */
.ef-data-table-container {
    background: var(--ef-card-bg);
    border-radius: var(--ef-radius);
    box-shadow: var(--ef-shadow);
    overflow: hidden;
    border: 1px solid var(--ef-border);
    margin-bottom: 24px;
}

.ef-data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.ef-data-table thead th {
    background: #f8fafc;
    padding: 14px 20px;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--ef-text-muted);
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--ef-border);
}

.ef-data-table tbody td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--ef-border);
    font-size: 14px;
    vertical-align: middle;
    color: var(--ef-text-main);
}

.ef-data-table tbody tr:last-child td {
    border-bottom: none;
}

.ef-data-table tbody tr:hover td {
    background: #fcfdfe;
}

.ef-data-table strong {
    color: var(--ef-text-main);
    font-weight: 600;
}

/* Name-as-profile-link (listagens Alunos / ResponsÃ¡veis / Professores) */
.ef-aluno-name,
.ef-responsavel-name,
.ef-professor-name {
    font-weight: 600;
    color: var(--ef-primary, #1c68d4);
    text-decoration: none;
    transition: color 150ms ease-out, text-decoration 150ms ease-out;
}

.ef-aluno-name:hover,
.ef-aluno-name:focus,
.ef-responsavel-name:hover,
.ef-responsavel-name:focus,
.ef-professor-name:hover,
.ef-professor-name:focus {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.ef-aluno-name:focus-visible,
.ef-responsavel-name:focus-visible,
.ef-professor-name:focus-visible {
    outline: 2px solid var(--ef-primary, #1c68d4);
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(28, 104, 212, 0.12);
}

@media (prefers-reduced-motion: reduce) {
    .ef-aluno-name,
    .ef-responsavel-name,
    .ef-professor-name {
        transition: none;
    }
}

/* Badges */
.ef-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: var(--ef-radius-sm);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.ef-badge-success { background: var(--ef-success-light, rgba(52,191,163,0.1)); color: var(--ef-success); }
.ef-badge-danger { background: var(--ef-danger-light, rgba(244,81,108,0.1)); color: var(--ef-danger); }
.ef-badge-warning { background: var(--ef-warning-light, rgba(255,184,34,0.1)); color: var(--ef-warning); }
.ef-badge-info { background: var(--ef-info-light, rgba(54,163,247,0.1)); color: var(--ef-info, #36a3f7); }

/* Responsive Tables */
@media (max-width: 782px) {
    .ef-data-table thead { display: none; }
    .ef-data-table tbody td {
        display: block;
        padding: 10px 20px;
        text-align: right;
        border-bottom: none;
    }
    .ef-data-table tbody td::before {
        content: attr(data-label);
        float: left;
        font-weight: 700;
        text-transform: uppercase;
        font-size: 11px;
        color: var(--ef-text-muted);
    }
    .ef-data-table tbody tr {
        border-bottom: 10px solid #f8fafc;
        display: block;
    }
}

/* Base Styles para Containers do Plugin */
.ef-dashboard-container {
    background-color: var(--ef-bg);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; /* impeccable-disable-line overused-font */
    color: var(--ef-text-main);
    padding: 20px;
}

/* Settings page wrapper fix */
.ef-dashboard-container .wrap {
    max-width: 100%;
    padding: 0;
}

/* Ensure form tables inside settings sections are styled */
.ef-settings-section-content table.form-table {
    width: 100%;
    margin-bottom: 20px;
    border-collapse: collapse;
}

.ef-settings-section-content table.form-table tr {
    border-bottom: 1px solid var(--ef-border);
}

.ef-settings-section-content table.form-table tr:last-child {
    border-bottom: none;
}

.ef-settings-section-content table.form-table th {
    padding: 16px;
    width: 250px;
    vertical-align: top;
    font-weight: 600;
    color: var(--ef-text-main);
}

.ef-settings-section-content table.form-table td {
    padding: 16px;
    vertical-align: top;
}

.ef-settings-section-content table.form-table label {
    display: block;
    font-weight: 500;
    font-size: 14px;
    color: var(--ef-text-main);
    margin-bottom: 4px;
}

.ef-settings-section-content table.form-table input[type="text"],
.ef-settings-section-content table.form-table input[type="url"],
.ef-settings-section-content table.form-table input[type="password"],
.ef-settings-section-content table.form-table input[type="email"],
.ef-settings-section-content table.form-table select,
.ef-settings-section-content table.form-table textarea,
.ef-settings-section-content table.form-table input.regular-text {
    width: 100%;
    max-width: 500px;
    padding: 10px 14px;
    border: 2px solid var(--ef-border);
    border-radius: var(--ef-radius-sm);
    font-size: 14px;
    transition: all 0.2s ease;
    background: #fff;
    box-sizing: border-box;
}

.ef-settings-section-content table.form-table input:focus,
.ef-settings-section-content table.form-table select:focus,
.ef-settings-section-content table.form-table textarea:focus {
    outline: none;
    border-color: var(--ef-primary);
    box-shadow: 0 0 0 3px var(--ef-primary-soft);
}

.ef-settings-section-content table.form-table .description {
    display: block;
    font-size: 12px;
    color: var(--ef-text-muted);
    margin-top: 6px;
    line-height: 1.5;
}

.ef-settings-section-content table.form-table code {
    display: inline-block;
    padding: 4px 8px;
    background: #f1f5f9;
    border-radius: var(--ef-radius-sm);
    font-size: 12px;
    color: #475569;
}

/* Section descriptions - hide empty p tags */
.ef-settings-section-content > p:empty,
.ef-settings-section-content p.description:empty {
    display: none;
}

.ef-settings-section-content > p:not(:empty) {
    font-size: 14px;
    color: var(--ef-text-muted);
    margin-bottom: 20px;
    padding: 12px 16px;
    background: #f8fafc;
    border-radius: var(--ef-radius-sm);
    border-left: 1px solid var(--ef-primary);
}

/* Submit button styling */
.ef-settings-section-content .submit {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--ef-border);
}

.ef-settings-section-content .submit input.button-primary {
    padding: 12px 24px;
    border-radius: var(--ef-radius-sm);
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    background: var(--ef-primary) !important;
    border: none !important;
}

.ef-settings-section-content .submit input.button-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(28, 104, 212, 0.3) /* impeccable-disable-line design-system-color */;
}

/* Checkbox styling */
.ef-settings-section-content table.form-table input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    cursor: pointer;
    vertical-align: middle;
}

.ef-settings-section-content table.form-table input[type="checkbox"] + label {
    display: inline;
    cursor: pointer;
    vertical-align: middle;
}

/* Card Estilo Datix */
.ef-card {
    background: var(--ef-card-bg);
    border-radius: var(--ef-radius);
    box-shadow: var(--ef-shadow);
    border: 1px solid var(--ef-border);
    padding: 20px;
    margin-bottom: 24px;
    transition: transform 0.2s ease-in-out;
}

.ef-card:hover {
    transform: translateY(-2px);
}

/* MÃ©trica "Small Card" */
.ef-metric-card {
    display: flex;
    flex-direction: column;
    padding: 24px;
    color: #fff;
    border-radius: var(--ef-radius);
    position: relative;
    overflow: hidden;
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 20px rgba(82,63,105,0.12); /* impeccable-disable-line design-system-color */
}

.ef-metric-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(82,63,105,0.18); /* impeccable-disable-line design-system-color */
}

.ef-metric-card .ef-metric-label {
    font-size: 14px;
    font-weight: 500;
    opacity: 0.9;
    margin-bottom: 8px;
}

.ef-metric-card .ef-metric-value {
    font-size: 28px;
    font-weight: 700;
}

.ef-metric-card.visitors { background: linear-gradient(45deg, #716aca, #9188e4 /* impeccable-disable-line design-system-color */); } /* impeccable-disable-line design-system-color */
.ef-metric-card.sales    { background: linear-gradient(45deg, #f4516c, #f77d8e /* impeccable-disable-line design-system-color */); } /* impeccable-disable-line design-system-color */
.ef-metric-card.income   { background: linear-gradient(45deg, #34bfa3, #5ed8bf /* impeccable-disable-line design-system-color */); } /* impeccable-disable-line design-system-color */
.ef-metric-card.reviews  { background: linear-gradient(45deg, #ffb822, #ffcd5d /* impeccable-disable-line design-system-color */); } /* impeccable-disable-line design-system-color */

/* Badges e Status */
.ef-badge {
    padding: 4px 10px;
    border-radius: var(--ef-radius-sm);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.ef-badge-success { background: var(--ef-success-light, rgba(52,191,163,0.1)); color: var(--ef-success); }
.ef-badge-danger { background: var(--ef-danger-light, rgba(244,81,108,0.1)); color: var(--ef-danger); }
.ef-badge-info { background: var(--ef-info-light, rgba(54,163,247,0.1)); color: var(--ef-info, #36a3f7); }

/* Dashboard Builder - Tooling & Editor */
.ef-builder-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    padding: 20px;
    background: #f8fafc;
    border-radius: var(--ef-radius);
    border: 1px solid var(--ef-border);
}

.ef-builder-column {
    background: #fff;
    padding: 25px;
    border-radius: var(--ef-radius-sm);
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
    min-height: 400px;
}

.ef-builder-column h4 {
    margin-top: 0;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--ef-text-muted);
    border-bottom: 2px solid var(--ef-bg);
    padding-bottom: 15px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Builder Items (The Draggable Tools) */
.ef-module-item {
    background: #fff;
    border: 1px solid var(--ef-border);
    margin-bottom: 12px;
    padding: 15px;
    border-radius: var(--ef-radius-sm);
    cursor: grab;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.ef-module-item:hover {
    border-color: var(--ef-primary);
    box-shadow: 0 5px 15px rgba(28, 104, 212, 0.1);
    background: #fafbff;
}

.ef-module-item:active { cursor: grabbing; }
.ef-sortable-placeholder {
    height: 60px;
    background: var(--ef-primary-soft);
    border: 2px dashed var(--ef-primary);
    margin-bottom: 12px;
    border-radius: var(--ef-radius-sm);
}

/* Icons & Actions inside items */
.ef-module-item .dashicons-move {
    color: #cbd5e1;
    margin-right: 12px;
}

.ef-module-item .ef-item-actions {
    display: flex;
    gap: 10px;
}

.ef-action-icon {
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    border-radius: var(--ef-radius-sm);
    cursor: pointer;
    background: #f1f5f9;
    color: var(--ef-text-muted);
    transition: all 0.2s;
}

.ef-action-icon:hover { background: var(--ef-primary); color: #fff; }
.ef-action-icon.remove:hover { background: var(--ef-danger); color: #fff; }
.ef-action-icon.add:hover { background: var(--ef-success); color: #fff; }

/* Modal System */
.ef-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 41, 59, 0.55);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.ef-builder-modal-wrap {
    background: #fff;
    border-radius: var(--ef-radius);
    width: 480px;
    max-width: 95vw;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 50px var(--ef-border, #e2e8f0);
    animation: mcpModalFadeIn 0.3s ease-out;
}

/* Conflict Modal */
#ef-conflito-overlay { animation: efConflitoFadeIn 0.2s ease; }
#ef-conflito-overlay > div { animation: efConflitoSlideIn 0.25s ease; }
@keyframes efConflitoFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes efConflitoSlideIn { from { opacity: 0; transform: translateY(-20px) scale(0.97); } to { opacity: 1; transform: translateY(0) scale(1); } }

@keyframes mcpModalFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.ef-modal-header {
    background: var(--ef-primary);
    color: #fff;
    padding: 20px;
    border-radius: var(--ef-radius) var(--ef-radius) 0 0;
}

.ef-modal-body {
    padding: 24px;
}

.ef-modal-footer {
    padding: 20px;
    border-top: 1px solid var(--ef-border);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Status Indicators - ConexÃµes */
.ef-status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 500;
    background: #f1f5f9;
    transition: all 0.3s ease;
}

.ef-status-indicator .ef-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.ef-status-indicator.online {
    background: var(--ef-success-light, rgba(52,191,163,0.1));
    color: var(--ef-success);
}

.ef-status-indicator.online .ef-status-dot {
    background: var(--ef-success);
    box-shadow: 0 0 0 3px rgba(52, 191, 163, 0.2);
}

.ef-status-indicator.offline {
    background: var(--ef-danger-light, rgba(244,81,108,0.1));
    color: var(--ef-danger);
}

.ef-status-indicator.offline .ef-status-dot {
    background: var(--ef-danger);
    animation: none;
}

.ef-status-indicator.pending {
    background: var(--ef-warning-light, rgba(255,184,34,0.1));
    color: var(--ef-warning);
}

.ef-status-indicator.pending .ef-status-dot {
    background: var(--ef-warning);
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
}

/* Settings Page Enhancements */
.ef-settings-wrapper {
    max-width: 1200px;
    margin: 0 auto;
}

.ef-settings-header {
    background: linear-gradient(135deg, var(--ef-primary) 0%, var(--ef-primary) 100%);
    color: white;
    padding: 30px;
    border-radius: var(--ef-radius);
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ef-settings-header h1 {
    color: white;
    margin: 0;
    font-size: 24px;
    font-weight: 700;
}

.ef-settings-header p {
    margin: 8px 0 0 0;
    opacity: 0.9;
    font-size: 14px;
}

.ef-settings-tabs {
    display: flex;
    gap: 4px;
    background: #fff;
    padding: 6px;
    border-radius: var(--ef-radius);
    box-shadow: 0 1px 3px rgba(82, 63, 105, 0.08); /* impeccable-disable-line design-system-color */
    margin-bottom: 24px;
    overflow-x: auto;
}

.ef-settings-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: var(--ef-radius-sm);
    text-decoration: none;
    color: var(--ef-text-muted);
    font-weight: 500;
    font-size: 14px;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.ef-settings-tab:hover {
    background: var(--ef-primary-soft);
    color: var(--ef-primary);
}

.ef-settings-tab.active {
    background: var(--ef-primary);
    color: white;
}

.ef-settings-tab .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.ef-settings-section {
    background: #fff;
    border-radius: var(--ef-radius);
    border: 1px solid var(--ef-border);
    margin-bottom: 20px;
    overflow: hidden;
}

.ef-settings-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: #f8fafc;
    border-bottom: 1px solid var(--ef-border);
    cursor: pointer;
    transition: background 0.2s;
}

.ef-settings-section-header:hover {
    background: #f1f5f9;
}

.ef-settings-section-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--ef-text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}

.ef-settings-section-header h3 .dashicons {
    color: var(--ef-primary);
}

.ef-settings-section-content {
    padding: 24px;
}

.ef-settings-section.collapsed .ef-settings-section-content {
    display: none;
}

.ef-settings-section.collapsed .ef-settings-section-header::after {
    transform: rotate(-90deg);
}

.ef-settings-section-header::after {
    content: "\f140";
    font: 400 20px/1 dashicons;
    speak: never;
    display: inline-block;
    padding: 0 2px 0 10px;
    vertical-align: middle;
    transition: transform 0.2s;
    color: var(--ef-text-muted);
}

/* Form Fields Enhancement */
.ef-form-group {
    margin-bottom: 20px;
}

.ef-form-group label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    color: var(--ef-text-main);
    margin-bottom: 8px;
}

.ef-form-group input[type="text"],
.ef-form-group input[type="url"],
.ef-form-group input[type="password"],
.ef-form-group input[type="email"],
.ef-form-group select,
.ef-form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--ef-border);
    border-radius: var(--ef-radius-sm);
    font-size: 14px;
    transition: all 0.2s ease;
    background: #fff;
}

.ef-form-group input:focus,
.ef-form-group select:focus,
.ef-form-group textarea:focus {
    outline: none;
    border-color: var(--ef-primary);
    box-shadow: 0 0 0 3px var(--ef-primary-soft);
}

.ef-form-group .description {
    font-size: 12px;
    color: var(--ef-text-muted);
    margin-top: 6px;
    line-height: 1.5;
}

.ef-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

/* Quick Actions Bar */
.ef-quick-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.ef-quick-action {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: white;
    border: 1px solid var(--ef-border);
    border-radius: var(--ef-radius-sm);
    text-decoration: none;
    color: var(--ef-text-main);
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.ef-quick-action:hover {
    border-color: var(--ef-primary);
    box-shadow: 0 4px 12px rgba(28, 104, 212, 0.15);
    transform: translateY(-2px);
}

.ef-quick-action .dashicons {
    color: var(--ef-primary);
}

.ef-nav-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--ef-border);
    overflow-x: auto;
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

.ef-nav-tabs::-webkit-scrollbar {
    display: none;  /* Chrome, Safari and Opera */
}

.ef-nav-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 20px;
    font-weight: 600;
    font-size: 14px;
    color: var(--ef-text-muted);
    text-decoration: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.ef-nav-tab:hover {
    color: var(--ef-primary);
}

.ef-nav-tab.active {
    color: var(--ef-primary);
    border-bottom-color: var(--ef-primary);
}

.ef-nav-tab .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* Settings Form Styles - WordPress Form Elements */
.ef-settings-section-content table.form-table {
    width: 100% !important;
    margin-bottom: 20px;
    border-collapse: collapse;
}

.ef-settings-section-content table.form-table tr {
    border-bottom: 1px solid var(--ef-border);
}

.ef-settings-section-content table.form-table tr:last-child {
    border-bottom: none;
}

.ef-settings-section-content table.form-table th {
    padding: 16px !important;
    width: 250px;
    vertical-align: top;
    font-weight: 600;
    color: var(--ef-text-main);
}

.ef-settings-section-content table.form-table td {
    padding: 16px !important;
    vertical-align: top;
}

.ef-settings-section-content table.form-table label {
    display: block;
    font-weight: 500;
    font-size: 14px;
    color: var(--ef-text-main);
    margin-bottom: 4px;
}

.ef-settings-section-content table.form-table input[type="text"],
.ef-settings-section-content table.form-table input[type="url"],
.ef-settings-section-content table.form-table input[type="password"],
.ef-settings-section-content table.form-table input[type="email"],
.ef-settings-section-content table.form-table select,
.ef-settings-section-content table.form-table textarea,
.ef-settings-section-content table.form-table input.regular-text {
    width: 100% !important;
    max-width: 500px;
    padding: 10px 14px !important;
    border: 2px solid var(--ef-border) !important;
    border-radius: 8px !important;
    font-size: 14px;
    transition: all 0.2s ease;
    background: #fff !important;
    box-sizing: border-box;
}

.ef-settings-section-content table.form-table input:focus,
.ef-settings-section-content table.form-table select:focus,
.ef-settings-section-content table.form-table textarea:focus {
    outline: none;
    border-color: var(--ef-primary) !important;
    box-shadow: 0 0 0 3px var(--ef-primary-soft) !important;
}

.ef-settings-section-content table.form-table .description {
    display: block;
    font-size: 12px;
    color: var(--ef-text-muted);
    margin-top: 6px;
    line-height: 1.5;
}

.ef-settings-section-content table.form-table code {
    display: inline-block;
    padding: 4px 8px;
    background: #f1f5f9;
    border-radius: var(--ef-radius-sm);
    font-size: 12px;
    color: #475569;
}

/* Section descriptions */
.ef-settings-section-content > p {
    font-size: 14px;
    color: var(--ef-text-muted);
    margin-bottom: 20px;
    padding: 12px 16px;
    background: #f8fafc;
    border-radius: var(--ef-radius-sm);
    border-left: 1px solid var(--ef-primary);
}

.ef-settings-section-content > p:empty {
    display: none;
}

/* Submit button styling */
.ef-settings-section-content .submit {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--ef-border);
}

.ef-settings-section-content .submit input.button-primary {
    padding: 12px 24px;
    border-radius: var(--ef-radius-sm);
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    background: var(--ef-primary) !important;
    border: none !important;
}

.ef-settings-section-content .submit input.button-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(28, 104, 212, 0.3) /* impeccable-disable-line design-system-color */;
}

/* Checkbox styling */
.ef-settings-section-content table.form-table input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    cursor: pointer;
    vertical-align: middle;
}

.ef-settings-section-content table.form-table input[type="checkbox"] + label {
    display: inline;
    cursor: pointer;
    vertical-align: middle;
}

/* Badges & Status */
.ef-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ef-badge-success {
    background: var(--ef-success-light, rgba(52,191,163,0.1));
    color: var(--ef-success);
}

.ef-badge-danger {
    background: var(--ef-danger-light, rgba(244,81,108,0.1));
    color: var(--ef-danger);
}

.ef-badge-warning {
    background: var(--ef-warning-light, rgba(255,184,34,0.1));
    color: var(--ef-warning);
}

.ef-badge-info {
    background: #eff6ff;
    color: var(--ef-primary);
}

/* Tooltip / Micro-animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.ef-tab-content.active {
    animation: fadeIn 0.3s ease-out;
}

/* Estilos para Resultados de Busca */
.ef-search-results-container {
    background: #fff;
    border: 1px solid var(--ef-border);
    border-radius: var(--ef-radius-sm);
    box-shadow: 0 10px 25px rgba(82, 63, 105, 0.1); /* impeccable-disable-line design-system-color */
    max-height: 300px;
    overflow-y: auto;
    position: absolute;
    width: 100%;
    z-index: 100;
    margin-top: 4px;
}

.ef-search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 1px solid #f1f5f9;
}

.ef-search-result-item:last-child {
    border-bottom: none;
}

.ef-search-result-item:hover {
    background: #f8fafc;
}

.ef-search-result-item .ef-user-avatar {
    width: 32px;
    height: 32px;
    background: var(--ef-primary-soft);
    color: var(--ef-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.ef-search-result-item .ef-user-info {
    flex: 1;
}

.ef-search-result-item .ef-user-name {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: var(--ef-text-main);
}

.ef-search-result-item .ef-user-email {
    display: block;
    font-size: 12px;
    color: var(--ef-text-muted);
}

.ef-search-loading {
    padding: 20px;
    text-align: center;
    color: var(--ef-text-muted);
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.ef-search-no-results {
    padding: 20px;
    text-align: center;
    color: var(--ef-text-muted);
    font-size: 13px;
}

/* WordPress 7.0 View Transitions â€” removido: view-transition-name em DOM dinÃ¢mico
   causa AbortError: Transition was skipped. WP 7.0 jÃ¡ gerencia transiÃ§Ãµes nativamente. */

/* Sub-nav tabs pills layout */
.ef-sub-nav-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    padding: 6px;
    background: #f8fafc;
    border-radius: var(--ef-radius-sm);
    border: 1px solid var(--ef-border);
    width: fit-content;
}

.ef-sub-nav-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-weight: 500;
    font-size: 13px;
    color: var(--ef-text-muted);
    text-decoration: none;
    border-radius: var(--ef-radius-sm);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.ef-sub-nav-tab:hover {
    color: var(--ef-primary);
    background: rgba(28, 104, 212, 0.05);
}

.ef-sub-nav-tab.active {
    color: #fff;
    background: var(--ef-primary);
}

.ef-sub-nav-tab .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Custom modern scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: var(--ef-radius-sm);
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

* {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

/* ============================================================
   Alunos Page â€” Sub-tabs + Container
   ============================================================ */
.ef-alunos-subtabs-wrap {
    background: var(--ef-card-bg);
    border-radius: var(--ef-radius);
    padding: 0 24px;
    margin-bottom: 16px;
    box-shadow: var(--ef-shadow);
    border: 1px solid var(--ef-border);
    display: flex;
    align-items: flex-end;
    gap: 0;
}

.ef-alunos-subtabs {
    display: flex;
    gap: 0;
    align-items: flex-end;
    border-bottom: 1px solid var(--ef-border);
    margin-bottom: 20px;
    padding-bottom: 0;
    flex-wrap: wrap;
}

/* When inside the subtabs-wrap, remove the border-bottom from the container */
.ef-alunos-subtabs-wrap .ef-alunos-subtabs {
    border-bottom: none;
    margin-bottom: 0;
    padding: 0;
    flex: 1;
}

.ef-aluno-subtab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 14px 20px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    color: var(--ef-text-muted);
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    white-space: nowrap;
}

.ef-aluno-subtab:hover {
    color: var(--ef-primary);
    text-decoration: none;
}

.ef-aluno-subtab.active {
    color: var(--ef-primary);
    border-bottom-color: var(--ef-primary);
}

.ef-aluno-subtab .dashicons {
    font-size: 15px;
    width: 15px;
    height: 15px;
    color: inherit;
}

/* DataViews host container */
.ef-dataviews-host {
    background: var(--ef-card-bg);
    border-radius: var(--ef-radius);
    border: 1px solid var(--ef-border);
    box-shadow: var(--ef-shadow);
    min-height: 200px;
    overflow: hidden;
}

.ef-loading-msg {
    color: var(--ef-text-muted);
    text-align: center;
    padding: 48px 24px;
    font-size: 14px;
}

/* Alunos page section header */
.ef-alunos-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.ef-section-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--ef-text-main);
    text-wrap: balance;
}

.ef-section-sub {
    margin: 4px 0 0 0;
    color: var(--ef-text-muted);
    font-size: 13px;
}

/* Primary action button */
.ef-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: var(--ef-primary);
    color: #fff;
    border: none;
    border-radius: var(--ef-radius-sm);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.ef-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(28, 104, 212, 0.3); /* impeccable-disable-line design-system-color */
    color: #fff;
    text-decoration: none;
}

.ef-btn-primary .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    color: inherit;
}

/* ============================================================
   Datix Premium Banner and Layout Styling
   ============================================================ */
.ef-dashboard-banner {
    background: var(--ef-primary, #1c68d4);
    border-radius: var(--ef-radius);
    padding: 32px;
    margin-bottom: 32px;
    color: white;
}

.ef-dashboard-banner h1 {
    color: white !important;
    font-size: 28px !important;
    font-weight: 700;
    margin: 0;
}

.ef-dashboard-banner p {
    margin: 8px 0 0 0;
    opacity: 0.9;
    font-size: 15px;
}

.ef-banner-metric-grid {
    display: flex;
    gap: 24px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.ef-banner-metric {
    background: rgba(255, 255, 255, 0.15);
    padding: 16px 24px;
    border-radius: var(--ef-radius-sm);
    min-width: 150px;
}

.ef-banner-metric .label {
    font-size: 12px;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.ef-banner-metric .val {
    font-size: 24px;
    font-weight: 700;
    margin-top: 4px;
}

/* Unified Filters & Search Bar Styling */
.ef-filter-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.ef-filter-select, .ef-filter-input {
    padding: 10px 14px;
    border: 2px solid var(--ef-border);
    border-radius: var(--ef-radius-sm);
    font-size: 14px;
    background: #fff;
    color: var(--ef-text-main);
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.ef-filter-select:focus, .ef-filter-input:focus {
    outline: none;
    border-color: var(--ef-primary);
    box-shadow: 0 0 0 3px var(--ef-primary-soft);
}

.ef-filter-input {
    flex: 1;
    min-width: 200px;
}

/* ============================================================
   Modern UI Animations & Glassmorphism Transitions (Impeccable System)
   ============================================================ */

/* Glassmorphism containers */
.ef-glass-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.04); /* impeccable-disable-line design-system-color */
    border-radius: var(--ef-radius);
    padding: 24px;
    margin-bottom: 24px;
}

/* Smooth list entry animation */
@keyframes efSlideInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ef-animate-entry {
    animation: efSlideInUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Enhancing standard table visual interactivity */
.ef-data-table tbody tr {
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.ef-data-table tbody tr:hover {
    background-color: var(--ef-primary-soft) !important;
}

/* Action button micro-interactions */
.ef-btn-primary, .button {
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.ef-btn-primary:active, .button:active {
    transform: scale(0.97) !important;
}

/* Responsive Grid columns for layouts */
.ef-grid-2-1 {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

@media (max-width: 960px) {
    .ef-grid-2-1 {
        grid-template-columns: 1fr;
    }
}

/* Sync Pulsing Dot for background tasks */
.ef-sync-pulse {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--ef-success);
    box-shadow: 0 0 0 0 rgba(52, 191, 163, 0.7);
    animation: efPulseSuccess 2s infinite;
}

@keyframes efPulseSuccess {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(52, 191, 163, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 8px rgba(52, 191, 163, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(52, 191, 163, 0.7);
    }
}

/* â”€â”€â”€ QDS (Quadro de Horarios Semanal) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
#ef-qds-preview .ef-qds-wrapper {
    background: #fff;
    padding: 24px;
    border-radius: var(--ef-radius-sm);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08); /* impeccable-disable-line design-system-color */
    max-width: 100%;
    overflow-x: auto;
}
#ef-qds-preview .ef-qds-header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid #1c68d4;
}
#ef-qds-preview .ef-qds-header h2 {
    margin: 0 0 4px;
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
}
#ef-qds-preview .ef-qds-header h3 {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 600;
    color: #334155;
}
#ef-qds-preview .ef-qds-header p {
    margin: 0;
    font-size: 13px;
    color: #64748b;
}
#ef-qds-preview .ef-qds-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}
#ef-qds-preview .ef-qds-table th {
    background: #1c68d4;
    color: #fff;
    padding: 10px 8px;
    text-align: center;
    font-weight: 600;
    border: 1px solid #1c68d4;
}
#ef-qds-preview .ef-qds-table td {
    padding: 8px 6px;
    border: 1px solid #e2e8f0;
    text-align: center;
    vertical-align: middle;
}
#ef-qds-preview .ef-qds-horario {
    font-weight: 600;
    background: #f1f5f9;
    color: #334155;
    white-space: nowrap;
    width: 100px;
}
#ef-qds-preview .ef-qds-cell-filled {
    min-height: 44px;
    font-weight: 500;
    color: #1e293b;
}
#ef-qds-preview .ef-qds-cell-empty {
    color: #94a3b8;
    font-style: italic;
}
#ef-qds-preview .ef-qds-cell-filled small {
    display: block;
    font-size: 10px;
    font-weight: 400;
    color: #64748b;
    margin-top: 2px;
}
}

/* Campos de chave protegidos (admin nÃ£o pode copiar) */
input.ef-protected-key {
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
}

/* Wrapper do campo de chave com snippet + status + botÃ£o validar */
.ef-key-field-wrapper {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.ef-key-snippet {
    font-family: 'Courier New', monospace; /* impeccable-disable-line design-system-font */
    font-size: 12px;
    color: #64748b;
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: var(--ef-radius-sm); /* impeccable-disable-line design-system-radius */
    letter-spacing: 0.5px;
    user-select: text;
    -webkit-user-select: text;
}
.ef-key-status {
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--ef-radius-sm); /* impeccable-disable-line design-system-radius */
}
.ef-key-status-ok {
    color: #166534; /* impeccable-disable-line design-system-color */
    background: #dcfce7; /* impeccable-disable-line design-system-color */
}
.ef-key-status-none {
    color: #6b7280; /* impeccable-disable-line design-system-color */
    background: #f3f4f6;
}
.ef-key-status-error {
    color: #991b1b; /* impeccable-disable-line design-system-color */
    background: #fee2e2; /* impeccable-disable-line design-system-color */
}
.ef-key-test-result {
    font-size: 12px;
    margin-top: 2px !important;
}

.ef-token-rotation-notice {
    border-left-color: #f4516c !important;
}
.ef-token-rotation-notice-content h3 {
    margin: 0 0 8px;
    font-size: 15px;
}
.ef-token-rotation-notice-content ul {
    margin-bottom: 12px;
}
.ef-token-rotation-notice-content .button {
    margin-right: 6px;
}

/* Boletim Escolar System Styles */
.ef-resp-tag {
    transition: all 0.2s ease;
}
.ef-resp-tag:hover {
    filter: brightness(0.95);
}
.ef-btn-boletim-individual {
    border-radius: var(--ef-radius-sm) !important;
    font-weight: 600 !important;
}

@media print {
    .no-print, #adminmenumain, #wpadminbar, #adminmenuwrap, #adminmenuback, #wpfooter {
        display: none !important;
    }
    body, #wpcontent {
        margin: 0 !important;
        padding: 0 !important;
        background: #fff !important;
    }
}

/* Professor VisÃ£o Geral & Minhas Turmas Redesign (NOT-012) */
.ef-prof-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.ef-prof-kpi-card {
    background: var(--ef-card-bg);
    border: 1px solid var(--ef-border);
    border-radius: var(--ef-radius);
    padding: 20px;
    box-shadow: var(--ef-shadow);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ef-prof-kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 36px 0 rgba(82, 63, 105, 0.08); /* impeccable-disable-line design-system-color */
}

.ef-prof-kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--ef-radius-sm);
    background: rgba(28, 104, 212, 0.1);
    color: var(--ef-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ef-prof-kpi-icon .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

.ef-prof-kpi-val {
    font-size: 26px;
    font-weight: 700;
    color: var(--ef-text-main);
    line-height: 1.1;
}

.ef-prof-kpi-label {
    font-size: 13px;
    color: var(--ef-text-muted);
    margin-top: 4px;
}

.ef-prof-control-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    background: var(--ef-card-bg);
    border: 1px solid var(--ef-border);
    border-radius: var(--ef-radius);
    padding: 16px 24px;
    margin-bottom: 24px;
    box-shadow: var(--ef-shadow);
}

.ef-view-toggle,
.ef-prof-view-toggle {
    display: inline-flex;
    background: var(--ef-bg);
    padding: 4px;
    border-radius: var(--ef-radius-sm);
    border: 1px solid var(--ef-border);
    gap: 4px;
}

.ef-toggle-btn,
.ef-prof-toggle-btn {
    border: none;
    background: transparent;
    color: var(--ef-text-muted);
    font-size: 13px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: var(--ef-radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.ef-toggle-btn:hover,
.ef-prof-toggle-btn:hover {
    color: var(--ef-primary);
}

.ef-toggle-btn.active,
.ef-prof-toggle-btn.active {
    background: var(--ef-primary);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(28, 104, 212, 0.25);
}

.ef-prof-group-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.ef-prof-card-group {
    background: var(--ef-card-bg);
    border: 1px solid var(--ef-border);
    border-radius: var(--ef-radius);
    padding: 24px;
    box-shadow: var(--ef-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ef-prof-card-group:hover {
    box-shadow: 0 12px 36px 0 rgba(82, 63, 105, 0.08); /* impeccable-disable-line design-system-color */
}

.ef-prof-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--ef-border);
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.ef-prof-group-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--ef-text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}

.ef-prof-badges-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.ef-prof-badge {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: var(--ef-radius-sm);
    background: var(--ef-bg);
    color: var(--ef-text-muted);
    border: 1px solid var(--ef-border);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.ef-prof-badge-primary {
    background: rgba(28, 104, 212, 0.08);
    color: var(--ef-primary);
    border-color: rgba(28, 104, 212, 0.2);
}

.ef-prof-items-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

.ef-prof-item-card {
    background: var(--ef-bg);
    border: 1px solid var(--ef-border);
    border-radius: var(--ef-radius-sm);
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.ef-prof-item-card:hover {
    background: #ffffff;
    border-color: rgba(28, 104, 212, 0.3);
}

.ef-prof-item-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--ef-text-main);
    margin: 0 0 4px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ef-prof-schedule-box {
    font-size: 12px;
    color: var(--ef-text-muted);
    background: rgba(255, 255, 255, 0.8);
    padding: 6px 10px;
    border-radius: var(--ef-radius-sm);
    border: 1px dashed var(--ef-border);
    display: flex;
    align-items: center;
    gap: 6px;
}

.ef-prof-actions-row {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.ef-prof-actions-row .button {
    font-size: 11px !important;
    padding: 8px 6px !important;
    height: auto !important;
    min-height: 52px !important;
    line-height: 1.2 !important;
    display: inline-flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    border-radius: var(--ef-radius-sm) !important;
    flex: 1 1 0px !important;
    min-width: 60px !important;
    text-align: center !important;
}

.ef-prof-actions-row .button .dashicons {
    font-size: 18px !important;
    width: 18px !important;
    height: 18px !important;
    margin: 0 !important;
}





/* â”€â”€â”€ Grade HorÃ¡ria â€” VisÃ£o Geral de Todas as Turmas (NOT-014) â”€â”€â”€ */

.ef-grade-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: var(--ef-bg);
    border-radius: var(--ef-radius-sm);
}

.ef-grade-search-input {
    flex: 1;
    min-width: 200px;
    height: 34px;
    padding: 0 12px;
    border: 1px solid var(--ef-border);
    border-radius: var(--ef-radius-sm);
    background: #ffffff;
    font-size: 13px;
    color: var(--ef-text-main);
}

.ef-grade-search-input:focus {
    outline: none;
    border-color: var(--ef-primary);
    box-shadow: 0 0 0 2px rgba(28, 104, 212, 0.15);
}

.ef-grade-filter-select {
    height: 34px;
    border: 1px solid var(--ef-border);
    border-radius: var(--ef-radius-sm);
    background: #ffffff;
    font-size: 13px;
    color: var(--ef-text-main);
}

/* Selo de horÃ¡rio no card da turma */
.ef-grade-selo {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border: 1px solid transparent;
    border-radius: var(--ef-radius-sm);
    background: transparent;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.ef-grade-selo .dashicons {
    font-size: 14px !important;
    width: 14px !important;
    height: 14px !important;
}

.ef-grade-selo:hover {
    transform: translateY(-1px);
}

.ef-grade-selo-vazio {
    background: rgba(255, 184, 34, 0.12);
    color: #8a6100; /* impeccable-disable-line design-system-color */
    border-color: rgba(255, 184, 34, 0.35);
}

.ef-grade-selo-ok {
    background: rgba(52, 191, 163, 0.12);
    color: #1d7a63; /* impeccable-disable-line design-system-color */
    border-color: rgba(52, 191, 163, 0.35);
}

.ef-grade-selo-flash {
    background: rgba(28, 104, 212, 0.12);
    color: var(--ef-primary);
    border-color: rgba(28, 104, 212, 0.35);
}

/* Card de disciplina na visÃ£o geral */
.ef-grade-disc-card {
    cursor: pointer;
}

.ef-grade-disc-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
}

.ef-grade-sem-aula {
    opacity: 0.65;
    font-style: italic;
}

.ef-grade-sem-disciplinas {
    margin: 0;
    padding: 16px;
    text-align: center;
    color: var(--ef-text-muted);
    font-size: 13px;
}

/* Menu contextual do selo */
.ef-grade-menu {
    position: fixed;
    z-index: 100101;
    min-width: 190px;
    padding: 6px;
    background: #ffffff;
    border: 1px solid var(--ef-border);
    border-radius: var(--ef-radius-sm);
    box-shadow: 0 10px 30px 0 rgba(82, 63, 105, 0.18); /* impeccable-disable-line design-system-color */
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ef-grade-menu button {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin: 0;
    padding: 7px 10px;
    border: none;
    border-radius: var(--ef-radius-sm);
    background: transparent;
    font-size: 13px;
    color: var(--ef-text-main);
    text-align: left;
    cursor: pointer;
}

.ef-grade-menu button .dashicons {
    font-size: 16px !important;
    width: 16px !important;
    height: 16px !important;
    color: var(--ef-text-muted);
}

.ef-grade-menu button:hover:not(:disabled) {
    background: rgba(28, 104, 212, 0.08);
    color: var(--ef-primary);
}

.ef-grade-menu button:hover:not(:disabled) .dashicons {
    color: var(--ef-primary);
}

.ef-grade-menu button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* Toast de feedback */
.ef-grade-toast {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 100102;
    max-width: 360px;
    padding: 12px 18px;
    background: #1e293b;
    color: #ffffff;
    font-size: 13px;
    border-radius: var(--ef-radius-sm);
    box-shadow: 0 10px 30px 0 rgba(82, 63, 105, 0.25); /* impeccable-disable-line design-system-color */
}

.ef-grade-toast-error {
    background: #b32d2e; /* impeccable-disable-line design-system-color */
}

@media (max-width: 782px) {
    .ef-grade-filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .ef-grade-search-input {
        min-width: 0;
    }
}

/* Secretaria Escolar - Card View Grid (Turmas & Disciplinas) */
.ef-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin-top: 16px;
}

.ef-turma-card,
.ef-disc-card {
    background: var(--ef-card-bg);
    border: 1px solid var(--ef-border);
    border-radius: var(--ef-radius);
    padding: 20px;
    box-shadow: var(--ef-shadow);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 16px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.ef-turma-card:hover,
.ef-disc-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 36px 0 rgba(82, 63, 105, 0.08); /* impeccable-disable-line design-system-color */
    border-color: rgba(28, 104, 212, 0.3);
}

.ef-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.ef-card-title-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ef-card-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--ef-text-main);
    line-height: 1.3;
}

.ef-card-subtitle {
    font-size: 12px;
    color: var(--ef-text-muted);
}

.ef-card-badges-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.ef-card-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
    color: var(--ef-text-muted);
    padding: 10px 0;
    border-top: 1px solid var(--ef-border);
    border-bottom: 1px solid var(--ef-border);
}

.ef-card-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.ef-card-actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.ef-card-actions-row .button {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    padding: 4px 12px !important;
    height: 32px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    border-radius: var(--ef-radius-sm) !important;
    line-height: 1.4 !important;
    flex: 0 0 auto !important;
}

.ef-card-actions-row .button .dashicons {
    font-size: 15px !important;
    width: 15px !important;
    height: 15px !important;
    margin: 0 !important;
    vertical-align: middle !important;
}


/* ==========================================================================
   CSS Grid Calendar Component (Secretaria & Professor)
   Inspirado no Grid Calendar HTML/CSS (Free Frontend)
   ========================================================================== */
.ef-grid-calendar-container {
    background: var(--ef-card-bg);
    border: 1px solid var(--ef-border);
    border-radius: var(--ef-radius);
    padding: 24px;
    box-shadow: var(--ef-shadow);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ef-grid-cal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--ef-border);
}

.ef-grid-cal-title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ef-grid-cal-title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--ef-text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.ef-grid-cal-nav {
    display: inline-flex;
    align-items: center;
    background: var(--ef-bg);
    border: 1px solid var(--ef-border);
    border-radius: var(--ef-radius-sm);
    padding: 2px;
    gap: 2px;
}

.ef-grid-cal-nav-btn {
    border: none;
    background: transparent;
    color: var(--ef-text-main);
    padding: 6px 12px;
    border-radius: var(--ef-radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: all 0.2s ease;
}

.ef-grid-cal-nav-btn:hover {
    background: #ffffff;
    color: var(--ef-primary);
}

/* Day of week headers */
.ef-grid-cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    text-align: center;
}

.ef-grid-cal-weekday {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--ef-text-muted);
    padding: 8px 4px;
    background: var(--ef-bg);
    border-radius: var(--ef-radius-sm);
    border: 1px solid var(--ef-border);
}

/* Month Grid */
.ef-grid-cal-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.ef-grid-cal-day-cell {
    background: var(--ef-card-bg);
    border: 1px solid var(--ef-border);
    border-radius: var(--ef-radius-sm);
    min-height: 110px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 6px;
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
    position: relative;
    cursor: pointer;
}

.ef-grid-cal-day-cell:hover {
    border-color: rgba(28, 104, 212, 0.4);
    box-shadow: 0 4px 14px rgba(82, 63, 105, 0.06); /* impeccable-disable-line design-system-color */
}

.ef-grid-cal-day-cell.ef-day-outside {
    background: var(--ef-bg);
    opacity: 0.45;
}

.ef-grid-cal-day-cell.ef-day-today {
    border: 2px solid var(--ef-primary);
    background: rgba(28, 104, 212, 0.02);
}

.ef-grid-cal-day-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ef-grid-cal-day-num {
    font-size: 13px;
    font-weight: 700;
    color: var(--ef-text-main);
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.ef-day-today .ef-grid-cal-day-num {
    background: var(--ef-primary);
    color: #ffffff;
}

/* Event Pills */
.ef-grid-cal-events-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow: hidden;
}

.ef-cal-pill {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 6px;
    border-radius: var(--ef-radius-sm);
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: transform 0.15s ease;
    cursor: pointer;
}

.ef-cal-pill:hover {
    transform: translateX(2px);
}

.ef-cal-pill-presencial {
    background: rgba(52, 191, 163, 0.12); /* impeccable-disable-line design-system-color */
    color: var(--ef-success);
    border: 1px solid rgba(52, 191, 163, 0.3);
}

.ef-cal-pill-semipresencial {
    background: rgba(255, 184, 34, 0.12); /* impeccable-disable-line design-system-color */
    color: var(--ef-warning);
    border: 1px solid rgba(255, 184, 34, 0.3);
}

.ef-cal-pill-ead {
    background: rgba(28, 104, 212, 0.12); /* impeccable-disable-line design-system-color */
    color: var(--ef-primary);
    border: 1px solid rgba(28, 104, 212, 0.3);
}

.ef-cal-pill-feriado {
    background: rgba(244, 81, 108, 0.12); /* impeccable-disable-line design-system-color */
    color: var(--ef-danger);
    border: 1px solid rgba(244, 81, 108, 0.3);
}

.ef-cal-pill-evento {
    background: rgba(147, 51, 234, 0.12); /* impeccable-disable-line design-system-color */
    color: #7e22ce; /* impeccable-disable-line design-system-color */
    border: 1px solid rgba(147, 51, 234, 0.3); /* impeccable-disable-line design-system-color */
}

.ef-cal-more-badge {
    font-size: 10px;
    font-weight: 700;
    color: var(--ef-text-muted);
    background: var(--ef-bg);
    padding: 2px 6px;
    border-radius: var(--ef-radius-sm);
    align-self: flex-start;
    border: 1px solid var(--ef-border);
}

@media (max-width: 782px) {
    .ef-grid-cal-days {
        grid-template-columns: repeat(1, 1fr);
    }
    .ef-grid-cal-weekdays {
        display: none;
    }
    .ef-grid-cal-day-cell {
        min-height: auto;
    }
}

/* FullCalendar Customization for Grid Calendar (Free Frontend inspired) */
#ef-cal-fullcalendar {
    background: var(--ef-card-bg);
    border-radius: var(--ef-radius);
    font-family: inherit;
}

#ef-cal-fullcalendar .fc-header-toolbar {
    margin-bottom: 20px;
    padding: 4px;
}

#ef-cal-fullcalendar .fc-toolbar-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--ef-text-main);
}

#ef-cal-fullcalendar .fc-button {
    background: var(--ef-bg);
    border: 1px solid var(--ef-border);
    color: var(--ef-text-main);
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--ef-radius-sm) !important;
    padding: 6px 14px;
    box-shadow: none;
    text-transform: capitalize;
    transition: all 0.2s ease;
}

#ef-cal-fullcalendar .fc-button:hover {
    background: #ffffff;
    color: var(--ef-primary);
    border-color: rgba(28, 104, 212, 0.3);
}

#ef-cal-fullcalendar .fc-button-primary:not(:disabled).fc-button-active,
#ef-cal-fullcalendar .fc-button-primary:not(:disabled):active {
    background: var(--ef-primary) !important;
    border-color: var(--ef-primary) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(28, 104, 212, 0.25);
}

#ef-cal-fullcalendar .fc-col-header-cell {
    background: var(--ef-bg);
    padding: 10px 4px;
    border: 1px solid var(--ef-border);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--ef-text-muted);
}

#ef-cal-fullcalendar .fc-daygrid-day {
    border: 1px solid var(--ef-border);
    transition: background 0.15s ease;
    min-height: 110px;
}

#ef-cal-fullcalendar .fc-daygrid-day:hover {
    background: rgba(28, 104, 212, 0.02);
}

#ef-cal-fullcalendar .fc-day-today {
    background: rgba(28, 104, 212, 0.03) !important;
}

#ef-cal-fullcalendar .fc-daygrid-day-number {
    font-size: 13px;
    font-weight: 700;
    color: var(--ef-text-main);
    padding: 6px 10px;
    text-decoration: none;
}

#ef-cal-fullcalendar .fc-day-today .fc-daygrid-day-number {
    background: var(--ef-primary);
    color: #ffffff;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 4px;
    padding: 0;
}

#ef-cal-fullcalendar .fc-daygrid-event {
    border-radius: var(--ef-radius-sm);
    font-size: 11px;
    font-weight: 600;
    padding: 3px 6px;
    margin: 2px 4px;
    transition: transform 0.15s ease;
}

#ef-cal-fullcalendar .fc-daygrid-event:hover {
    transform: translateX(2px);
}

/* ==========================================================================
   Modal Popup Component (Slider Lateral, Fullscreen & Touch Swiping)
   ========================================================================== */
.ef-modal-overlay {
    display: flex;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    transition: opacity 0.2s ease;
}

.ef-modal-box {
    background: #ffffff;
    border-radius: var(--ef-radius);
    width: 90vw;
    max-width: 960px;
    height: 85vh;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 24px;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25); /* impeccable-disable-line design-system-color */
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: grab;
}

#ef-aluno-profile-modal-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.ef-modal-box.is-dragging {
    cursor: grabbing !important;
    user-select: none !important;
}

.ef-modal-box.is-fullscreen {
    max-width: 100vw !important;
    max-height: 100vh !important;
    width: 100vw !important;
    height: 100vh !important;
    border-radius: 0 !important;
    margin: 0 !important;
    padding: 24px 32px !important;
}

.ef-modal-box.is-fullscreen .ef-modal-nav-arrow.prev {
    left: 10px !important;
}

.ef-modal-box.is-fullscreen .ef-modal-nav-arrow.next {
    right: 10px !important;
}

.ef-modal-nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent !important;
    border: none !important;
    color: var(--ef-primary, #1c68d4);
    padding: 20px 24px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100000;
    transition: all 0.2s ease;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.25)); /* impeccable-disable-line design-system-color */
}

.ef-modal-nav-arrow.prev {
    left: -54px;
}

.ef-modal-nav-arrow.next {
    right: -54px;
}

.ef-modal-nav-arrow:hover:not(:disabled) {
    background: transparent !important;
    color: var(--es-teal-hover);
    transform: translateY(-50%) scale(1.2);
    filter: drop-shadow(0 6px 14px rgba(13, 148, 136, 0.45)); /* impeccable-disable-line design-system-color */
}

.ef-modal-nav-arrow:disabled {
    opacity: 0.2;
    cursor: not-allowed;
    filter: none !important;
}

.ef-modal-nav-arrow .dashicons {
    font-size: 38px !important;
    width: 38px !important;
    height: 38px !important;
    line-height: 38px !important;
}

.ef-modal-top-actions {
    position: absolute;
    top: 16px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 10;
}

.ef-modal-btn-fullscreen,
.ef-modal-btn-close {
    border: none;
    background: #f1f5f9;
    color: var(--ef-text-muted);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

.ef-modal-btn-fullscreen:hover,
.ef-modal-btn-close:hover {
    background: #e2e8f0;
    color: var(--ef-text-main);
    transform: scale(1.05);
}

.ef-modal-btn-fullscreen .dashicons,
.ef-modal-btn-close .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    line-height: 18px;
}




