/* =============================================================================
   SABORA · ESTILOS DE PANTALLA HEREDADOS
   -----------------------------------------------------------------------------
   Lo que queda aquí son estilos de pantallas concretas pendientes de mover a
   css/pages/. La normalización, la tipografía y los colores base ya no están
   en este fichero: viven en css/tokens.css y css/base.css.
   ========================================================================== */

@media (min-width: 1400px) {
    .sch-grid {
        grid-template-columns: repeat(3, 1fr);
    }}

@media (max-width: 1200px) {
    .sch-grid {
        grid-template-columns: repeat(2, 1fr);
    }}

@media (max-width: 800px) {
    .sch-grid {
        grid-template-columns: 1fr;
    }}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.content {
    padding-top: 1.1rem;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3LjgyOSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred."
}

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.dietago-toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: var(--sb-z-toast);
}

.dietago-toast-box {
    display: flex;
    align-items: center;
    background-color: #28a745;
    color: white;
    padding: 12px 20px;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    min-width: 300px;
    max-width: 500px;
    margin-bottom: 10px;
    font-size: 15px;
    gap: 10px;
    overflow: hidden;
    animation: dietago-fadeIn 0.3s ease-out;
    position: relative;
}

.dietago-toast-box.error {
    background-color: #dc3545;
}

.dietago-toast-box.info {
    background-color: #007bff;
}

.dietago-toast-icon {
    font-size: 18px;
}

.dietago-toast-message {
    flex: 1;
    font-weight: 500;
}

.dietago-toast-close {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    padding: 0 5px;
}

.dietago-toast-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.6);
    width: 100%;
    animation: dietago-barraAnimacion 4s linear forwards;
}

@keyframes dietago-barraAnimacion {
    from {
        width: 100%;
    }

    to {
        width: 0%;
    }
}

@keyframes dietago-fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes dietago-fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0.95);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.back-link {
    color: #000 !important;
    text-decoration: none !important;
    font-weight: 500;
    transition: color 0.2s;
    cursor: pointer;
}

.back-link:hover {
    color: var(--sb-neutral-900) !important;
}

/* Ocultar en pantallas pequeñas (teléfonos) */
@media screen and (max-width: 767px) {
    .ocultar-en-movil {
        display: none !important;
    }
}

.management-layout {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.management-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
    justify-content: flex-start;
}

.management-filters .filter-item {
    min-width: 220px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.management-filters .filter-item label {
    font-weight: 600;
    color: var(--sb-neutral-850);
}

.management-filters .filter-actions {
    margin-left: auto;
}

.management-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.summary-card {
    background: #f4f7fb;
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 10px 25px rgba(10, 63, 116, 0.08);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.summary-label {
    font-size: 0.85rem;
    color: #4b5a70;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.summary-value {
    font-size: 1.8rem;
    color: #12233e;
    font-weight: 700;
}

.management-grid {
    width: 100%;
}

.grid-primary-text {
    font-weight: 600;
    color: var(--sb-neutral-850);
}

.grid-secondary-text {
    color: #556278;
    font-size: 0.85rem;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-badge.is-confirmed {
    background-color: #e0f6ec;
    color: #0c6b49;
}

.status-badge.is-pending {
    background-color: #fef1d6;
    color: #a66b0e;
}

.attendance-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.attendance-section+.attendance-section {
    margin-top: 20px;
}

.attendance-section .section-title {
    color: var(--sb-neutral-850);
    font-weight: 700;
    font-size: 1.1rem;
    margin: 0;
}

.period-status {
    font-size: 0.8rem;
    color: #ffe7d6;
}

.period-modal-backdrop {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(15, 23, 42, 0.6) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    z-index: var(--sb-z-spotlight);
}

.period-modal-backdrop.is-blocking {
    background: rgba(15, 23, 42, 0.75) !important;
}

.period-modal-dialog {
    width: min(520px, 100%);
    max-height: calc(100vh - 32px);
    background: var(--sb-neutral-0);
    border-radius: 20px;
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.35);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.period-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 12px 24px;
    border-bottom: 1px solid var(--sb-neutral-200);
}

.period-modal-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--sb-neutral-800);
}

.period-modal-close {
    border: none;
    background: transparent;
    font-size: 1.2rem;
    color: var(--sb-neutral-500);
    cursor: pointer;
    transition: color 0.2s ease;
}

.period-modal-close:hover {
    color: var(--sb-neutral-800);
}

.period-modal-body {
    padding: 20px 24px 24px;
    overflow-y: auto;
}

.period-option-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.period-option-button {
    width: 100%;
    border: 1px solid transparent;
    border-radius: 14px;
    background: var(--sb-neutral-50);
    color: var(--sb-neutral-900);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.period-option-button:hover {
    transform: translateY(-1px);
    background: var(--sb-neutral-0);
    border-color: #d6e1ff;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
}

.period-option-button.is-selected {
    border-color: var(--sb-brand);
    box-shadow: 0 0 0 3px rgba(200, 40, 0, 0.18);
    background: #fff4ef;
}

.period-option-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.period-option-title {
    font-weight: 600;
    font-size: 0.95rem;
}

.period-option-status {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--sb-neutral-200);
    color: var(--sb-neutral-700);
}

.period-option-status.is-open {
    background: var(--sb-green-100);
    color: var(--sb-green-800);
}

.period-option-status.is-closed {
    background: var(--sb-red-100);
    color: var(--sb-red-700);
}

.period-option-dates {
    font-size: 0.8rem;
    color: var(--sb-neutral-600);
}

.period-modal-actions {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.period-modal-action-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.period-modal-button {
    border: none;
    border-radius: 12px;
    padding: 10px 18px;
    font-weight: 600;
    cursor: pointer;
    background: var(--sb-neutral-200);
    color: var(--sb-neutral-900);
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.period-modal-button:hover:not(:disabled) {
    background: #d4def9;
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.08);
}

.period-modal-button.is-primary {
    background: var(--sb-brand);
    color: var(--sb-neutral-0);
    box-shadow: 0 12px 20px rgba(200, 40, 0, 0.25);
}

.period-modal-button.is-primary:hover:not(:disabled) {
    background: var(--sb-brand-700);
}

.period-modal-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
}

.period-modal-empty {
    display: flex;
    flex-direction: column;
    gap: 16px;
    text-align: center;
    color: var(--sb-neutral-600);
}

.period-modal-error {
    margin-top: 12px;
    color: var(--sb-red-700);
    font-size: 0.85rem;
}

.period-create-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.period-create-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.period-modal-empty-message {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.period-modal-empty-message p {
    margin: 0;
}

.period-create-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.period-button-text-gap {
    margin-left: 8px;
}

.period-modal-body ::deep .validation-summary {
    margin-bottom: 0;
    color: var(--sb-red-700);
}

.period-modal-body ::deep .validation-summary ul {
    margin: 0;
    padding-left: 18px;
}

@media (max-width: 640px) {

    .period-modal-dialog {
        width: 100%;
        max-height: calc(100vh - 16px);
    }

    .period-modal-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .period-modal-action-group {
        width: 100%;
    }

    .period-modal-action-group .period-modal-button,
    .period-modal-actions .period-modal-button {
        width: 100%;
    }}

/* El sistema de esqueletos de carga vive ahora en css/components/ui.css. */


/* Helpers for skeletons */
.mb-2 {
    margin-bottom: 0.5rem !important;
}

.mb-4 {
    margin-bottom: 1rem !important;
}

.mb-6 {
    margin-bottom: 1.5rem !important;
}

.mt-4 {
    margin-top: 1rem !important;
}

/* ==========================================================================
   ENROLLMENT FLOW PREMIUM V2 (Ticket & Dashboard)
   ========================================================================== */

:root {
    --brand: var(--sb-brand);
    --brand-dark: var(--sb-brand-700);
    --brand-soft: var(--sb-brand-surface);
    --success: var(--sb-green-500);
    --slate-text: var(--sb-neutral-800);
}

.fee-title-wrapper .title {
    font-size: 15px;
    font-weight: 700;
    color: var(--sb-neutral-800);
    white-space: nowrap;
}

.fee-info-content .desc {
    font-size: 12px;
    color: var(--sb-neutral-500);
    font-weight: 500;
    line-height: 1.2;
}

.cash-badge-card.is-open {
    background: #f0fdf4 !important;
    border-color: var(--sb-green-100) !important;
}

.cash-badge-card.is-closed {
    background: var(--sb-red-50) !important;
    border-color: var(--sb-red-100) !important;
}

.is-open .badge-icon-box i {
    color: var(--sb-green-500);
}

/* Green icon when open */
.is-closed .badge-icon-box i {
    color: var(--sb-red-600);
}

/* Red icon when closed */

.badge-title-wrapper .title {
    font-size: 15px;
    font-weight: 700;
    color: var(--sb-neutral-800);
    white-space: nowrap;
}

.badge-info-content .desc {
    font-size: 12px;
    color: var(--sb-neutral-500);
    font-weight: 500;
    line-height: 1.2;
}

.badge-status {
    flex-shrink: 0;
}

.home-date-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--sb-z-drawer);
    padding: 1rem;
}

.home-date-modal {
    width: min(420px, 100%);
    background: var(--sb-neutral-0);
    border-radius: 16px;
    padding: 1rem;
    box-shadow: 0 18px 48px rgba(2, 6, 23, 0.25);
}

.home-date-modal-title {
    margin: 0 0 0.75rem;
    color: var(--sb-neutral-900);
    font-size: 1.05rem;
    font-weight: 700;
}

.home-date-modal-input {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--sb-neutral-300);
    border-radius: 10px;
    min-height: 42px;
    padding: 0.5rem 0.65rem;
    font-weight: 600;
}

.home-date-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 0.9rem;
}

.home-date-modal-btn {
    border-radius: 10px;
    border: 1px solid transparent;
    min-height: 38px;
    padding: 0 0.9rem;
    font-weight: 600;
}

.home-date-modal-btn.ghost {
    border-color: var(--sb-neutral-300);
    background: var(--sb-neutral-0);
    color: var(--sb-neutral-700);
}

.home-date-modal-btn.primary {
    border-color: var(--sb-neutral-900);
    background: var(--sb-neutral-900);
    color: var(--sb-neutral-0);
}

.cash-badge-v2.is-open {
    background: #f0fdf4;
    border-color: var(--sb-green-100);
}

.cash-badge-v2.is-closed {
    background: var(--sb-red-50);
    border-color: var(--sb-red-100);
}

.receipt-header {

    text-align: center;
    background: linear-gradient(to bottom, #fcfdfe, var(--sb-neutral-0));
    border-bottom: 2px dashed var(--sb-neutral-300);
    position: relative;
}

.receipt-header::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    right: 0;
    height: 20px;
    background-image: radial-gradient(circle, var(--sb-neutral-0) 8px, transparent 8px);
    background-size: 24px 20px;
    background-position: center bottom;
    z-index: var(--sb-z-raised);
}

.receipt-date {
    font-size: 12px;
    color: var(--sb-neutral-500);
}

.total-label {
    font-size: 11px;
    font-weight: 800;
    color: var(--sb-neutral-400);
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.total-value {
    font-size: 2.2rem;
    /* Smaller as requested */
    font-weight: 900;
    color: var(--sb-green-500);
    line-height: 1;
    margin: 0;
}

.premium-numeric,.premium-input {
    border-radius: 24px !important;
    height: 64px !important;
    border: 2px solid var(--sb-neutral-100) !important;
    background: var(--sb-neutral-50) !important;
    font-weight: 600 !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    padding: 0 4px !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02) !important;
    font-family: var(--sb-font);
}

.premium-numeric:hover,.premium-input:hover {
    border-color: var(--sb-neutral-200) !important;
    background: var(--sb-neutral-0) !important;
}

.premium-numeric:focus-within,.premium-input:focus-within {
    border-color: var(--brand) !important;
    background: var(--sb-neutral-0) !important;
    box-shadow: 0 0 0 5px rgba(212, 59, 26, 0.1), 0 10px 20px rgba(0, 0, 0, 0.05) !important;
    transform: translateY(-2px);
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(12px);
    z-index: var(--sb-z-toast);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.premium-modal {
    background: white;
    border-radius: 40px;
    width: 100%;
    max-width: 520px;
    box-shadow: 0 50px 100px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: scaleIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-header-premium {
    padding: 40px;
    background: linear-gradient(135deg, var(--sb-neutral-25) 0%, var(--sb-neutral-0) 100%);
    border-bottom: 1px solid var(--sb-neutral-100);
}

.modal-body-premium {
    padding: 40px;
}

.cash-badge-v3.is-open .status-icon {
    background: var(--sb-green-50);
    color: #059669;
}

.cash-badge-v3.is-closed .status-icon {
    background: var(--sb-red-50);
    color: var(--sb-red-600);
}

.cash-badge-v3 .tag {
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 1px;
    color: var(--sb-neutral-500);
    margin-bottom: 2px;
}

.cash-badge-v3 .count {
    font-size: 13px;
    font-weight: 700;
    color: var(--sb-neutral-800);
}

/* CASH MODAL SPECIFIC */
.cash-modal {
    max-width: 480px !important;
    padding: 0 !important;
    position: relative;
    border: none !important;
    font-family: var(--sb-font);
}

.modal-close-btn {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--sb-neutral-50);
    border: none;
    color: var(--sb-neutral-500);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    z-index: var(--sb-z-raised);
}

.modal-close-btn:hover {
    background: var(--sb-red-100);
    color: var(--sb-red-600);
    transform: rotate(90deg);
}

.modal-header-premium {
    padding: 40px 40px 0;
    margin-bottom: 24px;
}

.modal-header-premium .header-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.modal-header-premium .icon-wrapper {
    width: 60px;
    height: 60px;
    background: var(--sb-green-50);
    color: #059669;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    border: 1px solid var(--sb-green-100);
}

.modal-header-premium .fee-icon-box {
    width: 44px;
    height: 44px;
    background: #fff7ed;
    color: #f97316;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.fee-info-content .title {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--sb-neutral-800);
    margin-bottom: 1px;
}

.fee-info-content .desc {
    display: block;
    font-size: 11px;
    color: var(--sb-neutral-500);
    font-weight: 500;
}

.modal-header-premium h3 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--sb-neutral-900);
    letter-spacing: -0.01em;
}

.modal-header-premium p {
    margin: 4px 0 0;
    font-size: 13px;
    color: var(--sb-neutral-500);
    font-weight: 500;
}

.modal-body-premium {
    padding: 0 40px 40px;
}

.modal-error-badge {
    background: var(--sb-red-50);
    border: 1px solid var(--sb-red-100);
    color: var(--sb-red-600);
    padding: 16px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 24px;
}

.modal-form-groups {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.form-group-premium {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-group-premium .group-label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-left: 2px;
}

.form-group-premium .group-label .icon {
    width: 28px;
    height: 28px;
    background: var(--sb-neutral-100);
    color: var(--sb-neutral-500);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
}

.form-group-premium .group-label label {
    font-size: 11px;
    font-weight: 600;
    color: var(--sb-neutral-500);
    text-transform: uppercase;
    letter-spacing: 0.2em;
}

/* Ensure full width for all inputs */
.modal-form-groups .input-container {
    width: 100% !important;
    display: block !important;
}

.field-huge {
    height: 72px !important;
}

.field-area {
    width: 100% !important;
    min-height: 120px !important;
    padding: 16px 20px !important;
    font-size: 15px !important;
    line-height: 1.5 !important;
    border-radius: 20px !important;
}

.modal-footer-premium {
    margin-top: 48px;
}

.btn-primary-huge {
    width: 100%;
    background: var(--sb-neutral-900);
    color: white;
    border: none;
    padding: 0 32px;
    height: 72px;
    border-radius: 24px;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.1em;
    cursor: pointer;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.15);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.btn-primary-huge:hover:not(:disabled) {
    background: #000;
    transform: translateY(-4px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2);
}

.btn-primary-huge:active {
    transform: translateY(-1px);
}

.btn-primary-huge i {
    font-size: 1.1rem;
    opacity: 0.7;
}

.btn-primary-huge:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@keyframes scaleIn {
    from {
        transform: scale(0.95) translateY(20px);
        opacity: 0;
    }

    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.close-grid.is-1col {
    grid-template-columns: 1fr;
    max-width: 520px;
}

.close-grid.is-2col {
    grid-template-columns: 1fr 1fr;
}

@media (max-width: 820px) {
    .close-grid.is-2col {
        grid-template-columns: 1fr;
    }}

.divider {
    height: 1px;
    background: rgba(226, 232, 240, .9);
    margin: 18px 0 18px;
}

/* ====== Field (label + control) ====== */
.field {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mass-notifications-container {
    padding: 1.5rem;
    max-width: 1600px;
    margin: 0 auto;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--sb-neutral-800);
    height: calc(100vh - 80px);
    /* Adjust based on your layout header */
    display: flex;
    flex-direction: column;
}

.page-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    background: white;
    padding: 1.25rem 1.75rem;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
    border: 1px solid var(--sb-neutral-200);
    flex-shrink: 0;
}

.brand-section {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.brand-icon {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--sb-red-500) 0%, var(--sb-red-600) 100%);
    color: white;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    box-shadow: 0 8px 16px rgba(220, 38, 38, 0.25);
}

.brand-text h1 {
    font-size: 1.6rem;
    font-weight: 800;
    margin: 0;
    color: var(--sb-neutral-900);
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.brand-text p {
    font-size: 0.85rem;
    color: var(--sb-neutral-500);
    margin: 4px 0 0 0;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.stats-section {
    display: flex;
    gap: 1rem;
}

.stat-badge {
    background: var(--sb-neutral-50);
    border: 1px solid var(--sb-neutral-200);
    padding: 0.65rem 1.25rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--sb-neutral-500);
    font-size: 0.9rem;
    font-weight: 500;
}

.stat-badge i {
    color: var(--sb-neutral-400);
    font-size: 1.1rem;
}

.stat-badge b {
    color: var(--sb-neutral-900);
    font-size: 1.1rem;
    font-weight: 800;
}

.main-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
    flex: 1;
    min-height: 0;
    /* Important for scroll */
}

@media (max-width: 1024px) {
    .main-layout {
        grid-template-columns: 1fr;
        height: auto;
        overflow-y: auto;
    }

    .mass-notifications-container {
        height: auto;
    }}

.left-panel,
.right-panel {
    background: white;
    border-radius: 20px;
    border: 1px solid var(--sb-neutral-200);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    overflow: visible;
    height: 100%;
}

.panel-header {
    padding: 1.25rem 1.75rem;
    border-bottom: 1px solid var(--sb-neutral-200);
    background: var(--sb-neutral-50);
}

.panel-header h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--sb-neutral-700);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.panel-header h3 i {
    color: var(--sb-blue-500);
}

/* Search Section in Left Panel */
.search-container {
    padding: 1.25rem 1.75rem;
    border-bottom: 1px solid var(--sb-neutral-200);
    background: white;
    z-index: var(--sb-z-raised);
}

.search-input-wrapper {
    position: relative;
    width: 100%;
}

.search-input-wrapper i.search-icon {
    position: absolute;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--sb-neutral-500);
    font-size: 1.1rem;
    pointer-events: none;
    z-index: var(--sb-z-raised);
}

.search-input-wrapper .loading-icon {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--sb-blue-500);
    z-index: var(--sb-z-raised);
}

.form-control-custom {
    /* Critical Fix for visibility */
    color: var(--sb-neutral-800) !important;
    background-color: var(--sb-neutral-0) !important;
    width: 100%;
    height: 54px;
    padding: 0 20px 0 65px !important;
    border-radius: 14px;
    border: 2px solid var(--sb-neutral-200);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.form-control-custom:focus {
    border-color: var(--sb-blue-500);
    background-color: var(--sb-blue-50) !important;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.form-control-custom::placeholder {
    color: var(--sb-neutral-400);
    font-weight: 400;
}

/* Search Results Dropdown */
.search-results-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--sb-neutral-200);
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    z-index: var(--sb-z-sticky);
    max-height: 400px;
    overflow-y: auto;
    padding: 0.5rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

.search-result-item {
    width: 90%;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1.5rem 0.75rem 0.75rem;
    /* Increased padding on right even more */
    border: none;
    background: transparent;
    border-radius: 10px;
    cursor: pointer;
    text-align: left;
    transition: all 0.1s ease;
    overflow: hidden;
    /* Ensure content doesn't spill unnecessarily */
}

.search-result-item:hover {
    background: var(--sb-neutral-100);
}

.search-result-item i {
    flex-shrink: 0;
    /* Prevent icon from shrinking */
    margin-left: auto;
    /* Push icon to the right if space allows */
}

.avatar {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    color: #4338ca;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
}

/* Selected Users Grid Panel */
.grid-container {
    flex: 1;
    overflow-y: auto;
    background: white;
}

.custom-grid {
    border: 1px solid var(--sb-neutral-200) !important;
    box-shadow: none !important;
    border-radius: 12px;
    overflow: hidden;
}

.btn-icon-danger {
    color: var(--sb-red-600);
    background: var(--sb-red-100);
    border: 1px solid var(--sb-red-200);
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    /* Reset button default */
    appearance: none;
    -webkit-appearance: none;
    text-align: center;
    line-height: 1;
}

.btn-icon-danger:hover {
    background-color: var(--sb-red-100);
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--sb-neutral-400);
    padding: 2rem;
    text-align: center;
}

.empty-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--sb-neutral-100);
    color: var(--sb-neutral-300);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

/* Right Panel Form */
.message-form {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    height: 100%;
    background: white;
}

.form-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    overflow-y: auto;
    padding-right: 5px;
    /* space for scrollbar */
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.form-group label {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--sb-neutral-700);
    margin-left: 2px;
}

.custom-textbox,
.custom-textarea {
    border-radius: 14px !important;
    border: 2px solid var(--sb-neutral-200) !important;
    padding: 0.85rem 1rem !important;
    font-size: 0.95rem !important;
    background-color: #fcfcfc !important;
    color: var(--sb-neutral-800) !important;
    width: 100%;
    font-family: inherit !important;
    transition: all 0.2s;
}

.custom-textbox:focus,
.custom-textarea:focus {
    background-color: var(--sb-neutral-0) !important;
    border-color: var(--sb-blue-500) !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.06) !important;
}

.custom-textarea {
    min-height: 250px;
    line-height: 1.6;
    resize: none;
}

.form-footer {
    padding-top: 1.5rem;
    margin-top: auto;
    border-top: 1px solid var(--sb-neutral-100);
}

.btn-send {
    width: 100%;
    height: 56px;
    border-radius: 14px;
    background: var(--brand);
    /* Primary brand color */
    color: white;
    border: none;
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0.02em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.btn-send:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.35);
    background: linear-gradient(135deg, var(--sb-blue-500) 0%, var(--sb-blue-600) 100%);
}

.btn-send:active:not(:disabled) {
    transform: translateY(1px);
}

.btn-send:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: var(--sb-neutral-400);
    box-shadow: none;
    transform: none;
}

/* Role Badges */
.role-badge {
    padding: 0.3rem 0.7rem;
    border-radius: 99px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-block;
}

.badge-admin {
    background: var(--sb-red-100);
    color: var(--sb-red-700);
}

.badge-prof {
    background: var(--sb-amber-100);
    color: var(--sb-amber-700);
}

.badge-student {
    background: var(--sb-green-100);
    color: #15803d;
}

.badge-default {
    background: var(--sb-neutral-100);
    color: var(--sb-neutral-500);
}

.report-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 16px;
    margin-bottom: 24px;
    padding: 16px;
    background: var(--sb-neutral-50);
    border-radius: 12px;
    border: 1px solid var(--sb-neutral-200);
}

.report-filter-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.report-filter-item label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--sb-neutral-600);
}