:root{
    --navy:#062a56;
    --navy-2:#0a3e78;
    --sky:#16c7e8;
    --purple:#7445d8;
    --green:#118a3d;
    --soft:#f6f8fc;
    --text:#1f2937;
}

.gradient-bg{background:linear-gradient(135deg,var(--navy) 0%,var(--sky) 52%,var(--purple) 100%)}

.hero-public{
    min-height:100vh;
    margin:0;
    background:
        radial-gradient(circle at top left,rgba(22,199,232,.36),transparent 30%),
        radial-gradient(circle at bottom right,rgba(116,69,216,.30),transparent 32%),
        linear-gradient(135deg,#062a56,#0a3e78 46%,#7445d8);
    padding:32px 18px;
    display:flex;
    align-items:center;
    justify-content:center;
}

.public-container{
    width:100%;
    max-width:1180px;
    margin:0 auto;
}

.public-card{
    width:100%;
    background:rgba(255,255,255,.98);
    border-radius:24px;
    box-shadow:0 24px 70px rgba(0,0,0,.24);
    overflow:hidden;
}

.validation-card{min-height:610px}

.public-grid{
    display:grid;
    grid-template-columns:minmax(330px,42%) 1fr;
    min-height:610px;
}

.public-hero-panel{
    color:#fff;
    padding:46px 38px;
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
    gap:14px;
}

.public-hero-panel h1{
    margin:10px 0 0;
    font-size:2.15rem;
    line-height:1.12;
    font-weight:800;
}

.institution-name{
    max-width:480px;
    margin:0;
    font-size:1rem;
    opacity:.95;
}

.hero-description{
    max-width:460px;
    margin:4px 0 0;
    font-size:1.02rem;
    line-height:1.55;
    opacity:.98;
}

.public-badge{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border:1px solid rgba(255,255,255,.42);
    background:rgba(255,255,255,.14);
    backdrop-filter:blur(8px);
    border-radius:999px;
    padding:7px 14px;
    font-size:.84rem;
    font-weight:700;
    letter-spacing:.02em;
}

.public-warning{
    width:100%;
    max-width:500px;
    margin:12px 0 0;
    border:0;
    text-align:left;
    font-size:.92rem;
}

.public-form-panel{
    padding:54px 56px;
    display:flex;
    flex-direction:column;
    justify-content:center;
}

.section-title span{
    display:inline-block;
    color:var(--navy);
    font-size:.82rem;
    font-weight:800;
    letter-spacing:.08em;
    text-transform:uppercase;
    margin-bottom:8px;
}

.section-title h2{
    font-size:2rem;
    line-height:1.15;
    margin:0 0 10px;
}

.section-title p{
    margin:0 0 22px;
    color:#64748b;
    line-height:1.55;
}

.form-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:18px;
}

.button-row{
    display:flex;
    flex-wrap:wrap;
    gap:12px;
    align-items:center;
    margin-top:20px;
}

.qr-upload-card{
    margin-top:28px;
    padding:22px;
    border:1px solid #e5e7eb;
    border-radius:18px;
    background:#f8fafc;
}

.qr-upload-card h3{
    margin:0 0 8px;
    color:var(--navy);
    font-size:1.25rem;
}

.public-footer-box{
    margin-top:20px;
    padding-top:16px;
    border-top:1px solid #e5e7eb;
}

.public-footer-box p,
.footer-note{
    margin:.35rem 0;
    font-size:.88rem;
    color:#6b7280;
}

.logo-lg{
    width:116px;
    height:116px;
    object-fit:contain;
    border-radius:50%;
    background:white;
    padding:7px;
    box-shadow:0 10px 35px rgba(0,0,0,.20);
}

.certificate-valid{border-left:8px solid #16a34a}
.certificate-invalid{border-left:8px solid #dc2626}
.certificate-pending{border-left:8px solid #f59e0b}
.qr-box svg{max-width:220px;width:100%;height:auto}
.actions form{display:inline}
.brand-gradient-text{
    background:linear-gradient(90deg,#062a56,#16c7e8,#7445d8);
    -webkit-background-clip:text;
    background-clip:text;
    color:transparent;
}

/* Ajustes para páginas administrativas y tablas */
.table-responsive{width:100%;overflow-x:auto}
.badge-status{white-space:nowrap}

@media(max-width:900px){
    .hero-public{padding:18px 10px;align-items:flex-start}
    .public-grid{grid-template-columns:1fr;min-height:auto}
    .validation-card{min-height:auto}
    .public-hero-panel{padding:36px 22px}
    .public-form-panel{padding:34px 24px}
    .section-title h2{font-size:1.65rem}
    .form-grid{grid-template-columns:1fr}
    .logo-lg{width:96px;height:96px}
    .public-hero-panel h1{font-size:1.75rem}
}

@media(max-width:520px){
    .hero-public{padding:0;background:linear-gradient(135deg,#062a56,#0a3e78 46%,#7445d8)}
    .public-card{border-radius:0;min-height:100vh}
    .public-form-panel{padding:28px 18px}
    .public-hero-panel{padding:30px 18px}
    .button-row .btn{width:100%;justify-content:center}
}

/* Corrección resultado público */
.result-card { padding: 2rem; }
.result-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 1.25rem;
    align-items: start;
}
.certificate-detail-card { border: 1px solid rgba(6, 42, 86, .12); box-shadow: 0 10px 26px rgba(6, 42, 86, .08); }
.qr-box svg { max-width: 220px; width: 100%; height: auto; }
@media (max-width: 768px) {
    .result-grid { grid-template-columns: 1fr; }
    .result-card { padding: 1.25rem; }
}

/* Dashboard estadístico mejorado */
.dashboard-kpis .kpi-card{overflow:hidden;position:relative}
.dashboard-kpis .kpi-card::after{content:"";position:absolute;right:-35px;bottom:-45px;width:130px;height:130px;border-radius:50%;background:rgba(255,255,255,.16)}
.kpi-card h2{font-size:2.1rem;margin:.2rem 0 0;font-weight:850}
.kpi-icon{font-size:2.35rem;line-height:1;filter:drop-shadow(0 8px 12px rgba(0,0,0,.20))}
.analytics-card{border:1px solid #dde7f3;box-shadow:0 14px 36px rgba(15,23,42,.08)}
.analytics-header{display:flex;align-items:center;justify-content:space-between;gap:1rem;background:linear-gradient(90deg,#ffffff,#f8fbff)}
.analytics-header strong{display:block;color:#062a56;font-size:1.05rem}
.analytics-header small{display:block;color:#64748b;font-weight:500;margin-top:.22rem}
.analytics-badge{display:inline-flex;align-items:center;border-radius:999px;padding:.35rem .7rem;font-size:.78rem;font-weight:800;color:white;white-space:nowrap}
.analytics-badge.blue{background:linear-gradient(135deg,#0d6efd,#16c7e8)}
.analytics-badge.purple{background:linear-gradient(135deg,#7445d8,#0d6efd)}
.chart-canvas{width:100%;min-height:280px;display:block}
.chart-legend{display:flex;flex-wrap:wrap;gap:.55rem .85rem;margin-bottom:.75rem;min-height:24px}
.chart-legend span{display:inline-flex;align-items:center;gap:.35rem;font-size:.82rem;font-weight:700;color:#475569;background:#f8fafc;border:1px solid #e2e8f0;border-radius:999px;padding:.28rem .55rem}
.chart-legend i{width:11px;height:11px;border-radius:50%;display:inline-block}

/* Mejoras solicitadas: sidebar activo, AJAX, reportes y QR JPG */
.menu a{position:relative;transition:all .18s ease;border-left:4px solid transparent}
.menu a.active{background:linear-gradient(90deg,rgba(22,199,232,.25),rgba(116,69,216,.16));color:#fff;border-left-color:#16c7e8;font-weight:800;box-shadow:inset 0 0 0 1px rgba(255,255,255,.10)}
.menu a.active::after{content:"";position:absolute;right:12px;top:50%;width:8px;height:8px;border-radius:50%;background:#16c7e8;transform:translateY(-50%);box-shadow:0 0 0 5px rgba(22,199,232,.16)}
.ajax-table-container{position:relative;min-height:120px;transition:opacity .18s ease}
.ajax-table-container.ajax-loading,.report-preview.ajax-loading{opacity:.55;pointer-events:none}
.ajax-table-container.ajax-loading::before,.report-preview.ajax-loading::before{content:"Cargando...";position:absolute;right:16px;top:10px;z-index:5;background:#062a56;color:white;padding:.35rem .65rem;border-radius:999px;font-size:.78rem;font-weight:700;box-shadow:0 8px 18px rgba(6,42,86,.25)}
.ajax-summary{padding:.35rem .55rem;border-radius:10px;background:#f8fafc;border:1px solid #e2e8f0;display:inline-block}
.report-card{height:100%;border:1px solid #dfe7f2;box-shadow:0 12px 28px rgba(15,23,42,.07)}
.report-card .card-header{font-weight:800;color:#062a56;background:linear-gradient(90deg,#fff,#f5fbff)}
.report-preview{position:relative;min-height:32px;border-top:1px dashed #d7e1ee;padding-top:.75rem}
.preview-scroll{max-height:260px;overflow:auto;border:1px solid #e5e7eb;border-radius:12px;background:#fff}
.preview-scroll table{margin-bottom:0}
.form-label.small{font-weight:700;color:#475569}
.table-hover tbody tr:hover{background:#f8fbff}

/* Ajustes de filtros solicitados */
.compact-filter-form .form-label{margin-bottom:.25rem;font-weight:700;color:#475569!important}
.compact-filter-form .btn-clean{
    background:linear-gradient(135deg,#0f63b7,#16a3d9);
    border:1px solid rgba(15,99,183,.18);
    color:#fff;
    font-weight:800;
    border-radius:8px;
    padding:.42rem .95rem;
    min-width:82px;
    box-shadow:0 6px 14px rgba(15,99,183,.18);
}
.compact-filter-form .btn-clean:hover{color:#fff;filter:brightness(.97);transform:translateY(-1px)}
.report-preview{position:relative;min-height:20px}

/* Corrección: botón Limpiar más bajo y rectangular */
.compact-filter-form .btn-clean,
.compact-filter-form a.btn-clean,
.compact-filter-form button.btn-clean{
    height:36px!important;
    min-height:36px!important;
    max-height:36px!important;
    min-width:78px!important;
    padding:0 .85rem!important;
    border-radius:8px!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    line-height:1!important;
    font-size:.88rem!important;
    font-weight:800!important;
    white-space:nowrap!important;
}
.compact-filter-form .col-md-auto.d-flex.align-items-end{
    align-items:flex-end!important;
}
.compact-filter-form{align-items:end!important}

/* Soporte local Bootstrap para columnas usadas en filtros */
.align-items-end{align-items:flex-end!important}
.col-md-auto{padding:.5rem;flex:0 0 auto;width:auto}
@media (min-width: 992px){
    .col-lg-3{padding:.5rem;flex:0 0 25%;max-width:25%}
    .col-lg-5{padding:.5rem;flex:0 0 41.666667%;max-width:41.666667%}
}
@media (max-width: 800px){
    .col-md-auto{flex:0 0 100%;width:100%}
    .compact-filter-form .btn-clean{width:auto!important}
}

/* Escáner QR público */
.qr-scanner-modal .modal-header{align-items:flex-start;gap:1rem;}
.qr-scanner-toolbar{display:grid;grid-template-columns:1fr auto auto;gap:.75rem;align-items:end;margin-bottom:1rem;}
.qr-scanner-toolbar .btn{height:38px;border-radius:10px;padding:.45rem .9rem;}
.camera-select-wrap .form-label{font-weight:700;color:#243b60;margin-bottom:.35rem;}
.qr-reader-box{min-height:320px;background:#0b172a;border-radius:18px;display:flex;align-items:center;justify-content:center;overflow:hidden;border:1px solid rgba(15,23,42,.12);}
.qr-reader-box video{width:100%;max-height:420px;object-fit:cover;border-radius:16px;}
.qr-reader-placeholder{text-align:center;color:#e2e8f0;padding:2rem;display:flex;flex-direction:column;align-items:center;gap:.45rem;}
.qr-reader-placeholder strong{font-size:1.15rem;color:#fff;}
.qr-reader-placeholder span{color:#cbd5e1;}
.qr-reader-icon{font-size:2rem;line-height:1;}
.qr-reader-danger{background:#fff;color:#334155;border-radius:14px;max-width:560px;}
.qr-reader-danger strong{color:#0f2d57;}
.qr-reader-danger span{color:#526072;}
.qr-help-box{background:#eff6ff;border:1px solid #bfdbfe;border-radius:12px;padding:.85rem 1rem;color:#1e3a5f;font-size:.92rem;}
.btn-soft-secondary{background:#e2e8f0;border-color:#cbd5e1;color:#1e293b;}
.btn-soft-secondary:hover{background:#cbd5e1;color:#0f172a;}
@media (max-width: 768px){.qr-scanner-toolbar{grid-template-columns:1fr}.qr-scanner-toolbar .btn{width:100%;}.qr-reader-box{min-height:260px}}

/* Emisión de certificados en bloque */
.bulk-certificate-card .bulk-options{
    border:1px solid #dbe7f3;
    background:linear-gradient(135deg,#f8fbff,#eef7ff);
    border-radius:14px;
    padding:1rem;
}
.bulk-issue-table thead th{
    background:#f8fafc;
    color:#0f2d57;
    font-weight:800;
    border-bottom:1px solid #dbe7f3;
}
.bulk-issue-table tbody tr:has(.bulk-enrollment-check:checked){
    background:#eefcf4;
}
.bulk-issue-table .form-check-input{
    width:1.05rem;
    height:1.05rem;
    cursor:pointer;
}
.btn-success{
    background:linear-gradient(135deg,#118a3d,#22c55e)!important;
    border-color:#118a3d!important;
    color:#fff!important;
    font-weight:800;
}
.btn-success:hover{filter:brightness(.96);color:#fff!important;}


/* Corrección general de listados administrativos: tablas, botones y paginación */
.admin-shell{width:100%;background:#eef2f7;}
.main{min-width:0;overflow-x:hidden;}
.content{max-width:100%;}
.card{max-width:100%;}
.table-responsive{width:100%;overflow-x:auto;border:1px solid #e5eaf2;border-radius:12px;background:#fff;}
.ajax-table-container .table-responsive{margin-top:.35rem;}
.table{width:100%;border-collapse:collapse;margin-bottom:0;font-size:.94rem;}
.table th{white-space:nowrap;color:#062a56;font-weight:850;background:#f8fafc;}
.table td{vertical-align:middle;}
.table td.actions{white-space:nowrap;min-width:170px;}
.table td.actions > a,
.table td.actions > form{display:inline-flex!important;margin:.12rem .08rem;vertical-align:middle;}
.table td.actions form button{margin:0;}
.table .btn-sm{min-height:28px!important;padding:.32rem .55rem!important;border-radius:7px!important;font-size:.78rem!important;line-height:1!important;align-items:center;justify-content:center;white-space:nowrap;}
.table .btn-light{background:#f8fafc!important;border-color:#dbe3ee!important;color:#0f2d57!important;}
.card-header .btn-sm{min-height:30px!important;line-height:1!important;}
.pagination-wrap{margin-top:.85rem;}
.pagination{display:flex;gap:.35rem;list-style:none;padding-left:0;margin:.25rem 0 0;align-items:center;}
.page-item{display:block;}
.page-link{display:flex;align-items:center;justify-content:center;min-width:34px;height:34px;padding:.25rem .65rem;border:1px solid #d3dce8;border-radius:8px;background:#fff;color:#0f2d57;text-decoration:none;font-weight:700;font-size:.84rem;}
.page-item.active .page-link{background:#0f63b7;color:#fff;border-color:#0f63b7;}
.page-item.disabled .page-link{background:#f1f5f9;color:#94a3b8;cursor:not-allowed;}
.bulk-filter-form .btn-show-records{height:36px!important;min-height:36px!important;border-radius:8px!important;font-weight:800!important;white-space:nowrap!important;}
.bulk-checkbox-note{display:inline-flex;gap:.45rem;align-items:center;font-weight:700;color:#34506d;background:#fff;border:1px solid #d6e3f2;border-radius:10px;padding:.55rem .75rem;}
.bulk-checkbox-note .form-check-input{margin:0;}
.bulk-issue-table{min-width:900px;}
@media (max-width: 900px){
    .table{font-size:.88rem;}
    .table td.actions{min-width:150px;}
}

/* Selección masiva de certificados filtrados */
.select-filtered-box{
    display:inline-flex;
    align-items:center;
    gap:.5rem;
    padding:.46rem .72rem;
    border:1px solid #b8d7ff;
    border-radius:10px;
    background:linear-gradient(135deg,#eef7ff,#f7fbff);
    color:#083b74;
    font-weight:800;
    font-size:.86rem;
    box-shadow:0 6px 14px rgba(10,88,202,.08);
    cursor:pointer;
}
.select-filtered-box .form-check-input{margin:0;}
.select-filtered-box:hover{border-color:#0d6efd;background:#edf6ff;}
.bulk-issue-table tbody tr:has(.bulk-enrollment-check:disabled){background:#f2f8ff;}

/* Búsqueda dinámica de participante en Nueva inscripción */
.enrollment-form-card .position-relative{position:relative!important;}
.participant-search-group{display:flex;gap:.5rem;align-items:stretch;}
.participant-search-group .form-control{flex:1 1 auto;}
.participant-search-group .btn{white-space:nowrap;border-radius:10px!important;font-weight:800;}
.ajax-search-results{
    position:absolute;
    left:.5rem;
    right:.5rem;
    top:calc(100% - .15rem);
    z-index:30;
    background:#fff;
    border:1px solid #cbd5e1;
    border-radius:12px;
    box-shadow:0 18px 38px rgba(15,23,42,.16);
    overflow:hidden;
    max-height:310px;
    overflow-y:auto;
}
.ajax-search-results.d-none{display:none!important;}
.ajax-search-item{
    width:100%;
    border:0;
    background:#fff;
    text-align:left;
    padding:.75rem .9rem;
    display:flex;
    flex-direction:column;
    gap:.18rem;
    cursor:pointer;
    border-bottom:1px solid #eef2f7;
}
.ajax-search-item:hover,
.ajax-search-item:focus{
    background:linear-gradient(90deg,#eef7ff,#f8fbff);
    outline:none;
}
.ajax-search-title{font-weight:850;color:#062a56;line-height:1.2;}
.ajax-search-meta{font-size:.84rem;color:#64748b;}
.ajax-search-empty{padding:.85rem .95rem;color:#64748b;font-weight:700;background:#f8fafc;}
.selected-participant-badge{
    margin-top:.5rem;
    display:flex;
    flex-wrap:wrap;
    gap:.25rem .45rem;
    align-items:center;
    padding:.45rem .65rem;
    border:1px solid #bfe3ff;
    background:#eff8ff;
    color:#0f2d57;
    border-radius:10px;
    font-size:.88rem;
}
.selected-participant-badge.d-none{display:none!important;}
.selected-participant-badge span{color:#64748b;font-weight:700;}
.selected-participant-badge strong{font-weight:850;}
@media(max-width: 768px){
    .participant-search-group{flex-direction:column;}
    .ajax-search-results{left:.5rem;right:.5rem;top:calc(100% - .05rem);}
}

/* Inscripción en bloque */
.bulk-enrollment-card .bulk-options{
    border:1px solid #dbe7f3;
    background:linear-gradient(135deg,#f8fbff,#eef7ff);
    border-radius:14px;
    padding:1rem;
}
.bulk-enrollment-table tbody tr:has(.bulk-participant-check:checked){
    background:#eefcf4;
}
.bulk-enrollment-table tbody tr:has(.bulk-participant-check:disabled){
    background:#f2f8ff;
}
.bulk-enrollment-table .form-check-input{
    width:1.05rem;
    height:1.05rem;
    cursor:pointer;
}

/* Selección masiva con conteo */
.selection-counter{
    display:inline-flex;
    align-items:center;
    min-height:32px;
    padding:.35rem .7rem;
    border-radius:10px;
    background:#e8f2ff!important;
    color:#064a8c!important;
    border:1px solid #bad7ff!important;
    font-weight:800;
}
.bulk-issue-table tbody tr:has(.bulk-enrollment-check:checked),
.bulk-issue-table tbody tr:has(.bulk-participant-check:checked){
    background:#eefcf4;
}
.select-filtered-box{
    cursor:pointer;
}
.bulk-all-filtered-message{
    border-left:4px solid #0d6efd;
}

/* Cambio de estado en bloque en listados */
.bulk-status-panel{
    border:1px solid #d7e5f6;
    background:linear-gradient(135deg,#f8fbff,#eef7ff);
    border-radius:14px;
    padding:1rem;
    box-shadow:0 8px 20px rgba(15,45,87,.05);
}
.bulk-status-panel .form-label{font-weight:800;color:#1e3455;margin-bottom:.35rem;}
.bulk-status-panel .btn{min-height:38px;border-radius:10px;font-weight:850;}
.status-bulk-table .form-check-input{width:1.05rem;height:1.05rem;cursor:pointer;}
.status-bulk-table tbody tr:has(.status-enrollment-check:checked),
.status-bulk-table tbody tr:has(.status-certificate-check:checked){background:#eefcf4;}
.status-bulk-table th:first-child,.status-bulk-table td:first-child{text-align:center;}

/* Corrección responsive del panel administrativo */
.admin-shell{
    display:flex !important;
    min-height:100vh;
    width:100%;
    background:#eef2f7;
}

#adminSidebar.sidebar{
    width:275px !important;
    flex:0 0 275px !important;
    min-height:100vh;
    height:100vh;
    position:sticky !important;
    top:0 !important;
    left:0 !important;
    right:auto !important;
    bottom:auto !important;
    z-index:1030;
    overflow-y:auto;
    background:linear-gradient(160deg,#062a56 0%,#0a3e78 50%,#7445d8 100%);
    color:#fff;
    padding:1rem 1rem 1.35rem;
    box-shadow:6px 0 24px rgba(15,23,42,.12);
    transform:none !important;
}

.brand{
    display:flex;
    align-items:center;
    gap:.75rem;
    min-height:72px;
    padding:.35rem .45rem 1rem;
    margin-bottom:.25rem;
    border-bottom:1px solid rgba(255,255,255,.16);
    color:#fff;
}

.brand img{
    width:48px;
    height:48px;
    object-fit:contain;
    border-radius:12px;
    background:#fff;
    padding:4px;
}

.brand-text{
    min-width:0;
    flex:1;
}

.sidebar-close{
    display:none;
    width:36px;
    height:36px;
    flex:0 0 36px;
    align-items:center;
    justify-content:center;
    border:1px solid rgba(255,255,255,.25);
    border-radius:10px;
    background:rgba(255,255,255,.12);
    color:#fff;
    font-size:1.6rem;
    line-height:1;
    font-weight:700;
}

.menu{
    display:flex;
    flex-direction:column;
    gap:.28rem;
    padding:.35rem 0;
}

.menu a{
    display:flex;
    align-items:center;
    gap:.75rem;
    min-height:44px;
    padding:.68rem .85rem;
    border-radius:12px;
    color:rgba(255,255,255,.92);
    text-decoration:none;
    font-weight:700;
    line-height:1.2;
}

.menu a:hover{
    background:rgba(255,255,255,.12);
    color:#fff;
}

.main{
    flex:1 1 auto !important;
    min-width:0;
    min-height:100vh;
    width:auto !important;
    max-width:none !important;
    margin-left:0 !important;
    background:#eef2f7;
    overflow-x:hidden;
}

.topbar{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:1rem;
    min-height:68px;
    height:auto !important;
    background:#fff;
    border-bottom:1px solid #e2e8f0;
    padding:0 1.35rem;
    position:sticky;
    top:0;
    z-index:1010;
    box-shadow:0 4px 18px rgba(15,23,42,.04);
}

.topbar-title{
    min-width:0;
    flex:1;
}

.page-title{
    color:#062a56;
    font-size:1.65rem;
    font-weight:850;
    line-height:1.15;
    margin:0;
}

.content{
    padding:1.25rem;
    max-width:100%;
}

.mobile-menu-toggle{
    display:none;
    width:42px;
    height:42px;
    flex:0 0 42px;
    align-items:center;
    justify-content:center;
    flex-direction:column;
    gap:5px;
    border:1px solid #dbe3ee;
    border-radius:12px;
    background:linear-gradient(135deg,#062a56,#0a3e78);
    box-shadow:0 8px 18px rgba(6,42,86,.18);
}

.mobile-menu-toggle span{
    display:block;
    width:20px;
    height:2px;
    border-radius:99px;
    background:#fff;
    transition:transform .18s ease, opacity .18s ease;
}

.sidebar-backdrop{
    display:none;
}

@media(max-width:991.98px){
    .admin-shell{
        display:block !important;
        min-height:100vh;
    }

    #adminSidebar.sidebar{
        position:fixed !important;
        top:0 !important;
        left:0 !important;
        bottom:0 !important;
        right:auto !important;
        width:300px !important;
        max-width:86vw !important;
        min-height:100vh;
        height:100vh;
        transform:translateX(-110%) !important;
        transition:transform .24s ease;
        z-index:1060;
        box-shadow:18px 0 44px rgba(15,23,42,.30);
    }

    body.sidebar-open #adminSidebar.sidebar{
        transform:translateX(0) !important;
    }

    .sidebar-backdrop{
        display:block;
        position:fixed;
        inset:0;
        z-index:1050;
        background:rgba(15,23,42,.50);
        opacity:0;
        visibility:hidden;
        pointer-events:none;
        transition:opacity .2s ease, visibility .2s ease;
    }

    body.sidebar-open .sidebar-backdrop{
        opacity:1;
        visibility:visible;
        pointer-events:auto;
    }

    body.sidebar-open{
        overflow:hidden;
    }

    .mobile-menu-toggle{
        display:inline-flex;
    }

    .sidebar-close{
        display:inline-flex;
    }

    .main{
        width:100% !important;
        margin-left:0 !important;
        min-height:100vh;
    }

    .topbar{
        padding:.85rem .9rem;
        gap:.75rem;
    }

    .page-title{
        font-size:1.35rem;
    }

    .content{
        padding:1rem .85rem;
    }

    .hide-sm{
        display:none !important;
    }

    .brand{
        padding-top:.5rem;
    }
}

@media(max-width:575.98px){
    #adminSidebar.sidebar{
        width:280px !important;
        max-width:84vw !important;
    }

    .topbar{
        align-items:flex-start;
    }

    .page-title{
        font-size:1.28rem;
    }

    .topbar .btn{
        padding:.45rem .7rem;
    }

    .content{
        padding:.85rem .7rem;
    }
}
