/* ============================================
   EDUNOTE - Theme System (Light / Dark)
   ============================================ */

/* --- Light Theme (default) --- */
:root {
    --side-bg: #181f2c;
    --side-text: #cfd6ee;
    --side-heading: #77cfff;
    --side-accent: #49f0bd;
    --side-hover: #242f49;
    --side-divider: #2a3547;
    --side-brand-border: #202f47;

    --main-bg: #ffffff;
    --main-text: #1f2937;
    --main-title: #11305e;

    --table-header-bg: #f8fafc;
    --table-subheader-bg: #f1f3f5;
    --table-cell-bg: #ffffff;
    --table-hover: #f0f4ff;
    --table-shadow: rgba(0,0,0,0.08);
}

/* --- Dark Theme --- */
[data-bs-theme="dark"] {
    --main-bg: #111318;
    --main-text: #e2e8f0;
    --main-title: #93c5fd;

    --table-header-bg: #1e293b;
    --table-subheader-bg: #1e293b;
    --table-cell-bg: #0f172a;
    --table-hover: #1e293b;
    --table-shadow: rgba(0,0,0,0.5);
}

/* --- Base --- */
html, body {
    height: 100%;
}

body {
    background: var(--main-bg);
    color: var(--main-text);
    transition: background 0.2s, color 0.2s;
}

.sidebar-scope {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 260px;
    z-index: 1000;
}

html.sidebar-collapsed .sidebar-scope {
    width: 60px;
}

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

.main-content {
    margin-left: 260px;
    padding: 1.5rem;
    background: var(--main-bg);
    min-height: 100vh;
    transition: background 0.2s;
    overflow-x: auto;
}

html.sidebar-collapsed .main-content {
    margin-left: 60px;
}

[x-cloak] {
    display: none !important;
}

.main-title {
    font-weight: 700;
    color: var(--main-title);
}

@media (max-width: 991px) {
    .main-content {
        margin-left: 60px;
    }
}
/* --- Login --- */
.login-body {
    min-height: 100vh;
    background: #f4f8fa;
}

/* Horizontal scrollable tabs */
.horizontal-tabs-wrapper::-webkit-scrollbar {
    height: 6px;
}
.horizontal-tabs-wrapper::-webkit-scrollbar-track {
    background: #f1f3f5;
    border-radius: 3px;
}
.horizontal-tabs-wrapper::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}
.horizontal-tabs-wrapper .nav-pills .nav-link {
    border-radius: 8px;
    padding: 0.5rem 1rem;
    color: #64748b;
    background: #f1f5f9;
    border: 1px solid transparent;
    font-weight: 500;
    font-size: 0.85rem;
}
.horizontal-tabs-wrapper .nav-pills .nav-link:hover {
    background: #e2e8f0;
    color: #388cff;
}
.horizontal-tabs-wrapper .nav-pills .nav-link.active {
    background: linear-gradient(135deg, #388cff, #4abff9);
    color: #fff;
    box-shadow: 0 2px 8px rgba(56, 140, 255, 0.3);
}

/* Main tabs in forms */
.card-header .nav-pills .nav-link[data-default-bg] {
    border: 1px solid #cbd5e1;
    color: #334155;
    background: #ffffff;
    padding: 0.85rem 1rem;
    font-weight: 500;
    transition: all 0.25s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.card-header .nav-pills .nav-link[data-default-bg]:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    color: #0f172a;
    background: #f8fafc;
}
.card-header .nav-pills .nav-link[data-default-bg].active {
    color: #ffffff !important;
    border: 1px solid transparent !important;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    transform: translateY(-1px);
}

/* Color for the first tab (default active) */
.card-header .nav-pills .nav-link[data-default-bg].active[href$="tab-estudiante"],
.card-header .nav-pills .nav-link[data-default-bg][data-bs-target="#tab-estudiante"].active {
    background: linear-gradient(135deg, #388cff, #4abff9) !important;
}

/* Scrollable table with sticky header */
.table-scrollable-wrapper {
    max-height: calc(100vh - 280px);
    overflow-y: auto;
    overflow-x: auto;
    position: relative;
}
.table-scrollable-wrapper thead th {
    position: sticky;
    top: 0;
    z-index: 10;
    background: linear-gradient(135deg, #388cff, #4abff9);
    color: #fff;
    font-weight: 600;
    border: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 0.85rem 0.75rem;
}
.table-scrollable-wrapper tbody tr:hover {
    background: var(--table-hover, #f0f4ff);
}
.table-scrollable-wrapper::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
.table-scrollable-wrapper::-webkit-scrollbar-track {
    background: #f1f3f5;
}
.table-scrollable-wrapper::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
.table-scrollable-wrapper::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Compact table inside scrollable wrapper */
.table-scrollable-wrapper .table {
    margin-bottom: 0;
}
.table-scrollable-wrapper .table tbody td {
    padding: 0.75rem;
    border-color: #f1f5f9;
}

/* (sidebar block removed - using grid layout for sticky sidebar above) */
.sidebar {
    background: var(--side-bg);
    color: var(--side-text);
    min-height: 100vh;
    width: 260px;
    min-width: 260px;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1000;
    transition: width 0.3s ease, min-width 0.3s ease;
    overflow: hidden;
}

.sidebar.collapsed {
    width: 60px;
    min-width: 60px;
}

.sidebar-wrapper {
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 1rem 1.2rem 0.8rem;
    font-weight: 600;
    color: #ffffff;
    border-bottom: 2px solid var(--side-brand-border);
    margin-bottom: 1rem;
    flex-shrink: 0;
}

.logo-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
}

.sidebar-menu-wrapper {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0 0.8rem 1rem;
    scrollbar-width: thin;
    scrollbar-color: var(--side-divider) transparent;
}

.sidebar-menu-wrapper::-webkit-scrollbar {
    width: 4px;
}

.sidebar-menu-wrapper::-webkit-scrollbar-thumb {
    background: var(--side-divider);
    border-radius: 4px;
}

.sidebar-section-title {
    padding: 0.45rem 0.8rem 0.3rem;
    font-weight: 600;
    color: var(--side-heading);
    margin-top: 12px;
    margin-bottom: 2px;
    border-left: 3px solid #4abff9;
    cursor: pointer;
    user-select: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    letter-spacing: 0.01em;
    transition: background 0.15s;
}

.sidebar-section-title:hover {
    background: #1e2a3d;
}

.sidebar-section-title .accordion-arrow {
    font-size: 0.6rem;
    transition: transform 0.2s ease;
    color: #4abff9;
}

.sidebar-section-title.collapsed .accordion-arrow {
    transform: rotate(-90deg);
}

.sidebar-group-list {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease-out;
}

.sidebar-group-list.sidebar-group-open {
    max-height: 600px;
    transition: max-height 0.25s ease-in;
}

.sidebar .nav-link {
    color: var(--side-text) !important;
    font-weight: 500;
    padding: 0.55rem 0.8rem 0.55rem 1.6rem;
    border-radius: 6px;
    margin: 1px 0;
    border-left: 2px solid transparent;
    display: flex;
    align-items: center;
    font-size: 0.83rem;
    transition: all 0.15s;
}

.sidebar .nav-link .feather {
    margin-right: 0.7rem;
    opacity: 0.83;
    width: 16px;
    height: 16px;
}

.sidebar .nav-link.active,
.sidebar .nav-link:hover {
    color: #ffffff !important;
    background: var(--side-hover);
    border-left: 2px solid var(--side-accent);
}

.sidebar-bottom {
    flex-shrink: 0;
    padding: 0.8rem 1rem 0.6rem;
    border-top: 1px solid var(--side-divider);
    background: var(--side-bg);
}

.sidebar-user {
    color: #ffffff !important;
    padding: 0.5rem 0.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    margin-bottom: 0.4rem;
}

.sidebar-logout .nav-link {
    background: linear-gradient(90deg, #0ba360 0%, #3cba92 100%);
    color: #fff !important;
    font-weight: 500;
    border-radius: 6px;
    padding: 0.55rem 1rem;
    font-size: 0.82rem;
    justify-content: center;
}

/* Theme toggle in sidebar */
.theme-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.6rem;
    margin-bottom: 0.5rem;
    background: #1e2a3d;
    border-radius: 8px;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s;
    font-size: 0.78rem;
    color: #cfd6ee;
}

.theme-toggle:hover {
    background: #242f49;
}

.theme-toggle-icon {
    font-size: 1rem;
    line-height: 1;
}

.theme-toggle-track {
    width: 36px;
    height: 20px;
    background: #2a3547;
    border-radius: 10px;
    position: relative;
    transition: background 0.25s;
    flex-shrink: 0;
}

.theme-toggle-track.active {
    background: #4abff9;
}

.theme-toggle-thumb {
    width: 16px;
    height: 16px;
    background: #ffffff;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: transform 0.25s;
}

.theme-toggle-track.active .theme-toggle-thumb {
    transform: translateX(16px);
}

/* === STATS BAR === */
.stat-card {
    background: var(--stat-bg);
    border-radius: 10px;
    padding: 1.25rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    border-left: 4px solid #388cff;
}

.stat-label {
    color: #64748b;
    font-size: 0.9rem;
}

.stat-value {
    color: var(--main-title);
    font-weight: 700;
    font-size: 2rem;
}

/* === CENTRALIZADOR TABLE === */
/* (Styles now inline in ver.php for speed and simplicity) */

/* Badge sizing */
.badge.rounded-pill {
    font-weight: 600;
    letter-spacing: 0.01em;
}

/* === MODAL === */
.modal {
    z-index: 2000;
}

.modal-backdrop {
    z-index: 1990;
}



/* === SIDEBAR COLLAPSE BLOCKER === */
/* Toggle button inside sidebar header */
.sidebar-toggle-btn {
    background: none;
    border: none;
    color: #cfd6ee;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 0 6px;
    line-height: 1;
    margin-left: auto;
    opacity: 0.6;
    transition: opacity 0.15s, transform 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 6px;
}

.sidebar-toggle-btn:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.08);
}

/* Collapsed header: logo on top, toggle below */
.sidebar.collapsed .sidebar-brand {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0.75rem 0 0.5rem;
    gap: 0.5rem;
}

.sidebar.collapsed .sidebar-brand .logo-icon {
    width: 28px;
    height: 28px;
    font-size: 0.85rem;
}

.sidebar.collapsed .sidebar-toggle-btn {
    margin-left: 0;
    width: 32px;
    height: 32px;
    padding: 0;
    font-size: 1.1rem;
    transform: none;
}

/* Hide text labels when collapsed */
.sidebar.collapsed .brand-text,
.sidebar.collapsed .nav-label,
.sidebar.collapsed .toggle-label,
.sidebar.collapsed .sidebar-section-title,
.sidebar.collapsed .accordion-arrow,
.sidebar.collapsed .sidebar-user {
    display: none;
}

/* Menu links in collapsed rail */
.sidebar.collapsed .nav-link {
    justify-content: center;
    padding: 0.6rem 0;
    border-radius: 0;
}

.sidebar.collapsed .nav-link .feather {
    margin-right: 0;
    width: 18px;
    height: 18px;
}

.sidebar.collapsed .nav-link:hover,
.sidebar.collapsed .nav-link.active {
    background: var(--side-hover);
}

/* Bottom section in collapsed rail */
.sidebar.collapsed .sidebar-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem 0;
    gap: 0.25rem;
}

/* Theme toggle collapsed */
.sidebar.collapsed .theme-toggle {
    justify-content: center;
    padding: 0.55rem 0;
    width: 100%;
    margin-bottom: 0.2rem;
    border-radius: 0;
}

.sidebar.collapsed .theme-toggle:hover {
    background: var(--side-hover);
}

.sidebar.collapsed .theme-toggle-icon {
    font-size: 1.1rem;
    margin: 0;
}

.sidebar.collapsed .theme-toggle-track,
.sidebar.collapsed .theme-toggle-thumb {
    display: none;
}

/* Logout collapsed */
.sidebar.collapsed .sidebar-logout {
    width: 100%;
}

.sidebar.collapsed .sidebar-logout .nav-link {
    justify-content: center;
    padding: 0.6rem 0;
    border-radius: 0;
    background: transparent;
}

.sidebar.collapsed .sidebar-logout .nav-link:hover {
    background: var(--side-hover);
}

.sidebar.collapsed .sidebar-logout .nav-link .feather {
    width: 18px;
    height: 18px;
}

/* Responsive: rail collapsed on mobile */
@media (max-width: 991px) {
    .app-layout {
        grid-template-columns: 60px 1fr !important;
    }
    .sidebar .sidebar-brand {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 0.75rem 0 0.5rem;
        gap: 0.5rem;
    }
    .sidebar .sidebar-brand .logo-icon {
        width: 28px;
        height: 28px;
        font-size: 0.85rem;
    }
    .sidebar .sidebar-toggle-btn {
        margin-left: 0;
        width: 32px;
        height: 32px;
        padding: 0;
        font-size: 1.1rem;
        transform: none;
    }
    .sidebar .brand-text,
    .sidebar .nav-label,
    .sidebar .toggle-label,
    .sidebar .sidebar-section-title,
    .sidebar .accordion-arrow,
    .sidebar .sidebar-user {
        display: none;
    }
    .sidebar .nav-link {
        justify-content: center;
        padding: 0.6rem 0;
        border-radius: 0;
    }
    .sidebar .nav-link .feather {
        margin-right: 0;
        width: 18px;
        height: 18px;
    }
    .sidebar .nav-link:hover,
    .sidebar .nav-link.active {
        background: var(--side-hover);
    }
    .sidebar .sidebar-bottom {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 0.5rem 0;
        gap: 0.25rem;
    }
    .sidebar .theme-toggle {
        justify-content: center;
        padding: 0.55rem 0;
        width: 100%;
        margin-bottom: 0.2rem;
        border-radius: 0;
    }
    .sidebar .theme-toggle-icon {
        font-size: 1.1rem;
        margin: 0;
    }
    .sidebar .theme-toggle-track,
    .sidebar .theme-toggle-thumb {
        display: none;
    }
    .sidebar .sidebar-logout {
        width: 100%;
    }
    .sidebar .sidebar-logout .nav-link {
        justify-content: center;
        padding: 0.6rem 0;
        border-radius: 0;
        background: transparent;
    }
    .sidebar .sidebar-logout .nav-link .feather {
        width: 18px;
        height: 18px;
    }
}



/* ============================================
   REPORTS AREA (EDUNOTE - REPORT BUILDER & VIEWER)
   ============================================ */

/* Report Stat Cards */
.report-stat-card {
    background: var(--table-cell-bg);
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 14px;
    padding: 1.15rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 2px 8px var(--table-shadow);
}

.report-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px var(--table-shadow);
}

.report-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
}

.report-stat-icon.primary {
    background: rgba(37, 99, 235, 0.12);
    color: #2563eb;
}

.report-stat-icon.success {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
}

.report-stat-icon.warning {
    background: rgba(245, 158, 11, 0.12);
    color: #d97706;
}

.report-stat-icon.info {
    background: rgba(6, 182, 212, 0.12);
    color: #0891b2;
}

/* Modern Report Card */
.report-card {
    background: var(--table-cell-bg);
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 3px 12px var(--table-shadow);
    transition: background 0.2s, border-color 0.2s;
}

[data-bs-theme="dark"] .report-card,
[data-bs-theme="dark"] .report-stat-card {
    border-color: rgba(255, 255, 255, 0.08);
}

/* Gradient Card Headers */
.report-header-gradient-blue {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%) !important;
    color: #ffffff !important;
}

.report-header-gradient-teal {
    background: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%) !important;
    color: #ffffff !important;
}

.report-header-gradient-indigo {
    background: linear-gradient(135deg, #4338ca 0%, #6366f1 100%) !important;
    color: #ffffff !important;
}

/* Column Selection Chips */
.column-chip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.45rem 0.65rem;
    border-radius: 8px;
    border: 1px solid var(--bs-border-color, #e2e8f0);
    background: var(--bs-body-bg);
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    user-select: none;
    margin-bottom: 0.35rem;
}

.column-chip:hover {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.05);
    transform: translateY(-1px);
}

.column-chip.selected-personal {
    background: linear-gradient(135deg, #2563eb, #3b82f6) !important;
    color: #ffffff !important;
    border-color: #1d4ed8 !important;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}

.column-chip.selected-academic {
    background: linear-gradient(135deg, #0d9488, #14b8a6) !important;
    color: #ffffff !important;
    border-color: #0f766e !important;
    box-shadow: 0 2px 6px rgba(13, 148, 136, 0.3);
}

.column-chip .chip-check {
    font-size: 0.75rem;
    opacity: 0;
    transition: opacity 0.15s;
}

.column-chip.selected-personal .chip-check,
.column-chip.selected-academic .chip-check {
    opacity: 1;
}

/* Preset Buttons */
.preset-btn {
    border-radius: 20px;
    padding: 0.3rem 0.85rem;
    font-size: 0.78rem;
    font-weight: 600;
    border: 1px solid var(--bs-border-color, #cbd5e1);
    background: var(--bs-body-bg);
    color: var(--bs-body-color);
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.preset-btn:hover {
    background: rgba(59, 130, 246, 0.08);
    border-color: #3b82f6;
    color: #2563eb;
    transform: translateY(-1px);
}

/* Accordion Custom Styling for Dark & Light Mode */
.report-accordion .accordion-item {
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color, #e2e8f0);
    border-radius: 10px !important;
    overflow: hidden;
    margin-bottom: 0.65rem;
}

.report-accordion .accordion-button {
    background: var(--bs-tertiary-bg, #f8fafc);
    color: var(--bs-body-color);
    font-size: 0.88rem;
    font-weight: 600;
    padding: 0.75rem 1rem;
    box-shadow: none !important;
}

.report-accordion .accordion-button:not(.collapsed) {
    background: rgba(59, 130, 246, 0.08);
    color: #2563eb;
}

[data-bs-theme="dark"] .report-accordion .accordion-button:not(.collapsed) {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
}

/* Report Results Table */
.report-table-wrapper {
    max-height: 56vh;
    overflow: auto;
    border-radius: 0 0 12px 12px;
}

.report-table {
    font-size: 0.83rem;
    white-space: nowrap;
}

.report-table thead th {
    background: #f8fafc !important;
    color: #1e293b !important;
    font-weight: 600;
    font-size: 0.82rem;
    padding: 0.65rem 0.75rem;
    border-bottom: 2px solid #e2e8f0 !important;
    position: sticky;
    top: 0;
    z-index: 10;
}

.report-table thead th.sortable {
    cursor: pointer;
    user-select: none;
    transition: background 0.12s;
}

.report-table thead th.sortable:hover {
    background: #edf2f7 !important;
    color: #2563eb !important;
}

[data-bs-theme="dark"] .report-table thead th {
    background: #1e293b !important;
    color: #f8fafc !important;
    border-bottom: 2px solid #334155 !important;
}

[data-bs-theme="dark"] .report-table thead th.sortable:hover {
    background: #334155 !important;
    color: #38bdf8 !important;
}

.report-table tbody tr {
    transition: background 0.1s;
}

.report-table tbody tr:hover {
    background: var(--table-hover) !important;
}

.report-table td {
    padding: 0.55rem 0.75rem;
    vertical-align: middle;
}

/* Badges for Report Results */
.badge-status-aprobado {
    background-color: rgba(16, 185, 129, 0.12);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.3);
    font-weight: 600;
    padding: 0.25rem 0.55rem;
    border-radius: 6px;
    font-size: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.badge-status-reprobado {
    background-color: rgba(239, 68, 68, 0.12);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.3);
    font-weight: 600;
    padding: 0.25rem 0.55rem;
    border-radius: 6px;
    font-size: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.badge-pill-soft-blue {
    background-color: rgba(59, 130, 246, 0.12);
    color: #2563eb;
    border: 1px solid rgba(59, 130, 246, 0.25);
    font-weight: 600;
    border-radius: 20px;
    padding: 0.2rem 0.6rem;
    font-size: 0.72rem;
}

.badge-pill-soft-purple {
    background-color: rgba(139, 92, 246, 0.12);
    color: #7c3aed;
    border: 1px solid rgba(139, 92, 246, 0.25);
    font-weight: 600;
    border-radius: 20px;
    padding: 0.2rem 0.6rem;
    font-size: 0.72rem;
}

/* Modern Report Tabbed Constructor */
.report-tabs-card {
    border-radius: 16px;
    border: 1px solid var(--bs-border-color, #e2e8f0);
    overflow: hidden;
    background: var(--table-cell-bg);
}

.report-tabs-header {
    background: var(--bs-tertiary-bg, #f8fafc);
    border-bottom: 2px solid var(--bs-border-color, #e2e8f0);
    padding: 0.75rem 1rem;
}

.report-tabs-nav {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 0.5rem;
    scrollbar-width: thin;
    padding-bottom: 0.25rem;
    padding-top: 0.25rem;
}

.report-tabs-nav::-webkit-scrollbar {
    height: 5px;
}

.report-tabs-nav::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.03);
    border-radius: 4px;
}

.report-tabs-nav::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.4);
    border-radius: 4px;
}

.report-tabs-nav .nav-link {
    border: 1px solid var(--bs-border-color, #cbd5e1);
    background: var(--bs-body-bg, #ffffff);
    color: #334155;
    border-radius: 10px;
    padding: 0.65rem 1.05rem;
    font-weight: 500;
    font-size: 0.85rem;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
    cursor: pointer;
}

.report-tabs-nav .nav-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    color: #0f172a;
    background: #f1f5f9;
}

.report-tabs-nav .nav-link.active {
    color: #ffffff !important;
    border-color: transparent !important;
    box-shadow: 0 6px 18px rgba(0,0,0,0.18);
    transform: translateY(-1px);
}

/* Fallback: if an active tab does not have a gradient, give it primary background */
.report-tabs-nav .nav-link.active:not([data-default-bg]) {
    background: #2563eb !important;
    color: #ffffff !important;
}

.report-tab-pane-content {
    min-height: 380px;
}

.report-subfilter-card {
    background: var(--bs-body-bg, #ffffff);
    border: 1.5px solid var(--bs-border-color, #cbd5e1);
    border-radius: 12px;
    transition: all 0.2s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.report-subfilter-card:hover {
    border-color: #93c5fd;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.08);
}

.report-subfilter-card.is-active {
    border-color: #2563eb !important;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.12);
}

.report-subfilter-card.is-active .subfilter-card-header {
    background: rgba(37, 99, 235, 0.08) !important;
    border-bottom-color: rgba(37, 99, 235, 0.2) !important;
}

.report-subfilter-card .subfilter-card-header {
    background: var(--bs-tertiary-bg, #f8fafc);
    border-bottom: 1px solid var(--bs-border-color, #cbd5e1);
    border-top-left-radius: 11px;
    border-top-right-radius: 11px;
    padding: 0.65rem 0.95rem;
}

.report-subfilter-card .subfilter-card-body {
    padding: 1rem;
    flex-grow: 1;
    color: var(--bs-body-color, #1e293b);
}

.report-subfilter-card .subfilter-card-body .form-check-label {
    color: #1e293b;
    font-weight: 500;
}

.report-subfilter-card .subfilter-card-body .form-select,
.report-subfilter-card .subfilter-card-body .form-control {
    color: #0f172a;
    border-color: #cbd5e1;
}

[data-bs-theme="dark"] .report-subfilter-card .subfilter-card-body .form-check-label {
    color: #e2e8f0;
}

.subfilter-ctrl-body {
    opacity: 1 !important;
    pointer-events: auto !important;
}

.tab-nav-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding-top: 1.25rem;
    margin-top: 1.5rem;
    border-top: 1px solid var(--bs-border-color, #e2e8f0);
}

[data-bs-theme="dark"] .report-tabs-nav .nav-link {
    border-color: rgba(255, 255, 255, 0.12) !important;
    background: #1e293b !important;
    color: #cbd5e1 !important;
}

[data-bs-theme="dark"] .report-subfilter-card {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .report-subfilter-card .subfilter-card-header {
    background: rgba(15, 23, 42, 0.6);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Print Stylesheet for Reports */
@media print {
    .sidebar-scope,
    .no-print,
    .navbar,
    .btn,
    .card-header .btn,
    .report-accordion,
    form .card:not(.results-card),
    .report-stat-card {
        display: none !important;
    }

    body {
        background: #ffffff !important;
        color: #000000 !important;
        font-size: 10pt;
    }

    .main-content {
        margin: 0 !important;
        padding: 0 !important;
    }

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

    .report-table thead th {
        background: #f1f5f9 !important;
        color: #000000 !important;
        border-bottom: 2px solid #000 !important;
    }

    .report-table td {
        border-bottom: 1px solid #e2e8f0 !important;
    }

    .report-print-header {
        display: block !important;
        margin-bottom: 1.5rem;
        border-bottom: 2px solid #0f172a;
        padding-bottom: 0.5rem;
    }
}


/* ============================================
   EDUNOTE UNIFIED DESIGN SYSTEM
   ============================================ */

/* Page Headers */
.page-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 0.75rem;
}

.main-title {
    font-size: 1.55rem;
    font-weight: 700;
    color: var(--main-title);
    line-height: 1.25;
}

.page-subtitle {
    color: var(--bs-secondary-color, #64748b);
    font-size: 0.875rem;
    margin-bottom: 0;
}

/* Primary Gradient Button (Standard for "Nuevo ...", "Crear ...") */
.btn-primary-gradient {
    background: linear-gradient(135deg, #2563eb, #3b82f6) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 10px !important;
    font-weight: 500 !important;
    padding: 0.5rem 1rem !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25) !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease !important;
    text-decoration: none !important;
}

.btn-primary-gradient:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35) !important;
    color: #ffffff !important;
}

/* ========================================================
   Action Buttons in Lists & Tables (Premium Redesign)
   ======================================================== */
.action-btn-group {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem;
    vertical-align: middle;
}

.action-btn-group form {
    margin: 0 !important;
    padding: 0 !important;
    display: inline-flex !important;
}

.btn-action-view,
.btn-action-edit,
.btn-action-danger,
.btn-action-delete,
.btn-action-success,
.btn-action-status,
.btn-action-info {
    height: 30px;
    min-width: 30px;
    padding: 0 0.55rem;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.3rem !important;
    font-size: 0.775rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.01em;
    border-radius: 7px !important;
    border: 1px solid transparent !important;
    cursor: pointer !important;
    text-decoration: none !important;
    line-height: 1 !important;
    transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
    outline: none !important;
    vertical-align: middle !important;
}

/* Icon-only variation */
.btn-action-icon {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    padding: 0 !important;
    border-radius: 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.btn-action-icon svg {
    width: 15px !important;
    height: 15px !important;
    pointer-events: none;
}

/* View Button (Blue) */
.btn-action-view {
    color: #1d4ed8 !important;
    background: #eff6ff !important;
    border-color: #bfdbfe !important;
}
.btn-action-view:hover {
    background: #2563eb !important;
    color: #ffffff !important;
    border-color: #2563eb !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.35) !important;
}

/* Edit Button (Amber) */
.btn-action-edit {
    color: #b45309 !important;
    background: #fffbeb !important;
    border-color: #fde68a !important;
}
.btn-action-edit:hover {
    background: #d97706 !important;
    color: #ffffff !important;
    border-color: #d97706 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(217, 119, 6, 0.35) !important;
}

/* Danger / Delete / Inactivate (Red) */
.btn-action-danger,
.btn-action-delete {
    color: #b91c1c !important;
    background: #fef2f2 !important;
    border-color: #fecaca !important;
}
.btn-action-danger:hover,
.btn-action-delete:hover {
    background: #dc2626 !important;
    color: #ffffff !important;
    border-color: #dc2626 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(220, 38, 38, 0.35) !important;
}

/* Success / Activate / Boletín (Green) */
.btn-action-success,
.btn-action-status {
    color: #15803d !important;
    background: #f0fdf4 !important;
    border-color: #bbf7d0 !important;
}
.btn-action-success:hover,
.btn-action-status:hover {
    background: #16a34a !important;
    color: #ffffff !important;
    border-color: #16a34a !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(22, 163, 74, 0.35) !important;
}

/* Dark mode variations for action buttons */
[data-bs-theme="dark"] .btn-action-view {
    color: #93c5fa !important;
    background: rgba(37, 99, 235, 0.16) !important;
    border-color: rgba(59, 130, 246, 0.35) !important;
}
[data-bs-theme="dark"] .btn-action-view:hover {
    background: #2563eb !important;
    color: #ffffff !important;
    border-color: #2563eb !important;
}

[data-bs-theme="dark"] .btn-action-edit {
    color: #fde047 !important;
    background: rgba(217, 119, 6, 0.16) !important;
    border-color: rgba(245, 158, 11, 0.35) !important;
}
[data-bs-theme="dark"] .btn-action-edit:hover {
    background: #d97706 !important;
    color: #ffffff !important;
    border-color: #d97706 !important;
}

[data-bs-theme="dark"] .btn-action-danger,
[data-bs-theme="dark"] .btn-action-delete {
    color: #fca5a5 !important;
    background: rgba(220, 38, 38, 0.16) !important;
    border-color: rgba(239, 68, 68, 0.35) !important;
}
[data-bs-theme="dark"] .btn-action-danger:hover,
[data-bs-theme="dark"] .btn-action-delete:hover {
    background: #dc2626 !important;
    color: #ffffff !important;
    border-color: #dc2626 !important;
}

[data-bs-theme="dark"] .btn-action-success,
[data-bs-theme="dark"] .btn-action-status {
    color: #86efac !important;
    background: rgba(22, 163, 74, 0.16) !important;
    border-color: rgba(34, 197, 94, 0.35) !important;
}
[data-bs-theme="dark"] .btn-action-success:hover,
[data-bs-theme="dark"] .btn-action-status:hover {
    background: #16a34a !important;
    color: #ffffff !important;
    border-color: #16a34a !important;
}

/* Prominent Centralizador & Boletín Action Buttons */
.btn-view-centralizador {
    background: linear-gradient(135deg, #2563eb, #3b82f6) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 0.42rem 0.95rem !important;
    font-size: 0.8125rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.01em;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.45rem !important;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.28) !important;
    transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1) !important;
    text-decoration: none !important;
    cursor: pointer !important;
    white-space: nowrap !important;
}
.btn-view-centralizador:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 14px rgba(37, 99, 235, 0.42) !important;
    color: #ffffff !important;
}

.btn-view-boletin {
    background: rgba(16, 185, 129, 0.12) !important;
    color: #059669 !important;
    border: 1px solid rgba(16, 185, 129, 0.3) !important;
    border-radius: 8px !important;
    padding: 0.42rem 0.9rem !important;
    font-size: 0.8125rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.01em;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.4rem !important;
    transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1) !important;
    text-decoration: none !important;
    cursor: pointer !important;
    white-space: nowrap !important;
}
.btn-view-boletin:hover {
    background: #10b981 !important;
    color: #ffffff !important;
    border-color: #10b981 !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 14px rgba(16, 185, 129, 0.35) !important;
}

[data-bs-theme="dark"] .btn-view-boletin {
    background: rgba(16, 185, 129, 0.18) !important;
    color: #6ee7b7 !important;
    border-color: rgba(16, 185, 129, 0.4) !important;
}
[data-bs-theme="dark"] .btn-view-boletin:hover {
    background: #059669 !important;
    color: #ffffff !important;
    border-color: #059669 !important;
}

.level-switcher-nav {
    display: inline-flex;
    align-items: center;
    background: var(--table-header-bg);
    border: 1px solid var(--bs-border-color);
    padding: 3px;
    border-radius: 10px;
    gap: 2px;
}
.level-switcher-nav .level-pill {
    padding: 0.3rem 0.85rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--bs-secondary-color, #64748b);
    text-decoration: none !important;
    border-radius: 7px;
    transition: all 0.15s ease;
}
.level-switcher-nav .level-pill:hover {
    color: var(--main-text);
    background: var(--table-hover);
}
.level-switcher-nav .level-pill.active {
    background: #2563eb;
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}

/* Search and Filter Buttons */
.btn-search-primary {
    background: linear-gradient(135deg, #2563eb, #3b82f6) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 8px !important;
    font-weight: 500 !important;
    padding: 0.45rem 1rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.4rem !important;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.22) !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease !important;
    text-decoration: none !important;
    cursor: pointer !important;
    line-height: 1.5 !important;
}
.btn-search-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.35) !important;
    color: #ffffff !important;
}

.btn-search-reset {
    background: var(--table-hover) !important;
    color: var(--bs-secondary-color, #64748b) !important;
    border: 1px solid var(--bs-border-color) !important;
    border-radius: 8px !important;
    font-weight: 500 !important;
    padding: 0.45rem 0.85rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.35rem !important;
    transition: all 0.15s ease !important;
    text-decoration: none !important;
    cursor: pointer !important;
    line-height: 1.5 !important;
}
.btn-search-reset:hover {
    background: var(--bs-border-color) !important;
    color: var(--main-text) !important;
}

/* Subtle Modern Badges */
.badge-subtle-success {
    background-color: rgba(22, 163, 74, 0.12) !important;
    color: #15803d !important;
    border: 1px solid rgba(22, 163, 74, 0.2) !important;
    font-weight: 500;
}

.badge-subtle-danger {
    background-color: rgba(220, 38, 38, 0.12) !important;
    color: #b91c1c !important;
    border: 1px solid rgba(220, 38, 38, 0.2) !important;
    font-weight: 500;
}

.badge-subtle-warning {
    background-color: rgba(217, 119, 6, 0.12) !important;
    color: #b45309 !important;
    border: 1px solid rgba(217, 119, 6, 0.2) !important;
    font-weight: 500;
}

.badge-subtle-primary {
    background-color: rgba(37, 99, 235, 0.12) !important;
    color: #1d4ed8 !important;
    border: 1px solid rgba(37, 99, 235, 0.2) !important;
    font-weight: 500;
}

.badge-subtle-info {
    background-color: rgba(8, 145, 178, 0.12) !important;
    color: #0e7490 !important;
    border: 1px solid rgba(8, 145, 178, 0.2) !important;
    font-weight: 500;
}

.badge-subtle-secondary {
    background-color: rgba(100, 116, 139, 0.12) !important;
    color: #475569 !important;
    border: 1px solid rgba(100, 116, 139, 0.2) !important;
    font-weight: 500;
}

[data-bs-theme="dark"] .badge-subtle-success {
    background-color: rgba(34, 197, 94, 0.18) !important;
    color: #4ade80 !important;
    border-color: rgba(34, 197, 94, 0.3) !important;
}

[data-bs-theme="dark"] .badge-subtle-danger {
    background-color: rgba(239, 68, 68, 0.18) !important;
    color: #f87171 !important;
    border-color: rgba(239, 68, 68, 0.3) !important;
}

[data-bs-theme="dark"] .badge-subtle-warning {
    background-color: rgba(245, 158, 11, 0.18) !important;
    color: #fbbf24 !important;
    border-color: rgba(245, 158, 11, 0.3) !important;
}

[data-bs-theme="dark"] .badge-subtle-primary {
    background-color: rgba(59, 130, 246, 0.18) !important;
    color: #60a5fa !important;
    border-color: rgba(59, 130, 246, 0.3) !important;
}

[data-bs-theme="dark"] .badge-subtle-info {
    background-color: rgba(6, 182, 212, 0.18) !important;
    color: #22d3ee !important;
    border-color: rgba(6, 182, 212, 0.3) !important;
}

[data-bs-theme="dark"] .badge-subtle-secondary {
    background-color: rgba(148, 163, 184, 0.18) !important;
    color: #cbd5e1 !important;
    border-color: rgba(148, 163, 184, 0.3) !important;
}

/* Card Standards */
.card-standard {
    background: var(--table-cell-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 14px;
    box-shadow: 0 2px 8px var(--table-shadow);
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.card-standard .card-header {
    background-color: transparent;
    border-bottom: 1px solid var(--bs-border-color);
    padding: 1rem 1.25rem;
    font-weight: 600;
}

.card-standard .card-footer {
    background-color: transparent;
    border-top: 1px solid var(--bs-border-color);
    padding: 1rem 1.25rem;
}

/* Universal Table Styling */
.table thead th {
    background-color: var(--table-header-bg) !important;
    color: var(--main-text) !important;
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    border-bottom: 2px solid var(--bs-border-color);
    padding: 0.75rem 0.85rem;
}

.table tbody td {
    padding: 0.75rem 0.85rem;
    color: var(--main-text);
    border-bottom: 1px solid var(--bs-border-color);
}

.table-hover tbody tr:hover td {
    background-color: var(--table-hover) !important;
}

/* Search and Filter Bars */
.search-filter-card {
    background: var(--table-cell-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 12px;
    box-shadow: 0 1px 4px var(--table-shadow);
}

/* ========================================================
   Form Cards & Inputs (Modern SaaS Redesign)
   ======================================================== */
.form-card-premium {
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--bs-border-color, rgba(0, 0, 0, 0.08));
    border-radius: 18px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.form-card-accent-bar {
    height: 4px;
    background: linear-gradient(90deg, #388cff, #4abff9, #10b981);
    width: 100%;
}

.user-form-hero {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.25rem 0 1.5rem;
    margin-bottom: 1.75rem;
    border-bottom: 1px dashed var(--bs-border-color, rgba(0, 0, 0, 0.12));
}

.user-form-hero-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.28);
}

.form-section-panel {
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.85), rgba(255, 255, 255, 0));
    border: 1px solid var(--bs-border-color, rgba(0, 0, 0, 0.08));
    border-radius: 16px;
    padding: 1.35rem 1.35rem 0.35rem;
    margin-bottom: 1.5rem;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.form-section-panel:focus-within {
    border-color: #93c5fd;
    box-shadow: 0 6px 22px rgba(37, 99, 235, 0.08);
}

.form-section-panel .form-section-header {
    margin-bottom: 1.25rem;
}

.form-section-panel .row {
    margin-bottom: 0 !important;
}

[data-bs-theme="dark"] .form-section-panel {
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.55), rgba(15, 23, 42, 0));
    border-color: #334155;
}

[data-bs-theme="dark"] .user-form-hero {
    border-bottom-color: #334155;
}

.form-section-header {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding-bottom: 0.85rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--bs-border-color, rgba(0, 0, 0, 0.06));
}

.form-section-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.form-section-icon.icon-blue {
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
}

.form-section-icon.icon-purple {
    background: rgba(124, 58, 237, 0.1);
    color: #7c3aed;
}

.form-card-premium .input-group-text {
    background: var(--table-subheader-bg, #f8fafc);
    border-color: var(--bs-border-color, #dee2e6);
    color: var(--main-text-muted, #64748b);
    border-radius: 10px 0 0 10px;
    border-right: none;
    padding: 0.65rem 0.85rem;
}

.form-card-premium .form-control,
.form-card-premium .form-select {
    border-radius: 10px;
    border-color: var(--bs-border-color, #dee2e6);
    font-size: 0.9rem;
    padding: 0.65rem 0.9rem;
    height: 44px;
    transition: all 0.2s ease;
    background-color: var(--card-bg, #ffffff);
    color: var(--main-text, #1e293b);
}

.form-card-premium .form-select {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.85rem center !important;
    background-size: 14px 10px !important;
    padding-right: 2.5rem !important;
}

.form-card-premium .form-select::-ms-expand {
    display: none !important;
}

.form-card-premium .input-group .form-select {
    border-radius: 0 10px 10px 0 !important;
}

.form-card-premium .input-group .form-control {
    border-radius: 0 10px 10px 0;
}

.form-card-premium .input-group:has(.btn-password-toggle) .form-control {
    border-radius: 0;
}

.form-card-premium .form-control:focus,
.form-card-premium .form-select:focus {
    border-color: #388cff;
    box-shadow: 0 0 0 3px rgba(56, 140, 255, 0.16);
    outline: none;
}

.form-card-premium .input-group:focus-within .input-group-text {
    border-color: #388cff;
}

.form-card-premium .btn-password-toggle {
    border-radius: 0 10px 10px 0 !important;
    border: 1px solid var(--bs-border-color, #dee2e6);
    border-left: none;
    background: var(--table-subheader-bg, #f8fafc);
    color: var(--main-text-muted, #64748b);
    transition: all 0.15s ease;
    padding: 0 0.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.form-card-premium .btn-password-toggle:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.form-card-premium .form-footer-action {
    background: var(--table-subheader-bg, #f8fafc);
    border-top: 1px solid var(--bs-border-color, rgba(0, 0, 0, 0.06));
    padding: 1.25rem 2rem;
}

[data-bs-theme="dark"] .form-card-premium .input-group-text,
[data-bs-theme="dark"] .form-card-premium .btn-password-toggle {
    background: #1e293b;
    border-color: #334155;
    color: #94a3b8;
}

[data-bs-theme="dark"] .form-card-premium .form-control,
[data-bs-theme="dark"] .form-card-premium .form-select {
    background-color: #0f172a;
    border-color: #334155;
    color: #f1f5f9;
}

[data-bs-theme="dark"] .form-card-premium .btn-password-toggle:hover {
    background: #334155;
    color: #ffffff;
}

[data-bs-theme="dark"] .form-card-premium .form-footer-action {
    background: rgba(15, 23, 42, 0.6);
}
