/* =====================================================
   Buzón de Mensajes Ingesis — Custom Styles
   ===================================================== */

/* ---- Sidebar ---- */
.sidebar {
    min-height: calc(100vh - 56px);
    background: linear-gradient(160deg, #0d6efd 0%, #084298 100%);
    color: #fff;
    padding: 1.25rem 1rem;
}

.sidebar .counter-badge {
    font-size: .75rem;
    min-width: 2rem;
}

.sidebar .nav-link {
    color: rgba(255,255,255,.85);
    border-radius: .375rem;
    padding: .45rem .75rem;
    transition: background .2s;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    background: rgba(255,255,255,.18);
    color: #fff;
}

.sidebar .section-title {
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: rgba(255,255,255,.55);
    margin-top: 1rem;
}

/* ---- Toolbar ---- */
.toolbar-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: .7rem;
    gap: 2px;
    padding: .45rem .65rem;
}

/* ---- Document Table ---- */
#tblDocumentos tbody tr {
    cursor: pointer;
}

[data-bs-theme="light"] #tblDocumentos tbody tr.table-active {
    background-color: #cfe2ff !important;
}

[data-bs-theme="dark"] #tblDocumentos tbody tr.table-active {
    background-color: #0d3b7a !important;
}

#tblDocumentos .badge-unread {
    width: .6rem;
    height: .6rem;
    border-radius: 50%;
    background: #0d6efd;
    display: inline-block;
}

/* ---- Preview Panel ---- */
#previewPanel {
    border-radius: .5rem;
    min-height: 400px;
}

#previewFrame {
    border: none;
    border-radius: 0 0 .5rem .5rem;
}

/* ---- Login Page ---- */
.login-wrapper {
    min-height: 100vh;
    background: linear-gradient(135deg, #0d6efd 0%, #084298 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    border: none;
    border-radius: 1rem;
    box-shadow: 0 1rem 3rem rgba(0,0,0,.3);
    max-width: 420px;
    width: 100%;
}

/* ---- Theme Toggle Button ---- */
.theme-toggle-btn {
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    z-index: 9999;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 2px 12px rgba(0,0,0,.45);
    background-color: #fff;
    border: 1px solid #dee2e6;
    color: #212529;
    transition: background-color .2s, color .2s, box-shadow .2s;
}

[data-bs-theme="dark"] .theme-toggle-btn {
    background-color: #2b2f33;
    border: 1px solid #495057;
    color: #f8f9fa;
}

.theme-toggle-btn:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,.55);
}

/* ---- Responsive ---- */
@media (max-width: 767.98px) {
    .sidebar {
        min-height: auto;
    }
}
