/**
 * modern-theme.css — SIGFit laboratorio (performance / precisión)
 * Activar con class="theme-modern" en <body>
 */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Sora:wght@600;700&display=swap');

.theme-modern {
    --mt-bg: #F4F6F5;
    --mt-surface: #FFFFFF;
    --mt-sidebar: #0B1220;
    --mt-sidebar-hover: #151E2E;
    --mt-sidebar-active: #1A2738;
    --mt-sidebar-text: #C8D0DB;
    --mt-sidebar-muted: #7A8699;
    --mt-text: #0F172A;
    --mt-muted: #5B6575;
    --mt-border: #E2E8E6;
    --mt-border-light: #EEF2F0;
    --mt-primary: #0F766E;
    --mt-primary-hover: #0D5F59;
    --mt-primary-soft: rgba(15, 118, 110, 0.10);
    --mt-accent: #F59E0B;
    --mt-focus-ring: rgba(15, 118, 110, 0.22);
    --mt-radius: 14px;
    --mt-radius-sm: 10px;
    --mt-radius-pill: 999px;
    --mt-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
    --mt-shadow: 0 8px 28px rgba(15, 23, 42, 0.07);
    --mt-shadow-hover: 0 12px 36px rgba(15, 23, 42, 0.11);
    --mt-input-h: 48px;
    --mt-font: 'Outfit', system-ui, -apple-system, sans-serif;
    --mt-font-display: 'Sora', 'Outfit', sans-serif;
}

/* ---- Base ---- */
.theme-modern.app-body {
    background: var(--mt-bg);
    color: var(--mt-text);
    font-family: var(--mt-font);
    -webkit-font-smoothing: antialiased;
}

.theme-modern .content-area {
    padding: 2rem 2.25rem 3rem;
    min-height: calc(100vh - 56px);
}

/* ---- Top navbar ---- */
.theme-modern .navbar-bikefit {
    background: var(--mt-surface);
    border-bottom: 1px solid var(--mt-border);
    box-shadow: var(--mt-shadow-sm);
}

.theme-modern .navbar-bikefit .navbar-brand {
    color: var(--mt-text) !important;
    font-family: var(--mt-font-display);
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: -0.03em;
}

.theme-modern .navbar-bikefit .navbar-brand i {
    color: var(--mt-primary);
}

.theme-modern .navbar-bikefit .text-white,
.theme-modern .navbar-bikefit .small {
    color: var(--mt-muted) !important;
}

.theme-modern .navbar-bikefit .btn-outline-light {
    color: var(--mt-text);
    border-color: var(--mt-border);
    background: var(--mt-surface);
    border-radius: var(--mt-radius-sm);
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.4rem 0.85rem;
}

.theme-modern .navbar-bikefit .btn-outline-light:hover {
    background: var(--mt-border-light);
    border-color: var(--mt-border);
    color: var(--mt-text);
}

.theme-modern .navbar-user-menu .dropdown-menu {
    min-width: 14rem;
}

.theme-modern .navbar-user-menu .dropdown-item i {
    width: 1.1rem;
    margin-right: 0.35rem;
}

/* ---- Sidebar ---- */
.theme-modern .sidebar-toolbar {
    background: var(--mt-sidebar);
    min-height: calc(100vh - 56px);
    padding: 1.25rem 0.85rem;
    border-right: none;
}

.theme-modern .sidebar-toolbar .section-title {
    color: var(--mt-sidebar-muted);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    padding: 0.5rem 0.85rem 0.35rem;
    margin-top: 0.25rem;
}

.theme-modern .sidebar-toolbar .nav-link {
    color: var(--mt-sidebar-text);
    padding: 0.6rem 0.85rem;
    margin: 0.15rem 0.5rem;
    border-left: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    transition: background 0.15s ease, color 0.15s ease;
}

.theme-modern .sidebar-toolbar .nav-link i,
.theme-modern .sidebar-toolbar .nav-link .fa,
.theme-modern .sidebar-toolbar .nav-link .fas {
    width: 1.1rem;
    text-align: center;
    font-size: 0.95rem;
    opacity: 0.85;
}

.theme-modern .sidebar-toolbar .nav-link:hover {
    color: #F9FAFB;
    background: var(--mt-sidebar-hover);
}

.theme-modern .sidebar-toolbar .nav-link.active {
    color: #FFFFFF;
    background: var(--mt-sidebar-active);
    font-weight: 600;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.theme-modern .sidebar-toolbar .nav-link.disabled {
    color: #4B5563;
    opacity: 0.7;
}

/* ---- Page header ---- */
.theme-modern .page-header-modern {
    margin-bottom: 1.75rem;
}

.theme-modern .page-eyebrow {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--mt-primary);
    margin-bottom: 0.35rem;
}

.theme-modern .page-title-modern,
.theme-modern .entity-title {
    font-family: var(--mt-font-display);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--mt-text);
    letter-spacing: -0.03em;
    margin-bottom: 0.35rem;
    line-height: 1.2;
}

.theme-modern .page-title-modern i,
.theme-modern .entity-title i {
    color: var(--mt-primary);
    margin-right: 0.4rem;
}

.theme-modern .page-subtitle {
    color: var(--mt-muted);
    font-size: 0.95rem;
    margin-bottom: 0;
    max-width: 42rem;
    line-height: 1.5;
}

/* ---- Cards ---- */
.theme-modern .saas-card,
.theme-modern .card-app,
.theme-modern .detail-card,
.theme-modern .panel-busqueda {
    background: var(--mt-surface);
    border: 1px solid var(--mt-border);
    border-radius: var(--mt-radius);
    box-shadow: var(--mt-shadow-sm);
}

.theme-modern .saas-card {
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.theme-modern .saas-card:hover {
    box-shadow: var(--mt-shadow-hover);
}

.theme-modern .saas-card-interactive {
    text-decoration: none;
    color: inherit;
    display: block;
}

.theme-modern .saas-card-interactive:hover {
    transform: translateY(-2px);
}

.theme-modern .saas-card-header {
    padding: 1.15rem 1.5rem;
    border-bottom: 1px solid var(--mt-border-light);
}

.theme-modern .saas-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--mt-text);
    margin: 0;
    letter-spacing: -0.02em;
}

.theme-modern .saas-card-subtitle {
    font-size: 0.85rem;
    color: var(--mt-muted);
    margin: 0.25rem 0 0;
}

.theme-modern .saas-card-body {
    padding: 1.5rem;
}

.theme-modern .panel-busqueda {
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
}

.theme-modern .detail-card {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(180deg, #fff 0%, #fafbfc 100%);
}

.theme-modern .detail-card dt {
    color: var(--mt-muted);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.theme-modern .detail-card dd {
    font-size: 0.95rem;
    color: var(--mt-text);
    font-weight: 500;
}

/* ---- Forms ---- */
.theme-modern .form-label {
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--mt-text);
    margin-bottom: 0.4rem;
}

.theme-modern .form-control,
.theme-modern .form-select,
.theme-modern .input-group-text {
    min-height: var(--mt-input-h);
    border-radius: var(--mt-radius-sm);
    border-color: var(--mt-border);
    padding: 0.55rem 0.95rem;
    font-size: 0.9rem;
    color: var(--mt-text);
    background-color: var(--mt-surface);
    box-shadow: none;
}

.theme-modern textarea.form-control {
    min-height: auto;
    padding-top: 0.65rem;
}

.theme-modern .input-group-text {
    background: var(--mt-border-light);
    color: var(--mt-muted);
    border-color: var(--mt-border);
}

.theme-modern .form-control:focus,
.theme-modern .form-select:focus {
    border-color: var(--mt-primary);
    box-shadow: 0 0 0 3px var(--mt-focus-ring);
    background-color: var(--mt-surface);
}

.theme-modern .form-card .form-control,
.theme-modern .panel-busqueda .form-control,
.theme-modern .panel-busqueda .form-select {
    min-height: var(--mt-input-h);
}

/* ---- Buttons ---- */
.theme-modern .btn {
    border-radius: var(--mt-radius-sm);
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.55rem 1.1rem;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.theme-modern .btn-primary {
    background: var(--mt-primary);
    border-color: var(--mt-primary);
    color: #fff;
}

.theme-modern .btn-primary:hover,
.theme-modern .btn-primary:focus {
    background: var(--mt-primary-hover);
    border-color: var(--mt-primary-hover);
    color: #fff;
}

.theme-modern .btn-outline-primary {
    color: var(--mt-primary);
    border-color: var(--mt-border);
    background: var(--mt-surface);
}

.theme-modern .btn-outline-primary:hover {
    background: var(--mt-primary-soft);
    border-color: var(--mt-primary);
    color: var(--mt-primary-hover);
}

.theme-modern .btn-outline-secondary,
.theme-modern .btn-secondary {
    background: var(--mt-surface);
    border-color: var(--mt-border);
    color: var(--mt-text);
}

.theme-modern .btn-outline-secondary:hover,
.theme-modern .btn-secondary:hover {
    background: var(--mt-border-light);
    border-color: var(--mt-border);
    color: var(--mt-text);
}

.theme-modern .btn-success {
    background: var(--mt-primary);
    border-color: var(--mt-primary);
}

.theme-modern .btn-success:hover {
    background: var(--mt-primary-hover);
    border-color: var(--mt-primary-hover);
}

.theme-modern .btn-sm {
    padding: 0.4rem 0.85rem;
    font-size: 0.8125rem;
}

/* ---- Tables SaaS ---- */
.theme-modern .saas-table-card {
    overflow: visible;
}

.theme-modern .saas-table-card .table-responsive {
    overflow: visible;
}

.theme-modern .col-acciones {
    width: 48px;
    padding-left: 0.75rem !important;
    padding-right: 0.25rem !important;
    position: relative;
}

.theme-modern .col-acciones .dropdown {
    position: static;
}

.theme-modern .col-acciones .dropdown-menu {
    z-index: 1060;
}

.theme-modern .page-actions .dropdown-menu {
    z-index: 1060;
}

.theme-modern .table-app {
    font-size: 0.9rem;
    border-collapse: separate;
    border-spacing: 0;
}

.theme-modern .table-app thead th {
    background: #F9FAFB;
    color: var(--mt-muted);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--mt-border);
    padding: 0.95rem 1.25rem;
}

.theme-modern .table-app tbody td {
    padding: 1rem 1.25rem;
    border-color: var(--mt-border-light);
    color: var(--mt-text);
    vertical-align: middle;
}

.theme-modern .table-app tbody tr {
    transition: background 0.12s ease;
}

.theme-modern .table-app tbody tr:hover {
    background: #F9FAFB;
}

.theme-modern .table-app tbody tr:last-child td {
    border-bottom: none;
}

.theme-modern .btn-hamburger {
    border-radius: 10px;
    color: var(--mt-muted);
}

.theme-modern .btn-hamburger:hover,
.theme-modern .btn-hamburger.show {
    background: var(--mt-border-light);
    border-color: var(--mt-border);
    color: var(--mt-text);
}

.theme-modern .dropdown-menu {
    border: 1px solid var(--mt-border);
    border-radius: var(--mt-radius-sm);
    box-shadow: var(--mt-shadow);
    padding: 0.4rem;
}

.theme-modern .dropdown-item {
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
}

.theme-modern .dropdown-item:hover {
    background: var(--mt-primary-soft);
}

/* ---- Badges ---- */
.theme-modern .badge {
    font-weight: 600;
    font-size: 0.72rem;
    padding: 0.35em 0.75em;
    border-radius: var(--mt-radius-pill);
    letter-spacing: 0.02em;
}

.theme-modern .badge-tipo {
    background: var(--mt-primary-soft) !important;
    color: var(--mt-primary) !important;
    border: 1px solid rgba(109, 40, 217, 0.15);
}

.theme-modern .badge-estado-activo,
.theme-modern .badge.bg-success {
    background: #ECFDF5 !important;
    color: #047857 !important;
    border: 1px solid #A7F3D0;
}

.theme-modern .badge-estado-pendiente,
.theme-modern .badge.bg-warning {
    background: #FFFBEB !important;
    color: #B45309 !important;
    border: 1px solid #FDE68A;
}

.theme-modern .badge-estado-proceso {
    background: #EEF2FF !important;
    color: #4338CA !important;
    border: 1px solid #C7D2FE;
}

.theme-modern .badge-estado-cancelado,
.theme-modern .badge.bg-danger {
    background: #FEF2F2 !important;
    color: #B91C1C !important;
    border: 1px solid #FECACA;
}

.theme-modern .badge.bg-secondary {
    background: #F3F4F6 !important;
    color: #4B5563 !important;
    border: 1px solid #E5E7EB;
}

/* ---- Alerts & empty ---- */
.theme-modern .alert-app {
    border-radius: var(--mt-radius-sm);
    border: 1px solid transparent;
    font-size: 0.9rem;
}

.theme-modern .alert-success {
    background: #ECFDF5;
    color: #065F46;
    border-color: #A7F3D0;
}

.theme-modern .alert-danger {
    background: #FEF2F2;
    color: #991B1B;
    border-color: #FECACA;
}

.theme-modern .empty-state {
    padding: 3.5rem 1.5rem;
    color: var(--mt-muted);
}

.theme-modern .empty-state i {
    color: var(--mt-border);
}

/* ---- Section blocks (formularios largos) ---- */
.theme-modern .form-sections {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.theme-modern .section-heading-modern {
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--mt-text);
    margin-bottom: 0.25rem;
}

.theme-modern .section-desc-modern {
    font-size: 0.85rem;
    color: var(--mt-muted);
    margin-bottom: 1.25rem;
}

/* ---- Login premium (split) ---- */
.theme-modern.login-page {
    background: #F7F8F6;
    font-family: var(--mt-font);
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

.theme-modern .login-split {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.theme-modern .login-visual {
    position: relative;
    min-height: 100vh;
    background:
        linear-gradient(165deg, rgba(8, 16, 28, 0.55) 0%, rgba(8, 16, 28, 0.28) 45%, rgba(8, 16, 28, 0.62) 100%),
        url("../img/login-bikefit.jpg") center / cover no-repeat;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: clamp(1.75rem, 4vw, 3rem);
    overflow: hidden;
}

.theme-modern .login-visual::before {
    content: "";
    position: absolute;
    inset: -20% auto auto -10%;
    width: 55%;
    height: 55%;
    background: radial-gradient(circle, rgba(15, 118, 110, 0.45), transparent 70%);
    animation: loginGlow 8s ease-in-out infinite alternate;
    pointer-events: none;
}

.theme-modern .login-visual::after {
    content: "";
    position: absolute;
    right: -10%;
    bottom: -15%;
    width: 50%;
    height: 50%;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.22), transparent 68%);
    animation: loginGlow 10s ease-in-out infinite alternate-reverse;
    pointer-events: none;
}

@keyframes loginGlow {
    from { transform: translate(0, 0) scale(1); opacity: 0.85; }
    to { transform: translate(4%, 3%) scale(1.08); opacity: 1; }
}

.theme-modern .login-visual-overlay {
    display: none;
}

.theme-modern .login-visual-top {
    position: relative;
    z-index: 1;
}

.theme-modern .login-visual-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(248, 250, 252, 0.78);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin: 0;
}

.theme-modern .login-visual-kicker i {
    color: var(--mt-accent);
}

.theme-modern .login-visual-content {
    position: relative;
    z-index: 1;
    color: #f8fafc;
    max-width: 32rem;
    animation: loginRise 0.7s ease-out both;
}

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

.theme-modern .login-visual-brand {
    font-family: var(--mt-font-display);
    font-size: clamp(2.6rem, 5.5vw, 3.75rem);
    font-weight: 700;
    letter-spacing: -0.05em;
    margin: 0 0 0.75rem;
    line-height: 1;
}

.theme-modern .login-visual-tagline {
    margin: 0 0 1.5rem;
    font-size: 1.15rem;
    color: rgba(248, 250, 252, 0.86);
    line-height: 1.5;
    max-width: 26rem;
}

.theme-modern .login-visual-points {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.55rem;
}

.theme-modern .login-visual-points li {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    color: rgba(248, 250, 252, 0.78);
    font-size: 0.95rem;
}

.theme-modern .login-visual-points li i {
    color: #5EEAD4;
    width: 1.1rem;
    text-align: center;
}

.theme-modern .login-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.75rem;
    background:
        radial-gradient(ellipse 80% 50% at 100% 0%, rgba(15, 118, 110, 0.08), transparent 55%),
        linear-gradient(180deg, #FBFCFA 0%, #F4F6F5 100%);
}

.theme-modern .login-panel-inner {
    width: 100%;
    max-width: 420px;
    animation: loginRise 0.7s ease-out 0.12s both;
}

.theme-modern .login-brand--panel {
    text-align: left;
    margin-bottom: 1.75rem;
}

.theme-modern .login-brand--panel .login-panel-logo {
    font-family: var(--mt-font-display);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--mt-primary);
    letter-spacing: -0.03em;
    margin: 0 0 1.25rem;
}

.theme-modern .login-brand h1 {
    font-family: var(--mt-font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--mt-text);
    letter-spacing: -0.04em;
    margin: 0 0 0.4rem;
}

.theme-modern .login-brand p {
    color: var(--mt-muted);
    font-size: 1rem;
    margin: 0;
    line-height: 1.45;
}

.theme-modern .login-card {
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
}

.theme-modern .login-card .card-body {
    padding: 0 !important;
}

.theme-modern .login-card .form-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--mt-text);
}

.theme-modern .login-card .form-control-lg {
    min-height: 52px;
    border-radius: 12px;
    font-size: 1rem;
    border: 1px solid #D7DED9;
    background: #fff;
}

.theme-modern .login-card .form-control-lg:focus {
    border-color: var(--mt-primary);
    box-shadow: 0 0 0 4px var(--mt-focus-ring);
}

.theme-modern .login-card .btn-lg {
    min-height: 52px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.02rem;
    letter-spacing: -0.01em;
}

.theme-modern .login-footnote {
    margin-top: 1.5rem;
    color: var(--mt-muted);
    font-size: 0.85rem;
}

@media (max-width: 900px) {
    .theme-modern .login-split {
        grid-template-columns: 1fr;
    }

    .theme-modern .login-visual {
        min-height: 280px;
        padding: 1.5rem;
    }

    .theme-modern .login-visual-brand {
        font-size: 2.2rem;
    }

    .theme-modern .login-visual-points {
        display: none;
    }

    .theme-modern .login-panel {
        padding: 1.75rem 1.25rem 2.5rem;
        align-items: flex-start;
    }
}

/* ---- Home workflow ---- */
.theme-modern .flow-hero {
    margin-bottom: 1.75rem;
}

.theme-modern .flow-hero .page-title-modern {
    font-family: var(--mt-font-display);
    letter-spacing: -0.04em;
}

.theme-modern .flow-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.theme-modern .flow-step {
    display: block;
    text-decoration: none;
    color: inherit;
    background: var(--mt-surface);
    border: 1px solid var(--mt-border);
    border-radius: var(--mt-radius);
    padding: 1.35rem 1.25rem;
    box-shadow: var(--mt-shadow-sm);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    min-height: 100%;
}

.theme-modern .flow-step:hover {
    transform: translateY(-3px);
    box-shadow: var(--mt-shadow);
    border-color: rgba(15, 118, 110, 0.35);
    color: inherit;
}

.theme-modern .flow-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    background: var(--mt-primary-soft);
    color: var(--mt-primary);
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 0.85rem;
}

.theme-modern .flow-step h2 {
    font-family: var(--mt-font-display);
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 0.4rem;
    letter-spacing: -0.02em;
}

.theme-modern .flow-step p {
    margin: 0;
    color: var(--mt-muted);
    font-size: 0.92rem;
    line-height: 1.45;
}

.theme-modern .flow-step-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 1rem;
    color: var(--mt-primary);
    font-weight: 600;
    font-size: 0.9rem;
}

.theme-modern .manual-toc a {
    text-decoration: none;
    color: var(--mt-primary);
    font-weight: 600;
}

.theme-modern .manual-section {
    scroll-margin-top: 1.5rem;
}

.theme-modern .manual-section h2 {
    font-family: var(--mt-font-display);
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--mt-border);
}

.theme-modern .manual-section h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 1.25rem 0 0.5rem;
}

.theme-modern .manual-callout {
    background: var(--mt-primary-soft);
    border-left: 3px solid var(--mt-primary);
    border-radius: 0 var(--mt-radius-sm) var(--mt-radius-sm) 0;
    padding: 0.85rem 1rem;
    margin: 1rem 0;
    color: var(--mt-text);
    font-size: 0.95rem;
}

@media (max-width: 900px) {
    .theme-modern .flow-steps {
        grid-template-columns: 1fr;
    }
}


/* ---- BikeFit accordion ---- */
.theme-modern .bikefit-accordion {
    --bs-accordion-border-color: var(--mt-border);
    --bs-accordion-btn-bg: #F9FAFB;
    --bs-accordion-active-bg: var(--mt-primary-soft);
    --bs-accordion-active-color: var(--mt-text);
    --bs-accordion-btn-focus-box-shadow: 0 0 0 3px var(--mt-focus-ring);
}

.theme-modern .bikefit-accordion .accordion-item {
    border: 1px solid var(--mt-border);
    border-radius: var(--mt-radius) !important;
    margin-bottom: 0.75rem;
    box-shadow: var(--mt-shadow-sm);
    overflow: hidden;
}

.theme-modern .bikefit-accordion .accordion-button {
    font-weight: 600;
    font-size: 0.95rem;
    padding: 1rem 1.25rem;
    border-radius: 0 !important;
}

.theme-modern .bikefit-accordion .accordion-button:not(.collapsed) {
    color: var(--mt-primary);
    background: var(--mt-primary-soft);
}

.theme-modern .bikefit-accordion .accordion-body {
    padding: 1.25rem;
}

.theme-modern .bf-campo-grupo {
    background: #FAFBFC;
    border-color: var(--mt-border-light);
    border-radius: var(--mt-radius-sm);
}

.theme-modern .bf-valor-actual {
    background-color: #F1F5F9 !important;
    border-color: #CBD5E1 !important;
}

.theme-modern .bf-valor-nuevo {
    background-color: #F5F3FF !important;
    border-color: #C4B5FD !important;
}

.theme-modern .bf-label-nuevo,
.theme-modern .bf-leyenda-nuevo {
    color: var(--mt-primary);
}

.theme-modern .bf-campo-referencia {
    background-color: #FFFBEB !important;
    border-color: #FCD34D !important;
    font-style: italic;
    color: #92400E;
}

.theme-modern .bf-campo-referencia::placeholder {
    color: #B45309;
    font-style: italic;
    opacity: 1;
}

.theme-modern .bf-campo-referencia:focus {
    font-style: normal;
    color: var(--mt-text);
}

.theme-modern .bf-leyenda-referencia,
.theme-modern .bf-leyenda-item.bf-leyenda-referencia {
    color: #B45309;
}

.theme-modern .bf-badge-referencia {
    background: #FEF3C7;
    color: #92400E;
    font-weight: 500;
}

.theme-modern .bf-foto-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
}

.theme-modern .bf-foto-card {
    border: 1px solid var(--mt-border);
    border-radius: var(--mt-radius-sm);
    overflow: hidden;
    background: var(--mt-surface);
    max-width: 160px;
}

.theme-modern .bf-foto-thumb-btn {
    display: block;
    width: 100%;
    padding: 0;
    border: none;
    background: #F1F5F9;
    position: relative;
    cursor: zoom-in;
    overflow: hidden;
    line-height: 0;
}

.theme-modern .bf-foto-thumb {
    width: 100%;
    height: 96px;
    max-height: 96px;
    object-fit: cover;
    display: block;
}

.theme-modern .bf-foto-zoom {
    position: absolute;
    right: 6px;
    bottom: 6px;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    background: rgba(15, 23, 42, 0.65);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    pointer-events: none;
}

.theme-modern .bf-foto-meta {
    padding: 0.5rem 0.65rem;
}

.theme-modern .bf-foto-modal-img {
    max-width: 100%;
    max-height: 75vh;
    object-fit: contain;
    border-radius: var(--mt-radius-sm);
}

.theme-modern .bf-foto-upload .form-text {
    font-size: 0.75rem;
}

/* ---- Recepción ---- */
.theme-modern .recepcion-panel {
    background: transparent;
    border: none;
    padding: 0;
    box-shadow: none;
}

.theme-modern .recepcion-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
}

.theme-modern .card.recepcion-card,
.theme-modern .card.card-app.recepcion-card {
    background: #FFFFFF !important;
    border: 1px solid #E2E8F0 !important;
    border-left-width: 5px !important;
    border-left-style: solid !important;
    border-radius: var(--mt-radius);
    padding: 0;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08) !important;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.theme-modern .recepcion-card:hover {
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.12);
    transform: translateY(-1px);
}

.theme-modern .recepcion-card-estado-agendado { border-left-color: #F59E0B; }
.theme-modern .recepcion-card-estado-en_proceso { border-left-color: #3B82F6; }
.theme-modern .recepcion-card-estado-realizado { border-left-color: #10B981; }
.theme-modern .recepcion-card-estado-cancelado { border-left-color: #94A3B8; opacity: 0.85; }

.theme-modern .recepcion-card .recepcion-hora {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--mt-primary);
}

.theme-modern .recepcion-actions .btn {
    min-width: 120px;
}

.theme-modern .btn-whatsapp {
    background: #25D366;
    border-color: #25D366;
    color: #fff;
}

.theme-modern .btn-whatsapp:hover {
    background: #1DA851;
    border-color: #1DA851;
    color: #fff;
}

/* ---- Comparación ---- */
.theme-modern .bf-comparar-cambio,
.theme-modern .bf-comparar-fila.bf-comparar-cambio {
    background: #FEF9C3 !important;
}

.theme-modern .bf-comparar-igual,
.theme-modern .bf-comparar-fila.bf-comparar-igual {
    background: #F0FDF4 !important;
}

.theme-modern .bf-comparar-solo-actual,
.theme-modern .bf-comparar-fila.bf-comparar-solo_actual {
    background: #EDE9FE !important;
}

.theme-modern .bf-comparar-solo-anterior,
.theme-modern .bf-comparar-fila.bf-comparar-solo_anterior {
    background: #F1F5F9 !important;
}

.theme-modern .bf-comparar-fila.bf-comparar-ambos_vacios {
    background: transparent !important;
    color: #94A3B8;
}

.theme-modern .bf-comparar-header-anterior {
    background: #E2E8F0;
    font-weight: 600;
}

.theme-modern .bf-comparar-header-actual {
    background: #DDD6FE;
    font-weight: 600;
    color: var(--mt-primary);
}

.theme-modern .bf-comparar-celda {
    white-space: pre-line;
    font-size: 0.875rem;
    vertical-align: top;
}

.theme-modern .bf-comparar-stats .bf-comparar-stat {
    border-radius: var(--mt-radius-sm);
    padding: 0.85rem 1rem;
    text-align: center;
    border: 1px solid var(--mt-border);
}

.theme-modern .bf-comparar-stat-num {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.theme-modern .bf-comparar-stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.85;
}

.theme-modern .bf-comparar-stat-cambio { background: #FEF9C3; }
.theme-modern .bf-comparar-stat-nuevo { background: #EDE9FE; }
.theme-modern .bf-comparar-stat-viejo { background: #F1F5F9; }
.theme-modern .bf-comparar-stat-igual { background: #F0FDF4; }

.theme-modern .bf-comparar-leyenda {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.theme-modern .bf-comparar-leyenda-item {
    font-size: 0.75rem;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    border: 1px solid transparent;
}

.theme-modern .bf-comparar-badge-cambio { background: #CA8A04; color: #fff; }
.theme-modern .bf-comparar-badge-nuevo { background: var(--mt-primary); color: #fff; }
.theme-modern .bf-comparar-badge-viejo { background: #64748B; color: #fff; }

/* ---- Dashboard / Inicio ---- */
.theme-modern .dashboard-hero {
    margin-bottom: 2rem;
}

.theme-modern .dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
}

.theme-modern .dashboard-tile {
    background: var(--mt-surface);
    border: 1px solid var(--mt-border);
    border-radius: var(--mt-radius);
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    display: block;
    box-shadow: var(--mt-shadow-sm);
    transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.theme-modern .dashboard-tile:hover {
    box-shadow: var(--mt-shadow-hover);
    transform: translateY(-2px);
    border-color: #D1D5DB;
    color: inherit;
}

.theme-modern .dashboard-tile-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--mt-primary-soft);
    color: var(--mt-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.theme-modern .dashboard-tile h2 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.35rem;
    letter-spacing: -0.02em;
    color: var(--mt-text);
}

.theme-modern .dashboard-tile p {
    font-size: 0.85rem;
    color: var(--mt-muted);
    margin: 0;
    line-height: 1.45;
}

/* ---- Agenda calendario ---- */
.theme-modern .agenda-calendario-card {
    padding: 0;
    overflow: hidden;
}

.theme-modern .agenda-calendario-toolbar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 1.15rem 1.5rem;
    border-bottom: 1px solid var(--mt-border-light);
    background: #FAFBFC;
}

.theme-modern .agenda-calendario-mes {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
    min-width: 180px;
    text-align: center;
    letter-spacing: -0.02em;
    color: var(--mt-text);
}

.theme-modern .agenda-calendario-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: var(--mt-border-light);
    padding: 1px;
}

.theme-modern .agenda-calendario-dow {
    background: #F9FAFB;
    color: var(--mt-muted);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: center;
    padding: 0.75rem 0.35rem;
}

.theme-modern .agenda-calendario-dia {
    background: var(--mt-surface);
    min-height: 96px;
    padding: 0.65rem 0.55rem;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    transition: background 0.15s ease, box-shadow 0.15s ease;
}

.theme-modern .agenda-calendario-dia:hover {
    background: #F5F3FF;
    color: inherit;
    box-shadow: inset 0 0 0 1px rgba(109, 40, 217, 0.15);
}

.theme-modern .agenda-calendario-dia.es-hoy {
    box-shadow: inset 0 0 0 2px var(--mt-primary);
    background: #FAF5FF;
}

.theme-modern .agenda-calendario-dia.con-turnos .agenda-calendario-num {
    color: var(--mt-primary);
    font-weight: 700;
}

.theme-modern .agenda-calendario-dia.vacio-mes {
    background: #F9FAFB;
    min-height: 96px;
}

.theme-modern .agenda-calendario-num {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--mt-text);
}

.theme-modern .agenda-calendario-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    min-width: 1.65rem;
    height: 1.65rem;
    padding: 0 0.45rem;
    border-radius: var(--mt-radius-pill);
    background: var(--mt-primary);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
}

.theme-modern .agenda-calendario-label {
    font-size: 0.72rem;
    color: var(--mt-muted);
    line-height: 1.2;
}

.theme-modern .agenda-calendario-label.vacio {
    opacity: 0.55;
}

@media (max-width: 767.98px) {
    .theme-modern .agenda-calendario-dia {
        min-height: 72px;
        padding: 0.45rem 0.35rem;
    }

    .theme-modern .agenda-calendario-label {
        display: none;
    }
}

/* ---- Módulos (toggles) ---- */
.theme-modern .modulo-card {
    border: 1px solid var(--mt-border, #e5e7eb);
    border-radius: 12px;
    padding: 1rem 1.1rem;
    height: 100%;
    background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.theme-modern .modulo-card-on {
    border-color: #198754;
    box-shadow: 0 0 0 1px rgba(25, 135, 84, .15);
}
.theme-modern .modulo-card-off {
    opacity: .92;
}
.theme-modern .modulo-card-icon {
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(15, 118, 110, .1);
    color: #0f766e;
    margin-bottom: .5rem;
}
.theme-modern .modulo-card-title {
    font-size: 1rem;
    font-weight: 650;
    margin: 0 0 .35rem;
}
.theme-modern .modulo-card-desc {
    font-size: .85rem;
    color: var(--mt-muted, #6b7280);
    margin: 0 0 .75rem;
    line-height: 1.35;
}
.theme-modern .modulo-switch {
    width: 2.75rem;
    height: 1.4rem;
    cursor: pointer;
}
.theme-modern .help-icon-btn {
    border: 0;
    background: transparent;
    color: #0f766e;
    padding: .15rem .35rem;
    line-height: 1;
    vertical-align: middle;
}
.theme-modern .help-icon-btn:hover {
    color: #0d9488;
}
.theme-modern .protocolo-steps {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
    margin-bottom: 1rem;
    align-items: center;
}
.theme-modern .protocolo-step {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    border: 1px solid var(--mt-border, #e5e7eb);
    border-radius: 999px;
    padding: .35rem .7rem .35rem .95rem;
    font-size: .82rem;
    background: #fff;
    color: #374151;
}
.theme-modern .protocolo-step > a {
    color: inherit;
    text-decoration: none;
    font-weight: 600;
}
.theme-modern .protocolo-step.active {
    background: #0f766e;
    border-color: #0f766e;
    color: #fff;
}
.theme-modern .protocolo-help-btn {
    border: 0;
    background: transparent;
    color: inherit;
    opacity: .8;
    padding: 0 .15rem;
    line-height: 1;
    font-size: .95rem;
    cursor: pointer;
}
.theme-modern .protocolo-help-btn:hover {
    opacity: 1;
}
.theme-modern .bikefit-accordion .accordion-button {
    pointer-events: auto;
    cursor: pointer;
}
.theme-modern .bf-readonly input,
.theme-modern .bf-readonly select,
.theme-modern .bf-readonly textarea {
    pointer-events: none;
    background-color: #f8fafc !important;
}
.theme-modern .ficha-fit-seccion {
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #0f766e;
    margin: 1rem 0 .5rem;
}
.theme-modern .ficha-fit-campo {
    background: #f8fafc;
    border: 1px solid var(--mt-border, #e5e7eb);
    border-radius: 10px;
    padding: .65rem .8rem;
    height: 100%;
}
.theme-modern .ficha-fit-label {
    font-size: .72rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: .2rem;
}
.theme-modern .ficha-fit-valor {
    font-size: .92rem;
    color: #111827;
    white-space: pre-wrap;
}
.theme-modern .ficha-fit-mini {
    display: block;
    font-size: .68rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.theme-modern .ficha-fit-nuevo {
    color: #6d28d9;
}
.theme-modern .cliente-fits-accordion .accordion-button {
    gap: .35rem;
    flex-wrap: wrap;
}
.theme-modern .angulo-semaforo-ok { color: #198754; }
.theme-modern .angulo-semaforo-warn { color: #fd7e14; }
.theme-modern .angulo-semaforo-bad { color: #dc3545; }

/* ---- Responsive ---- */
@media (max-width: 767.98px) {
    .theme-modern .content-area {
        padding: 1.25rem 1rem 2rem;
    }

    .theme-modern .page-title-modern,
    .theme-modern .entity-title {
        font-size: 1.45rem;
    }
}
