/* =============================================================
   GRUPO CREATE EXPERIENCE - REFINED
   ============================================================= */

:root {
    --gf-bg: #F8FAFC;
    --gf-card-bg: #FFFFFF;
    --gf-border: #E2E8F0;
    --gf-primary: #BE123C; /* Red-ish color from screenshot */
    --gf-primary-light: #FFF1F2;
    --gf-text-main: #1E293B;
    --gf-text-muted: #64748B;
    --gf-radius: 12px;
    --gf-radius-sm: 8px;
    --gf-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.grupo-form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.grupo-form.layout-page {
    gap: 1rem;
    height: 100%;
    min-height: 0;
}

.grupo-form .layout-page__body {
    overflow: hidden;
    min-height: 0;
}

.grupo-edit-tabs-shell {
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
}

.grupo-edit-tabs-shell .grupo-tabs {
    flex-shrink: 0;
    margin-bottom: 0.75rem;
}

#grupo-edit-form {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

/* Hero Section — inline: título + botones en la misma fila */
.grupo-form__hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.grupo-form__hero .grupo-form__intro {
    flex: 1;
    min-width: 0;
}

.grupo-form__intro p.grupo-form__eyebrow {
    font-size: 0.875rem;
    color: var(--gf-text-muted);
    margin: 0 0 0.25rem 0;
}

.grupo-form__intro h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gf-text-main);
    margin: 0;
}

.grupo-form__hero .grupo-form__actions {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
    flex-shrink: 0;
    display: flex;
    gap: 0.5rem;
}

/* Compact content tab for curso create/edit to fit full content at 1920x1080 */
.course-content-panel .general-card {
    padding: 0.75rem;
}

.course-content-panel .general-card__grid {
    grid-template-columns: repeat(3, minmax(220px, 1fr));
    gap: 0.5rem 0.75rem;
}

.course-content-panel .form-group {
    grid-column: auto !important;
}

.course-content-panel .form-group.course-content-full {
    grid-column: 1 / -1 !important;
}

.course-content-panel .ql-toolbar {
    padding: 0.25rem !important;
}

.course-content-panel .rich-editor-container {
    display: flex;
    flex-direction: column;
    min-height: 160px;
    resize: vertical;
    overflow: auto;
}

.course-content-panel .rich-editor-container .ql-container {
    flex: 1 1 auto;
    overflow: auto;
}

.course-content-panel .ql-editor {
    min-height: 116px !important;
    height: 100%;
    padding: 0.4rem 0.55rem !important;
    line-height: 1.3 !important;
}

.course-content-panel .ql-editor.ql-blank::before {
    left: 0.625rem !important;
    right: 0.625rem !important;
}

/* Tabs Navigation */
.grupo-tabs {
    display: flex;
    background: #F1F5F9;
    padding: 0.35rem;
    border-radius: var(--gf-radius);
    gap: 0.25rem;
    margin-bottom: 1.5rem;
}

.grupo-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border: none;
    background: transparent;
    color: var(--gf-text-muted);
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: var(--gf-radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

.grupo-tab i {
    font-size: 1.1rem;
}

.grupo-tab:hover {
    color: var(--gf-text-main);
    background: rgba(255,255,255,0.5);
}

.grupo-tab.is-active {
    background: white;
    color: var(--gf-text-main);
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    font-weight: 600;
}

/* Form Body */
.grupo-form__body {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

#grupo-edit-form.grupo-form__body {
    flex: 1;
    min-height: 0;
}

.grupo-panel,
.grupo-tab-panel {
    display: none;
    animation: fadeIn 0.3s ease;
}

#grupo-edit-form .grupo-tab-panel {
    flex: 1;
    min-height: 0;
    overflow: visible;
}

.grupo-form:has(#panel-facturacion.is-active) .layout-page__body,
.layout-page__body.layout-page__body--facturacion-active {
    overflow-y: auto;
    overflow-x: hidden;
}

#grupo-edit-form:has(#panel-facturacion.is-active),
#grupo-edit-form.grupo-edit-form--facturacion-active {
    display: block;
    flex: 0 0 auto;
    min-height: auto;
}

#grupo-edit-form:has(#panel-facturacion.is-active) #panel-facturacion,
#grupo-edit-form.grupo-edit-form--facturacion-active #panel-facturacion,
#grupo-edit-form #panel-facturacion.is-active {
    display: block;
    flex: 0 0 auto;
    min-height: auto;
    height: auto;
    overflow: visible;
    align-self: stretch;
    padding-top: 0;
}

#grupo-edit-form:has(#panel-facturacion.is-active) #panel-facturacion .grupo-facturacion,
#grupo-edit-form.grupo-edit-form--facturacion-active #panel-facturacion .grupo-facturacion,
#grupo-edit-form #panel-facturacion.is-active .grupo-facturacion {
    display: flex;
    flex-direction: column;
    align-self: stretch;
    border: 1px solid var(--gf-border);
    border-radius: var(--gf-radius);
    overflow: hidden;
    background: var(--gf-card-bg);
    box-shadow: var(--gf-shadow);
}

.grupo-panel.is-active,
.grupo-tab-panel.is-active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* General Stack */
.grupo-general-stack {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Keep diplomas visible on Full HD by limiting the students table height. */
#panel-alumnos .table-container--compact {
    max-height: clamp(220px, 34vh, 360px);
    overflow: auto;
}

#panel-alumnos .table-container--compact thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #fff;
}

/* Compact professor panels to fit key fields in a single desktop viewport */
.profesor-compact-panel .general-card {
    padding: 1rem;
}

.profesor-compact-panel .general-card__header {
    margin-bottom: 1rem;
}

.profesor-general-stack .general-card__grid,
.profesor-facturacion-stack .general-card__grid {
    grid-template-columns: repeat(5, minmax(160px, 1fr));
    gap: 0.75rem 1rem;
    align-items: start;
}

.profesor-general-stack .form-control,
.profesor-facturacion-stack .form-control {
    padding: 0.625rem 0.8rem;
}

.profesor-general-stack .form-group.profesor-rich-compact .ql-toolbar {
    padding: 0.25rem !important;
}

.profesor-general-stack .form-group.profesor-rich-compact .ql-editor {
    min-height: 96px !important;
    padding: 0.5rem 0.625rem !important;
    line-height: 1.3 !important;
}

.profesor-general-stack .form-group.profesor-rich-compact .ql-editor.ql-blank::before {
    left: 0.625rem !important;
    right: 0.625rem !important;
}

.profesor-cursos-selected {
    padding: 0.75rem 1rem;
    background: #f9fafb;
    border-bottom: 1px solid var(--color-border);
}

.profesor-cursos-selected__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.profesor-cursos-selected__count {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.875rem;
    color: #374151;
}

.profesor-cursos-selected__count .ph-check-circle {
    color: #10b981;
}

.profesor-cursos-selected__list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.profesor-curso-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.25rem 0.6rem;
    max-width: 22rem;
}

.profesor-curso-chip span:nth-child(2) {
    max-width: 12rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profesor-cursos-selected__more {
    margin-top: 0.45rem;
    font-size: 0.8rem;
    color: #64748b;
}

.profesor-cursos-toolbar {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--color-border);
}

.profesor-cursos-toolbar__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.profesor-cursos-toolbar__meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.profesor-cursos-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 1rem;
    border-top: 1px solid var(--color-border);
}

.profesor-cursos-footer__info {
    font-size: 0.875rem;
    color: #6b7280;
}

.profesor-cursos-pagination {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin: 0;
}

.profesor-cursos-pagination .pagination-link {
    min-width: 2.15rem;
    height: 2.15rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    background: #fff;
    color: #374151;
    font-size: 0.875rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.6rem;
    cursor: pointer;
}

.profesor-cursos-pagination .pagination-link.is-active {
    background: #7f1d1d;
    border-color: #7f1d1d;
    color: #fff;
}

.profesor-cursos-pagination .pagination-link:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.profesor-cursos-pagination .pagination-ellipsis {
    color: #6b7280;
    padding: 0 0.2rem;
}

.profesor-cursos-search-input {
    max-width: 420px;
}

.profesor-cursos-table-wrap {
    max-height: none;
    overflow: visible;
}

.profesor-general-stack .form-group.profesor-text-compact textarea.form-control {
    min-height: 96px;
    max-height: 96px;
}

.profesor-general-stack .form-group.profesor-span-2,
.profesor-facturacion-stack .form-group.profesor-span-2 {
    grid-column: span 2;
}

.profesor-general-stack .form-group.profesor-span-3,
.profesor-facturacion-stack .form-group.profesor-span-3 {
    grid-column: span 3;
}

/* Two-column full-width row for description + observations */
.profesor-general-stack .profesor-two-col-row {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem 1rem;
}

@media (max-width: 640px) {
    .profesor-general-stack .profesor-two-col-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1400px) {
    .profesor-general-stack .general-card__grid,
    .profesor-facturacion-stack .general-card__grid {
        grid-template-columns: repeat(3, minmax(180px, 1fr));
    }
}

@media (max-width: 992px) {
    .profesor-general-stack .general-card__grid,
    .profesor-facturacion-stack .general-card__grid {
        grid-template-columns: repeat(2, minmax(180px, 1fr));
    }

    .profesor-cursos-toolbar__row {
        flex-direction: column;
        align-items: stretch;
    }

    .profesor-cursos-toolbar__meta {
        justify-content: space-between;
        flex-wrap: wrap;
    }

    .profesor-cursos-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .profesor-cursos-pagination {
        justify-content: center;
    }

    .profesor-cursos-search-input {
        max-width: 100%;
    }

    .profesor-general-stack .form-group.profesor-span-2,
    .profesor-general-stack .form-group.profesor-span-3,
    .profesor-facturacion-stack .form-group.profesor-span-2,
    .profesor-facturacion-stack .form-group.profesor-span-3 {
        grid-column: 1 / -1;
    }
}

@media (max-width: 640px) {
    .profesor-general-stack .general-card__grid,
    .profesor-facturacion-stack .general-card__grid {
        grid-template-columns: 1fr;
    }
}

/* General Card */
.general-card {
    background: var(--gf-card-bg);
    border: 1px solid var(--gf-border);
    border-radius: var(--gf-radius);
    padding: 1.5rem;
    box-shadow: var(--gf-shadow);
}

.general-card__header {
    margin-bottom: 1.5rem;
}

.general-card__icon-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

/* Header left group: keep icon + actions together */
.general-card__header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Place actions to the right inside header */
.general-card__header > .header-actions {
    margin-left: auto;
}

.header-action-masa {
    margin-left: 0; /* handled by gap in .header-actions */
}

.general-card__icon-wrapper i {
    color: var(--gf-primary);
    font-size: 1.25rem;
}

.general-card__icon-wrapper span {
    font-weight: 600;
    color: var(--gf-text-main);
    font-size: 1rem;
}

.general-card__description {
    color: var(--gf-text-muted);
    font-size: 0.9rem;
    margin: 0;
    padding-left: 2rem; /* Align with text start */
}

/* Grid Layout */
.general-card__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* Form Controls */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gf-text-main);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.form-group label i {
    color: var(--gf-text-muted);
    font-size: 0.9rem;
    cursor: help;
}

.form-control {
    width: 100%;
    max-width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gf-border);
    border-radius: var(--gf-radius-sm);
    background: #F8FAFC;
    color: var(--gf-text-main);
    font-size: 0.95rem;
    transition: all 0.2s;
    overflow-x: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

textarea.form-control {
    white-space: normal;
    overflow-x: auto;
    resize: vertical;
}

.form-control:focus {
    outline: none;
    border-color: var(--gf-primary);
    background: white;
    box-shadow: 0 0 0 3px var(--gf-primary-light);
}

.form-control::placeholder {
    color: #94A3B8;
}

/* Select Wrapper for custom arrow if needed, 
   but native select styling is usually sufficient with appearance: none */
.select-wrapper {
    position: relative;
}

.select-wrapper::after {
    content: '';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 0.6rem;
    height: 0.6rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748B' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    pointer-events: none;
}

select.form-control {
    appearance: none;
    padding-right: 2.5rem;
}

/* Input Icon Wrapper */
.input-icon-wrapper {
    position: relative;
}

.input-icon-wrapper::after {
    content: ''; /* Calendar icon placeholder if needed */
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    /* Add icon here if desired */
}

/* Footer Actions */
.grupo-form__actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gf-border);
    margin-top: 1rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: var(--gf-radius-sm);
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

/* Button styles now consolidated in style.css */

@media (max-width: 640px) {
    .grupo-tabs {
        overflow-x: auto;
        justify-content: flex-start;
    }
    
    .grupo-tab {
        min-width: 120px;
    }
}

/* =============================================================
   LEGACY / OTHER TABS SUPPORT
   ============================================================= */

.grupo-panel__header {
    margin-bottom: 1.5rem;
}

.grupo-panel__eyebrow {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gf-text-muted);
    margin-bottom: 0.35rem;
}

.grupo-panel__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
}

.grupo-panel__columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    align-items: flex-start;
}

.grupo-panel__stack {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.grupo-panel__card {
    border: 1px solid var(--gf-border);
    border-radius: var(--gf-radius);
    padding: 1.25rem;
    background: var(--gf-bg);
}

/* Schedule Builder Buttons */
.schedule-builder__days {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.schedule-day {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    border: 1px solid var(--gf-border);
    background: white;
    color: var(--gf-text-muted);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.schedule-day:hover {
    border-color: var(--gf-primary);
    color: var(--gf-primary);
    background: var(--gf-primary-light);
}

.schedule-day.is-selected {
    background: var(--gf-primary);
    color: white;
    border-color: var(--gf-primary);
    box-shadow: 0 2px 4px rgba(190, 18, 60, 0.2);
}

.schedule-builder__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.schedule-builder__time {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.schedule-builder__time input {
    padding: 0.5rem;
    border: 1px solid var(--gf-border);
    border-radius: var(--gf-radius-sm);
}

/* Insight Card */
.insight-card {
    background: #F0F9FF;
    border: 1px solid #BAE6FD;
    border-radius: var(--gf-radius);
    padding: 1.5rem;
}

.insight-card__eyebrow {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #0369A1;
    margin-bottom: 0.5rem;
}

.insight-card h3 {
    color: #0C4A6E;
    margin: 0 0 1rem 0;
}

.insight-card__stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.insight-card__stats dt {
    font-size: 0.8rem;
    color: #0369A1;
}

.insight-card__stats dd {
    font-weight: 600;
    color: #0C4A6E;
    margin: 0;
}

/* =============================================================
   FORM EXTRAS (ECONOMY & ACTIONS)
   ============================================================= */

.input-with-action {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-action input {
    padding-right: 8rem; /* Space for button */
}

.input-with-action button {
    position: absolute;
    right: 0.4rem;
    top: 50%;
    transform: translateY(-50%);
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    background: white;
    border: 1px solid var(--gf-border);
    border-radius: 6px;
    color: var(--gf-text-muted);
    cursor: pointer;
}

.input-with-action button:hover {
    color: var(--gf-primary);
    border-color: var(--gf-primary);
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.85rem 1rem;
    border: 1px solid var(--gf-border);
    border-radius: var(--gf-radius-sm);
    background: white;
    transition: all 0.2s;
}

.checkbox-wrapper:hover {
    border-color: var(--gf-primary);
    background: #FFF1F2; /* Light red tint */
}

.checkbox-wrapper input[type="checkbox"] {
    width: 1.15rem;
    height: 1.15rem;
    accent-color: var(--gf-primary);
    cursor: pointer;
}

.checkbox-wrapper span {
    font-size: 0.95rem;
    color: var(--gf-text-main);
    font-weight: 500;
}

.checkbox-wrapper--simple {
    display: inline-flex;
    width: auto;
    padding: 0.35rem 0;
    border: 0;
    background: transparent;
    border-radius: 0;
}

.checkbox-wrapper--simple:hover {
    border: 0;
    background: transparent;
}

.checkbox-wrapper--simple span {
    font-weight: 600;
}

/* Aula create/edit compact layout: keep all blocks inline in one row when possible, two max */
.aula-inline-stack {
    display: grid;
    grid-template-columns: repeat(3, minmax(250px, 1fr));
    gap: 0.9rem;
}

.aula-inline-stack .general-card {
    padding: 1rem;
}

.aula-inline-stack .general-card__header {
    margin-bottom: 0.85rem;
}

.aula-inline-stack .general-card__grid {
    grid-template-columns: repeat(2, minmax(130px, 1fr));
    gap: 0.7rem;
}

.aula-inline-stack .form-control {
    padding: 0.625rem 0.8rem;
}

@media (max-width: 1400px) {
    .aula-inline-stack {
        grid-template-columns: repeat(2, minmax(260px, 1fr));
    }
}

@media (max-width: 900px) {
    .aula-inline-stack {
        grid-template-columns: 1fr;
    }

    .aula-inline-stack .general-card__grid {
        grid-template-columns: 1fr;
    }
}

.form-hint {
    display: block;
    margin-top: 0.4rem;
    font-size: 0.8rem;
    color: var(--gf-text-muted);
}

/* Input Group Styles */
.input-group {
    display: flex;
    align-items: stretch;
    border: 1px solid var(--gf-border);
    border-radius: var(--gf-radius-sm);
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.input-group:focus-within {
    border-color: var(--gf-primary);
    box-shadow: 0 0 0 3px rgba(190, 18, 60, 0.1);
}

.input-group .form-control {
    border: none;
    border-radius: 0;
    flex: 1;
    margin: 0;
}

.input-group .form-control:focus {
    box-shadow: none;
    border-color: transparent;
}

.input-group .btn {
    border: none;
    border-radius: 0;
    padding: 0.5rem 0.75rem;
    background: #F8FAFC;
    color: var(--gf-text-muted);
    border-left: 1px solid var(--gf-border);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
}

.input-group .btn:active {
    background: #CBD5E1;
}

.input-group .input-group-text {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: var(--gf-bg-light);
    border-left: 1px solid var(--gf-border);
    border-radius: 0 calc(var(--gf-radius-sm) - 1px) calc(var(--gf-radius-sm) - 1px) 0;
    font-size: 0.875rem;
    color: var(--gf-text-muted);
    font-weight: 500;
}

.form-help {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: var(--gf-text-muted);
    line-height: 1.4;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e5e7eb;
    transition: 0.3s;
    border-radius: 26px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--gf-primary, #BE123C);
}

.toggle-switch input:focus + .toggle-slider {
    box-shadow: 0 0 0 3px rgba(190, 18, 60, 0.2);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(22px);
}

/* Tooltip styles */
.tooltip-trigger {
    position: relative;
    display: inline-flex;
}

.tooltip-trigger[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5rem 0.75rem;
    background: #1f2937;
    color: white;
    font-size: 0.75rem;
    white-space: nowrap;
    border-radius: 0.375rem;
    z-index: 1000;
    margin-bottom: 0.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.tooltip-trigger[title]:hover::before {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #1f2937;
    z-index: 1000;
}

/* ================================================
   PROFESOR FACTURACIÓN - Full Width Stack
   ================================================ */

.profesor-facturacion-stack {
    background: var(--gf-card-bg, #fff);
    border: 1px solid var(--gf-border, #e5e7eb);
    border-radius: var(--gf-radius, 12px);
    box-shadow: var(--gf-shadow, 0 1px 3px rgba(0, 0, 0, 0.08));
    padding: 1.5rem;
}

.facturacion-header {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.facturacion-header span {
    font-weight: 600;
    font-size: 1.1rem;
    color: #1e293b;
}

.facturacion-header p {
    margin: 0;
    font-size: 0.875rem;
    color: #64748b;
}

.facturacion-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    padding: 0;
}

.facturacion-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}

.facturacion-card__header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid #e2e8f0;
}

.facturacion-card__header i {
    color: var(--primary-500);
    font-size: 1rem;
}

.facturacion-card__header span {
    font-weight: 600;
    font-size: 0.875rem;
    color: #1e293b;
}

.facturacion-card__body {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-row + .form-row {
    margin-top: 0;
}

.form-col {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.form-col--full {
    grid-column: 1 / -1;
}

.form-col label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
}

.form-col .form-control,
.form-col .select-wrapper .form-control {
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-col .form-control:focus,
.form-col .select-wrapper .form-control:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-col .select-wrapper {
    margin: 0;
}

.form-col .select-wrapper::after {
    right: 0.75rem;
}

/* Responsive */
@media (max-width: 768px) {
    .facturacion-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .facturacion-card__body {
        padding: 1rem;
    }
}
