/* Reset y ocultar header */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
header,
.site-header,
#masthead,
.header,
.main-header,
.page-header,
.site-head,
.top-bar,
.header-top,
.top-header,
.header-contact,
.header-info,
.header-links,
.header-promo,
.header-phone,
.contact-info,
.top-bar-contact,
.pre-header,
.header-wrapper,
.site-branding,
.main-navigation,
.nav-menu,
.menu-primary {
    display: none !important;
}

/* Layout principal */
.st-dashboard-elegante {
    display: flex;
    min-height: 100vh;
    background: #f8fafc;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ===== SIDEBAR ===== */
.st-sidebar {
    background: white;
    color: #000000 !important;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    overflow: visible;
    z-index: 100;
    box-shadow: 2px 0 15px rgba(0,0,0,0.05);
}
.st-sidebar.collapsed {
    width: 60px;
}
.st-sidebar:not(.collapsed) {
    width: 180px;
}
.st-sidebar-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
}
.st-toggle-btn {
    position: absolute;
    right: -15px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 40px;
    background: white;
    border: 1px solid #000000 !important;
    border-radius: 30px;
    color: #000000 !important;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 101;
    transition: all 0.2s;
    padding: 0;
}
.st-toggle-btn:hover {
    background: #000000 !important;
    color: white !important;
    border-color: #000000 !important;
}
.st-sidebar.collapsed .st-toggle-btn i {
    transform: rotate(180deg);
}
.st-toggle-btn i {
    transition: transform 0.3s;
}
.st-sidebar:not(.collapsed) .st-sidebar-content {
    padding-right: 5px;
}
.st-sidebar-logo {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    margin: 3rem 0 1.5rem 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    text-align: center !important;
}
.st-sidebar-logo img {
    max-width: 80% !important;
    height: auto !important;
    display: block !important;
    margin: 0 auto !important;
}
.st-sidebar-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    font-size: 2rem;
    margin: 2rem 0 1.5rem 0;
    color: #000000 !important;
}
.st-sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.st-nav-item {
    margin: 0.2rem 0.5rem;
    border-radius: 8px;
    transition: all 0.2s;
}
.st-nav-item a {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.1rem 0.3rem;
    text-decoration: none;
    color: #000000 !important;
    transition: all 0.2s;
    white-space: nowrap;
    border-radius: 8px;
}
.st-sidebar.collapsed .st-nav-item a {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
}
.st-nav-icon {
    font-size: 1.4rem;
    min-width: 30px;
    text-align: center;
    color: #000000 !important;
    transition: color 0.2s;
}
.st-nav-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #000000 !important;
    transition: color 0.2s;
}
.st-sidebar.collapsed .st-nav-label {
    display: none;
}
.st-nav-item:hover {
    background: #000000 !important;
}
.st-nav-item:hover .st-nav-label {
    color: white !important;
}
.st-nav-item:hover .st-nav-icon {
    color: white !important;
}
.st-nav-item.active {
    background: #000000 !important;
    box-shadow: inset 3px 0 0 white;
}
.st-nav-item.active .st-nav-label {
    color: white !important;
    font-weight: 600;
}
.st-nav-item.active .st-nav-icon {
    color: white !important;
}
.st-sidebar-footer {
    margin-top: auto;
    padding: 1rem 0;
}
.st-user-info {
    padding: 0 0.8rem;
    margin-bottom: 0.8rem;
    color: #000000 !important;
}
.st-user-name {
    font-weight: 600;
    font-size: 0.85rem;
    display: block;
}
.st-user-email {
    font-size: 0.7rem;
    opacity: 0.7;
}
.st-logout-btn {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.1rem 0.3rem;
    color: #000000 !important;
    text-decoration: none;
    transition: all 0.2s;
    border-radius: 8px;
    margin: 0 0.5rem;
}
.st-sidebar.collapsed .st-logout-btn {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
}
.st-logout-btn:hover {
    background: #000000 !important;
    color: white !important;
}
.st-logout-btn:hover .st-logout-icon {
    color: white !important;
}
.st-logout-btn:hover .st-logout-label {
    color: white !important;
}
.st-logout-icon {
    font-size: 1.4rem;
    min-width: 30px;
    text-align: center;
    color: #000000 !important;
    transition: color 0.2s;
}
.st-logout-label {
    font-size: 0.9rem;
    color: #000000 !important;
    transition: color 0.2s;
}
.st-sidebar.collapsed .st-logout-label {
    display: none;
}

/* ===== RESPONSIVE HORIZONTAL (MÓVIL) ===== */
@media (max-width: 768px) {
    .st-sidebar {
        position: fixed !important;
        top: auto !important;
        bottom: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: auto !important;
        min-height: 48px !important;
        flex-direction: row !important;
        background: white;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
        z-index: 1000;
        overflow-x: auto;
        overflow-y: hidden;
        transition: none !important;
    }
    .st-toggle-btn {
        display: none !important;
    }
    .st-sidebar-content {
        flex-direction: row !important;
        align-items: center;
        justify-content: space-around;
        width: 100%;
        height: 100%;
        padding: 0 5px;
    }
    .st-sidebar-logo,
    .st-sidebar-footer,
    .st-nav-label,
    .st-user-info,
    .st-logout-label {
        display: none !important;
    }
    .st-sidebar-nav {
        width: 100%;
    }
    .st-sidebar-nav ul {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-around;
        align-items: center;
        margin: 0;
        padding: 0;
    }
    .st-nav-item {
        margin: 0 !important;
        padding: 0 !important;
        flex: 1;
        text-align: center;
    }
    .st-nav-item a {
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 4px 0 !important;
        min-width: auto;
    }
    .st-nav-icon {
        font-size: 1.4rem !important;
        min-width: auto;
        margin: 0;
    }
    .st-logout-btn {
        justify-content: center;
        margin: 0 !important;
        padding: 8px 0 !important;
        min-width: auto;
    }
    .st-logout-icon {
        font-size: 1.4rem !important;
    }
    .st-nav-item a:active,
    .st-logout-btn:active {
        background-color: rgba(0,0,0,0.2) !important;
        transform: scale(0.95);
        transition: transform 0.1s, background-color 0.1s;
        border-radius: 8px;
    }
    .st-nav-item.active a {
        background-color: #000000 !important;
        color: white !important;
    }
    .st-nav-item.active .st-nav-icon {
        color: white !important;
    }
    .st-main-content {
        margin-left: 0 !important;
        margin-bottom: 48px !important;
        padding: 1rem;
    }
}

/* ===== CONTENIDO PRINCIPAL ===== */
.st-main-content {
    flex: 1;
    margin-left: 60px;
    padding: 2rem;
    transition: margin-left 0.3s ease;
}
.st-sidebar:not(.collapsed) + .st-main-content {
    margin-left: 20px;
}
.st-tab-pane {
    display: none;
    background: white;
    border-radius: 20px;
    padding: 1rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}
.st-tab-pane.active {
    display: block;
}
.st-tab-pane h2 {
    color: #000000 !important;
    margin-bottom: 1rem;
    font-size: 1.8rem;
}
.st-tab-pane p {
    color: #000000 !important;
    line-height: 1.6;
}
@media (max-width: 768px) {
    .st-sidebar.collapsed {
        width: 50px;
    }
    .st-sidebar:not(.collapsed) {
        width: 160px;
    }
    .st-main-content {
        margin-left: 50px;
        padding: 1rem;
    }
    .st-sidebar:not(.collapsed) + .st-main-content {
        margin-left: 160px;
    }
    .st-nav-icon {
        font-size: 1.2rem;
        min-width: 26px;
    }
    .st-toggle-btn {
        right: -10px;
        width: 24px;
        height: 32px;
    }
}
.st-sidebar.collapsed .st-user-info {
    display: none;
}
.st-sidebar-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 80%;
    margin: 3rem 0 1.5rem 0;
    padding: 0;
    overflow: hidden;
}
.st-sidebar-logo img {
    max-width: 80%;
    height: auto;
    display: block;
}

/* ===== FORMULARIO DE SERVICIO ===== */
.st-form-servicio {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-top: 1rem;
}
.st-form-section h3 {
    background: #000000 !important;
    color: white !important;
    padding: 0.50rem 1rem;
    margin: 0 0 1.5rem 0;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.st-form-section {
    margin-bottom: 2rem;
    padding: 0 0 1rem 0;
    border-bottom: 1px solid #000000 !important;
}
.st-form-row {
    display: flex;
    gap: 0.65rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}
.st-form-group {
    flex: 1 1 140px;
    min-width: 140px;
}
.st-form-group.full-width {
    flex: 1 1 100%;
}
.st-form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.15rem;
    color: #000000 !important;
    font-size: 0.8rem;
}
.st-form-group input,
.st-form-group select,
.st-form-group textarea,
.st-form-group input[type="datetime-local"],
.st-form-group input[type="date"],
.st-form-group input[type="time"] {
    width: 100%;
    padding: 0.5rem 1rem;
    background: #f8fafc;
    border: 1px solid #000000 !important;
    border-radius: 6px !important;
    font-size: 0.95rem;
    transition: all 0.2s;
    box-sizing: border-box;
    color: #000000 !important;
}
.st-form-group input:focus,
.st-form-group select:focus,
.st-form-group textarea:focus,
.st-form-group input[type="datetime-local"]:focus {
    outline: none;
    border-color: #000000 !important;
    box-shadow: 0 0 0 3px rgba(0,0,0,0.1);
    background: white;
}
.st-form-group input[type="file"] {
    padding: 0.4rem;
    background: white;
    border: 1px dashed #000000 !important;
    border-radius: 6px;
}
.st-btn-guardar {
    background: #000000 !important;
    color: white !important;
    border: none;
    padding: 0.45rem 2rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}
.st-btn-guardar:hover {
    background: #333333 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.35);
}
.st-success {
    background: #d1fae5;
    border: 1px solid #a7f3d0;
    color: #065f46;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
}

/* Responsive formulario */
@media (max-width: 768px) {
    .st-form-servicio { padding: 0.8rem !important; }
    .st-form-row { display: block !important; margin: 0 0 0.5rem 0 !important; padding: 0 !important; }
    .st-form-group { display: block !important; width: 100% !important; margin: 0 0 0.25rem 0 !important; padding: 0 !important; }
    .st-form-group:last-child { margin-bottom: 0 !important; }
    .st-form-group label { display: block !important; margin: 0 0 0.15rem 0 !important; padding: 0 !important; font-size: 0.8rem !important; line-height: 1.2 !important; }
    .st-form-group input, .st-form-group select, .st-form-group textarea, .st-form-group input[type="datetime-local"] {
        width: 100%; padding: 0.3rem 0.5rem; background: #f8fafc; border: 1px solid #000000 !important; border-radius: 4px !important; font-size: 0.85rem;
    }
    .st-form-section h3 { font-size: 0.9rem !important; padding: 0.3rem 0.5rem !important; margin: 0 0 0.5rem 0 !important; }
    .st-form-section { margin-bottom: 0.8rem !important; padding-bottom: 0.3rem !important; }
    .st-btn-guardar { width: 100% !important; padding: 0.5rem !important; margin: 0.5rem 0 0 0 !important; font-size: 0.9rem !important; }
}

/* Tablas y reportes */
.st-estado-select {
    border: none;
    outline: none;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding: 4px 8px;
    border-radius: 4px;
    color: #000000 !important;
}
.st-reporte-tabla {
    overflow-x: auto !important;
}
.st-tabla-registros {
    min-width: 1200px;
}
.st-btn-editar, .st-btn-eliminar {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    margin: 0 2px;
    padding: 0 4px;
    transition: color 0.2s;
    color: #000000 !important;
}
.st-btn-editar:hover, .st-btn-eliminar:hover {
    color: #000000 !important;
}
#tab-reporte {
    padding: 1rem;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}
.st-reporte-tabla {
    overflow-x: auto !important;
    overflow-y: visible;
    width: 100%;
    margin: 1rem 0;
    border: 1px solid #000000 !important;
    border-radius: 8px;
    background: white;
    padding-right: 10px;
}
.st-tabla-registros {
    min-width: 1000px;
    width: 100%;
    border-collapse: collapse;
    background: white;
    font-size: 0.85rem;
    table-layout: auto;
}
.st-tabla-registros th,
.st-tabla-registros td {
    padding: 0.75rem 0.5rem;
    white-space: nowrap;
    border-bottom: 1px solid #000000 !important;
    text-align: left;
    color: #000000 !important;
}
.st-tabla-registros th {
    background: #f1f5f9;
    font-weight: 700;
    color: #000000 !important;
}
#stFiltroNombreDni {
    width: 100%;
    max-width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #000000 !important;
    border-radius: 30px;
    margin-bottom: 1rem;
    font-size: 1rem;
    box-sizing: border-box;
    color: #000000 !important;
}

/* Botones de acción */
.st-btn-pdf,
.st-btn-editar,
.st-btn-eliminar,
.st-btn-whatsapp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    border-radius: 4px;
    font-size: 1.2rem;
    cursor: pointer;
    margin: 0 2px;
    padding: 0;
    text-decoration: none;
    transition: all 0.2s ease;
    vertical-align: middle;
    line-height: 1;
    color: #000000 !important;
}
.st-btn-pdf:hover,
.st-btn-editar:hover,
.st-btn-eliminar:hover,
.st-btn-whatsapp:hover {
    background: #f1f5f9;
    transform: scale(1.1);
    color: #000000 !important;
}
@media (max-width: 768px) {
    .st-btn-pdf, .st-btn-editar, .st-btn-eliminar, .st-btn-whatsapp {
        width: 40px; height: 40px; font-size: 1.4rem; margin: 0 4px;
    }
}

/* Tabla de clientes */
.st-clientes-tabla-wrapper {
    overflow-x: auto;
    margin-top: 1rem;
}
.st-clientes-tabla {
    width: 100%;
    min-width: 500px;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.st-clientes-tabla th,
.st-clientes-tabla td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #000000 !important;
    color: #000000 !important;
}
.st-clientes-tabla th {
    background: #f1f5f9;
    font-weight: 600;
    color: #000000 !important;
}
.st-clientes-tabla .st-btn-pdf,
.st-clientes-tabla .st-btn-editar,
.st-clientes-tabla .st-btn-eliminar {
    font-size: 1.1rem;
    padding: 0.2rem 0.4rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #000000 !important;
}
.st-clientes-tabla .st-btn-historial {
    font-size: 1.1rem;
    padding: 0.3rem 0.5rem;
    background: #000000 !important;
    border: none;
    cursor: pointer;
    display: inline-block;
    margin: 0 2px;
    vertical-align: middle;
    transition: transform 0.1s;
    color: #000000 !important;
}
.st-clientes-tabla .st-btn-historial:hover {
    transform: scale(1.1);
}

/* Modal */
.st-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
}
.st-modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 0;
    border-radius: 16px;
    width: 90%;
    max-width: 800px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    animation: modalFadeIn 0.3s;
}
@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}
.st-modal-header {
    padding: 1rem 1.5rem;
    background: #000000 !important;
    color: white !important;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.st-modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
}
.st-modal-close {
    color: white;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}
.st-modal-close:hover {
    color: #f1f5f9;
}
.st-modal-body {
    padding: 1.5rem;
    max-height: 60vh;
    overflow-y: auto;
}
.st-historial-tabla {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.st-historial-tabla th {
    background: #f1f5f9;
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    color: #000000 !important;
}
.st-historial-tabla td {
    padding: 0.75rem;
    border-bottom: 1px solid #000000 !important;
    color: #000000 !important;
}
.st-historial-tabla tr:last-child td {
    border-bottom: none;
}
@media (max-width: 768px) {
    .st-modal-content { width: 95%; margin: 10% auto; }
    .st-historial-tabla { font-size: 0.8rem; }
    .st-historial-tabla th, .st-historial-tabla td { padding: 0.5rem; }
}

/* KPI Grid */
.st-kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
    margin: 2rem 0;
}
.st-kpi-card {
    background: white;
    border-radius: 20px;
    padding: 1.2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease;
    border: 1px solid #f1f5f9;
}
.st-kpi-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}
.st-kpi-icon {
    width: 48px;
    height: 48px;
    background: rgba(0,0,0,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000000 !important;
    font-size: 1.6rem;
    flex-shrink: 0;
}
.st-kpi-content {
    flex: 1;
}
.st-kpi-value {
    font-size: 2rem;
    font-weight: 700;
    color: #000000 !important;
    line-height: 1.2;
    margin-bottom: 0.2rem;
}
.st-kpi-label {
    color: #000000 !important;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
@media (max-width: 1024px) { .st-kpi-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .st-kpi-grid { grid-template-columns: 1fr; } .st-kpi-card { padding: 1rem; } .st-kpi-icon { width: 40px; height: 40px; font-size: 1.4rem; } .st-kpi-value { font-size: 1.8rem; } }

/* Soporte */
.st-soporte-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
}
.st-soporte-form-card {
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1);
    border: 1px solid #f1f5f9;
}
.st-soporte-form-card h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #000000 !important;
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 0.8rem;
}
.st-soporte-form-card h3 i {
    color: #000000 !important;
    font-size: 1.5rem;
}
.st-form-soporte {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.st-form-soporte .st-form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 0;
}
.st-form-soporte .st-form-group {
    flex: 1;
}
.st-form-soporte label {
    font-weight: 600;
    color: #000000 !important;
    font-size: 0.85rem;
    margin-bottom: 0.3rem;
    display: block;
}
.st-form-soporte input,
.st-form-soporte select,
.st-form-soporte textarea {
    width: 100%;
    padding: 0.5rem 1rem;
    border: 2px solid #000000 !important;
    border-radius: 12px;
    font-size: 0.95rem;
    transition: all 0.2s;
    background: #f8fafc;
    color: #000000 !important;
}
.st-form-soporte input:focus,
.st-form-soporte select:focus,
.st-form-soporte textarea:focus {
    border-color: #000000 !important;
    outline: none;
    background: white;
    box-shadow: 0 0 0 3px rgba(0,0,0,0.1);
}
.st-soporte-listas {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.st-ticket-list-card {
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1);
    border: 1px solid #f1f5f9;
}
.st-ticket-list-card h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #000000 !important;
    font-size: 1.2rem;
    margin-bottom: 1.2rem;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 0.8rem;
}
.st-ticket-list-card h3 i {
    color: #000000 !important;
}
.st-ticket-table-responsive {
    overflow-x: auto;
    border-radius: 12px;
}
.st-ticket-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    min-width: 600px;
}
.st-ticket-table th {
    background: #f1f5f9;
    color: #000000 !important;
    font-weight: 600;
    padding: 0.8rem 0.5rem;
    text-align: left;
}
.st-ticket-table td {
    padding: 0.8rem 0.5rem;
    border-bottom: 1px solid #000000 !important;
    vertical-align: middle;
    color: #000000 !important;
}
.st-ticket-table tr:hover {
    background: #f8fafc;
}
.st-prioridad {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.prioridad-alto { background: #fee2e2; color: #b91c1c; }
.prioridad-medio { background: #fef9c3; color: #854d0e; }
.prioridad-bajo { background: #dcfce7; color: #166534; }
.st-btn-iniciar, .st-btn-finalizar {
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.st-btn-iniciar {
    background: #000000 !important;
    color: white !important;
}
.st-btn-iniciar:hover {
    background: #333333 !important;
}
.st-btn-finalizar {
    background: #10b981;
    color: white;
}
.st-btn-finalizar:hover {
    background: #059669;
}
.st-no-data {
    color: #94a3b8;
    text-align: center;
    padding: 2rem;
    background: #f8fafc;
    border-radius: 12px;
    font-style: italic;
}

/* Radios y checkboxes */
.st-boton, .st-boton-check {
    position: relative;
    display: inline-flex;
    background: #f1f5f9 !important;
    border-radius: 8px !important;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
    margin: 0;
    overflow: hidden;
}
.st-boton input, .st-boton-check input {
    position: absolute !important;
    width: 0 !important;
    height: 0 !important;
    opacity: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    pointer-events: none;
}
.st-boton span, .st-boton-check span {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: #000000 !important;
    background: transparent !important;
    border-radius: 8px;
    transition: all 0.2s;
    width: 100%;
    text-align: center;
    line-height: 1.2;
}
.st-boton input:checked + span, .st-boton-check input:checked + span {
    background: #000000 !important;
    color: white !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
.st-boton:hover, .st-boton-check:hover {
    background: #e2e8f0 !important;
}
.st-botonera, .st-botonera-multiple {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.5rem 0;
}
@media (max-width: 768px) {
    .st-boton, .st-boton-check { flex: 1 1 auto; min-width: 100px; }
    .st-boton span, .st-boton-check span { padding: 0.4rem 0.8rem; font-size: 0.8rem; }
}

/* Responsive general */
@media screen and (max-width: 768px) {
    .st-soporte-grid { display: block !important; width: 100% !important; }
    .st-soporte-form-card, .st-ticket-list-card { width: 100% !important; max-width: 100% !important; margin: 0 0 1rem 0 !important; padding: 1rem !important; }
    .st-form-soporte .st-form-row { flex-direction: column !important; gap: 0.75rem !important; margin-bottom: 0.75rem !important; }
    .st-form-soporte .st-form-group { width: 100% !important; flex: none !important; }
    .st-soporte-form-card .st-botonera { display: flex !important; flex-wrap: wrap !important; gap: 0.5rem !important; justify-content: flex-start !important; }
    .st-soporte-form-card .st-boton { flex: 0 1 auto !important; min-width: 70px !important; margin: 0 !important; }
    .st-soporte-form-card .st-boton span { padding: 0.4rem 0.6rem !important; font-size: 0.8rem !important; white-space: nowrap !important; }
    .st-ticket-table-responsive { overflow-x: auto !important; }
    .st-ticket-table { min-width: 600px !important; width: auto !important; }
    .st-ticket-table th, .st-ticket-table td { padding: 0.5rem 0.3rem !important; font-size: 0.75rem !important; white-space: nowrap !important; }
    .st-main-content { padding: 0.5rem !important; }
}

/* Botón descarga y cancelar */
.st-btn-descarga {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    background: #000000 !important;
    color: white !important;
    border: none;
    border-radius: 5px;
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    cursor: pointer;
}
.st-btn-descarga:hover {
    background: #333333 !important;
    transform: translateY(-2px);
}
.st-btn-cancelar {
    background: #f1f5f9;
    color: #000000 !important;
    border: 1px solid #000000 !important;
    padding: 0.5rem 1.5rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}
.st-btn-cancelar:hover {
    background: #e2e8f0;
}

/* Cotizador */
.st-cotizacion-tabla {
    overflow-x: auto;
    margin: 1rem 0;
}
.st-tabla-cotizacion {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}
.st-tabla-cotizacion th,
.st-tabla-cotizacion td {
    border: 1px solid #000000 !important;
    padding: 0.5rem;
    text-align: left;
    vertical-align: top;
    color: #000000 !important;
}
.st-tabla-cotizacion input {
    width: 100%;
    box-sizing: border-box;
    padding: 0.3rem;
    border: 1px solid #000000 !important;
    color: #000000 !important;
}
.st-cotizacion-totales {
    background: #f8fafc;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    text-align: right;
    border: 1px solid #000000 !important;
}
.st-total-line {
    margin: 0.5rem 0;
    font-size: 1rem;
    color: #000000 !important;
}
.st-total-line span:first-child {
    font-weight: 600;
    margin-right: 1rem;
}
.st-total-final {
    font-size: 1.2rem;
    font-weight: bold;
    color: #000000 !important;
}
.st-total-line input {
    width: 120px;
    display: inline-block;
    margin-left: 0.5rem;
    border: 1px solid #000000 !important;
}
@media (max-width: 768px) {
    .st-tabla-cotizacion th, .st-tabla-cotizacion td { padding: 0.3rem; font-size: 0.7rem; }
    .st-total-line { font-size: 0.9rem; }
}
.st-tabla-cotizacion thead tr {
    background: #000000 !important;
}
.st-tabla-cotizacion th {
    color: white !important;
}
.st-tabla-cotizacion td:first-child {
    background-color: #f8fafc;
    font-weight: 600;
    border-right: 1px solid #000000 !important;
}
.st-tabla-cotizacion td:first-child::before {
    font-family: 'remixicon';
    content: "\ec9f";
    margin-right: 8px;
    font-size: 1rem;
    vertical-align: middle;
    color: #000000 !important;
}

/* Login */
.st-login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.st-login-card {
    max-width: 440px;
    width: 100%;
    background: white;
    border-radius: 24px;
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.15);
    padding: 2.5rem 2rem;
}
.st-logo {
    text-align: center;
    margin-bottom: 2rem;
}
.st-logo img {
    max-width: 180px;
    height: auto;
}
.st-input-group {
    margin-bottom: 1.25rem;
}
.st-input-group label {
    display: block;
    color: #000000 !important;
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
}
.st-input-group input[type="text"],
.st-input-group input[type="email"],
.st-input-group input[type="password"] {
    width: 100%;
    padding: 0.9rem 1rem;
    background: #f8fafc;
    border: 2px solid #000000 !important;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.2s;
    color: #000000 !important;
}
.st-password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}
.st-password-wrapper input {
    width: 100%;
    padding-right: 40px;
}
.st-password-toggle {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    color: #000000 !important;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    width: 30px;
    height: 30px;
    transition: color 0.2s;
}
.st-password-toggle:hover {
    color: #000000 !important;
}
.st-input-group input:focus {
    outline: none;
    border-color: #000000 !important;
    box-shadow: 0 0 0 3px rgba(0,0,0,0.1);
}
.st-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    margin: 1.5rem 0;
}
.st-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #000000 !important;
    cursor: pointer;
}
.st-checkbox input {
    width: 16px;
    height: 16px;
    accent-color: #000000;
}
.st-options a {
    color: #000000 !important;
    text-decoration: none;
    font-weight: 500;
}
.st-options a:hover {
    text-decoration: underline;
}
.st-btn-acceso {
    width: 100%;
    padding: 0.9rem;
    background: #000000 !important;
    border: none;
    border-radius: 5px;
    color: white !important;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
}
.st-btn-acceso:hover {
    background: #333333 !important;
    transform: translateY(-2px);
}
.st-divider {
    text-align: center;
    color: #000000 !important;
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
    margin: 1.5rem 0;
}
.st-divider::before,
.st-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 45%;
    height: 1px;
    background: #000000 !important;
}
.st-divider::before { left: 0; }
.st-divider::after { right: 0; }
.st-social-column {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 1rem 0;
}
.st-btn-social {
    width: 100%;
    padding: 0.9rem;
    background: #000000 !important;
    border: none;
    border-radius: 5px;
    color: white !important;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    text-decoration: none;
}
.st-btn-social:hover {
    background: #333333 !important;
    transform: translateY(-2px);
}
.st-icon-cloud, .st-icon-factura {
    font-size: 1.2rem;
    line-height: 1;
    filter: brightness(0) invert(1);
}
.st-register {
    text-align: center;
    color: #000000 !important;
    font-size: 0.95rem;
    margin-top: 1.5rem;
}
.st-register a {
    color: #000000 !important;
    font-weight: 600;
    text-decoration: none;
}
.st-register a:hover {
    text-decoration: underline;
}
.st-error {
    background: #fff5f5;
    border-left: 4px solid #000000 !important;
    border-radius: 8px;
    color: #000000 !important;
    padding: 1rem 1rem 1rem 3rem;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.5;
    position: relative;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.3s ease;
}
.st-error::before {
    content: "\26A0\FE0F";
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.3rem;
    line-height: 1;
}
@keyframes slideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 480px) {
    .st-options { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
    .st-error { padding: 0.8rem 0.8rem 0.8rem 2.5rem; font-size: 0.85rem; }
    .st-error::before { left: 0.6rem; font-size: 1.2rem; }
    .st-login-card { padding: 1.5rem; }
}
.st-credits {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #000000 !important;
}
.st-credits-line1 {
    color: #000000 !important;
    font-size: 0.85rem;
    font-weight: 500;
}
.st-credits-line2 {
    color: #000000 !important;
    font-size: 0.7rem;
    margin-top: 0.25rem;
}

/* Subpestañas */
.st-subtabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #000000 !important;
    padding-bottom: 0.5rem;
}
.st-subtab-btn {
    background: none;
    border: none;
    padding: 0.6rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    color: #000000 !important;
    cursor: pointer;
    border-radius: 8px !important;
    transition: all 0.2s;
}
.st-subtab-btn.active {
    background: #000000 !important;
    color: white !important;
}
.st-subtab-content {
    display: none;
}
.st-subtab-content.active {
    display: block;
}

/* Ampliar columna Estado */
.st-tabla-registros th:nth-child(2),
.st-tabla-registros td:nth-child(2) {
    min-width: 150px !important;
}

.st-tabla-registros .st-estado-select {
    width: 100% !important;
    min-width: 140px !important;
    box-sizing: border-box !important;
}

/* Recursos tabs */
.st-recursos-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #000000 !important;
    padding-bottom: 0.5rem;
    flex-wrap: wrap;
}
.st-recursos-tab {
    background: none;
    border: none;
    padding: 0.6rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    color: #000000 !important;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
}
.st-recursos-tab.active {
    background: #000000 !important;
    color: white !important;
}
.st-recursos-panel {
    display: none;
}
.st-recursos-panel.active {
    display: block;
}

/* Resto de elementos varios */
.st-form-group .checkbox-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 5px;
}
.st-form-group .checkbox-group label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: normal;
    font-size: 0.9rem;
    color: #000000 !important;
}
.st-btn-icon {
    background: #000000 !important;
    border: none;
    color: white !important;
    width: 42px;
    height: 42px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    flex-shrink: 0;
    padding: 0;
    font-size: 1.2rem;
}
.st-btn-icon:hover {
    background: #333333 !important;
    transform: scale(1.05);
}
.st-fila-cliente input {
    height: 42px;
    box-sizing: border-box;
    border: 1px solid #000000 !important;
    color: #000000 !important;
}
#st_dni_ruc_hint {
    font-size: 0.7rem;
    margin-top: 2px;
    color: #000000 !important;
}
.st-modal .modal-btn {
    padding: 0.5rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    background: #000000 !important;
    color: white !important;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}
.st-modal .modal-btn:hover {
    background: #333333 !important;
}
.st-kpi-link.st-kpi-pendiente {
    background-color: #000000 !important;
    color: white !important;
    border-radius: 8px;
    display: block;
    text-decoration: none;
}
.st-kpi-link.st-kpi-pendiente .st-kpi-card {
    background-color: transparent !important;
    box-shadow: none;
}
.st-kpi-link.st-kpi-pendiente .st-kpi-icon {
    background: rgba(255, 255, 255, 0.2) !important;
    color: white !important;
}
.st-kpi-link.st-kpi-pendiente .st-kpi-value,
.st-kpi-link.st-kpi-pendiente .st-kpi-label {
    color: white !important;
}
.st-kpi-link.st-kpi-destacado {
    background-color: #000000 !important;
    color: white !important;
    border-radius: 8px;
    display: block;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}
.st-kpi-link.st-kpi-destacado:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 20px -8px rgba(0,0,0,0.5);
}
.st-kpi-link.st-kpi-destacado .st-kpi-card {
    background-color: transparent !important;
    box-shadow: none;
}
.st-kpi-link.st-kpi-destacado .st-kpi-icon {
    background: rgba(255, 255, 255, 0.2) !important;
    color: white !important;
}
.st-kpi-link.st-kpi-destacado .st-kpi-value,
.st-kpi-link.st-kpi-destacado .st-kpi-label {
    color: white !important;
}
.st-estado-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.estado-revision { background-color: #fef08a; color: #854d0e; }
.estado-entregado { background-color: #bbf7d0; color: #166534; }

/* Calculadora flotante */
.st-calc-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 55px;
    height: 55px;
    background: #000000 !important;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: all 0.3s;
    z-index: 999;
}
.st-calc-button i {
    font-size: 28px;
    color: white;
}
.st-calc-button:hover {
    transform: scale(1.08);
    box-shadow: 0 8px 25px rgba(0,0,0,0.5);
}
.st-calc-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(8px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}
.st-calc-card {
    background: white;
    width: 90%;
    max-width: 480px;
    border-radius: 8px;
    box-shadow: 0 30px 50px -20px rgba(0,0,0,0.4);
    animation: slideUpFade 0.4s;
    overflow: hidden;
}
.st-calc-header {
    padding: 1.6rem 1.5rem 1rem;
    text-align: center;
    border-bottom: 1px solid #f0f2f5;
    position: relative;
}
.st-calc-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
    background: linear-gradient(135deg, #1e293b, #334155);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.st-calc-close {
    position: absolute;
    top: 1.2rem;
    right: 1.2rem;
    font-size: 1.7rem;
    cursor: pointer;
    color: #94a3b8;
    transition: color 0.2s;
    line-height: 1;
}
.st-calc-close:hover {
    color: #000000;
}
.st-calc-tabs {
    display: flex;
    gap: 0.6rem;
    background: #f9fafb;
    padding: 0.8rem 1.5rem;
    border-bottom: 1px solid #eef2f6;
}
.st-calc-tab {
    flex: 1;
    background: white;
    border: none;
    padding: 0.65rem 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    color: #000000 !important;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.st-calc-tab.active {
    background: #000000 !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.st-calc-tab:not(.active):hover {
    background: #eef2ff;
    color: #000000 !important;
    transform: translateY(-1px);
}
.st-calc-body {
    padding: 1.6rem;
}
.st-calc-panel {
    display: none;
}
.st-calc-panel.active {
    display: block;
}
.st-calc-field label {
    display: block;
    font-weight: 600;
    color: #000000 !important;
    margin-bottom: 0.4rem;
    font-size: 0.85rem;
}
.st-calc-field input,
.st-calc-mode select {
    width: 100%;
    padding: 0.7rem 1rem;
    border: 1px solid #000000 !important;
    border-radius: 16px;
    font-size: 0.95rem;
    transition: all 0.2s;
    background: white;
    color: #000000 !important;
}
.st-calc-field input:focus,
.st-calc-mode select:focus {
    border-color: #000000 !important;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0,0,0,0.1);
}
.st-calc-extra {
    margin-bottom: 1.2rem;
    padding: 0.8rem;
    background: #f8fafc;
    border-radius: 16px;
}
.st-calc-extra input {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid #000000 !important;
    border-radius: 8px;
    margin-top: 0.3rem;
    color: #000000 !important;
}
.st-calc-result {
    background: linear-gradient(135deg, #fef2f2, #fff5f5);
    padding: 1.2rem;
    border-radius: 8px;
    text-align: center;
    margin: 1.2rem 0;
    border: 1px solid #fee2e2;
}
.st-calc-result span {
    font-size: 0.85rem;
    font-weight: 600;
    color: #000000 !important;
    text-transform: uppercase;
}
.st-calc-result strong {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: #000000 !important;
    margin-top: 0.3rem;
}
.st-calc-compare {
    font-size: 0.8rem;
    color: #000000 !important;
    background: #f9fafb;
    padding: 0.8rem;
    border-radius: 16px;
    margin-top: 1rem;
}
.st-calc-checkbox label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: #000000 !important;
    cursor: pointer;
}
.st-calc-checkbox input {
    width: 18px;
    height: 18px;
    accent-color: #000000;
}
.st-calc-diff.positive { background: #fef2f2; color: #dc2626; }
.st-calc-diff.negative { background: #f0fdf4; color: #16a34a; }
.st-calc-diff.neutral { background: #f9fafb; color: #6b7280; }

/* Modal flotante */
.st-floating-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(4px);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}
.st-floating-card {
    background: white;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    border-radius: 8px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUpFade 0.3s;
}
.st-floating-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.2rem;
    background: #000000 !important;
    color: white !important;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
}
.st-floating-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}
.st-floating-header .st-floating-close {
    font-size: 1.8rem;
    cursor: pointer;
    line-height: 1;
    transition: transform 0.2s;
}
.st-floating-header .st-floating-close:hover {
    transform: scale(1.1);
}
.st-floating-tabs {
    display: flex;
    gap: 0.6rem;
    background: #f9fafb;
    padding: 0.8rem 1.2rem;
    border-bottom: 1px solid #eef2f6;
}
.st-float-tab {
    flex: 1;
    background: white;
    border: none;
    padding: 0.65rem 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    color: #000000 !important;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.st-float-tab.active {
    background: #000000 !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.st-float-tab:not(.active):hover {
    background: #eef2ff;
    color: #000000 !important;
}
.st-floating-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}
.st-float-panel {
    display: none;
}
.st-float-panel.active {
    display: block;
}
.st-floating-open-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 55px;
    height: 55px;
    background: #000000 !important;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: all 0.3s;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
}
.st-floating-open-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 8px 25px rgba(0,0,0,0.5);
}
@media (max-width: 640px) {
    .st-floating-card { width: 95%; max-width: 95%; max-height: 90vh; }
    .st-floating-header h3 { font-size: 1rem; }
    .st-float-tab { padding: 0.4rem; font-size: 0.85rem; }
}

/* ===== SOLO PARA PANTALLAS PEQUEÑAS (MÓVIL) ===== */
@media (max-width: 768px) {

    /* Contenedor principal no se desborda */
    .st-main-content {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100vw !important;
        padding: 0.5rem !important;
        margin-left: 0 !important;
        margin-bottom: 55px !important;
    }

    /* Todas las tablas tendrán scroll horizontal */
    .st-reporte-tabla,
    .st-historial-tabla-wrapper,
    .st-clientes-tabla-wrapper,
    .st-ticket-table-responsive,
    .st-cotizacion-tabla {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        width: 100% !important;
        margin-bottom: 1rem !important;
    }

    /* Las tablas no rompen el layout */
    .st-tabla-registros,
    .st-historial-tabla,
    .st-clientes-tabla,
    .st-ticket-table {
        min-width: 600px !important;
        width: auto !important;
        font-size: 0.75rem !important;
    }

    /* Celdas más compactas */
    .st-tabla-registros th,
    .st-tabla-registros td,
    .st-historial-tabla th,
    .st-historial-tabla td,
    .st-clientes-tabla th,
    .st-clientes-tabla td,
    .st-ticket-table th,
    .st-ticket-table td {
        padding: 0.4rem 0.3rem !important;
        white-space: nowrap !important;
    }

    /* Botones de acción en tablas se ajustan */
    .st-btn-pdf,
    .st-btn-editar,
    .st-btn-eliminar,
    .st-btn-whatsapp,
    .st-btn-historial {
        width: 30px !important;
        height: 30px !important;
        font-size: 1rem !important;
        margin: 0 2px !important;
    }

    /* KPI grid: 1 columna */
    .st-kpi-grid {
        grid-template-columns: 1fr !important;
        gap: 0.8rem !important;
    }

    .st-kpi-card {
        padding: 0.8rem !important;
    }

    .st-kpi-value {
        font-size: 1.4rem !important;
    }

    /* Formularios: campos apilados */
    .st-form-row {
        flex-direction: column !important;
        gap: 0.5rem !important;
    }
    .st-form-group {
        width: 100% !important;
        min-width: auto !important;
    }
    .st-botonera {
        flex-wrap: wrap !important;
        justify-content: flex-start !important;
    }
    .st-boton span {
        padding: 0.3rem 0.8rem !important;
        font-size: 0.8rem !important;
    }

    /* Sidebar horizontal móvil */
    .st-sidebar {
        height: 50px !important;
        min-height: 50px !important;
    }

    /* Ocultar el botón flotante del cotizador si estorba */
    .st-floating-open-btn {
        bottom: 60px !important;
        right: 10px !important;
        width: 45px !important;
        height: 45px !important;
        font-size: 22px !important;
    }

    /* Modal flotante (cotizador) */
    .st-floating-card {
        width: 95% !important;
        max-width: 95% !important;
        height: 90vh !important;
        max-height: 90vh !important;
    }
    .st-floating-body {
        padding: 0.5rem !important;
    }
    .st-tabla-cotizacion {
        font-size: 0.7rem !important;
        min-width: 500px !important;
    }
    .st-tabla-cotizacion th,
    .st-tabla-cotizacion td {
        padding: 0.2rem !important;
    }

    /* Calculadora flotante */
    .st-calc-card {
        width: 95% !important;
        max-width: 95% !important;
    }
    .st-calc-grid {
        grid-template-columns: 1fr !important;
    }

    /* Pestañas de reportes y recursos */
    .st-subtabs,
    .st-recursos-tabs {
        flex-wrap: wrap !important;
        justify-content: center !important;
    }
    .st-subtab-btn,
    .st-recursos-tab {
        padding: 0.3rem 0.8rem !important;
        font-size: 0.8rem !important;
    }

    /* Mensajes de éxito/error */
    .st-success, .st-error {
        font-size: 0.85rem !important;
        padding: 0.8rem !important;
    }
    
    /* Asegurar que el modal de edición esté por encima del modal unificado */
    .st-modal {
        z-index: 9999;
    }
    #stModalEditarLicencia {
        z-index: 10000 !important;
    }
}