/* Reset y estilos base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    overflow-x: clip;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    -webkit-text-size-adjust: 100%;
}

/* --- ESTILOS DE AUTENTICACIÓN (LOGIN Y REGISTRO) --- */
body.auth-page {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #e8f6f5 0%, #d4f0ee 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #2c3e50;
}

.auth-container {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
}

.auth-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 35px 30px;
    box-shadow: 0 10px 25px rgba(0, 121, 107, 0.12);
    border: 1px solid #b2dfdb;
    text-align: center;
}

.auth-logo img {
    max-width: 160px;
    height: auto;
    margin-bottom: 15px;
    display: inline-block;
}

.auth-card h2 {
    font-size: 22px;
    color: #004d40;
    margin-bottom: 6px;
    font-weight: 700;
}

.auth-subtitle {
    font-size: 13px;
    color: #718096;
    margin-bottom: 25px;
}

.auth-card form {
    text-align: left;
}

.auth-footer {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #edf2f7;
    font-size: 13px;
    color: #718096;
    text-align: center;
}

.auth-footer a {
    color: #00796b;
    font-weight: 600;
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* --- ESTILOS DEL PANEL DE CONTROL (DASHBOARD) --- */
body.dashboard-page {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f7f8;
    color: #2c3e50;
    min-height: 100vh;
}

.dashboard-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.sidebar {
    width: 100%;
    background-color: #e8f6f5;
    border-bottom: 2px solid #b2dfdb;
    box-shadow: 0 2px 6px rgba(0, 121, 107, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 30px;
}

.sidebar-header {
    padding: 0 !important;
    text-align: left !important;
}

.sidebar-header .logo {
    max-width: 130px;
    height: auto;
    display: block;
}

.sidebar nav ul {
    display: flex;
    flex-direction: row;
    gap: 15px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar nav ul li a {
    text-decoration: none;
    color: #004d40;
    font-weight: 600;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.sidebar nav ul li a:hover,
.sidebar nav ul li.active a {
    color: #00796b;
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    border-bottom: 1px solid #d9e1e8;
    overflow-x: auto;
}

.tab {
    border: 0;
    border-bottom: 3px solid transparent;
    background: transparent;
    color: #52606d;
    cursor: pointer;
    font: inherit;
    font-weight: 600;
    padding: 12px 16px;
    white-space: nowrap;
}

.tab:hover,
.tab.active {
    color: #173f5f;
    border-bottom-color: #1f7a8c;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

header {
    background: #ffffff;
    padding: 14px 30px;
    border-bottom: 1px solid #e2e8f0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1750px;
    width: 96%;
    margin: 0 auto;
}

.header-content h2 {
    font-size: 20px;
    color: #1a252f;
    font-weight: 700;
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 14px;
}

.content-wrapper {
    flex: 1;
    width: 100%;
}

.main {
    max-width: 1750px;
    width: 96%;
    margin: 0 auto;
    padding: 14px 20px;
}

.doctors-layout {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(0, 2fr);
    gap: 15px;
    align-items: start;
}

.doctors-layout > .card:first-child {
    height: fit-content;
}

.doctors-table-container {
    margin-top: 10px;
    padding: 0;
    border: 0;
    box-shadow: none;
    overflow-x: auto;
}

.case-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px 14px;
}

/* COMPONENTES REUTILIZABLES */
.card {
    background: white;
    border-radius: 8px;
    padding: 14px 18px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    border: 1px solid #e2e8f0;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 8px;
}

.input-group label {
    font-size: 12px;
    font-weight: 600;
    color: #4a5568;
}

.input-group input,
.input-group select,
.input-group textarea {
    padding: 7px 10px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
    border-color: #00796b;
    box-shadow: 0 0 0 3px rgba(0, 121, 107, 0.15);
}

.btn {
    padding: 10px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    border: none;
    font-size: 14px;
    transition: background-color 0.2s, transform 0.1s;
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary { background-color: #00796b; color: white; }
.btn-primary:hover { background-color: #004d40; }

.btn-secondary { background-color: #718096; color: white; }
.btn-secondary:hover { background-color: #4a5568; }

.btn-full-width { width: 100%; text-align: center; }
.btn-sm { padding: 6px 12px; font-size: 13px; }

.table-container {
    background: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.04);
    border: 1px solid #e2e8f0;
}

.table {
    width: 100%;
    border-collapse: collapse;
    min-width: 640px;
}

.table th {
    background-color: #f8fafc;
    color: #4a5568;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10px 14px;
    border-bottom: 2px solid #e2e8f0;
    text-align: left;
    white-space: nowrap;
}

.table td {
    padding: 10px 14px;
    border-bottom: 1px solid #edf2f7;
    font-size: 14px;
    white-space: nowrap;
    vertical-align: middle;
}

/* --- CONTENEDOR Y TABLA DE CASOS (SCROLL INTERNO Y ENCABEZADOS FIJOS) --- */
.cases-table-container {
    background: #ffffff;
    border-radius: 8px;
    padding: 0 !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04);
    border: 1px solid #e2e8f0;
    overflow: auto;
    max-height: calc(100vh - 220px);
    min-height: 360px;
    position: relative;
}

.cases-table-container::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
.cases-table-container::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}
.cases-table-container::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
.cases-table-container::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

#cases-table {
    width: 100%;
    min-width: 1160px;
    border-collapse: separate;
    border-spacing: 0;
}

#cases-table thead th {
    position: sticky !important;
    top: 0;
    z-index: 20;
    background-color: #f8fafc;
    color: #4a5568;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10px 10px;
    border-bottom: 2px solid #cbd5e1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
    white-space: nowrap;
}

#cases-table thead th:first-child {
    border-top-left-radius: 8px;
}

#cases-table thead th:last-child {
    border-top-right-radius: 8px;
}

#cases-table tbody td {
    padding: 8px 10px;
    border-bottom: 1px solid #edf2f7;
    font-size: 13px;
    white-space: nowrap;
    vertical-align: middle;
}

.case-id-cell {
    cursor: pointer;
}

.case-id-link {
    font-weight: bold;
    color: #004d40;
    text-decoration: none;
    cursor: pointer;
    display: inline-block;
    transition: color 0.15s ease, text-decoration 0.15s ease;
}

.case-id-cell:hover .case-id-link,
.case-id-link:hover {
    color: #00796b;
    text-decoration: underline;
}

.case-filters select,
.case-filters input,
#case-search,
#doctor-search,
#doctor-sort,
#distributor-search,
#manufacturer-search,
.toolbar-actions input[type="search"],
.toolbar-actions select,
#product-form input,
#user-form input,
.trace-row input,
.trace-row select {
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    background: #fff;
    color: #2c3e50;
    font-size: 14px;
    box-sizing: border-box;
}

#case-search,
#doctor-search,
#distributor-search,
#manufacturer-search,
.toolbar-actions input[type="search"] {
    min-width: 250px;
    height: 38px;
}

#doctor-sort,
.toolbar-actions select {
    min-width: 190px;
    height: 38px;
    cursor: pointer;
}

.case-filters select:focus,
.case-filters input:focus,
#case-search:focus,
#doctor-search:focus,
#doctor-sort:focus,
#distributor-search:focus,
#manufacturer-search:focus,
.toolbar-actions input[type="search"]:focus,
.toolbar-actions select:focus,
#product-form input:focus,
#user-form input:focus,
.trace-row input:focus {
    outline: none;
    border-color: #00796b;
    box-shadow: 0 0 0 3px rgba(0, 121, 107, 0.15);
}

.urgency-dot {
    display: inline-block;
    width: 11px;
    height: 11px;
    margin-right: 7px;
    border-radius: 50%;
    vertical-align: middle;
    border: 1px solid rgba(0, 0, 0, 0.2);
}

.urgency-rojo { background: #d32f2f; }
.urgency-naranja { background: #f57c00; }
.urgency-verde { background: #388e3c; }

.semaforo-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 8px;
    border-radius: 4px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    cursor: default;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.semaforo-badge:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.global-floating-tooltip {
    position: absolute;
    display: none;
    opacity: 0;
    background-color: #0f172a;
    color: #f8fafc;
    text-align: left;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.45;
    max-width: 340px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.2);
    z-index: 999999;
    pointer-events: none;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: opacity 0.12s ease;
}

.trace-row {
    display: grid;
    grid-template-columns: 150px 150px minmax(180px, 1fr) 140px;
    gap: 10px;
    align-items: center;
    margin-top: 10px;
}

.trace-row label {
    font-weight: 600;
    color: #4a5568;
}

.trace-row a[aria-disabled="true"] {
    opacity: 0.6;
    pointer-events: none;
}

.case-timeline-layout {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 16px;
    align-items: start;
}

.timeline-history-pane {
    min-width: 0;
}

.timeline-advance-pane {
    min-width: 0;
}

#timeline-list {
    margin: 0;
    padding-left: 0;
    list-style: none;
}

#timeline-list li {
    padding: 10px 12px;
    border-left: 3px solid #00796b;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #00796b;
    border-radius: 6px;
    margin-bottom: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

#timeline-list small {
    color: #718096;
}

#products-list,
#users-list {
    margin-top: 18px;
    overflow-x: auto;
}

.catalog-form {
    display: grid;
    grid-template-columns: repeat(3, minmax(140px, 1fr));
    gap: 10px;
    margin: 15px 0;
}

.catalog-form input {
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
}

.catalog-form select {
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    background: #fff;
}

.list-toolbar,
.detail-actions,
.toolbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.list-toolbar {
    justify-content: space-between;
    margin-bottom: 16px;
}

.toolbar-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
}

.muted {
    color: #718096;
    font-size: 13px;
    margin-top: 4px;
}

.detail-actions {
    justify-content: flex-end;
    flex-wrap: wrap;
    margin-top: 18px;
}

.btn-danger {
    background-color: #c53030;
    color: white;
}

.btn-danger:hover {
    background-color: #9b2c2c;
}

.product-detail-form,
.doctor-detail-form {
    margin-bottom: 20px;
}

.doctor-associated {
    margin-top: 8px;
    font-size: 12px;
}

.doctor-associated summary {
    cursor: pointer;
    color: #00796b;
    font-weight: 700;
    padding: 5px 0;
}

.associated-block {
    margin: 8px 0;
    padding: 8px;
    background: #f8fafc;
    border-left: 3px solid #80cbc4;
}

.associated-item {
    margin-top: 5px;
    padding-top: 5px;
    border-top: 1px solid #e2e8f0;
}

.clinic-form,
.contact-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(100px, 1fr));
    gap: 6px;
    margin: 8px 0 12px;
}

.clinic-form input,
.contact-form input {
    min-height: 30px;
    padding: 5px 7px;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    font-size: 12px;
}

.alert {
    margin-bottom: 15px;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
}
.alert-info { background-color: #e0f2fe; color: #0369a1; border: 1px solid #bae6fd; }
.alert-danger { background-color: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.alert-success { background-color: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }

.confirm-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(26, 37, 47, 0.42);
}

.confirm-dialog {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 16px 40px rgba(26, 37, 47, 0.2);
    max-width: 480px;
    width: 100%;
    padding: 24px;
}

.confirm-dialog h3 {
    margin-bottom: 10px;
    color: #1a252f;
}

.confirm-dialog p {
    color: #52606d;
    line-height: 1.5;
}

.confirm-dialog strong {
    color: #1a252f;
}

.confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

/* --- ESTILOS DE ORDENACIÓN EN TABLAS (TIPO EXCEL) --- */
th.sortable {
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
    padding: 10px 12px;
    white-space: nowrap;
    position: relative;
}

th.sortable:hover {
    background-color: #e0f2f1;
    color: #004d40;
}

th.sortable .sort-icon {
    display: inline-block;
    margin-left: 6px;
    font-size: 11px;
    color: #94a3b8;
    vertical-align: middle;
}

th.sortable.sort-asc {
    background-color: #e8f5e9;
    color: #1b5e20;
    border-bottom: 2px solid #2e7d32 !important;
}

th.sortable.sort-asc .sort-icon {
    color: #2e7d32;
    font-weight: bold;
}

th.sortable.sort-desc {
    background-color: #e8f5e9;
    color: #1b5e20;
    border-bottom: 2px solid #2e7d32 !important;
}

th.sortable.sort-desc .sort-icon {
    color: #2e7d32;
    font-weight: bold;
}

.tipologia-tag {
    display: inline-block;
    background: #f1f5f9;
    color: #334155;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 500;
    border: 1px solid #cbd5e1;
}

.distribuidor-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 600;
    border: 1px solid #bae6fd;
    background: #e0f2fe;
    color: #0369a1;
}

/* Distribuidor: Ixom (azul original) */
.distribuidor-tag-ixom {
    background: #e0f2fe;
    color: #0369a1;
    border-color: #bae6fd;
}

/* Distribuidor: Maffinter (rojo pálido) */
.distribuidor-tag-maffinter {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fecaca;
}

/* Distribuidores adicionales */
.distribuidor-tag-emerald {
    background: #dcfce7;
    color: #166534;
    border-color: #bbf7d0;
}

.distribuidor-tag-purple {
    background: #f3e8ff;
    color: #6b21a8;
    border-color: #e9d5ff;
}

.distribuidor-tag-amber {
    background: #fef3c7;
    color: #92400e;
    border-color: #fde68a;
}

.distribuidor-directa {
    color: #64748b;
    font-size: 0.85em;
    font-weight: 500;
}

/* --- ESTILOS DE FICHA DE CASO COMPACTA Y PESTAÑAS --- */
.case-section-box {
    background: #ffffff;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.case-section-box.section-highlight {
    background: #fafbfc;
    border-left: 4px solid #00796b;
}

.case-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid #edf2f7;
}

.case-section-header h3 {
    font-size: 14px;
    color: #0f172a;
    font-weight: 700;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.live-save-status {
    font-size: 11px;
    color: #059669;
    font-weight: 600;
    background: #ecfdf5;
    padding: 2px 8px;
    border-radius: 10px;
    border: 1px solid #a7f3d0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: opacity 0.3s ease;
}

.case-tabs-nav {
    display: flex;
    gap: 6px;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 12px;
}

.case-tab-btn {
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: -2px;
    border-radius: 6px 6px 0 0;
}

.case-tab-btn:hover {
    color: #00796b;
    background: #f8fafc;
}

.case-tab-btn.active {
    color: #00796b;
    border-bottom-color: #00796b;
    background: #f0fdfa;
}

.case-tab-pane {
    display: none;
}

.case-tab-pane.active {
    display: block;
}

/* --- BOTONES DE NAVEGACIÓN ENTRE CASOS (← TÍTULO →) --- */
.case-nav-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-case-arrow-btn,
.nav-doctor-arrow-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 6px;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #00796b;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    padding: 0;
    line-height: 1;
    user-select: none;
}

.nav-case-arrow-btn:hover:not(:disabled),
.nav-doctor-arrow-btn:hover:not(:disabled) {
    background: #00796b;
    color: #ffffff;
    border-color: #004d40;
    box-shadow: 0 2px 4px rgba(0, 121, 107, 0.2);
}

.nav-case-arrow-btn:disabled,
.nav-doctor-arrow-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    background: #f8fafc;
    color: #94a3b8;
    border-color: #e2e8f0;
    box-shadow: none;
}

/* ==========================================================================
   SISTEMA DE DISEÑO MÓVIL Y RESPONSIVO (CERO DESPLAZAMIENTO HORIZONTAL)
   ========================================================================== */

@media (max-width: 992px) {
    .main {
        max-width: 100%;
        width: 100%;
        padding: 14px 16px;
    }

    .doctors-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    /* 1. Prevención Global de Desbordamiento */
    * {
        max-width: 100%;
    }

    html, body {
        overflow-x: hidden !important;
        width: 100% !important;
        position: relative;
    }

    .dashboard-layout,
    .content-wrapper,
    .main,
    .container,
    .card,
    .table-container,
    .doctors-table-container,
    #products-list,
    #users-list {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }

    .main {
        padding: 10px 12px !important;
    }

    /* 2. Barra Superior y Navegación en Cuadrícula 2x2 */
    .sidebar {
        flex-direction: column !important;
        padding: 10px 12px !important;
        gap: 10px !important;
        align-items: stretch !important;
    }

    .sidebar-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    .sidebar-header .logo {
        max-width: 115px;
    }

    .sidebar nav {
        width: 100%;
    }

    .sidebar nav ul {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 6px !important;
        width: 100% !important;
        padding: 0 !important;
    }

    .sidebar nav ul li {
        width: 100% !important;
    }

    .sidebar nav ul li a {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        padding: 10px 6px !important;
        font-size: 13px !important;
        border-radius: 6px !important;
        background: rgba(255, 255, 255, 0.75);
        border: 1px solid #b2dfdb;
        color: #004d40;
    }

    .sidebar nav ul li.active a {
        background: #00796b !important;
        color: #ffffff !important;
        border-color: #004d40 !important;
    }

    header {
        padding: 10px 12px !important;
    }

    .header-content {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 8px !important;
        width: 100% !important;
    }

    .header-content h2 {
        font-size: 17px;
    }

    .user-actions {
        width: 100%;
        justify-content: space-between;
        font-size: 13px;
    }

    /* 3. Toolbar y Filtros */
    .dashboard-toolbar,
    .dashboard-filters-toolbar {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
    }

    .dashboard-actions {
        width: 100% !important;
        flex-direction: column !important;
        align-items: stretch !important;
        margin-left: 0 !important;
    }

    #case-search,
    #doctor-search,
    #doctor-sort,
    #distributor-search,
    #manufacturer-search,
    .toolbar-actions input[type="search"],
    .toolbar-actions select,
    .case-filters select {
        width: 100% !important;
        min-width: 0 !important;
        min-height: 42px;
        font-size: 15px;
    }

    .case-filters {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
        width: 100% !important;
    }

    .list-toolbar {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
    }

    .toolbar-actions {
        width: 100% !important;
        justify-content: stretch !important;
        gap: 8px !important;
    }

    .toolbar-actions > * {
        width: 100% !important;
    }

    /* 4. Pestañas en Cuadrícula (Sin Desplazamiento Horizontal) */
    .tabs {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 6px !important;
        overflow-x: hidden !important;
        border-bottom: none !important;
        margin-bottom: 14px !important;
    }

    .tab {
        border: 1px solid #cbd5e1 !important;
        border-radius: 6px !important;
        padding: 10px 6px !important;
        text-align: center !important;
        font-size: 12px !important;
        white-space: normal !important;
        line-height: 1.25 !important;
        background: #f8fafc;
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 40px;
    }

    .tab.active {
        background: #00796b !important;
        color: #ffffff !important;
        border-color: #004d40 !important;
        font-weight: 700;
    }

    .case-tabs-nav {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 6px !important;
        border-bottom: none !important;
        margin-bottom: 12px !important;
    }

    .case-tab-btn {
        border: 1px solid #cbd5e1 !important;
        border-radius: 6px !important;
        padding: 10px 8px !important;
        text-align: center !important;
        font-size: 12px !important;
        white-space: normal !important;
        background: #f8fafc;
        min-height: 40px;
    }

    .case-tab-btn.active {
        background: #00796b !important;
        color: #ffffff !important;
        border-color: #004d40 !important;
        font-weight: 700;
    }

    /* 5. TRANSFORMACIÓN DE TABLAS A TARJETAS VERTICALES NATIVAS (MOBILE CARDS) */
    .table-container,
    .cases-table-container,
    .doctors-table-container,
    #products-list,
    #users-list {
        padding: 0 !important;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        overflow-x: hidden !important;
        overflow: visible !important;
        max-height: none !important;
        min-height: 0 !important;
        width: 100% !important;
    }

    .table,
    #cases-table {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        border: none !important;
        background: transparent !important;
    }

    .table thead {
        display: none !important;
    }

    .table tbody {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
        width: 100% !important;
    }

    .table tr {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        background: #ffffff !important;
        border: 1px solid #e2e8f0 !important;
        border-radius: 8px !important;
        padding: 12px 14px !important;
        box-shadow: 0 1px 4px rgba(0,0,0,0.04) !important;
        gap: 8px !important;
        box-sizing: border-box !important;
    }

    .table td {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 5px 0 !important;
        border-bottom: 1px dashed #f1f5f9 !important;
        font-size: 13px !important;
        white-space: normal !important;
        width: 100% !important;
        box-sizing: border-box !important;
        word-break: break-word !important;
    }

    .table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #64748b;
        font-size: 12px;
        margin-right: 12px;
        flex-shrink: 0;
        text-align: left;
    }

    .table td:last-child {
        border-bottom: none !important;
        padding-top: 8px !important;
        justify-content: stretch !important;
    }

    .table td:last-child > * {
        width: 100% !important;
        text-align: center !important;
        display: block !important;
        box-sizing: border-box !important;
        padding: 9px 12px !important;
    }

    .table td .visor-version-select {
        max-width: 100% !important;
        width: auto !important;
        flex: 1;
    }

    .table td input[type="text"],
    .table td input[type="number"] {
        width: 100% !important;
        max-width: 180px !important;
        border: 1px solid #cbd5e1 !important;
        padding: 6px 8px !important;
        border-radius: 4px !important;
        font-size: 14px !important;
    }

    /* 6. Formularios y Bloques en 1 Columna */
    .doctors-layout,
    .case-grid,
    .catalog-form,
    .clinic-form,
    .contact-form,
    .piece-form-grid,
    .case-timeline-layout {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    .input-group input,
    .input-group select,
    .input-group textarea,
    .btn {
        font-size: 15px;
        min-height: 42px;
    }

    .trace-row {
        grid-template-columns: 1fr !important;
        background: #f8fafc;
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        padding: 12px;
        gap: 8px;
        margin-top: 10px;
    }

    .trace-row > * {
        width: 100% !important;
    }

    .trace-row a.btn {
        text-align: center;
    }

    /* 7. Diálogos Modales */
    .confirm-dialog {
        width: 95% !important;
        max-width: 95% !important;
        padding: 18px 14px !important;
        margin: 10px auto !important;
    }

    .confirm-actions {
        flex-direction: column-reverse !important;
        gap: 8px !important;
    }

    .confirm-actions button {
        width: 100% !important;
        min-height: 42px;
    }
}

@media (max-width: 480px) {
    .case-filters {
        grid-template-columns: 1fr !important;
    }

    .tabs {
        grid-template-columns: 1fr !important;
    }

    .sidebar nav ul {
        grid-template-columns: 1fr 1fr !important;
    }
}

/* --- MATRIZ EXCEL DE CATÁLOGO DE PRODUCTOS --- */
.matrix-container {
    overflow-x: auto;
    max-width: 100%;
    margin-top: 15px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.excel-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    color: #1e293b;
}

.excel-table th, .excel-table td {
    border: 1px solid #e2e8f0;
    padding: 6px 8px;
    vertical-align: middle;
}

.excel-table th {
    background: #f8fafc;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 2;
}

.excel-table tr:hover td {
    background-color: #f8fafc;
}

.excel-group-direct {
    background: #e0f2fe !important;
    color: #0369a1 !important;
}

.excel-group-dist {
    background: #d1fae5 !important;
    color: #065f46 !important;
}

.excel-group-fab {
    background: #ede9fe !important;
    color: #5b21b6 !important;
}

.excel-cell-input {
    width: 100%;
    border: 1px solid transparent;
    background: transparent;
    padding: 5px 6px;
    border-radius: 4px;
    font-size: 13px;
    font-family: inherit;
    color: inherit;
    text-align: right;
    box-sizing: border-box;
    transition: all 0.15s ease-in-out;
}

.excel-cell-input:hover {
    border-color: #94a3b8;
    background: #ffffff;
}

.excel-cell-input:focus {
    border-color: #0284c7;
    background: #ffffff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.2);
}

.excel-cell-locked {
    cursor: default !important;
    pointer-events: none;
}

.excel-cell-locked:hover {
    border-color: transparent !important;
    background: transparent !important;
}

.excel-cell-editable {
    background: #ffffff !important;
    border-color: #cbd5e1 !important;
    cursor: text !important;
}

.excel-cell-editable:hover {
    border-color: #0284c7 !important;
}

.excel-cell-text {
    text-align: left;
    font-weight: 500;
}

.excel-cell-select {
    text-align: left;
    font-weight: 500;
    cursor: pointer !important;
}

.edit-mode-active-btn {
    background-color: #f59e0b !important;
    color: #ffffff !important;
    border-color: #d97706 !important;
}

/* --- AVISOS FLOTANTES (TOASTS) --- */
#floating-toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
    max-width: 420px;
    width: calc(100% - 48px);
}

.floating-toast {
    pointer-events: auto;
    background: #fffbeb;
    color: #78350f;
    border: 1px solid #fde68a;
    border-left: 5px solid #f59e0b;
    border-radius: 8px;
    padding: 12px 16px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    font-size: 13.5px;
    line-height: 1.45;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.floating-toast-icon {
    font-size: 18px;
    line-height: 1;
    flex-shrink: 0;
}

.floating-toast-content {
    flex-grow: 1;
}

.floating-toast-close {
    background: none;
    border: none;
    color: #92400e;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    padding: 0;
    margin-left: 4px;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.15s ease;
}

.floating-toast-close:hover {
    opacity: 1;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateY(-16px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* --- TRAZABILIDAD DOCUMENTAL --- */
.traceability-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 14px;
    margin-top: 6px;
}

.trace-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
    display: flex;
    flex-direction: column;
}

.trace-card-header {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 9px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.trace-card-title {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
}

.trace-card-icon {
    font-size: 15px;
}

.trace-count-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 10px;
    background: #e2e8f0;
    color: #475569;
}

.trace-card-body {
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.trace-docs-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 220px;
    overflow-y: auto;
}

.trace-empty-msg {
    font-size: 12px;
    color: #94a3b8;
    font-style: italic;
    padding: 8px 4px;
    text-align: center;
    background: #f8fafc;
    border-radius: 6px;
    border: 1px dashed #e2e8f0;
}

.trace-doc-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 3px solid #00796b;
    border-radius: 6px;
    padding: 7px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    transition: background 0.15s ease;
}

.trace-doc-item:hover {
    background: #f1f5f9;
}

.trace-doc-main {
    flex: 1;
    min-width: 0;
}

.trace-doc-header {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 2px;
}

.trace-version-badge {
    background: #00796b;
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 4px;
    text-transform: uppercase;
}

.trace-filename {
    font-size: 12px;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
}

.trace-date-badge {
    font-size: 11px;
    color: #64748b;
    margin-left: auto;
}

.trace-doc-note {
    font-size: 11px;
    color: #475569;
    background: #ffffff;
    padding: 3px 6px;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
    margin-top: 3px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.trace-note-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.trace-edit-note-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    font-size: 11px;
    color: #0284c7;
    opacity: 0.8;
}

.trace-edit-note-btn:hover {
    opacity: 1;
}

.trace-doc-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.trace-action-btn {
    padding: 4px 8px !important;
    font-size: 11px !important;
    height: 28px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    white-space: nowrap !important;
}

.trace-delete-btn {
    background-color: #fee2e2 !important;
    color: #b91c1c !important;
    border: 1px solid #fecaca !important;
    padding: 4px 7px !important;
    font-size: 11px !important;
    height: 28px !important;
    border-radius: 4px !important;
    cursor: pointer !important;
}

.trace-delete-btn:hover {
    background-color: #fecaca !important;
}

.trace-upload-box {
    background: #ffffff;
    border-top: 1px dashed #cbd5e1;
    padding-top: 8px;
    margin-top: auto;
}

.trace-upload-form {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.trace-file-select-row {
    display: flex;
    gap: 6px;
    align-items: center;
}

.trace-file-input {
    font-size: 11px;
    color: #475569;
    flex: 1;
    min-width: 0;
}

.trace-note-input {
    width: 100%;
    padding: 4px 8px;
    font-size: 11px;
    border-radius: 4px;
    border: 1px solid #cbd5e1;
    box-sizing: border-box;
}

.trace-upload-btn {
    padding: 4px 10px !important;
    font-size: 11px !important;
    height: 28px !important;
    white-space: nowrap !important;
}

@media (max-width: 768px) {
    .traceability-grid {
        grid-template-columns: 1fr;
    }
}

/* ====================================================
   SEARCHABLE SELECT COMPONENT (Doctor Solicitante)
   ==================================================== */
.searchable-select-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.searchable-select-wrapper .searchable-select-input {
    width: 100%;
    height: 38px;
    padding: 7px 48px 7px 10px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    font-size: 13px;
    outline: none;
    box-sizing: border-box;
    background-color: #ffffff;
    transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.searchable-select-wrapper .searchable-select-input:focus {
    border-color: #00796b;
    box-shadow: 0 0 0 3px rgba(0, 121, 107, 0.15);
}

.searchable-select-wrapper .searchable-select-input:disabled {
    background-color: #f8fafc;
    color: #475569;
    cursor: default;
    border-color: #e2e8f0;
}

.searchable-select-wrapper .searchable-select-clear {
    position: absolute;
    right: 26px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    font-size: 16px;
    line-height: 1;
    color: #94a3b8;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
    display: none;
    transition: color 0.15s, background-color 0.15s;
}

.searchable-select-wrapper .searchable-select-clear:hover {
    color: #ef4444;
    background-color: #fee2e2;
}

.searchable-select-wrapper .searchable-select-arrow {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    font-size: 11px;
    color: #64748b;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, color 0.2s ease;
}

.searchable-select-wrapper.is-open .searchable-select-arrow {
    transform: translateY(-50%) rotate(180deg);
    color: #00796b;
}

.searchable-select-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 250px;
    overflow-y: auto;
    background: #ffffff;
    border: 1.5px solid #00796b;
    border-radius: 6px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.08);
    z-index: 1050;
    padding: 4px 0;
    margin: 0;
    list-style: none;
}

.searchable-select-item {
    padding: 8px 12px;
    font-size: 13px;
    color: #1e293b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background-color 0.12s ease;
}

.searchable-select-item:hover,
.searchable-select-item.highlighted {
    background-color: #f0fdfa;
    color: #00796b;
}

.searchable-select-item.selected {
    background-color: #e6fffa;
    color: #004d40;
    font-weight: 600;
}

.searchable-select-item .doc-subtext {
    font-size: 11px;
    color: #64748b;
    margin-left: 8px;
    font-weight: normal;
}

.searchable-select-no-results {
    padding: 12px 14px;
    font-size: 12px;
    color: #64748b;
    text-align: center;
    font-style: italic;
}

/* ==========================================================================
   PRESENCE & COLLABORATIVE CURSORS SYSTEM
   ========================================================================== */

.presence-header-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-right: 6px;
    flex-shrink: 0;
}

.presence-active-users {
    display: inline-flex;
    align-items: center;
}

.presence-avatar-group {
    display: inline-flex;
    align-items: center;
}

.presence-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    margin-left: -6px;
    position: relative;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, z-index 0.15s ease;
    user-select: none;
    flex-shrink: 0;
}
.presence-avatar:first-child {
    margin-left: 0;
}
.presence-avatar:hover {
    transform: translateY(-2px) scale(1.1);
    z-index: 20;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
}

.presence-avatar.same-page {
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.35);
}

.presence-status-dot {
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #22c55e;
    border: 1.5px solid #ffffff;
}

.presence-collab-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 10px;
    line-height: 1;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
    animation: collabBadgeBounce 2s infinite;
}

@keyframes collabBadgeBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-2px); }
}

.presence-more-count {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: #475569;
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: -6px;
    border: 2px solid #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
    cursor: pointer;
    user-select: none;
    flex-shrink: 0;
}
.presence-more-count:hover {
    transform: translateY(-2px) scale(1.1);
    z-index: 20;
}

.presence-alone-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    background: #f1f5f9;
    color: #64748b;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    user-select: none;
    border: 1px solid #e2e8f0;
}
.presence-alone-badge .presence-pulse-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #22c55e;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
    0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
    70% { box-shadow: 0 0 0 4px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* Collab Punteros Button */
.btn-collab-cursor {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    line-height: 1.4;
    white-space: nowrap;
}
.btn-collab-cursor:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #1e293b;
}

.btn-collab-cursor.active {
    background: #eef2ff;
    border-color: #6366f1;
    color: #4338ca;
    font-weight: 600;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.25);
    animation: collabPulse 2.5s infinite;
}

@keyframes collabPulse {
    0% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(99, 102, 241, 0); }
    100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
}

/* Toast Notifications */
.zyntra-collab-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #1e293b;
    color: #ffffff;
    padding: 10px 16px;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    font-size: 13px;
    z-index: 1000000;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
}
.zyntra-collab-toast.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Remote Cursors Layer & Items */
#zyntra-collab-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none !important;
    z-index: 999999;
    overflow: visible;
}

.zyntra-remote-cursor {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none !important;
    will-change: transform, opacity;
    transition: transform 0.07s linear, opacity 0.3s ease;
    z-index: 999999;
    user-select: none;
}
.zyntra-remote-cursor * {
    pointer-events: none !important;
}

/* --- TOGGLE SWITCH (AJUSTES / USUARIOS) --- */
.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    margin: 0;
    vertical-align: middle;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: .25s ease-in-out;
    border-radius: 26px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .25s ease-in-out;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.switch input:checked + .slider {
    background-color: #0f766e;
}

.switch input:focus + .slider {
    box-shadow: 0 0 1px #0f766e;
}

.switch input:checked + .slider:before {
    transform: translateX(22px);
}









