.spanner{
    position:absolute;
    top: 50%;
    left: 0;
    background: #2a2a2a55;
    width: 100%;
    display:block;
    text-align:center;
    height: 300px;
    color: #FFF;
    transform: translateY(-50%);
    z-index: 10001;
    visibility: hidden;
}

.overlay{
    z-index: 10000;
    position: fixed;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    visibility: hidden;
}

.loader,
.loader:before,
.loader:after {
    z-index: 10002;
    border-radius: 50%;
    width: 2.5em;
    height: 2.5em;
    -webkit-animation-fill-mode: both;
    animation-fill-mode: both;
    -webkit-animation: load7 1.8s infinite ease-in-out;
    animation: load7 1.8s infinite ease-in-out;
}
.loader {
    color: hsl(201, 94%, 37%);
    font-size: 10px;
    margin: 80px auto;
    position: relative;
    text-indent: -9999em;
    -webkit-transform: translateZ(0);
    -ms-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-animation-delay: -0.16s;
    animation-delay: -0.16s;
}
.loader:before,
.loader:after {
    content: '';
    position: absolute;
    top: 0;
}
.loader:before {
    left: -3.5em;
    -webkit-animation-delay: -0.32s;
    animation-delay: -0.32s;
}
.loader:after {
    left: 3.5em;
}
@-webkit-keyframes load7 {
    0%,
    80%,
    100% {
        box-shadow: 0 2.5em 0 -1.3em;
    }
    40% {
        box-shadow: 0 2.5em 0 0;
    }
}
@keyframes load7 {
    0%,
    80%,
    100% {
        box-shadow: 0 2.5em 0 -1.3em;
    }
    40% {
        box-shadow: 0 2.5em 0 0;
    }
}

.show{
    visibility: visible;
}

.spanner, .overlay{
    opacity: 0;
    -webkit-transition: all 0.3s;
    -moz-transition: all 0.3s;
    transition: all 0.3s;
}

.spanner.show, .overlay.show {
    opacity: 1
}
/* Estilos modernos de la Biblioteca (Grid de libros, fichas y modo oscuro) */

/* Compatibilidad utilidades Bootstrap 4 -> Bootstrap 5 / Tabler */
.mr-1, .me-1 { margin-right: 0.4rem !important; }
.mr-2, .me-2 { margin-right: 0.6rem !important; }
.mr-3, .me-3 { margin-right: 1rem !important; }
.mr-4, .me-4 { margin-right: 1.5rem !important; }
.ml-1, .ms-1 { margin-left: 0.4rem !important; }
.ml-2, .ms-2 { margin-left: 0.6rem !important; }
.ml-3, .ms-3 { margin-left: 1rem !important; }
.ml-4, .ms-4 { margin-left: 1.5rem !important; }

/* Separación y alineación perfecta de iconos dentro de botones y dropdowns */
.btn > i,
.btn > svg,
.dropdown-item > i,
.dropdown-item > svg,
.badge > i,
.badge > svg,
.nav-link > i,
.nav-link > svg {
    display: inline-block;
    vertical-align: -0.125em;
}
.btn > i:first-child:not(:only-child),
.btn > svg:first-child:not(:only-child),
.dropdown-item > i:first-child:not(:only-child),
.dropdown-item > svg:first-child:not(:only-child),
.badge > i:first-child:not(:only-child),
.badge > svg:first-child:not(:only-child) {
    margin-right: 0.45rem !important;
}
.btn > i:last-child:not(:only-child),
.btn > svg:last-child:not(:only-child),
.dropdown-item > i:last-child:not(:only-child),
.dropdown-item > svg:last-child:not(:only-child) {
    margin-left: 0.35rem !important;
}

/* Tarjetas de Libros en Cuadrícula */
.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.25rem;
}

@media (min-width: 768px) {
    .book-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1.5rem;
    }
}

.book-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-radius: 8px;
    overflow: visible;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

/* Solo animar elevación en dispositivos con hover real */
@media (hover: hover) and (pointer: fine) {
    .book-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.15) !important;
        z-index: 5;
    }
}

.book-card.dropdown-open,
.book-card:has(.dropdown.show),
.book-card:has(.dropup.show),
.book-card:focus-within {
    transform: none !important;
    z-index: 1050 !important;
}

.book-card-footer {
    position: relative;
    z-index: 2;
}

.dropup .dropdown-menu {
    top: auto !important;
    bottom: 100% !important;
    margin-bottom: 0.35rem !important;
    transform: none !important;
    min-width: 220px;
    max-width: min(320px, 92vw);
    max-height: 340px;
    overflow-y: auto;
    z-index: 1055 !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.25), 0 8px 10px -6px rgba(0, 0, 0, 0.2) !important;
    border-radius: 12px;
}

.book-card .dropdown-item,
.table-responsive .dropdown-item {
    padding: 0.5rem 0.85rem !important;
    font-size: 0.9rem !important;
    border-radius: 8px !important;
    display: flex !important;
    align-items: center !important;
    cursor: pointer;
}

.book-card .dropdown-item:hover,
.table-responsive .dropdown-item:hover {
    background-color: rgba(32, 107, 196, 0.08) !important;
}

html[data-theme="dark"] .book-card .dropdown-menu,
html[data-theme="dark"] .table-responsive .dropdown-menu {
    background-color: #111827 !important;
    border: 1px solid #1f2937 !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.7) !important;
}

html[data-theme="dark"] .book-card .dropdown-item,
html[data-theme="dark"] .table-responsive .dropdown-item {
    color: #e2e8f0 !important;
}

html[data-theme="dark"] .book-card .dropdown-item:hover,
html[data-theme="dark"] .table-responsive .dropdown-item:hover {
    background-color: #1e293b !important;
    color: #fff !important;
}

/* ==========================================================================
   Mobile Action Sheet (Estilo nativo iOS para acciones de libro en <768px)
   ========================================================================== */
.mobile-action-sheet-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1060;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.24s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-action-sheet-backdrop.active {
    opacity: 1;
    visibility: visible;
}

body.action-sheet-open {
    overflow: hidden !important;
}

.mobile-action-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    max-height: 85vh;
    background-color: #ffffff;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.25);
    z-index: 1070;
    padding: 0.75rem 1.25rem calc(1.5rem + env(safe-area-inset-bottom, 0px)) 1.25rem;
    transform: translateY(100%);
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.28s;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.mobile-action-sheet.active {
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
}

.mobile-action-sheet-handle {
    width: 38px;
    height: 4.5px;
    background: rgba(156, 163, 175, 0.5);
    border-radius: 9999px;
    margin: 0 auto 0.75rem auto;
}

.mobile-action-sheet-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: #64748b;
    text-align: center;
    margin-bottom: 0.85rem;
    padding: 0 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mobile-action-sheet .dropdown-item {
    padding: 0.75rem 1rem !important;
    font-size: 0.98rem !important;
    border-radius: 10px !important;
    display: flex !important;
    align-items: center !important;
    color: #1e293b;
    margin-bottom: 0.25rem;
    cursor: pointer;
    text-decoration: none !important;
    transition: background-color 0.15s ease;
}

.mobile-action-sheet .dropdown-item:hover,
.mobile-action-sheet .dropdown-item:active {
    background-color: rgba(32, 107, 196, 0.08) !important;
}

.mobile-action-sheet .dropdown-divider {
    margin: 0.6rem 0;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.mobile-action-sheet .dropdown-header {
    padding: 0.35rem 0.5rem 0.5rem 0.5rem;
    font-size: 0.75rem !important;
    letter-spacing: 0.5px;
    color: #64748b !important;
}

.mobile-action-sheet-close-btn {
    background-color: #f1f5f9;
    color: #334155;
    border: none;
    font-size: 0.95rem;
    font-weight: 600;
}

.mobile-action-sheet-close-btn:hover,
.mobile-action-sheet-close-btn:active {
    background-color: #e2e8f0;
    color: #0f172a;
}

/* Modo oscuro para Mobile Action Sheet */
html[data-theme="dark"] .mobile-action-sheet {
    background-color: #111827 !important;
    border-top: 1px solid #1f2937 !important;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.7) !important;
}

html[data-theme="dark"] .mobile-action-sheet-handle {
    background: rgba(156, 163, 175, 0.3);
}

html[data-theme="dark"] .mobile-action-sheet-title {
    color: #94a3b8;
}

html[data-theme="dark"] .mobile-action-sheet .dropdown-item {
    color: #f1f5f9 !important;
}

html[data-theme="dark"] .mobile-action-sheet .dropdown-item:hover,
html[data-theme="dark"] .mobile-action-sheet .dropdown-item:active {
    background-color: #1e293b !important;
}

html[data-theme="dark"] .mobile-action-sheet .dropdown-divider {
    border-top: 1px solid #1f2937;
}

html[data-theme="dark"] .mobile-action-sheet .dropdown-header {
    color: #94a3b8 !important;
}

html[data-theme="dark"] .mobile-action-sheet-close-btn {
    background-color: #1f2937 !important;
    color: #e2e8f0 !important;
    border: 1px solid #374151 !important;
}

html[data-theme="dark"] .mobile-action-sheet-close-btn:hover,
html[data-theme="dark"] .mobile-action-sheet-close-btn:active {
    background-color: #374151 !important;
    color: #ffffff !important;
}

@media (min-width: 768px) {
    .mobile-action-sheet,
    .mobile-action-sheet-backdrop {
        display: none !important;
    }
}

.book-cover-wrapper {
    position: relative;
    width: 100%;
    padding-top: 145%; /* Aspect ratio ~ 1 : 1.45 (típico de portadas de libros) */
    background-color: #f3f4f6;
    overflow: hidden;
    cursor: pointer;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.book-cover-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.book-card:hover .book-cover-img {
    transform: scale(1.03);
}

.book-card-body {
    padding: 0.85rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.book-title-link {
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 2.3em;
    color: inherit;
    text-decoration: none;
}

.book-title-link:hover {
    color: #4e73df;
    text-decoration: none;
}

.book-author-link {
    font-size: 0.82rem;
    color: #6b7280;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 0.25rem;
    text-decoration: none;
}

.book-author-link:hover {
    color: #3b82f6;
    text-decoration: underline;
}

.book-card-footer {
    padding: 0.65rem 0.85rem;
    background-color: rgba(0, 0, 0, 0.02);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

/* Miniatura en vista de lista */
.book-table-thumb {
    width: 40px;
    height: 56px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* Paginador visual */
.pagination-modern .page-link {
    border-radius: 6px;
    margin: 0 2px;
    border: 1px solid #e3e6f0;
    color: #4e73df;
}

.pagination-modern .page-item.active .page-link {
    background-color: #4e73df;
    border-color: #4e73df;
    color: #fff;
}

.topbar {
    height: 3.25rem !important;
    min-height: 3.25rem !important;
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

@media (max-width: 576px) {
    .topbar {
        height: 3rem !important;
        min-height: 3rem !important;
        padding-left: 0.6rem !important;
        padding-right: 0.6rem !important;
    }
}

.border-left-primary { border-left: 0.25rem solid #4f46e5 !important; }
.border-left-success { border-left: 0.25rem solid #10b981 !important; }
.border-left-info    { border-left: 0.25rem solid #06b6d4 !important; }
.border-left-warning { border-left: 0.25rem solid #f59e0b !important; }
.border-left-danger  { border-left: 0.25rem solid #ef4444 !important; }

.badge-primary { background-color: #4f46e5 !important; color: #fff; }
.badge-success { background-color: #10b981 !important; color: #fff; }
.badge-info    { background-color: #06b6d4 !important; color: #fff; }
.badge-warning { background-color: #f59e0b !important; color: #fff; }
.badge-danger  { background-color: #ef4444 !important; color: #fff; }

.btn-primary {
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.22);
    transition: all 0.2s ease;
}
.btn-primary:hover {
    background: linear-gradient(135deg, #4338ca 0%, #4f46e5 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.32);
}
.btn-outline-primary {
    color: #4f46e5;
    border-color: #4f46e5;
    border-radius: 8px;
}
.btn-outline-primary:hover {
    background-color: #4f46e5;
    border-color: #4f46e5;
    color: #fff;
}

/* Modo Oscuro (Dark Theme) */
html[data-theme="dark"],
html[data-theme="dark"] body,
html[data-theme="dark"] #wrapper,
html[data-theme="dark"] #content-wrapper,
html[data-theme="dark"] #wrapper #content-wrapper,
html[data-theme="dark"] #content {
    background-color: #0b0f19 !important;
    color: #f1f5f9 !important;
}

html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4,
html[data-theme="dark"] h5,
html[data-theme="dark"] h6,
html[data-theme="dark"] .h1,
html[data-theme="dark"] .h2,
html[data-theme="dark"] .h3,
html[data-theme="dark"] .h4,
html[data-theme="dark"] .h5,
html[data-theme="dark"] .h6,
html[data-theme="dark"] .text-darkBlue {
    color: #f8fafc !important;
}

html[data-theme="dark"] .card {
    background-color: #111827 !important;
    border: 1px solid #1f2937 !important;
    color: #f1f5f9 !important;
}

html[data-theme="dark"] .card-header {
    background-color: #0f172a !important;
    border-color: #1f2937 !important;
    color: #f8fafc !important;
}

html[data-theme="dark"] .book-card {
    background-color: #111827 !important;
    border: 1px solid #1f2937 !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45) !important;
}

html[data-theme="dark"] .book-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6) !important;
    border-color: #374151 !important;
}

html[data-theme="dark"] .book-cover-wrapper {
    background-color: #1a2234 !important;
}

html[data-theme="dark"] .book-title-link {
    color: #f1f5f9 !important;
}

html[data-theme="dark"] .book-title-link:hover {
    color: #818cf8 !important;
}

html[data-theme="dark"] .book-author-link {
    color: #94a3b8 !important;
}

html[data-theme="dark"] .book-author-link:hover {
    color: #c7d2fe !important;
}

html[data-theme="dark"] .book-card-footer {
    background-color: #0d131f !important;
    border-top: 1px solid #1f2937 !important;
}

html[data-theme="dark"] .navbar {
    background-color: #0b0f19 !important;
}

/* Menú colapsable en móvil (<768px): tarjeta sólida con sombra y bordes definidos */
@media (max-width: 767.98px) {
    .navbar .navbar-collapse {
        background-color: var(--tblr-bg-surface, #ffffff);
        border: 1px solid var(--tblr-border-color, #e6e7e9);
        border-radius: 12px;
        margin-top: 0.75rem;
        margin-bottom: 0.75rem;
        padding: 0.5rem 0.5rem;
        box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.08);
        width: 100%;
    }

    .navbar .navbar-collapse .navbar-nav {
        gap: 0.25rem;
    }

    .navbar .navbar-collapse .nav-link {
        border-radius: 8px;
        padding: 0.6rem 0.85rem !important;
        font-weight: 500;
        display: flex;
        align-items: center;
        transition: background-color 0.15s ease, color 0.15s ease;
    }

    .navbar .navbar-collapse .nav-link:hover,
    .navbar .navbar-collapse .nav-link:active {
        background-color: rgba(32, 107, 196, 0.08);
        color: var(--tblr-primary, #206bc4) !important;
    }

    html[data-theme="dark"] .navbar .navbar-collapse {
        background-color: #182433 !important;
        border-color: #2b3a4a !important;
        box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5) !important;
    }

    html[data-theme="dark"] .navbar .navbar-collapse .nav-link {
        color: #e2e8f0 !important;
    }

    html[data-theme="dark"] .navbar .navbar-collapse .nav-link:hover,
    html[data-theme="dark"] .navbar .navbar-collapse .nav-link:active {
        background-color: rgba(255, 255, 255, 0.08) !important;
        color: #38bdf8 !important;
    }
}

html[data-theme="dark"] .topbar {
    background: #0b0f19 !important;
    border-bottom: 1px solid #1f2937;
}

html[data-theme="dark"] .input-group-text {
    background-color: #1e293b !important;
    border-color: #334155 !important;
    color: #cbd5e1 !important;
}

html[data-theme="dark"] .btn-outline-secondary {
    color: #cbd5e1 !important;
    border-color: #334155 !important;
}

html[data-theme="dark"] .btn-outline-secondary:hover,
html[data-theme="dark"] .btn-outline-secondary:focus {
    background-color: #334155 !important;
    color: #fff !important;
}

html[data-theme="dark"] .table {
    color: #f1f5f9 !important;
    background-color: #111827 !important;
    border-color: #1f2937 !important;
}

html[data-theme="dark"] .table-hover tbody tr:hover {
    background-color: #1e293b !important;
    color: #fff !important;
}

html[data-theme="dark"] .table thead th,
html[data-theme="dark"] .table td,
html[data-theme="dark"] .table th {
    border-color: #1f2937 !important;
}

html[data-theme="dark"] .table td a.text-dark {
    color: #f1f5f9 !important;
}

html[data-theme="dark"] .table td a.text-secondary {
    color: #94a3b8 !important;
}

html[data-theme="dark"] .thead-light th {
    background-color: #0f172a !important;
    color: #cbd5e1 !important;
    border-color: #1f2937 !important;
}

html[data-theme="dark"] .form-control {
    background-color: #1e293b !important;
    border-color: #334155 !important;
    color: #f8fafc !important;
}

html[data-theme="dark"] .form-control:focus {
    background-color: #1e293b !important;
    border-color: #6366f1 !important;
    color: #fff !important;
    box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.25) !important;
}

html[data-theme="dark"] select.form-control option {
    background-color: #1e293b !important;
    color: #f8fafc !important;
}

html[data-theme="dark"] .dropdown-menu {
    background-color: #111827 !important;
    border-color: #1f2937 !important;
}

html[data-theme="dark"] .dropdown-item {
    color: #f1f5f9 !important;
}

html[data-theme="dark"] .dropdown-item:hover {
    background-color: #1e293b !important;
    color: #fff !important;
}

html[data-theme="dark"] .modal-content {
    background-color: #111827 !important;
    border-color: #1f2937 !important;
    color: #f1f5f9 !important;
}

html[data-theme="dark"] .modal-header,
html[data-theme="dark"] .modal-footer {
    border-color: #1f2937 !important;
}

html[data-theme="dark"] .close {
    color: #fff !important;
}

html[data-theme="dark"] footer.sticky-footer {
    background-color: #0b0f19 !important;
    border-top: 1px solid #1f2937 !important;
    color: #9ca3af !important;
}

html[data-theme="dark"] .pagination-modern .page-link {
    background-color: #111827 !important;
    border-color: #1f2937 !important;
    color: #9ca3af !important;
}

html[data-theme="dark"] .pagination-modern .page-item.active .page-link {
    background-color: #4f46e5 !important;
    border-color: #4f46e5 !important;
    color: #fff !important;
}

html[data-theme="dark"] .pagination-modern .page-item.disabled .page-link {
    background-color: #0b0f19 !important;
    border-color: #1f2937 !important;
    color: #475569 !important;
}

html[data-theme="dark"] .text-dark {
    color: #f3f4f6 !important;
}

html[data-theme="dark"] .text-gray-800 {
    color: #f3f4f6 !important;
}

html[data-theme="dark"] .text-muted {
    color: #9ca3af !important;
}

html[data-theme="dark"] #libraryToastBody {
    background-color: #1e212b !important;
    color: #e5e7eb !important;
}

/* Autocomplete / Live Typeahead */
.autocomplete-container {
    position: relative;
}

.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1050;
    margin-top: 4px;
    border-radius: 8px;
    overflow: hidden;
    max-height: 400px;
    overflow-y: auto;
}

html[data-theme="dark"] .autocomplete-dropdown .list-group-item {
    background-color: #1e212b;
    border-color: #2e3343;
    color: #e5e7eb;
}

html[data-theme="dark"] .autocomplete-dropdown .list-group-item:hover,
html[data-theme="dark"] .autocomplete-dropdown .list-group-item.active {
    background-color: #2a2f3f;
    color: #fff;
}

html[data-theme="dark"] .autocomplete-dropdown .bg-light {
    background-color: #181a23 !important;
}

/* Topbar & User Menu Modernizado */
.theme-toggle-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #fff !important;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.theme-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.35);
    color: #fff !important;
    transform: scale(1.05);
}

.theme-toggle-btn:active {
    transform: scale(0.95);
}

.topbar-user-pill {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 9999px;
    padding: 0.25rem 0.65rem 0.25rem 0.35rem;
    font-size: 0.88rem;
    color: #fff !important;
    text-decoration: none !important;
    transition: all 0.2s ease;
}

.topbar-user-pill:hover,
.topbar-user-pill:focus,
.show > .topbar-user-pill {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.32);
}

.topbar-user-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    margin-right: 0.4rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.topbar-nav-link {
    color: rgba(255, 255, 255, 0.8) !important;
    font-weight: 500;
    padding: 0.35rem 0.65rem !important;
    font-size: 0.9rem;
    border-radius: 8px;
    transition: all 0.15s ease;
}

@media (max-width: 576px) {
    .topbar .nav-item .nav-link {
        height: 3rem !important;
        padding: 0 0.35rem !important;
    }
}

.topbar-nav-link:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.12);
}

.topbar .dropdown-menu {
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    min-width: 230px;
    margin-top: 0.5rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

html[data-theme="dark"] .topbar .dropdown-menu {
    background-color: #111827;
    border-color: #1f2937;
    color: #f1f5f9;
}

html[data-theme="dark"] .topbar .dropdown-item {
    color: #e2e8f0;
}

html[data-theme="dark"] .topbar .dropdown-item:hover {
    background-color: #1e293b;
    color: #fff;
}

html[data-theme="dark"] .topbar .dropdown-divider {
    border-top-color: #1f2937;
}

html[data-theme="dark"] .topbar .border-bottom {
    border-bottom-color: #1f2937 !important;
}

html[data-theme="dark"] .topbar .text-dark {
    color: #f8fafc !important;
}



