* {
    box-sizing: border-box;
}

body {
    background: #f4f6f9;
    font-family: Arial, sans-serif;
}

.login-body {
    min-height: 100vh;
    background: linear-gradient(135deg, #0d6efd, #0b5ed7);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
}

.login-wrapper {
    width: 100%;
    max-width: 390px;
}

.login-card {
    background: #fff;
    border-radius: 22px;
    padding: 28px 24px;
    box-shadow: 0 20px 45px rgba(0,0,0,.18);
}

.login-logo {
    width: 70px;
    height: 70px;
    margin: 0 auto 12px;
    background: #eef5ff;
    color: #0d6efd;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
}

.form-control {
    border-radius: 12px;
    padding: 11px 13px;
}

.btn {
    border-radius: 12px;
    padding: 11px;
}

.app-wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: #111827;
    color: #fff;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1050;
    padding: 18px;
    transition: all .25s ease;
}

.sidebar-brand {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 24px;
}

.sidebar-brand h5 {
    margin: 0;
    font-size: 18px;
}

.sidebar-brand small {
    color: #9ca3af;
}

.brand-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255,255,255,.06);
    border-radius: 16px;
    margin-bottom: 22px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #374151;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-user strong {
    display: block;
    font-size: 14px;
}

.sidebar-user small {
    display: block;
    color: #9ca3af;
    font-size: 12px;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #d1d5db;
    text-decoration: none;
    padding: 12px 14px;
    border-radius: 14px;
    margin-bottom: 6px;
    transition: all .2s ease;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: #2563eb;
    color: #fff;
}

.sidebar-menu i {
    width: 20px;
    text-align: center;
}

.main-content {
    margin-left: 260px;
    width: calc(100% - 260px);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.top-navbar {
    height: 66px;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: 0 22px;
    display: flex;
    align-items: center;
    gap: 14px;
    position: sticky;
    top: 0;
    z-index: 900;
}

.top-navbar small {
    color: #6b7280;
}

.btn-menu {
    display: none;
}

.content-area {
    padding: 22px;
    flex: 1;
}

.app-footer {
    background: #fff;
    border-top: 1px solid #e5e7eb;
    padding: 12px 22px;
    color: #6b7280;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.page-header h4 {
    margin: 0;
    font-weight: 600;
}

.page-header p {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
}

.kpi-card {
    background: #fff;
    border-radius: 20px;
    padding: 16px;
    box-shadow: 0 8px 22px rgba(0,0,0,.05);
    min-height: 142px;
}

.kpi-card span {
    display: block;
    color: #6b7280;
    font-size: 13px;
    margin-top: 12px;
}

.kpi-card h4 {
    margin: 4px 0 0;
    font-weight: 700;
    font-size: 20px;
}

.kpi-icon {
    width: 46px;
    height: 46px;
    border-radius: 15px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.bg-blue { background: #2563eb; }
.bg-green { background: #16a34a; }
.bg-purple { background: #7c3aed; }
.bg-orange { background: #f97316; }
.bg-red { background: #dc2626; }
.bg-darkblue { background: #0f172a; }

.panel-card {
    background: #fff;
    border-radius: 22px;
    padding: 18px;
    box-shadow: 0 8px 22px rgba(0,0,0,.05);
}

.panel-title {
    margin-bottom: 16px;
}

.panel-title h5 {
    margin: 0;
    font-weight: 600;
}

.panel-title small {
    color: #6b7280;
}

.quick-actions {
    display: grid;
    gap: 12px;
}

.quick-btn {
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    border-radius: 16px;
    padding: 14px;
    text-align: left;
    display: flex;
    gap: 12px;
    align-items: center;
    transition: all .2s ease;
}

.quick-btn:hover {
    background: #eef5ff;
    border-color: #2563eb;
    color: #2563eb;
}

.quick-btn i {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-overlay {
    display: none;
}

@media (max-width: 991px) {
    .sidebar {
        left: -270px;
    }

    .sidebar.active {
        left: 0;
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,.45);
        z-index: 1040;
    }

    .sidebar-overlay.active {
        display: block;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
    }

    .btn-menu {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .content-area {
        padding: 16px;
        padding-bottom: 80px;
    }

    .page-header {
        align-items: flex-start;
        gap: 12px;
    }

    .page-header .btn {
        white-space: nowrap;
    }

    .kpi-card {
        min-height: 130px;
        padding: 14px;
    }

    .kpi-card h4 {
        font-size: 17px;
    }

    .top-navbar {
        padding: 0 14px;
    }
}
.mobile-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 14px;
}
.cliente-avatar {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 50%;
    background: #eef2ff;
    color: #1e3a8a;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 14px;
    box-shadow: 0 6px 18px rgba(0,0,0,.04);
}

.bg-success-subtle {
    background: #dcfce7 !important;
}

.bg-danger-subtle {
    background: #fee2e2 !important;
}

.bg-secondary-subtle {
    background: #f1f5f9 !important;
}

.text-success {
    color: #15803d !important;
}

.text-danger {
    color: #b91c1c !important;
}

.text-secondary {
    color: #475569 !important;
}
.cliente-profile-card {
    position: sticky;
    top: 82px;
}

.profile-avatar {
    width: 110px;
    height: 110px;
    border-radius: 30px;
    background: linear-gradient(135deg, #2563eb, #1e40af);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    box-shadow: 0 12px 28px rgba(37,99,235,.25);
}

.cliente-info {
    display: grid;
    gap: 10px;
    color: #475569;
    font-size: 14px;
}

.cliente-info i {
    width: 22px;
    color: #2563eb;
}

.kpi-card.mini {
    min-height: 100px;
}

.kpi-card.mini h4 {
    font-size: 17px;
}

.resumen-box {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 16px;
}

.resumen-box span,
.loan-grid span {
    display: block;
    color: #64748b;
    font-size: 13px;
}

.resumen-box strong,
.loan-grid strong {
    display: block;
    margin-top: 4px;
    font-size: 16px;
    color: #0f172a;
}

.loan-card {
    border: 1px solid #e5e7eb;
    background: #fff;
    border-radius: 20px;
    padding: 16px;
    transition: all .2s ease;
}

.loan-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0,0,0,.06);
}

.loan-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.obs-item {
    border-left: 4px solid #2563eb;
    background: #f8fafc;
    padding: 12px 14px;
    border-radius: 14px;
    margin-bottom: 12px;
}

.obs-item small {
    color: #64748b;
}

.obs-item p {
    margin: 6px 0 0;
    color: #334155;
}

@media (max-width: 991px) {
    .cliente-profile-card {
        position: static;
    }
}
.cliente-selected {
    background: #f8fafc;
    border: 1px solid #dbeafe;
    border-radius: 18px;
    padding: 14px;
    display: flex;
    gap: 12px;
    align-items: center;
}

.cronograma-table th {
    font-size: 13px;
    color: #64748b;
}

.cronograma-table td {
    font-size: 14px;
}

@media (max-width: 768px) {
    .panel-card {
        padding: 15px;
    }

    .cliente-selected {
        align-items: flex-start;
    }
}
.dashboard-action {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    padding: 18px;
    display: flex;
    gap: 14px;
    align-items: center;
    text-decoration: none;
    color: #0f172a;
    box-shadow: 0 8px 22px rgba(0,0,0,.05);
    transition: all .2s ease;
}

.dashboard-action:hover {
    transform: translateY(-2px);
    border-color: #2563eb;
    color: #2563eb;
}

.dashboard-action i {
    width: 46px;
    height: 46px;
    border-radius: 15px;
    background: #eef2ff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2563eb;
    font-size: 20px;
}

.dashboard-action strong {
    display: block;
    font-size: 15px;
}

.dashboard-action small {
    display: block;
    color: #64748b;
    font-size: 13px;
}

.mora-item,
.simple-item {
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 12px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    background: #f8fafc;
}

.mora-item small,
.simple-item small {
    display: block;
    color: #64748b;
    font-size: 12px;
}

.mora-item {
    border-left: 4px solid #dc2626;
}
.caja-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    padding: 16px;
    box-shadow: 0 8px 22px rgba(0,0,0,.05);
    transition: all .2s ease;
}

.caja-card:hover {
    transform: translateY(-2px);
}

.caja-icon {
    width: 44px;
    height: 44px;
    border-radius: 15px;
    background: #eef2ff;
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.caja-card span {
    display: block;
    color: #64748b;
    font-size: 13px;
}

.caja-card h5 {
    margin: 4px 0;
    font-size: 20px;
    font-weight: 700;
}

.caja-card small {
    color: #94a3b8;
}
.nota-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-left: 5px solid #2563eb;
    border-radius: 20px;
    padding: 16px;
    min-height: 220px;
    box-shadow: 0 8px 22px rgba(0,0,0,.05);
    transition: all .2s ease;
}

.nota-card:hover {
    transform: translateY(-2px);
}

.nota-card h6 {
    margin: 0;
    color: #0f172a;
}

.nota-card small {
    color: #64748b;
}

.nota-card p {
    margin: 14px 0;
    color: #334155;
    font-size: 14px;
    white-space: normal;
}

.nota-footer {
    border-top: 1px solid #e5e7eb;
    padding-top: 10px;
    margin-top: 10px;
}

.nota-azul {
    border-left-color: #2563eb;
}

.nota-verde {
    border-left-color: #16a34a;
}

.nota-amarillo {
    border-left-color: #f59e0b;
}

.nota-rojo {
    border-left-color: #dc2626;
}

.nota-gris {
    border-left-color: #64748b;
}
.circle-kpi {
    --percent: 0;
    width: 120px;
    height: 120px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background:
        conic-gradient(
            #16a34a calc(var(--percent) * 1%),
            #e5e7eb 0
        );
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 24px rgba(0,0,0,.08);
}

.circle-inner {
    width: 88px;
    height: 88px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0f172a;
    font-size: 24px;
    font-weight: 700;
}

.circle-kpi + h6 {
    margin: 6px 0 2px;
    color: #0f172a;
    font-weight: 700;
}

.circle-kpi + h6 + small {
    color: #64748b;
    font-size: 12px;
}

@media (max-width: 576px) {
    .circle-kpi {
        width: 105px;
        height: 105px;
    }

    .circle-inner {
        width: 78px;
        height: 78px;
        font-size: 20px;
    }
}
.bottom-nav-mobile {
    display: none;
}

@media (max-width: 768px) {
    body {
        padding-bottom: 78px;
    }

    .bottom-nav-mobile {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        height: 72px;
        background: #fff;
        border-top: 1px solid #e5e7eb;
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        z-index: 9999;
        box-shadow: 0 -8px 24px rgba(15, 23, 42, .08);
    }

    .bottom-nav-mobile a {
        text-decoration: none;
        color: #1e293b;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        font-size: 12px;
        font-weight: 500;
    }

    .bottom-nav-mobile a i {
        font-size: 20px;
        color: var(--app-primary, #2563eb);
    }

    .bottom-nav-mobile a.active {
        background: var(--app-primary, #2563eb);
        color: #fff !important;
        border-radius: 10px;
        margin: 6px 8px;
    }

    .bottom-nav-mobile a.active i {
        color: #fff !important;
    }

    .sidebar {
        display: none;
    }

    .main-content,
    .content-wrapper {
        margin-left: 0 !important;
        width: 100% !important;
    }
}
.topbar-app {
    height: 72px;
    background: var(--app-sidebar, #111827);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 22px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    box-shadow: 0 8px 24px rgba(15, 23, 42, .08);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.topbar-left h5 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
}

.topbar-left small {
    color: rgba(255,255,255,.75);
}

.btn-menu-mobile {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: rgba(255,255,255,.12);
    color: #fff;
    display: none;
    align-items: center;
    justify-content: center;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 12px;
    border-radius: 16px;
    background: rgba(255,255,255,.10);
}

.topbar-user strong {
    display: block;
    font-size: 13px;
    color: #fff;
    line-height: 1.1;
}

.topbar-user small {
    display: block;
    font-size: 11px;
    color: rgba(255,255,255,.65);
}

.topbar-avatar {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: var(--app-primary, #2563eb);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-logout-topbar {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: #fff;
    color: var(--app-primary, #2563eb);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: .2s ease;
}

.btn-logout-topbar:hover {
    background: var(--app-primary, #2563eb);
    color: #fff;
}

@media (max-width: 768px) {
    .topbar-app {
        height: 68px;
        padding: 0 14px;
    }

    .btn-menu-mobile {
        display: flex;
    }

    .topbar-left h5 {
        font-size: 15px;
    }

    .topbar-left small {
        font-size: 12px;
    }
}
/* TOPBAR FIJO */
.topbar-app {
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* MÓVIL: sidebar funcional */
@media (max-width: 768px) {
    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
    }

    .sidebar {
        display: block !important;
        position: fixed;
        top: 0;
        left: -280px;
        width: 260px;
        height: 100vh;
        z-index: 10000;
        transition: left .25s ease;
    }

    .sidebar.active {
        left: 0;
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,.55);
        z-index: 9999;
    }

    .sidebar-overlay.active {
        display: block;
    }
}

@media (max-width: 768px) {

    .app-mobile-card {
        background: #fff;
        border-radius: 22px;
        border: 1px solid #e5e7eb;
        border-left: 5px solid var(--app-primary, #2563eb);
        box-shadow: 0 12px 28px rgba(15, 23, 42, .08);
        padding: 15px;
        margin-bottom: 14px;
        transition: .2s ease;
    }

    .app-mobile-card:active {
        transform: scale(.98);
    }

    .app-card-header {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .app-card-avatar {
        width: 48px;
        height: 48px;
        border-radius: 16px;
        background: color-mix(in srgb, var(--app-primary, #2563eb) 12%, white);
        color: var(--app-primary, #2563eb);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 20px;
        flex-shrink: 0;
    }

    .app-card-info {
        flex: 1;
        min-width: 0;
    }

    .app-card-info h6 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.35;
	}

    .app-card-info small {
    font-size: 12px;
    font-weight: 400;
    color: #64748b;
	}

    .app-card-badge {
        flex-shrink: 0;
    }

    .app-card-body {
        margin-top: 13px;
        display: grid;
        gap: 7px;
        color: #475569;
		font-weight: 400;
        font-size: 13px;
    }

    .app-card-body div {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .app-card-body i {
        width: 18px;
        color: var(--app-primary, #2563eb);
        text-align: center;
    }

    .app-card-actions {
        margin-top: 14px;
        padding-top: 12px;
        border-top: 1px solid #e5e7eb;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .btn-app-action {
        border: 1px solid #e5e7eb;
        background: #fff;
        border-radius: 14px;
        padding: 9px 6px;
        text-decoration: none;
        font-size: 13px;
        font-weight: 400;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 5px;
    }

    .btn-app-action.primary {
        color: var(--app-primary, #2563eb);
        border-color: var(--app-primary, #2563eb);
    }

    .btn-app-action.success {
        color: #15803d;
        border-color: #16a34a;
    }

    .btn-app-action.danger {
        color: #dc2626;
        border-color: #ef4444;
    }
}
.app-card-info h6,
.mobile-card h6,
.cliente-card h6,
.panel-title h5,
.table td strong {
    font-weight: 600 !important;
}

.mobile-card,
.app-mobile-card {
    font-weight: 400;
}

.btn,
.badge {
    font-weight: 500 !important;
}
.producto-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-left: 5px solid var(--producto-color, var(--app-primary, #2563eb));
    border-radius: 22px;
    padding: 16px;
    min-height: 100%;
    box-shadow: 0 10px 26px rgba(15, 23, 42, .07);
    transition: .2s ease;
}

.producto-card:hover {
    transform: translateY(-2px);
}

.producto-icon {
    width: 44px;
    height: 44px;
    border-radius: 15px;
    background: color-mix(in srgb, var(--producto-color, #2563eb) 12%, white);
    color: var(--producto-color, #2563eb);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.producto-card h6 {
    margin: 0;
    font-weight: 600;
    color: #1e293b;
}

.producto-card small {
    color: #64748b;
    font-size: 12px;
}

.producto-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px 12px;
}

.producto-grid div {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 10px;
}

.producto-grid span {
    display: block;
    font-size: 12px;
    color: #64748b;
}

.producto-grid strong {
    display: block;
    margin-top: 3px;
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
}

.producto-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
}

.producto-actions .btn {
    font-size: 12px;
    padding: 8px 6px;
}

@media (max-width: 576px) {
    .producto-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .producto-actions {
        grid-template-columns: 1fr;
    }
}

/* Ajustes módulo Productos Crediticios */
.producto-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-left: 5px solid var(--producto-color, var(--app-primary, #2563eb));
    border-radius: 22px;
    padding: 16px;
    min-height: 100%;
    box-shadow: 0 10px 26px rgba(15, 23, 42, .07);
    transition: .2s ease;
}

.producto-card:hover {
    transform: translateY(-2px);
}

.producto-icon {
    width: 44px;
    height: 44px;
    border-radius: 15px;
    background: color-mix(in srgb, var(--producto-color, #2563eb) 12%, white);
    color: var(--producto-color, #2563eb);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.producto-card h6 {
    margin: 0;
    font-weight: 600;
    color: #1e293b;
}

.producto-card small {
    color: #64748b;
    font-size: 12px;
}

.producto-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px 12px;
}

.producto-grid div {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 10px;
}

.producto-grid span {
    display: block;
    font-size: 12px;
    color: #64748b;
}

.producto-grid strong {
    display: block;
    margin-top: 3px;
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
}

.producto-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
}

.producto-actions .btn {
    font-size: 12px;
    padding: 8px 6px;
}

#modalProducto .modal-xl {
    max-width: 1000px;
}

#modalProducto .modal-body {
    max-height: calc(100vh - 170px);
    overflow-y: auto;
    padding: 22px;
}

#modalProducto .modal-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
}

#modalProducto .modal-footer {
    position: sticky;
    bottom: 0;
    z-index: 20;
    background: #fff;
    border-top: 1px solid #e5e7eb;
}

@media (max-width: 576px) {
    .producto-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .producto-actions {
        grid-template-columns: 1fr;
    }

    #modalProducto .modal-body {
        padding: 14px;
        max-height: calc(100vh - 150px);
    }
}
.sim-kpi {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 14px;
}

.sim-kpi span {
    display: block;
    font-size: 12px;
    color: #64748b;
}

.sim-kpi strong {
    display: block;
    margin-top: 5px;
    font-size: 17px;
    font-weight: 600;
    color: #0f172a;
}

.sim-kpi.total {
    background: color-mix(in srgb, var(--app-primary, #2563eb) 10%, white);
    border-color: var(--app-primary, #2563eb);
}

@media (max-width: 768px) {
    .simulador-result .table-responsive {
        max-height: 480px;
        overflow: auto;
    }

    .simulador-result table {
        min-width: 900px;
    }
}

/* =========================================================
   LOGO EMPRESA + LOGIN MODERNO
   ========================================================= */
.empresa-logo-box {
    border: 1px solid #e5e7eb;
    background: #f8fafc;
    border-radius: 18px;
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.empresa-logo-preview {
    width: 86px;
    height: 86px;
    border-radius: 20px;
    background: #fff;
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--app-primary, #2563eb);
    font-size: 34px;
    overflow: hidden;
    flex-shrink: 0;
}

.empresa-logo-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
}

.empresa-logo-info {
    flex: 1;
    min-width: 0;
}

.brand-logo-box {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: rgba(255,255,255,.95);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 10px 22px rgba(0,0,0,.12);
}

.brand-logo-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 6px;
}

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

.brand-text h5 {
    max-width: 160px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.login-body-modern {
    background:
        radial-gradient(circle at top left, color-mix(in srgb, var(--app-primary, #2563eb) 26%, transparent), transparent 32%),
        linear-gradient(135deg, var(--app-sidebar, #111827), color-mix(in srgb, var(--app-primary, #2563eb) 72%, #111827));
    position: relative;
    overflow: hidden;
}

.login-bg-shape {
    position: fixed;
    border-radius: 999px;
    filter: blur(2px);
    opacity: .26;
    pointer-events: none;
}

.login-bg-shape.shape-1 {
    width: 260px;
    height: 260px;
    background: #fff;
    top: -80px;
    right: -60px;
}

.login-bg-shape.shape-2 {
    width: 190px;
    height: 190px;
    background: var(--app-primary, #2563eb);
    bottom: -70px;
    left: -60px;
}

.login-wrapper-modern {
    max-width: 430px;
    position: relative;
    z-index: 2;
}

.login-card-modern {
    border: 1px solid rgba(255,255,255,.36);
    box-shadow: 0 28px 70px rgba(0,0,0,.26);
    backdrop-filter: blur(10px);
}

.login-logo-modern {
    width: 92px;
    height: 92px;
    border-radius: 26px;
    background: color-mix(in srgb, var(--app-primary, #2563eb) 12%, white);
    color: var(--app-primary, #2563eb);
    box-shadow: 0 14px 34px color-mix(in srgb, var(--app-primary, #2563eb) 22%, transparent);
    overflow: hidden;
}

.login-logo-modern img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
}

.login-title {
    color: #0f172a;
    font-weight: 650;
}

.login-subtitle {
    color: #64748b;
    font-size: 13px;
    margin-bottom: 0;
}

.login-input-group {
    position: relative;
}

.login-input-group i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--app-primary, #2563eb);
    z-index: 2;
}

.login-input-group .form-control {
    padding-left: 42px;
    background: #f8fafc;
    border-color: #e5e7eb;
}

.login-input-group .form-control:focus {
    background: #fff;
}

.btn-login-modern {
    background: var(--app-primary, #2563eb) !important;
    border-color: var(--app-primary, #2563eb) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 550 !important;
}

.login-footer-text {
    text-align: center;
    margin-top: 16px;
    color: #64748b;
}

@media (max-width: 576px) {
    .empresa-logo-box {
        align-items: flex-start;
        flex-direction: column;
    }

    .empresa-logo-preview {
        width: 78px;
        height: 78px;
    }

    .login-card-modern {
        padding: 24px 20px;
    }

    .login-logo-modern {
        width: 82px;
        height: 82px;
    }
}
