:root {
    --primary: #0759a6;
    --primary-dark: #053f78;
    --accent: #34b4dc;
    --soft: #eef8fc;
    --ink: #1f2937;
}

body {
    background: #f5f8fb;
    color: var(--ink);
}

body.is-loading {
    cursor: progress;
}

.app-preloader {
    position: fixed;
    inset: 0;
    z-index: 20000;
    display: grid;
    place-items: center;
    padding: 1rem;
    background:
        radial-gradient(circle at 20% 20%, rgba(52, 180, 220, .16), transparent 30%),
        linear-gradient(135deg, rgba(245, 248, 251, .98), rgba(238, 248, 252, .96));
    opacity: 1;
    visibility: visible;
    transition: opacity .24s ease, visibility .24s ease;
}

.app-preloader.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.app-preloader-card {
    width: min(92vw, 360px);
    border: 1px solid rgba(7, 89, 166, .12);
    border-radius: 12px;
    padding: 1.25rem;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 24px 60px rgba(15, 23, 42, .14);
    text-align: center;
}

.app-preloader-mark {
    width: 62px;
    height: 62px;
    margin: 0 auto .85rem;
    border-radius: 16px;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    font-size: 1.8rem;
    box-shadow: 0 12px 26px rgba(7, 89, 166, .24);
    animation: preloaderPulse 1.2s ease-in-out infinite;
}

.app-preloader-title {
    font-weight: 800;
    color: var(--primary-dark);
}

.app-preloader-text {
    margin-top: .1rem;
    color: #64748b;
    font-size: .92rem;
}

.app-preloader-bar {
    height: 4px;
    margin-top: 1rem;
    border-radius: 999px;
    overflow: hidden;
    background: #e4eef6;
}

.app-preloader-bar span {
    display: block;
    width: 42%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    animation: preloaderBar 1s ease-in-out infinite;
}

@keyframes preloaderPulse {
    0%,
    100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-2px) scale(1.04);
    }
}

@keyframes preloaderBar {
    0% {
        transform: translateX(-110%);
    }
    100% {
        transform: translateX(250%);
    }
}

.login-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1.25rem;
    background:
        linear-gradient(135deg, rgba(7, 89, 166, .92), rgba(52, 180, 220, .78)),
        url('https://images.unsplash.com/photo-1523580846011-d3a5bc25702b?auto=format&fit=crop&w=1600&q=80') center/cover;
}

.login-shell {
    width: min(94vw, 1080px);
}

.login-portal {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(360px, .78fr);
    align-items: stretch;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 28px 70px rgba(2, 30, 58, .34);
    animation: fadeSlide .26s ease-out;
}

.login-panel {
    background: rgba(255, 255, 255, .96);
    padding: clamp(1.6rem, 3vw, 2.7rem);
}

.login-info-panel {
    position: relative;
    padding: clamp(1.6rem, 3vw, 2.8rem);
    color: #fff;
    background:
        linear-gradient(135deg, rgba(5, 63, 120, .96), rgba(7, 89, 166, .9) 56%, rgba(52, 180, 220, .78)),
        linear-gradient(135deg, rgba(255, 255, 255, .08), transparent);
}

.login-info-panel::after {
    content: '';
    position: absolute;
    inset: auto 1.6rem 1.4rem auto;
    width: 160px;
    height: 160px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 50%;
    opacity: .7;
    pointer-events: none;
}

.login-brand-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.login-lead {
    max-width: 560px;
    color: rgba(255, 255, 255, .86);
    font-size: 1.05rem;
}

.brand-mark {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    color: #fff;
    background: var(--primary);
    font-size: 2rem;
}

.login-info-panel .brand-mark {
    color: var(--primary);
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 14px 28px rgba(0, 0, 0, .18);
}

.login-panel-mark {
    width: 56px;
    height: 56px;
    font-size: 1.55rem;
}

.login-access-grid {
    display: grid;
    gap: .85rem;
}

.login-access-card {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    align-items: flex-start;
    gap: .85rem;
    color: #fff;
    background: rgba(255, 255, 255, .11);
    text-align: left;
    transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.login-access-card:hover,
.login-access-card.active {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, .58);
    background: rgba(255, 255, 255, .2);
    box-shadow: 0 16px 34px rgba(0, 0, 0, .16);
}

.login-access-card small {
    display: block;
    margin-top: .18rem;
    color: rgba(255, 255, 255, .78);
    line-height: 1.35;
}

.login-access-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: var(--primary);
    background: rgba(255, 255, 255, .94);
    flex: 0 0 auto;
    font-size: 1.2rem;
}

.login-public-links {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
}

.login-public-links a {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .65rem .8rem;
    border: 1px solid rgba(255, 255, 255, .26);
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, .1);
    text-decoration: none;
    transition: background .18s ease, transform .18s ease;
}

.login-public-links a:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, .2);
}

.login-submit-btn {
    box-shadow: 0 14px 28px rgba(13, 110, 253, .2);
}

.login-help-box {
    padding: .85rem 1rem;
    border: 1px solid #dbe7f0;
    border-radius: 12px;
    background: #f8fbfd;
    color: #475569;
}

.login-help-box div {
    display: flex;
    align-items: center;
    gap: .45rem;
    color: var(--primary-dark);
    font-weight: 700;
}

.public-body {
    min-height: 100vh;
    padding: 1.25rem;
    background:
        linear-gradient(135deg, rgba(7, 89, 166, .92), rgba(52, 180, 220, .72)),
        url('https://images.unsplash.com/photo-1523580846011-d3a5bc25702b?auto=format&fit=crop&w=1600&q=80') center/cover fixed;
}

.public-shell {
    width: min(94vw, 1040px);
    margin: 0 auto;
    display: grid;
    gap: 1rem;
}

.public-hero,
.public-card {
    border-radius: 16px;
    box-shadow: 0 24px 58px rgba(2, 30, 58, .24);
    animation: fadeSlide .26s ease-out;
}

.public-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(1.35rem, 3vw, 2rem);
    color: #fff;
    background: linear-gradient(135deg, rgba(5, 63, 120, .96), rgba(7, 89, 166, .88) 58%, rgba(52, 180, 220, .82));
}

.public-hero::after {
    content: '';
    position: absolute;
    right: -48px;
    bottom: -68px;
    width: 210px;
    height: 210px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 50%;
}

.public-hero-alt {
    background: linear-gradient(135deg, rgba(5, 63, 120, .96), rgba(13, 110, 253, .86) 54%, rgba(25, 135, 84, .72));
}

.public-back {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    margin-bottom: 1.1rem;
    color: rgba(255, 255, 255, .86);
    text-decoration: none;
    font-weight: 700;
}

.public-back:hover {
    color: #fff;
}

.public-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.public-brand h1 {
    margin: 0;
    font-weight: 850;
}

.public-logo {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    overflow: hidden;
    color: var(--primary);
    background: rgba(255, 255, 255, .96);
    font-size: 1.9rem;
    box-shadow: 0 14px 28px rgba(0, 0, 0, .16);
}

.public-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: .35rem;
}

.public-hero p {
    max-width: 720px;
    margin: 1rem 0 0;
    color: rgba(255, 255, 255, .86);
    font-size: 1.03rem;
}

.public-card {
    padding: clamp(1.2rem, 3vw, 2rem);
    background: rgba(255, 255, 255, .96);
}

.public-card .form-control,
.public-card .form-select,
.public-card .input-group-text {
    border-color: #dbe7f0;
}

.public-card .input-group-text {
    color: var(--primary);
    background: #f8fbfd;
}

.public-result {
    margin-top: 1.25rem;
    padding: 1.1rem;
    border: 1px solid #dbe7f0;
    border-radius: 14px;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: linear-gradient(180deg, #fff, #f8fbfd);
    animation: fadeSlide .24s ease-out;
}

.public-result.is-valid {
    border-color: rgba(25, 135, 84, .28);
    box-shadow: inset 4px 0 0 rgba(25, 135, 84, .75);
}

.public-result.is-warning {
    border-color: rgba(255, 193, 7, .38);
    box-shadow: inset 4px 0 0 rgba(255, 193, 7, .85);
}

.public-result-icon {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: var(--primary);
    background: var(--soft);
    font-size: 1.55rem;
    flex: 0 0 auto;
}

.public-result-grid span {
    display: block;
    color: #64748b;
    font-size: .82rem;
}

.public-result-grid strong {
    display: block;
    color: var(--ink);
}

.public-empty {
    margin-top: 1.25rem;
    min-height: 190px;
    border: 1px dashed #c9d9e6;
    border-radius: 14px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: .4rem;
    color: #64748b;
    text-align: center;
    background: #fbfdff;
    animation: fadeSlide .24s ease-out;
}

.public-empty i {
    color: var(--primary);
    font-size: 2.35rem;
}

.public-empty strong {
    color: var(--ink);
    font-size: 1.12rem;
}

.app-layout {
    min-height: 100vh;
    display: flex;
}

.sidebar {
    width: 260px;
    min-height: 100vh;
    flex-direction: column;
    background: var(--primary);
    color: #fff;
    position: sticky;
    top: 0;
}

.sidebar-brand {
    display: flex;
    gap: .75rem;
    align-items: center;
    padding: 1.25rem;
    font-weight: 700;
    line-height: 1.1;
    background: var(--primary-dark);
}

.sidebar-brand i {
    font-size: 2rem;
}

.sidebar-nav {
    padding: .75rem;
}

.sidebar-nav .nav-link {
    color: rgba(255, 255, 255, .86);
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .75rem .85rem;
    border-radius: 8px;
    margin-bottom: .25rem;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link.active {
    color: #fff;
    background: rgba(255, 255, 255, .16);
}

.offcanvas .sidebar-nav .nav-link {
    color: var(--primary-dark);
}

.offcanvas .sidebar-nav .nav-link:hover,
.offcanvas .sidebar-nav .nav-link.active {
    color: #fff;
    background: var(--primary);
}

.main-area {
    flex: 1;
    min-width: 0;
}

.topbar {
    min-height: 64px;
}

.content-wrap {
    padding: 1.5rem;
}

.stat-card,
.panel {
    border: 0;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .06);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: var(--soft);
    color: var(--primary);
    font-size: 1.4rem;
}

.table thead th {
    background: #edf6fb;
    color: var(--primary-dark);
    white-space: nowrap;
}

.receipt-page {
    max-width: 880px;
    margin: 0 auto;
}

.ticket-body {
    background: #fff;
    color: #000;
}

.ticket {
    width: 80mm;
    padding: 8px;
    font-family: Consolas, 'Courier New', monospace;
    font-size: 12px;
}

.ticket h2,
.ticket h3,
.ticket p {
    text-align: center;
    margin: 6px 0;
}

.ticket-saved {
    display: none;
}

.void-stamp {
    position: absolute;
    inset: 42% auto auto 32%;
    transform: rotate(-18deg);
    font-size: clamp(2rem, 8vw, 5rem);
    font-weight: 800;
    color: rgba(220, 53, 69, .22);
    border: 6px solid rgba(220, 53, 69, .22);
    padding: .25rem 1rem;
    pointer-events: none;
}

.signature-line {
    width: min(260px, 80%);
    border-top: 1px solid #94a3b8;
    margin-top: 54px;
}

@media print {
    .app-preloader,
    .sidebar,
    .topbar,
    .print-hide {
        display: none !important;
    }

    .content-wrap {
        padding: 0;
    }

    .card {
        box-shadow: none !important;
        border: 0 !important;
    }

    .ticket {
        width: 80mm;
    }
}

@media (prefers-reduced-motion: reduce) {
    .app-preloader,
    .app-preloader-mark,
    .app-preloader-bar span {
        animation: none !important;
        transition: none !important;
    }
}

.badge-soft {
    background: var(--soft);
    color: var(--primary-dark);
}

.dashboard-hero {
    min-height: 150px;
    border-radius: 8px;
    padding: 1.4rem;
    color: #fff;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary) 55%, var(--accent));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    box-shadow: 0 16px 36px rgba(7, 89, 166, .22);
}

.dashboard-hero h2 {
    font-weight: 800;
}

.dashboard-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.dashboard-stat {
    border: 0;
    border-radius: 8px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .07);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.dashboard-stat:hover,
.quick-actions a:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 32px rgba(7, 89, 166, .16);
}

.dashboard-stat-link {
    display: block;
    height: 100%;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

.dashboard-stat-link:hover {
    color: inherit;
}

.dashboard-stat-link:hover .stat-icon {
    background: var(--primary);
    color: #fff;
}

.stat-open {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    color: var(--primary);
    background: #f4f9fd;
    opacity: .78;
    transition: background .18s ease, color .18s ease, opacity .18s ease;
}

.dashboard-stat-link:hover .stat-open {
    color: #fff;
    background: var(--accent);
    opacity: 1;
}

.stat-detail {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    margin-top: .7rem;
    color: var(--primary);
    font-size: .82rem;
    font-weight: 700;
}

.stat-detail::after {
    content: '\F138';
    font-family: "bootstrap-icons";
    font-size: .78rem;
}

.stat-value {
    font-size: clamp(1.35rem, 2vw, 2rem);
    font-weight: 800;
    color: var(--ink);
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
}

.quick-actions a {
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .85rem;
    border-radius: 8px;
    background: #f8fbfd;
    color: var(--primary-dark);
    text-decoration: none;
    border: 1px solid #e3eef5;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.quick-actions i {
    font-size: 1.15rem;
    color: var(--primary);
}

.chart-card canvas {
    min-height: 280px;
}

.dashboard-table tbody tr {
    transition: background .18s ease;
}

.dashboard-table tbody tr:hover {
    background: #f8fbfd;
}

.status-pagado,
.status-pendiente,
.status-anulado,
.status-observado {
    border-radius: 999px;
    padding: .35rem .55rem;
    font-weight: 700;
}

.status-pagado {
    background: #e7f8ef;
    color: #166534;
}

.status-pendiente {
    background: #fff7df;
    color: #92400e;
}

.status-anulado {
    background: #fee2e2;
    color: #991b1b;
}

.status-observado {
    background: #e0f2fe;
    color: #075985;
}

.live-search {
    position: relative;
}

.live-search-results {
    position: absolute;
    z-index: 1050;
    top: calc(100% + .35rem);
    left: 0;
    right: 0;
    max-height: 320px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #dbe7f0;
    border-radius: 8px;
    box-shadow: 0 18px 44px rgba(15, 23, 42, .16);
    transform-origin: top;
    animation: dropdownIn .18s ease-out;
}

.live-search-item {
    width: 100%;
    border: 0;
    background: #fff;
    text-align: left;
    padding: .75rem .9rem;
    border-bottom: 1px solid #eef2f6;
}

.live-search-item:hover,
.live-search-item:focus {
    background: var(--soft);
}

.student-preview {
    border: 1px solid #dbe7f0;
    border-radius: 8px;
    background: linear-gradient(180deg, #fff, #f7fbfd);
    animation: fadeSlide .22s ease-out;
}

.reniec-status {
    min-height: 1.25rem;
    line-height: 1.25;
}

.reniec-search-actions {
    padding: .85rem;
    border: 1px solid #dbe7f0;
    border-radius: 8px;
    background: #f8fbfd;
}

.reniec-action-btn {
    min-height: 42px;
    padding-inline: 1rem;
    font-weight: 700;
    box-shadow: 0 8px 18px rgba(7, 89, 166, .12);
}

.reniec-action-btn i {
    font-size: 1.05rem;
}

.payment-preview-ticket {
    width: min(100%, 430px);
    margin: 0 auto;
    padding: 1rem;
    border: 1px solid #dbe7f0;
    border-radius: 8px;
    background: linear-gradient(180deg, #fff, #f8fbfd);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .7);
}

.payment-preview-logo {
    width: 44px;
    height: 44px;
    margin: 0 auto .5rem;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: var(--soft);
    color: var(--primary);
    font-size: 1.45rem;
}

.payment-preview-row,
.payment-preview-total {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    padding: .35rem 0;
}

.payment-preview-row span,
.payment-preview-total span {
    color: #64748b;
}

.payment-preview-row strong,
.payment-preview-total strong {
    color: var(--ink);
    text-align: right;
}

.payment-preview-total {
    border-top: 2px solid #dbe7f0;
    font-size: 1.1rem;
}

.payment-preview-total strong {
    color: var(--primary);
    font-size: 1.25rem;
}

@keyframes dropdownIn {
    from {
        opacity: 0;
        transform: translateY(-6px) scaleY(.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scaleY(1);
    }
}

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

@media (max-width: 767.98px) {
    .content-wrap {
        padding: 1rem;
    }

    .login-body {
        align-items: start;
        padding: .75rem;
    }

    .login-portal {
        grid-template-columns: 1fr;
        border-radius: 12px;
    }

    .login-info-panel,
    .login-panel {
        padding: 1.4rem;
    }

    .login-info-panel::after {
        display: none;
    }

    .public-body {
        padding: .75rem;
    }

    .public-brand {
        align-items: flex-start;
    }

    .public-result {
        flex-direction: column;
    }

    .dashboard-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .quick-actions {
        grid-template-columns: 1fr;
    }
}

/* Modal estilo Laravel para matriculas */
.matricula-modal .modal-dialog {
    max-width: min(980px, calc(100vw - 2rem));
}

.matricula-modal .modal-content {
    border-radius: 12px;
    overflow: hidden;
}

.matricula-modal.fade .modal-dialog {
    transform: translateY(18px) scale(.98);
    transition: transform .22s ease-out, opacity .22s ease-out;
}

.matricula-modal.show .modal-dialog {
    transform: translateY(0) scale(1);
}

.matricula-modal .modal-header {
    background: linear-gradient(180deg, #fff, #f8fbfd);
}

.matricula-modal .modal-body {
    background: #fff;
}

.matricula-modal .fw-semibold.text-primary {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding-bottom: .35rem;
    border-bottom: 1px solid #e7eef5;
}

.matricula-modal .fw-semibold.text-primary::before {
    content: '';
    width: .55rem;
    height: .55rem;
    border-radius: 999px;
    background: var(--primary);
    box-shadow: 0 0 0 .22rem rgba(7, 89, 166, .12);
}

.modal-backdrop.show {
    opacity: .58;
}

.modal-form-footer {
    position: sticky;
    bottom: -1.5rem;
    z-index: 2;
    background: linear-gradient(180deg, rgba(255, 255, 255, .86), #fff 45%);
    padding-bottom: .35rem;
}

@supports (backdrop-filter: blur(6px)) {
    .modal-backdrop.show {
        backdrop-filter: blur(6px);
    }
}

@media (max-width: 767.98px) {
    .matricula-modal .modal-dialog {
        max-width: 100%;
        margin: .5rem;
    }

    .matricula-modal .modal-header,
    .matricula-modal .modal-body {
        padding: 1rem !important;
    }

    .modal-form-footer {
        flex-direction: column-reverse;
    }

    .modal-form-footer .btn {
        width: 100%;
    }
}

/* Buscador dinamico de conceptos en registro de pagos */
.concept-search .input-group-text {
    background: #f8fbfd;
    color: var(--primary);
}

.concept-results {
    max-height: 360px;
}

.concept-result-item .text-muted {
    line-height: 1.35;
}

.concept-selected {
    min-height: 58px;
    padding: .75rem .85rem;
    border: 1px solid #dbe7f0;
    border-radius: 8px;
    background: linear-gradient(180deg, #ffffff, #f7fbfd);
    box-shadow: inset 3px 0 0 rgba(7, 89, 166, .18);
    animation: fadeSlide .2s ease-out;
}

@media (max-width: 767.98px) {
    .concept-result-item .d-flex,
    .concept-selected .d-flex {
        align-items: flex-start !important;
        flex-direction: column;
    }
}

.quick-action-button {
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .85rem;
    border-radius: 8px;
    background: #f8fbfd;
    color: var(--primary-dark);
    text-decoration: none;
    border: 1px solid #e3eef5;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
    text-align: left;
}

.quick-action-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 32px rgba(7, 89, 166, .16);
}

.quick-action-button i {
    font-size: 1.15rem;
    color: var(--primary);
}

/* Configuracion institucional */
.institution-logo-card {
    background: linear-gradient(180deg, #fff, #f8fbfd);
}

.logo-preview {
    width: 160px;
    height: 160px;
    border-radius: 8px;
    border: 1px dashed #b9d7ea;
    background: #fff;
    display: grid;
    place-items: center;
    overflow: hidden;
    color: var(--primary);
    font-size: 3rem;
}

.logo-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: .65rem;
}

.sidebar-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 8px;
    background: rgba(255, 255, 255, .95);
    padding: .2rem;
}

.sidebar-logo-sm {
    width: 34px;
    height: 34px;
    object-fit: contain;
}

.import-type-card {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 104px;
    padding: 18px;
    border: 1px solid rgba(13, 110, 253, 0.12);
    border-radius: 12px;
    color: inherit;
    text-decoration: none;
    background: #fff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.import-type-card:hover,
.import-type-card.active {
    transform: translateY(-2px);
    border-color: rgba(13, 110, 253, 0.38);
    box-shadow: 0 18px 42px rgba(13, 110, 253, 0.12);
}
.import-type-card.active {
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.10), #fff 68%);
}
.import-type-icon {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #0d6efd;
    background: #eef8ff;
    font-size: 1.45rem;
    flex: 0 0 auto;
}
.import-type-card strong,
.import-type-card small {
    display: block;
}
.import-type-card small {
    color: #6c757d;
    line-height: 1.35;
    margin-top: 4px;
}
.import-columns {
    padding: 14px;
    border: 1px dashed rgba(13, 110, 253, 0.28);
    border-radius: 10px;
    background: #f8fbff;
}
.import-preview-table {
    max-height: 520px;
    overflow: auto;
}
.empty-state {
    min-height: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    color: #6c757d;
    border: 1px dashed #d8e2ef;
    border-radius: 12px;
    background: #fbfdff;
}
.empty-state i {
    font-size: 3rem;
    color: #0d6efd;
}
.empty-state strong {
    color: #1f2937;
}
@media (max-width: 768px) {
    .import-type-card {
        min-height: auto;
    }
    .import-preview-table {
        max-height: none;
    }
}

.signature-preview {
    width: 100%;
    max-width: 260px;
    min-height: 116px;
    border: 1px dashed rgba(13, 110, 253, .35);
    border-radius: 12px;
    background: #f8fbff;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    overflow: hidden;
}
.signature-preview i {
    font-size: 2rem;
}
.signature-preview img {
    width: 100%;
    height: 116px;
    object-fit: contain;
    padding: 10px;
}
.institution-settings .form-control-color {
    min-width: 58px;
}
.institution-preview {
    border-left: 5px solid var(--preview-color, var(--primary));
    border-radius: 12px;
    padding: 18px;
    background: linear-gradient(135deg, rgba(248, 251, 255, .95), #fff);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}
.institution-preview h3 {
    margin: 0;
    font-weight: 800;
    color: var(--preview-color, var(--primary));
}
.institution-preview p {
    margin: 4px 0 0;
    color: #6c757d;
}
.institution-preview-logo {
    width: 62px;
    height: 62px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: #eef8ff;
    color: var(--preview-color, var(--primary));
    flex: 0 0 auto;
    overflow: hidden;
}
.institution-preview-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 5px;
}
.institution-preview-logo i {
    font-size: 2rem;
}
.institution-preview-chip {
    padding: 8px 12px;
    border-radius: 999px;
    color: var(--preview-color, var(--primary));
    background: color-mix(in srgb, var(--preview-color, var(--primary)) 12%, #fff);
    font-weight: 700;
    white-space: nowrap;
}
@media (max-width: 768px) {
    .institution-preview {
        align-items: flex-start;
        flex-direction: column;
    }
}

.receipt-signature-block {
    min-width: 220px;
}
.receipt-digital-signature {
    display: block;
    width: 180px;
    max-height: 78px;
    object-fit: contain;
    margin: 0 auto 6px;
}

/* Administracion academica: semestres, programas y modulos simples */
.academic-hero {
    min-height: 148px;
    border-radius: 12px;
    padding: 1.5rem;
    color: #fff;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary) 58%, var(--accent));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    box-shadow: 0 18px 42px rgba(7, 89, 166, .22);
    animation: fadeSlide .24s ease-out;
}

.academic-hero p {
    max-width: 720px;
    color: rgba(255, 255, 255, .88);
}

.academic-hero-badge {
    min-width: 154px;
    padding: .85rem 1rem;
    border: 1px solid rgba(255, 255, 255, .34);
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    background: rgba(255, 255, 255, .14);
    font-weight: 800;
    white-space: nowrap;
}

.academic-hero-badge i {
    font-size: 1.25rem;
}

.academic-summary,
.academic-admin-shell {
    animation: fadeSlide .28s ease-out;
}

.academic-stat,
.academic-form-card,
.academic-table-card {
    transition: transform .18s ease, box-shadow .18s ease;
}

.academic-stat:hover,
.academic-form-card:hover,
.academic-table-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 38px rgba(7, 89, 166, .12);
}

.academic-card-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: var(--primary);
    background: var(--soft);
    font-size: 1.35rem;
}

.academic-form .input-group-text {
    color: var(--primary);
    background: #f8fbfd;
}

.academic-form .form-control,
.academic-form .form-select {
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.academic-form .form-control:focus,
.academic-form .form-select:focus {
    border-color: rgba(7, 89, 166, .55);
    box-shadow: 0 0 0 .2rem rgba(7, 89, 166, .12);
}

.academic-save-btn {
    box-shadow: 0 12px 24px rgba(13, 110, 253, .18);
}

.academic-table {
    border-collapse: separate;
    border-spacing: 0 .45rem;
}

.academic-table thead th {
    border: 0;
}

.academic-table tbody tr {
    background: #fff;
    box-shadow: 0 1px 0 rgba(15, 23, 42, .06);
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.academic-table tbody tr:hover {
    transform: translateY(-2px);
    background: #f8fbfd;
    box-shadow: 0 12px 26px rgba(15, 23, 42, .08);
}

.academic-table tbody td {
    border-top: 1px solid #e8eef5;
    border-bottom: 1px solid #e8eef5;
    padding: .9rem .75rem;
}

.academic-table tbody td:first-child {
    border-left: 1px solid #e8eef5;
    border-radius: 8px 0 0 8px;
}

.academic-table tbody td:last-child {
    border-right: 1px solid #e8eef5;
    border-radius: 0 8px 8px 0;
}

.semester-number {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: var(--primary);
    background: var(--soft);
    font-weight: 800;
}

.academic-actions .btn {
    min-width: 38px;
}

.academic-schedule {
    border: 1px solid #e4edf5;
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(180deg, #ffffff, #f8fbfd);
    box-shadow: 0 10px 26px rgba(15, 23, 42, .05);
}

.academic-schedule-head {
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
    border-bottom: 1px solid #e4edf5;
    background: rgba(238, 248, 252, .72);
}

.academic-class-item {
    display: flex;
    gap: .9rem;
    padding: .9rem 0;
    border-bottom: 1px solid #edf2f7;
}

.academic-class-item:last-child {
    border-bottom: 0;
}

.academic-class-time {
    min-width: 112px;
    height: fit-content;
    padding: .45rem .6rem;
    border-radius: 10px;
    color: var(--primary-dark);
    background: var(--soft);
    font-weight: 800;
    text-align: center;
    white-space: nowrap;
}

.academic-check-list {
    display: grid;
    gap: .55rem;
    max-height: 210px;
    overflow: auto;
    padding: .75rem;
    border: 1px solid #dee8f2;
    border-radius: 10px;
    background: #f8fbfd;
}

.academic-check-list label {
    display: flex;
    align-items: center;
    gap: .55rem;
    margin: 0;
    padding: .5rem .6rem;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: background .16s ease, transform .16s ease;
}

.academic-check-list label:hover {
    transform: translateY(-1px);
    background: var(--soft);
}

@media (max-width: 767.98px) {
    .academic-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .academic-hero-badge {
        width: 100%;
    }

    .academic-schedule-head,
    .academic-class-item {
        align-items: flex-start;
        flex-direction: column;
    }

    .academic-class-time {
        min-width: 0;
        width: 100%;
    }
}
