:root {
            --primary-light-blue: #60a5fa; 
            --primary-dark-blue: #3b82f6; 
            --black: #000000;
            --text-dark: #1f2937;
            --text-gray: #6b7280;
            --border-color: #e5e7eb;
            --bg-light: #f9fafb;
            --white: #ffffff;
            --badge-orange: #f59e0b;

            /* Colores pasteles para estadísticas */
            --stat-purple: #e9d5ff;
            --stat-green: #d1fae5;
            --stat-pink: #fce7f3;
            --stat-yellow: #fef08a;
            --stat-blue: #e0f2fe;
            --toggle-on: #f97316;

            /* Volki core adaptado a Bella Vet */
            --volki-purple: #3b82f6;
            --volki-purple-light: #e0f2fe;
            --volki-purple-hover: #1d4ed8;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Inter', sans-serif;
        }

        body {
            background-color: var(--bg-light);
            color: var(--text-dark);
            height: 100vh;
            overflow: hidden;
        }

        /* =========================================
           PANTALLA DE LOGIN
        ========================================= */
        #loginPage {
            display: flex;
            height: 100vh;
            width: 100vw;
            background-color: var(--white);
            position: fixed;
            top: 0; left: 0; z-index: 1000;
        }

        .login-left {
            flex: 1.2;
            background: linear-gradient(135deg, var(--primary-dark-blue), var(--primary-light-blue));
            border-bottom-right-radius: 30% 100%;
            border-top-right-radius: 20% 50%;
            box-shadow: 5px 0 25px rgba(0,0,0,0.1);
        }

        .login-right {
            flex: 1; display: flex; align-items: center; justify-content: center; background-color: var(--white);
        }

        .login-box {
            width: 100%; max-width: 320px; text-align: center; display: flex; flex-direction: column;
        }

        .login-title {
            font-size: 28px; font-weight: 700; color: var(--black); margin-bottom: 8px;
            display: flex; align-items: center; justify-content: center; gap: 8px;
        }

        .login-subtitle { font-size: 14px; color: var(--black); margin-bottom: 32px; font-weight: 500; }

        .login-input {
            width: 100%; padding: 12px 14px; margin-bottom: 16px; border: 1px solid var(--border-color);
            border-radius: 4px; font-size: 13px; outline: none; transition: border-color 0.2s;
        }
        .login-input:focus { border-color: var(--black); }

        .login-link { font-size: 12px; color: var(--primary-dark-blue); text-decoration: none; margin-bottom: 24px; font-weight: 500; }
        .login-link:hover { text-decoration: underline; }

        .login-btn {
            width: 100%; background-color: var(--black); color: var(--white); padding: 12px;
            border: none; border-radius: 4px; font-size: 14px; font-weight: 600; cursor: pointer;
        }
        .login-btn:hover { opacity: 0.8; }
        .login-btn:disabled { background-color: var(--text-gray); cursor: not-allowed; opacity: 0.6; }

        /* =========================================
           MODALES GENERALES
        ========================================= */
        .modal-overlay {
            position: fixed;
            top: 0; left: 0; width: 100vw; height: 100vh;
            background-color: rgba(0, 0, 0, 0.6); display: none;
            align-items: center; justify-content: center; z-index: 2000; backdrop-filter: blur(3px);
        }

        .modal-box {
            background-color: var(--white); width: 100%; max-width: 460px;
            border-radius: 8px; padding: 24px; text-align: left; box-shadow: 0 10px 25px rgba(0,0,0,0.2); position: relative;
        }

        .modal-close { position: absolute; top: 16px; right: 16px; cursor: pointer; color: var(--text-gray); }
        .modal-header { display: flex; justify-content: space-between; align-items: center; font-size: 16px; font-weight: 700; color: var(--black); margin-bottom: 16px; }
        .modal-footer { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
        .btn-close { background: none; border: none; color: var(--text-gray); font-weight: 600; font-size: 13px; cursor: pointer; padding: 10px 16px; }
        .btn-save { background-color: #6d28d9; color: var(--white); border: none; border-radius: 4px; font-weight: 600; font-size: 13px; cursor: pointer; padding: 10px 20px; }
        .mish-rec-row.vencido { border-left: 3px solid #ef4444; }
        .mish-rec-row.hoy { border-left: 3px solid #f59e0b; }
        .mish-rec-row.proximo { border-left: 3px solid #10b981; }
        .mish-rec-row.completado { opacity: 0.55; }
        .mish-status-chip { font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 12px; display: inline-block; }
        .mish-status-chip.vencido { background:#fee2e2; color:#b91c1c; }
        .mish-status-chip.hoy { background:#fef3c7; color:#92400e; }
        .mish-status-chip.proximo { background:#d1fae5; color:#065f46; }
        .mish-status-chip.completado { background:#e5e7eb; color:#4b5563; }
        .mish-status-chip.pendiente { background:#e0e7ff; color:#3730a3; }
        .mish-status-chip.confirmado { background:#d1fae5; color:#065f46; }
        .mish-status-chip.atendido { background:#e5e7eb; color:#4b5563; }
        .mish-status-chip.cancelado { background:#fee2e2; color:#b91c1c; }
        .mish-row-actions-inline { display:flex; gap:10px; align-items:center; justify-content:flex-end; }
        .mish-row-actions-inline .material-icons-outlined { font-size:18px; cursor:pointer; color: var(--text-gray); }
        .mish-row-actions-inline .material-icons-outlined:hover { color: var(--text-dark); }
        .modal-title { font-size: 18px; font-weight: 700; margin-bottom: 20px; color: var(--black); text-align: left; }
        .modal-error { color: #ef4444; font-size: 12px; margin-bottom: 16px; min-height: 15px; font-weight: 500; text-align: left; }
        .modal-footer-btns { display: flex; justify-content: flex-end; gap: 12px; margin-top: 20px; }
        
        .btn-cancel { background: none; border: none; color: var(--text-gray); font-weight: 600; font-size: 13px; cursor: pointer; padding: 10px 16px; }
        .btn-accept { background-color: #6d28d9; color: var(--white); border: none; border-radius: 4px; font-weight: 600; font-size: 13px; cursor: pointer; padding: 10px 20px; }

        .input-group-custom {
            display: flex; align-items: center; border: 1px solid var(--border-color); border-radius: 4px; margin-bottom: 16px; padding: 0 12px;
        }
        .input-group-custom span { font-size: 14px; margin-right: 8px; }
        .input-group-custom .login-input { margin-bottom: 0; border: none; padding: 12px 4px; }

        .signature-pad-container { border: 1px dashed var(--border-color); border-radius: 4px; background: #f9fafb; margin-bottom: 12px; }
        #signatureCanvas { width: 100%; height: 120px; display: block; cursor: crosshair; }

        /* INTERRUPTOR / SWITCH VISUAL */
        .switch-control {
            position: relative; display: inline-block; width: 34px; height: 20px;
        }
        .switch-control input { opacity: 0; width: 0; height: 0; }
        .slider-round {
            position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
            background-color: #ccc; transition: .3s; border-radius: 34px;
        }
        .slider-round:before {
            position: absolute; content: ""; height: 14px; width: 14px; left: 3px; bottom: 3px;
            background-color: white; transition: .3s; border-radius: 50%;
        }
        input:checked + .slider-round { background-color: var(--toggle-on); }
        input:checked + .slider-round:before { transform: translateX(14px); }

        /* Estilos Adaptados para Campos Formularios Volki */
        .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 14px; }
        .form-group { margin-bottom: 14px; }
        .modal-body { max-height: 65vh; overflow-y: auto; padding-right: 4px; }
        .input-text, .select-custom, .textarea-custom {
            width: 100%; padding: 10px 12px; border: 1px solid var(--border-color); border-radius: 4px; font-size: 13px; color: var(--text-dark); outline: none; background: var(--white);
        }
        .input-text:focus, .select-custom:focus, .textarea-custom:focus { border-color: var(--black); }
        .phone-group { display: flex; align-items: center; border: 1px solid var(--border-color); border-radius: 4px; padding-left: 12px; background: var(--white); }
        .phone-group .input-text { border: none; padding-left: 4px; }
        .prefix { font-size: 13px; color: var(--text-dark); margin-right: 4px; display: flex; align-items: center; gap: 4px; }
        .field-note { font-size: 11px; color: var(--text-gray); margin-top: 4px; }
        .textarea-custom { resize: vertical; min-height: 60px; }
        .switch-container { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
        .switch-label { font-size: 13px; color: var(--text-dark); font-weight: 500; }
        .search-wrapper { position: relative; }
        .search-wrapper .material-icons-outlined { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--text-gray); font-size: 18px; }

        .mish-inline-actions { display: flex; gap: 8px; justify-content: flex-end; }
        .mish-delete-btn { color: #ef4444; cursor: pointer; font-size: 18px; }
        .mish-edit-btn { color: #7c3aed; cursor: pointer; font-size: 18px; }

        /* =========================================
           DASHBOARD (LAYOUT)
        ========================================= */
        #dashboardPage { display: none; height: 100vh; width: 100vw; flex-direction: row; }
        
        .sidebar { 
            width: 250px; background-color: var(--white); border-right: 1px solid var(--border-color); 
            display: flex; flex-direction: column; transition: width 0.3s ease, border-right 0.3s ease;
            overflow: hidden; white-space: nowrap;
        }
        .sidebar-hidden { width: 0px; border-right: 1px solid transparent; }
        
        .logo-container { 
            height: 80px; display: flex; align-items: center; justify-content: center; padding: 12px 24px; min-width: 250px; 
            border-bottom: 1px solid var(--border-color);
        }
        .logo-text { font-size: 20px; font-weight: 700; color: var(--black); font-family: 'Inter', sans-serif; letter-spacing: 0.5px; }
        
        .nav-menu { flex: 1; padding-top: 16px; overflow-y: auto; min-width: 250px; }
        .nav-item { display: flex; align-items: center; padding: 12px 24px; color: var(--text-gray); text-decoration: none; font-size: 14px; font-weight: 500; transition: all 0.2s; cursor: pointer; }
        .nav-item:hover { background-color: var(--bg-light); color: var(--black); }
        .nav-item.active { color: var(--black); font-weight: 600; border-left: 3px solid var(--black); }
        .nav-item .material-icons-outlined { margin-right: 16px; font-size: 20px; }

        .sidebar-submenu { display: none; flex-direction: column; background-color: #fcfcfc; padding-left: 12px; }
        .submenu-item { display: flex; align-items: center; padding: 10px 24px; color: var(--text-gray); text-decoration: none; font-size: 13px; font-weight: 500; cursor: pointer; transition: all 0.2s; }
        .submenu-item:hover { color: var(--black); background-color: var(--bg-light); }
        .submenu-item.active { color: var(--black); font-weight: 600; }
        .submenu-item .material-icons-outlined { margin-right: 12px; font-size: 18px; }

        .badge { background-color: var(--badge-orange); color: var(--white); font-size: 11px; font-weight: bold; border-radius: 50%; width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; margin-left: auto; }
        .main-wrapper { flex: 1; display: flex; flex-direction: column; background-color: var(--bg-light); }

        /* TOPBAR */
        .topbar { height: 64px; background-color: var(--white); border-bottom: 1px solid var(--border-color); display: flex; align-items: center; justify-content: space-between; padding: 0 24px; }
        .topbar-left, .topbar-right { display: flex; align-items: center; }
        .topbar-right { gap: 20px; position: relative; }
        .menu-btn { background: none; border: none; color: var(--text-dark); cursor: pointer; display: flex; padding: 8px; border-radius: 4px; }
        .menu-btn:hover { background-color: var(--bg-light); }
        .icon-btn { color: var(--text-gray); cursor: pointer; display: flex; }

        .user-profile { display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 4px 8px; border-radius: 4px; position: relative; }
        .user-profile:hover { background-color: var(--bg-light); }
        .user-avatar { background-color: var(--black); color: var(--white); border-radius: 50%; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; }
        .user-name { font-size: 14px; font-weight: 500; }

        /* Dropdown Perfil */
        .dropdown-menu {
            position: absolute; top: 110%; right: 0; background: var(--white); border: 1px solid var(--border-color); border-radius: 8px;
            box-shadow: 0 10px 25px rgba(0,0,0,0.1); display: none; flex-direction: column; z-index: 100; min-width: 210px; padding: 6px 0;
        }
        .dropdown-item { padding: 10px 20px; font-size: 13px; color: var(--text-dark); cursor: pointer; text-decoration: none; font-weight: 500; text-align: left; }
        .dropdown-item:hover { background-color: var(--bg-light); }
        .dropdown-divider { height: 1px; background-color: var(--border-color); margin: 6px 0; }
        .dropdown-item.logout { color: #ef4444; }

        .content { flex: 1; padding: 32px; overflow-y: auto; }
        .view-section { display: none; }
        .view-section.active { display: block; }

        /* =========================================
           VISTAS: INICIO Y MÉTRICAS
        ========================================= */
        .inicio-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 32px; }
        .inicio-title { font-size: 20px; font-weight: 700; color: var(--black); }
        .pills-container { display: flex; gap: 12px; }
        .pill { background-color: #f3f4f6; color: var(--text-dark); font-size: 12px; font-weight: 500; padding: 6px 16px; border-radius: 20px; cursor: pointer; }
        .pill:hover { background-color: #e5e7eb; }
        .pill.active-pill { background: var(--black); color: var(--white); }

        .stats-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 24px; margin-bottom: 32px; }
        .stat-card { display: flex; flex-direction: column; align-items: center; background: var(--white); padding: 24px; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); cursor: pointer; transition: transform 0.2s; }
        .stat-card:hover { transform: translateY(-3px); box-shadow: 0 4px 6px rgba(0,0,0,0.08); }
        .stat-circle { width: 70px; height: 70px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 700; color: var(--black); margin-bottom: 12px; }
        .stat-label { font-size: 11px; font-weight: 600; color: var(--text-gray); text-transform: uppercase; letter-spacing: 0.5px; }

        .charts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
        .chart-card { background: var(--white); padding: 24px; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); display: flex; flex-direction: column; align-items: center; min-height: 250px; }
        .chart-title { font-size: 14px; font-weight: 600; color: var(--text-dark); align-self: flex-start; margin-bottom: 32px; }
        .doughnut { width: 140px; height: 140px; border-radius: 50%; position: relative; }
        .doughnut::after { content: ''; position: absolute; top: 20px; left: 20px; right: 20px; bottom: 20px; background-color: var(--white); border-radius: 50%; }
        .chart-1 { background: conic-gradient(#fde047 0% 15%, #60a5fa 15% 35%, #fca5a5 35% 50%, #86efac 50% 75%, #e9d5ff 75% 100%); }
        .chart-2 { background: conic-gradient(#e9d5ff 0% 100%); }

        /* =========================================
           VISTA: DATOS DEL NEGOCIO
        ========================================= */
        .section-tab-title { font-size: 12px; font-weight: 600; color: var(--text-gray); background: var(--white); padding: 8px 16px; border-radius: 4px; display: inline-block; margin-bottom: 16px; border: 1px solid var(--border-color); }
        .business-card { background: var(--white); padding: 24px; border-radius: 8px; border: 1px solid var(--border-color); display: flex; gap: 24px; align-items: flex-start; margin-bottom: 24px; }
        
        .business-store-icon { 
            width: 100px; height: 100px; background: #f3f4f6; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; 
            border: 1px solid var(--border-color); color: var(--text-gray); cursor: pointer; position: relative; overflow: hidden;
        }
        .business-store-icon span { font-size: 40px; }
        .business-store-icon p { font-size: 10px; font-weight: 600; margin-top: 4px; }
        #bizLogoPreview { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: contain; background: var(--white); display: none; }

        .business-details { flex: 1; }
        .business-name-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
        .business-name-main { font-size: 18px; font-weight: 700; color: var(--black); }
        .business-info-item { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-gray); margin-bottom: 8px; }
        .business-info-item .material-icons-outlined { font-size: 18px; }

        .download-box { background: var(--white); padding: 24px; border-radius: 8px; border: 1px solid var(--border-color); display: flex; justify-content: space-between; align-items: center; }
        .download-box-text h4 { font-size: 14px; font-weight: 600; color: #7c3aed; margin-bottom: 4px; }
        .download-box-text p { font-size: 12px; color: var(--text-gray); }

        /* =========================================
           VISTAS GENERALES DE TABLAS / GESTIÓN
        ========================================= */
        .tabs { display: flex; gap: 32px; border-bottom: 1px solid var(--border-color); margin-bottom: 24px; }
        .tab { padding-bottom: 12px; color: var(--text-gray); font-size: 14px; font-weight: 500; cursor: pointer; position: relative; }
        .tab.active { color: var(--text-dark); font-weight: 600; }
        .tab.active::after { content: ''; position: absolute; bottom: -1px; left: 0; width: 100%; height: 2px; background-color: var(--black); }
        
        .toolbar-container { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; gap: 16px; }
        .search-input-container { display: flex; align-items: center; background: var(--white); border: 1px solid var(--border-color); border-radius: 6px; padding: 4px 12px; width: 100%; max-width: 360px; }
        .search-input-container span { color: var(--text-gray); margin-right: 8px; font-size: 20px; }
        .search-input-container input { border: none; outline: none; width: 100%; font-size: 13px; color: var(--text-dark); background: transparent; }

        .data-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: 8px; overflow: visible; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
        .data-table th, .data-table td { padding: 16px; text-align: left; border-bottom: 1px solid var(--border-color); font-size: 13px; }
        .data-table th { background-color: var(--white); color: var(--text-dark); font-weight: 600; border-bottom: 2px solid var(--border-color); }
        
        .action-icon-btn { cursor: pointer; color: #7c3aed; background: none; border: none; font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 4px; padding: 8px 12px; border-radius: 4px; transition: background 0.2s; }
        .action-icon-btn:hover { background-color: rgba(124, 58, 237, 0.05); }

        .action-cell { position: relative; text-align: right; cursor: pointer; font-weight: bold; font-size: 16px; padding-right: 24px; }
        .context-menu-inline {
            display: none; position: absolute; right: 24px; top: -10px; background: var(--white);
            border: 1px solid var(--border-color); border-radius: 4px; box-shadow: 0 4px 15px rgba(0,0,0,0.15);
            z-index: 150; flex-direction: column; min-width: 160px; padding: 4px 0;
        }
        .context-menu-inline span { 
            display: flex; align-items: center; gap: 8px; padding: 10px 16px; 
            font-size: 13px; color: var(--text-dark); text-align: left; font-weight: 500; 
        }
        .context-menu-inline span:hover { background: var(--bg-light); }
        .context-menu-inline .menu-danger-item { color: #ef4444; }
        .context-menu-inline .menu-danger-item:hover { background-color: #fef2f2; }

        /* PAGINACIÓN DE COMPONENTES DE LISTADO */
        .pagination-container-listado {
            display: flex; justify-content: flex-end; align-items: center; padding: 16px 24px;
            font-size: 12px; color: var(--text-gray); gap: 24px; background: var(--white); border-top: 1px solid var(--border-color);
            user-select: none;
        }
        .pagination-controls-listado { display: flex; gap: 16px; align-items: center; }
        .pagination-controls-listado .material-icons-outlined { font-size: 18px; cursor: pointer; color: var(--text-gray); }
        .pagination-controls-listado .material-icons-outlined.disabled { color: #d1d5db; cursor: not-allowed; }

        /* =========================================
           VISTA: MIS DATOS Y PERFIL
        ========================================= */
        .profile-container-box { background: var(--white); padding: 24px; border-radius: 8px; border: 1px solid var(--border-color); margin-bottom: 24px; }
        .profile-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
        .profile-card-title { font-size: 15px; font-weight: 700; color: var(--black); }
        .profile-info-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-dark); margin-bottom: 10px; }
        .profile-info-row .material-icons-outlined { color: var(--text-gray); font-size: 18px; }
        .signature-preview-area { width: 160px; height: 80px; background: #f3f4f6; border-radius: 6px; border: 1px solid var(--border-color); display: flex; align-items: center; justify-content: center; overflow: hidden; margin-top: 16px; }
        #imgSignatureView { max-width: 100%; max-height: 100%; object-fit: contain; }

        /* =========================================
           DISEÑO DE HISTORIAL CLINICO
        ========================================= */
        .history-layout { display: flex; gap: 24px; align-items: flex-start; height: 100%; }
        .history-main-content { flex: 1; background: var(--white); border-radius: 8px; border: 1px solid var(--border-color); padding: 24px; min-height: 500px; display: flex; flex-direction: column; }
        .history-sidebar-info { width: 320px; display: flex; flex-direction: column; gap: 24px; }
        .sidebar-widget-box { background: var(--white); border-radius: 8px; border: 1px solid var(--border-color); padding: 20px; }
        .widget-title-flex { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; border-bottom: 1px solid var(--border-color); padding-bottom: 8px; }
        .widget-title-text { font-size: 14px; font-weight: 700; color: var(--text-dark); }
        .patient-avatar-large { background: #f3f4f6; border-radius: 50%; width: 64px; height: 64px; display: flex; align-items: center; justify-content: center; color: var(--text-gray); margin: 0 auto 12px auto; }
        .patient-detail-row { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 8px; color: var(--text-dark); }
        .patient-detail-row span:first-child { color: var(--text-gray); font-weight: 500; }
        .patient-detail-row span:last-child { font-weight: 600; }
        .action-pill-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border-color); padding: 8px 16px; border-radius: 20px; font-size: 12px; font-weight: 600; color: var(--text-dark); cursor: pointer; background: var(--white); transition: background 0.2s; }
        .action-pill-btn:hover { background: var(--bg-light); }
        .breadcrumbs-nav { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-gray); margin-bottom: 16px; font-weight: 500; }
        .breadcrumbs-nav span.link-click { color: #7c3aed; cursor: pointer; }
        .breadcrumbs-nav span.link-click:hover { text-decoration: underline; }

        /* =========================================
           VISTA SECCIÓN COMPONENTES PRODUCTOS 
        ========================================= */
        .volki-isolated-wrapper {
            background-color: var(--white);
            padding: 24px;
            border-radius: 8px;
            border: 1px solid var(--border-color);
        }

        .volki-isolated-wrapper .volki-menu-tabs {
            display: flex;
            gap: 1.5rem;
            border-bottom: 2px solid var(--border-color);
            margin-bottom: 1.5rem;
            overflow-x: auto;
        }

        .volki-isolated-wrapper .volki-tab-item {
            padding: 0.6rem 0.4rem;
            color: var(--text-gray);
            text-decoration: none;
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
            border-bottom: 3px solid transparent;
            transition: all 0.2s ease;
            background: none;
            border: none;
        }

        .volki-isolated-wrapper .volki-tab-item.active {
            color: var(--black);
            border-bottom-color: var(--black);
            font-weight: 600;
        }

        .volki-isolated-wrapper .volki-action-bar {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1.5rem;
            gap: 1rem;
        }

        .volki-isolated-wrapper .volki-search-box {
            display: flex;
            gap: 0.5rem;
            flex-grow: 1;
            max-width: 400px;
        }

        .volki-isolated-wrapper .volki-input, 
        .volki-isolated-wrapper .volki-select {
            padding: 0.5rem 0.75rem;
            border: 1px solid var(--border-color);
            border-radius: 6px;
            font-size: 13px;
            outline: none;
            background: var(--white);
        }

        .volki-isolated-wrapper .volki-input { flex-grow: 1; }

        .volki-isolated-wrapper .volki-btn-trigger {
            background: var(--black);
            color: var(--white);
            border: none;
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            padding: 10px 16px;
            border-radius: 4px;
            display: flex;
            align-items: center;
            gap: 4px;
        }

        .volki-isolated-wrapper .volki-btn-trigger:hover {
            opacity: 0.8;
        }

        .volki-custom-modal {
            position: fixed;
            top: 0; left: 0; width: 100%; height: 100%;
            background: rgba(0, 0, 0, 0.6);
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 99999;
            backdrop-filter: blur(3px);
        }

        .volki-modal-box {
            background: var(--white);
            width: 100%;
            max-width: 450px;
            border-radius: 8px;
            box-shadow: 0 10px 25px rgba(0,0,0,0.2);
            overflow: hidden;
        }

        .volki-modal-box .header {
            padding: 1.5rem;
            font-weight: 700;
            font-size: 18px;
            border-bottom: 1px solid var(--border-color);
            color: var(--black);
        }

        .volki-modal-box .body { padding: 1.5rem; }

        .volki-isolated-wrapper .status-toggle {
            display: inline-flex;
            background: var(--bg-light);
            padding: 0.2rem;
            border-radius: 20px;
            margin-bottom: 1.25rem;
            border: 1px solid var(--border-color);
        }

        .volki-isolated-wrapper .status-btn {
            padding: 0.4rem 1.2rem;
            border: none;
            background: transparent;
            font-size: 12px;
            font-weight: 500;
            border-radius: 15px;
            cursor: pointer;
            color: var(--text-gray);
        }

        .volki-isolated-wrapper .status-btn.active {
            background: var(--volki-purple-light);
            color: var(--primary-dark-blue);
            font-weight: 600;
        }

        .volki-isolated-wrapper .form-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 1rem;
            margin-bottom: 1rem;
        }

        .volki-isolated-wrapper .field-full {
            margin-bottom: 1rem;
        }

        .volki-isolated-wrapper label {
            display: block;
            font-size: 11px;
            color: var(--text-gray);
            margin-bottom: 0.4rem;
            font-weight: 600;
        }

        .volki-isolated-wrapper .modal-footer {
            padding: 1.25rem 1.5rem;
            background: var(--bg-light);
            display: flex;
            justify-content: flex-end;
            gap: 12px;
            border-top: 1px solid var(--border-color);
        }

        .volki-isolated-wrapper .btn-close {
            background: transparent; border: none; cursor: pointer; padding: 10px 16px; color: var(--text-gray); font-weight: 600; font-size: 13px;
        }

        .volki-isolated-wrapper .btn-save {
            background: #6d28d9; color: white; border: none; font-weight: 600; font-size: 13px;
            padding: 10px 20px; border-radius: 4px; cursor: pointer;
        }
        
        .volki-isolated-wrapper .btn-save:hover { opacity: 0.9; }

        /* MISH CLINICAL HISTORY MODULE START */
        .mish-history-records{flex:1;display:flex;flex-direction:column;gap:10px;overflow-y:auto;padding:4px 0 12px}
        .mish-history-row{display:grid;grid-template-columns:32px 1fr 90px;gap:10px;align-items:center;background:#fbfbfc;border:1px solid #f0f0f2;border-radius:8px;padding:10px 12px;min-height:54px}
        .mish-history-icon{width:24px;height:24px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:#f5f3ff;color:#6d28d9}
        .mish-history-icon .material-icons-outlined{font-size:15px;margin:0}
        .mish-history-type{display:inline-flex;font-size:11px;font-weight:700;color:#6d28d9;background:#f5f3ff;border:1px solid #ede9fe;border-radius:16px;padding:3px 8px;margin-bottom:5px}
        .mish-history-detail{font-size:12px;color:var(--text-dark);line-height:1.45}
        .mish-history-actions{display:flex;justify-content:flex-end;gap:10px}
        .mish-history-action{cursor:pointer;color:var(--black);font-size:20px}
        .mish-clinic-table-wrap{background:var(--white);border-radius:8px;overflow-x:auto;border:1px solid var(--border-color)}
        .mish-clinic-top-action{display:flex;justify-content:flex-end;margin:0 0 12px}
        .mish-link-action{color:#6d28d9;font-size:13px;font-weight:700;cursor:pointer;display:inline-flex;align-items:center;gap:4px}
        .mish-consult-form{background:var(--white);border-radius:8px;border:1px solid var(--border-color);padding:18px;overflow:auto;max-height:calc(100vh - 165px)}
        .mish-consult-form-title{font-size:13px;font-weight:700;margin-bottom:12px;color:var(--text-dark)}
        .mish-consult-grid{display:grid;grid-template-columns:minmax(220px,330px) 1fr;gap:10px;margin-bottom:10px}
        .mish-consult-grid-full{display:grid;grid-template-columns:1fr;gap:10px;margin-bottom:10px}
        .mish-consult-input,.mish-consult-textarea,.mish-consult-select{width:100%;border:1px solid #c9c9c9;border-radius:2px;font-size:12px;padding:8px 10px;background:#fff;color:#111827;outline:none}
        .mish-consult-textarea{min-height:72px;resize:vertical}
        .mish-consult-accordion{border:1px solid #e5e7eb;margin-bottom:10px;border-radius:3px;overflow:hidden}
        .mish-consult-accordion-header{padding:9px 12px;font-size:12px;font-weight:600;background:#fff;cursor:pointer;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #e5e7eb}
        .mish-consult-accordion-body{display:none;padding:10px;background:#fff}
        .mish-consult-accordion.open .mish-consult-accordion-body{display:block}
        .mish-form-two{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:8px}
        .mish-exam-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
        .mish-exam-card{position:relative}
        .mish-exam-buttons{position:absolute;right:6px;top:-7px;display:flex;gap:4px}
        .mish-exam-buttons button{border:1px solid #d1d5db;background:#fff;border-radius:12px;padding:2px 7px;font-size:9px;cursor:pointer;color:#4b5563}
        .mish-products-row{display:grid;grid-template-columns:1fr minmax(130px,220px) 70px;gap:8px;align-items:center;margin-bottom:8px}
        .mish-consult-footer{display:flex;justify-content:flex-end;gap:12px;padding-top:14px;border-top:1px solid #e5e7eb;margin-top:14px}
        .mish-consult-save{background:#6d28d9;color:var(--white);border:none;border-radius:4px;font-size:12px;font-weight:700;padding:9px 18px;cursor:pointer}
        .mish-consult-cancel{background:transparent;border:none;color:var(--text-dark);font-weight:700;font-size:12px;cursor:pointer;padding:9px 12px}
        @media(max-width:900px){.mish-consult-grid,.mish-form-two,.mish-exam-grid,.mish-products-row{grid-template-columns:1fr}}
        /* MISH CLINICAL HISTORY MODULE END */


        /* MISH CLIENTS REPAIR MODULE START */
        .mish-client-action-wrap {
            display: flex;
            justify-content: flex-end;
            gap: 8px;
            align-items: center;
        }

        .mish-client-action {
            cursor: pointer;
            font-size: 19px;
            user-select: none;
        }

        .mish-client-action.go {
            color: #7c3aed;
        }

        .mish-client-action.delete {
            color: #ef4444;
        }

        .mish-client-action.edit {
            color: #3b82f6;
        }

        .mish-client-empty-row td {
            text-align: center;
            color: var(--text-gray);
            padding: 28px 16px;
        }
        /* MISH CLIENTS REPAIR MODULE END */


        /* MISH SALES MODULE START */
        .mish-sales-shell {
            background: transparent;
            width: 100%;
        }

        .mish-sales-tabs {
            display: flex;
            gap: 28px;
            margin-bottom: 26px;
            align-items: center;
        }

        .mish-sales-tab {
            font-size: 14px;
            color: var(--text-gray);
            font-weight: 600;
            padding-bottom: 10px;
            cursor: pointer;
            position: relative;
        }

        .mish-sales-tab.active {
            color: var(--black);
        }

        .mish-sales-tab.active::after {
            content: "";
            position: absolute;
            bottom: 0;
            left: 0;
            width: 28px;
            height: 3px;
            border-radius: 6px;
            background: #6d28d9;
        }

        .mish-sales-toolbar {
            display: flex;
            align-items: flex-end;
            gap: 10px;
            margin-bottom: 24px;
            flex-wrap: wrap;
        }

        .mish-sales-filter {
            min-width: 130px;
            height: 52px;
            border: 1px solid #d1d5db;
            border-radius: 4px;
            background: var(--white);
            position: relative;
            display: flex;
            align-items: flex-end;
            padding: 18px 12px 9px 12px;
        }

        .mish-sales-filter.large {
            min-width: 210px;
        }

        .mish-sales-filter label {
            position: absolute;
            top: -9px;
            left: 9px;
            background: var(--white);
            padding: 0 4px;
            font-size: 11px;
            color: var(--text-gray);
            font-weight: 600;
        }

        .mish-sales-filter input,
        .mish-sales-filter select {
            width: 100%;
            border: none;
            outline: none;
            background: transparent;
            font-size: 13px;
            color: var(--text-dark);
        }

        .mish-sales-search-icon {
            font-size: 20px;
            color: var(--black);
            cursor: pointer;
        }

        .mish-sales-new {
            margin-left: auto;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            color: #6d28d9;
            font-size: 13px;
            font-weight: 700;
            cursor: pointer;
            padding: 10px 4px;
        }

        .mish-sales-alert {
            background: #fff3db;
            color: #2f2f2f;
            border-radius: 10px;
            padding: 16px 18px;
            font-size: 13px;
            margin-bottom: 18px;
        }

        .mish-sales-table-wrap {
            background: var(--white);
            border-radius: 8px;
            border: 1px solid var(--border-color);
            overflow-x: auto;
        }

        .mish-sales-actions {
            display: flex;
            justify-content: flex-end;
            align-items: center;
            gap: 10px;
        }

        .mish-sales-action {
            font-size: 20px;
            cursor: pointer;
            color: var(--text-dark);
        }

        .mish-sales-action.purple {
            color: #6d28d9;
        }

        .mish-sales-modal-box {
            background: var(--white);
            width: 100%;
            max-width: 760px;
            max-height: 92vh;
            border-radius: 8px;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            box-shadow: 0 14px 34px rgba(0,0,0,0.22);
            text-align: left;
        }

        .mish-sales-modal-header {
            padding: 22px 24px 16px 24px;
            border-bottom: 1px solid var(--border-color);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .mish-sales-modal-title {
            font-size: 18px;
            font-weight: 800;
            color: var(--black);
        }

        .mish-sales-modal-body {
            padding: 22px 24px;
            overflow-y: auto;
        }

        .mish-sales-grid {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 14px;
            margin-bottom: 14px;
        }

        .mish-sales-grid-3 {
            display: grid;
            grid-template-columns: 1fr 1fr 1fr;
            gap: 14px;
            margin-bottom: 14px;
        }

        .mish-sales-field label {
            display: block;
            font-size: 11px;
            color: var(--text-gray);
            font-weight: 700;
            margin-bottom: 6px;
            text-transform: uppercase;
        }

        .mish-sales-input,
        .mish-sales-select,
        .mish-sales-textarea {
            width: 100%;
            border: 1px solid var(--border-color);
            border-radius: 4px;
            padding: 10px 12px;
            font-size: 13px;
            color: var(--text-dark);
            outline: none;
            background: var(--white);
        }

        .mish-sales-textarea {
            min-height: 68px;
            resize: vertical;
        }

        .mish-sales-line {
            display: grid;
            grid-template-columns: 1fr 90px 110px 42px;
            gap: 8px;
            align-items: end;
            margin-bottom: 10px;
        }

        .mish-sales-add-line {
            border: none;
            background: #6d28d9;
            color: var(--white);
            height: 38px;
            border-radius: 4px;
            cursor: pointer;
            font-weight: 700;
        }

        .mish-sales-total-box {
            display: flex;
            justify-content: flex-end;
            margin-top: 14px;
        }

        .mish-sales-total-inner {
            min-width: 250px;
            background: var(--bg-light);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            padding: 14px;
        }

        .mish-sales-total-row {
            display: flex;
            justify-content: space-between;
            font-size: 13px;
            margin-bottom: 8px;
        }

        .mish-sales-total-row.strong {
            font-size: 16px;
            font-weight: 800;
            margin-bottom: 0;
            color: var(--black);
        }

        .mish-sales-modal-footer {
            padding: 16px 24px;
            border-top: 1px solid var(--border-color);
            display: flex;
            justify-content: flex-end;
            gap: 12px;
            background: var(--bg-light);
        }

        .mish-sales-cancel {
            background: transparent;
            border: none;
            color: var(--text-gray);
            font-weight: 700;
            font-size: 13px;
            cursor: pointer;
            padding: 10px 14px;
        }

        .mish-sales-draft {
            background: var(--white);
            border: 1px solid var(--border-color);
            color: var(--text-dark);
            font-weight: 700;
            font-size: 13px;
            cursor: pointer;
            border-radius: 4px;
            padding: 10px 16px;
        }

        .mish-sales-save {
            background: #6d28d9;
            color: var(--white);
            border: none;
            border-radius: 4px;
            font-weight: 700;
            font-size: 13px;
            cursor: pointer;
            padding: 10px 18px;
        }

        @media(max-width: 900px) {
            .mish-sales-grid,
            .mish-sales-grid-3,
            .mish-sales-line {
                grid-template-columns: 1fr;
            }
            .mish-sales-new {
                margin-left: 0;
            }
        }
        /* MISH SALES MODULE END */


        /* MISH SALES INLINE FLOW START */
        .mish-sales-new-wrap {
            margin-left: auto;
            position: relative;
        }

        .mish-sales-dropdown {
            position: absolute;
            right: 0;
            top: 38px;
            background: var(--white);
            border: 1px solid var(--border-color);
            box-shadow: 0 8px 22px rgba(0,0,0,0.18);
            border-radius: 2px;
            min-width: 150px;
            z-index: 2500;
            display: none;
            padding: 8px 0;
        }

        .mish-sales-dropdown.open {
            display: block;
        }

        .mish-sales-dropdown-item {
            padding: 12px 16px;
            font-size: 13px;
            color: var(--text-dark);
            cursor: pointer;
            white-space: nowrap;
        }

        .mish-sales-dropdown-item:hover {
            background: var(--bg-light);
        }

        .mish-sales-client-modal-box {
            width: 100%;
            max-width: 340px;
            background: var(--white);
            border-radius: 4px;
            box-shadow: 0 18px 45px rgba(0,0,0,.28);
            padding: 22px;
            text-align: left;
        }

        .mish-sales-client-title {
            font-size: 18px;
            font-weight: 700;
            margin-bottom: 24px;
            color: var(--black);
        }

        .mish-sales-client-search {
            border: 1px solid #6d28d9;
            border-radius: 4px;
            padding: 10px 12px;
            display: flex;
            align-items: center;
            gap: 8px;
            margin-bottom: 14px;
        }

        .mish-sales-client-search label {
            position: absolute;
            margin-top: -34px;
            background: var(--white);
            padding: 0 4px;
            font-size: 11px;
            color: #6d28d9;
        }

        .mish-sales-client-search input {
            border: none;
            outline: none;
            width: 100%;
            font-size: 13px;
        }

        .mish-sales-client-list {
            max-height: 120px;
            overflow-y: auto;
            margin-bottom: 18px;
        }

        .mish-sales-client-option {
            padding: 10px 12px;
            cursor: pointer;
            font-size: 13px;
            border-radius: 4px;
        }

        .mish-sales-client-option:hover,
        .mish-sales-client-option.active {
            background: #f5f3ff;
            color: #6d28d9;
        }

        .mish-sales-client-footer {
            display: flex;
            justify-content: flex-end;
            gap: 10px;
        }

        .mish-sales-inline-header {
            margin-bottom: 24px;
        }

        .mish-sales-breadcrumb {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            font-size: 13px;
            color: var(--text-gray);
            background: #fafafa;
            padding: 9px 14px;
            border-radius: 0 0 10px 10px;
        }

        .mish-sales-breadcrumb span:last-child {
            color: var(--black);
            font-weight: 700;
        }

        .mish-sales-client-label {
            font-size: 13px;
            font-weight: 700;
            color: var(--black);
            margin-bottom: 26px;
        }

        .mish-sales-suggestions {
            background: #fafafa;
            border-radius: 18px;
            padding: 12px 18px;
            display: flex;
            align-items: center;
            gap: 12px;
            margin-bottom: 28px;
            color: var(--text-gray);
            font-size: 11px;
        }

        .mish-sales-suggestions-badge {
            width: 26px;
            height: 26px;
            border-radius: 50%;
            background: #fb923c;
            color: var(--white);
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-weight: 700;
            font-size: 12px;
        }

        .mish-sales-form-row-main {
            display: grid;
            grid-template-columns: minmax(240px, 380px) 190px 190px 1fr;
            gap: 8px;
            align-items: center;
            margin-bottom: 22px;
        }

        .mish-sales-inline-input {
            height: 52px;
            border: 1px solid #9ca3af;
            border-radius: 3px;
            padding: 0 14px;
            font-size: 13px;
            outline: none;
            background: var(--white);
        }

        .mish-sales-product-search {
            display: flex;
            align-items: center;
            border: 1px solid #9ca3af;
            border-radius: 3px;
            height: 52px;
            padding: 0 12px;
            background: var(--white);
        }

        .mish-sales-product-search input {
            border: none;
            outline: none;
            width: 100%;
            font-size: 13px;
        }

        .mish-sales-add-inline {
            justify-self: end;
            color: #6d28d9;
            font-weight: 700;
            cursor: pointer;
            font-size: 13px;
            display: inline-flex;
            align-items: center;
            gap: 5px;
        }

        .mish-sales-iva-row {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 22px;
            font-size: 13px;
            color: var(--black);
        }

        .mish-sales-inline-table {
            background: #fafafa;
            border-radius: 12px;
            overflow: hidden;
            margin-bottom: 30px;
        }

        .mish-sales-inline-table table {
            width: 100%;
            border-collapse: collapse;
        }

        .mish-sales-inline-table th,
        .mish-sales-inline-table td {
            text-align: left;
            padding: 13px 18px;
            font-size: 13px;
            border-bottom: 1px solid #f0f0f0;
        }

        .mish-sales-inline-table th {
            font-weight: 700;
            color: var(--black);
        }

        .mish-sales-inline-table td {
            color: var(--text-dark);
        }

        .mish-sales-total-area {
            display: flex;
            justify-content: flex-end;
            margin-bottom: 44px;
        }

        .mish-sales-total-card {
            width: 260px;
        }

        .mish-sales-total-line {
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 13px;
            margin-bottom: 10px;
        }

        .mish-sales-total-discount {
            height: 50px;
            border: 1px solid #9ca3af;
            border-radius: 3px;
            padding: 0 12px;
            font-size: 13px;
            width: 100%;
            margin-bottom: 24px;
        }

        .mish-sales-total-final {
            border-top: 1px solid var(--border-color);
            padding-top: 16px;
            font-weight: 800;
        }

        .mish-sales-inline-footer {
            display: flex;
            justify-content: flex-end;
            gap: 12px;
            border-top: 1px solid var(--border-color);
            padding-top: 18px;
        }

        .mish-sales-inline-cancel {
            border: none;
            background: transparent;
            font-size: 13px;
            font-weight: 700;
            cursor: pointer;
            padding: 10px 14px;
        }

        .mish-sales-inline-draft,
        .mish-sales-inline-final {
            background: #6d28d9;
            color: var(--white);
            border: none;
            border-radius: 5px;
            padding: 11px 18px;
            font-size: 13px;
            font-weight: 700;
            cursor: pointer;
        }

        @media(max-width: 1000px) {
            .mish-sales-form-row-main {
                grid-template-columns: 1fr;
            }
            .mish-sales-add-inline {
                justify-self: start;
            }
        }
        /* MISH SALES INLINE FLOW END */


        /* MISH INVENTORY MODULE START */
        .mish-inventory-shell { width:100%; }
        .mish-inventory-title {
            display:inline-block;
            background:#fafafa;
            padding:9px 14px;
            border-radius:0 0 10px 10px;
            font-size:15px;
            font-weight:700;
            margin-bottom:18px;
            color:var(--black);
        }
        .mish-inventory-toolbar {
            display:flex;
            gap:10px;
            margin-bottom:26px;
            flex-wrap:wrap;
            align-items:center;
        }
        .mish-inv-filter {
            height:52px;
            min-width:190px;
            border:1px solid #9ca3af;
            border-radius:4px;
            background:#fff;
            display:flex;
            align-items:center;
            padding:0 12px;
            gap:8px;
        }
        .mish-inv-filter input,.mish-inv-filter select {
            border:none;
            outline:none;
            width:100%;
            font-size:13px;
            background:transparent;
            color:var(--text-dark);
        }
        .mish-inventory-table {
            background:#fafafa;
            border-radius:12px;
            overflow:visible;
            position:relative;
        }
        .mish-inventory-table table {
            width:100%;
            border-collapse:collapse;
        }
        .mish-inventory-table th,.mish-inventory-table td {
            padding:13px 18px;
            text-align:left;
            font-size:13px;
            border-bottom:1px solid #ededed;
            vertical-align:middle;
        }
        .mish-inventory-table th { color:var(--black); font-weight:700; }
        .mish-stock-badge {
            display:inline-block;
            background:#fb923c;
            color:#fff;
            border-radius:4px;
            font-size:11px;
            font-weight:700;
            padding:4px 8px;
        }
        .mish-inv-menu-btn {
            cursor:pointer;
            color:var(--black);
            font-size:22px;
            user-select:none;
        }
        .mish-inv-context {
            position:absolute;
            right:18px;
            background:#fff;
            border:1px solid var(--border-color);
            border-radius:3px;
            box-shadow:0 9px 24px rgba(0,0,0,.20);
            min-width:190px;
            z-index:3000;
            padding:8px 0;
            display:none;
        }
        .mish-inv-context.open { display:block; }
        .mish-inv-context-item {
            display:flex;
            align-items:center;
            gap:14px;
            padding:12px 16px;
            cursor:pointer;
            font-size:13px;
            color:var(--text-dark);
        }
        .mish-inv-context-item:hover { background:var(--bg-light); }
        .mish-inv-history {
            background:#fff;
            border:1px solid var(--border-color);
            border-radius:8px;
            padding:16px;
            margin-top:18px;
        }
        .mish-inv-history h3 { font-size:15px; margin-bottom:10px; }
        .mish-inv-history-row {
            display:flex;
            justify-content:space-between;
            font-size:12px;
            border-bottom:1px solid #eee;
            padding:8px 0;
        }
        .mish-product-suggestions {
            position:absolute;
            background:#fff;
            border:1px solid var(--border-color);
            box-shadow:0 8px 22px rgba(0,0,0,.16);
            border-radius:4px;
            max-height:190px;
            overflow-y:auto;
            z-index:3500;
            min-width:320px;
            display:none;
        }
        .mish-product-suggestion {
            padding:10px 12px;
            font-size:13px;
            cursor:pointer;
            display:flex;
            justify-content:space-between;
            gap:12px;
        }
        .mish-product-suggestion:hover { background:#f5f3ff; color:#6d28d9; }
        /* MISH INVENTORY MODULE END */


        /* MISH STOCK PRODUCTS MODULE START */
        .mish-stock-shell {
            width: 100%;
        }

        .mish-stock-title {
            display: inline-block;
            background: #fafafa;
            color: var(--black);
            padding: 9px 14px;
            border-radius: 0 0 10px 10px;
            font-size: 15px;
            font-weight: 700;
            margin-bottom: 18px;
        }

        .mish-stock-toolbar {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
            margin-bottom: 26px;
        }

        .mish-stock-field {
            height: 52px;
            min-width: 190px;
            border: 1px solid #9ca3af;
            border-radius: 4px;
            background: var(--white);
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 0 12px;
        }

        .mish-stock-field input,
        .mish-stock-field select {
            border: none;
            outline: none;
            width: 100%;
            font-size: 13px;
            color: var(--text-dark);
            background: transparent;
        }

        .mish-stock-table-wrap {
            background: #fafafa;
            border-radius: 12px;
            overflow: visible;
            position: relative;
        }

        .mish-stock-table {
            width: 100%;
            border-collapse: collapse;
        }

        .mish-stock-table th,
        .mish-stock-table td {
            padding: 13px 18px;
            text-align: left;
            font-size: 13px;
            border-bottom: 1px solid #ededed;
            vertical-align: middle;
        }

        .mish-stock-table th {
            font-weight: 700;
            color: var(--black);
        }

        .mish-stock-low {
            display: inline-block;
            background: #fb923c;
            color: var(--white);
            border-radius: 4px;
            font-size: 11px;
            font-weight: 700;
            padding: 4px 8px;
        }

        .mish-stock-dots {
            cursor: pointer;
            font-size: 22px;
            color: var(--black);
            user-select: none;
        }

        .mish-stock-menu {
            position: absolute;
            right: 18px;
            min-width: 190px;
            background: var(--white);
            border: 1px solid var(--border-color);
            border-radius: 3px;
            box-shadow: 0 9px 24px rgba(0,0,0,.20);
            z-index: 3000;
            padding: 8px 0;
            display: none;
        }

        .mish-stock-menu.open {
            display: block;
        }

        .mish-stock-menu-item {
            display: flex;
            align-items: center;
            gap: 14px;
            padding: 12px 16px;
            cursor: pointer;
            font-size: 13px;
            color: var(--text-dark);
        }

        .mish-stock-menu-item:hover {
            background: var(--bg-light);
        }

        .mish-stock-footer {
            display: flex;
            justify-content: flex-end;
            align-items: center;
            gap: 24px;
            padding: 16px 24px;
            color: var(--text-gray);
            font-size: 12px;
        }

        .mish-stock-history-box {
            background: var(--white);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            padding: 18px;
            margin-top: 18px;
        }

        .mish-stock-history-title {
            font-size: 15px;
            font-weight: 700;
            margin-bottom: 12px;
        }

        .mish-stock-history-row {
            display: grid;
            grid-template-columns: 170px 1fr 80px;
            gap: 12px;
            padding: 9px 0;
            border-bottom: 1px solid #eee;
            font-size: 12px;
        }

        .mish-stock-observed {
            background: #f5f3ff;
        }

        .mish-stock-modal-card {
            background: var(--white);
            border-radius: 8px;
            width: 100%;
            max-width: 420px;
            padding: 24px;
            box-shadow: 0 18px 45px rgba(0,0,0,.24);
            text-align: left;
        }

        .mish-stock-modal-title {
            font-size: 18px;
            font-weight: 700;
            margin-bottom: 18px;
            color: var(--black);
        }

        .mish-stock-modal-detail {
            background: #f5f3ff;
            border: 1px solid #ede9fe;
            border-radius: 8px;
            padding: 14px;
            margin-bottom: 16px;
            font-size: 13px;
        }

        .mish-stock-modal-actions {
            display: flex;
            justify-content: flex-end;
            gap: 12px;
            margin-top: 18px;
        }
        /* MISH STOCK PRODUCTS MODULE END */


        /* MISH STOCK HISTORY EXPORT START */
        .mish-stock-history-screen {
            width: 100%;
        }

        .mish-stock-breadcrumb {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            background: #fafafa;
            padding: 9px 14px;
            border-radius: 0 0 10px 10px;
            font-size: 13px;
            margin-bottom: 18px;
            color: var(--text-dark);
        }

        .mish-stock-breadcrumb .link {
            color: #6d28d9;
            cursor: pointer;
            font-weight: 600;
        }

        .mish-stock-history-toolbar {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 26px;
            flex-wrap: wrap;
        }

        .mish-stock-date-filter {
            height: 52px;
            min-width: 190px;
            border: 1px solid #9ca3af;
            border-radius: 4px;
            background: var(--white);
            display: flex;
            align-items: center;
            padding: 0 12px;
            position: relative;
        }

        .mish-stock-date-filter label {
            position: absolute;
            top: -9px;
            left: 9px;
            background: var(--white);
            padding: 0 4px;
            color: var(--text-gray);
            font-size: 11px;
            font-weight: 600;
        }

        .mish-stock-date-filter input {
            border: none;
            outline: none;
            width: 100%;
            background: transparent;
            font-size: 13px;
        }

        .mish-stock-export-btn {
            margin-left: auto;
            border: none;
            border-radius: 5px;
            background: #6d28d9;
            color: var(--white);
            font-size: 13px;
            font-weight: 700;
            padding: 12px 16px;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 6px;
        }

        .mish-stock-selected-pill {
            margin-left: auto;
            background: #9ca3af;
            color: #fff;
            border-radius: 18px;
            padding: 7px 12px;
            font-size: 13px;
            font-weight: 700;
        }

        .mish-stock-select-cell {
            width: 42px;
        }

        .mish-stock-check {
            width: 16px;
            height: 16px;
            accent-color: #6d28d9;
            cursor: pointer;
        }

        .mish-stock-history-table-wrap {
            background: #fafafa;
            border-radius: 12px;
            overflow: hidden;
        }

        .mish-stock-history-table {
            width: 100%;
            border-collapse: collapse;
        }

        .mish-stock-history-table th,
        .mish-stock-history-table td {
            padding: 13px 18px;
            text-align: left;
            font-size: 13px;
            border-bottom: 1px solid #ededed;
            vertical-align: middle;
        }

        .mish-stock-history-table th {
            color: var(--black);
            font-weight: 700;
        }

        .mish-stock-sale-tag {
            display: inline-block;
            background: #ede9fe;
            color: #6d28d9;
            border-radius: 4px;
            padding: 3px 7px;
            font-size: 11px;
            font-weight: 700;
            margin-left: 6px;
        }
        /* MISH STOCK HISTORY EXPORT END */


        /* MISH EXPORT SELECTED BUTTON START */
        .mish-export-selected-top-btn {
            margin-left: auto;
            border: none;
            border-radius: 5px;
            background: #6d28d9;
            color: var(--white);
            font-size: 13px;
            font-weight: 700;
            padding: 12px 16px;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 6px;
        }

        .mish-export-selected-top-btn:disabled {
            background: #d1d5db;
            cursor: not-allowed;
            opacity: 0.8;
        }
        /* MISH EXPORT SELECTED BUTTON END */


        /* MISH PRODUCTS INVENTORY CATEGORIES START */
        .mish-product-category-tabs {
            display: flex;
            gap: 26px;
            align-items: center;
            margin-bottom: 24px;
            overflow-x: auto;
            white-space: nowrap;
        }

        .mish-product-category-tab {
            font-size: 12px;
            color: var(--text-gray);
            font-weight: 600;
            padding-bottom: 10px;
            cursor: pointer;
            position: relative;
        }

        .mish-product-category-tab.active {
            color: var(--black);
        }

        .mish-product-category-tab.active::after {
            content: "";
            position: absolute;
            left: 0;
            bottom: 0;
            width: 36px;
            height: 3px;
            background: #6d28d9;
            border-radius: 8px;
        }

        .mish-product-topbar {
            display: flex;
            justify-content: flex-end;
            align-items: center;
            gap: 14px;
            margin-bottom: 18px;
        }

        .mish-product-purple-btn {
            background: #6d28d9;
            color: var(--white);
            border: none;
            border-radius: 4px;
            padding: 10px 18px;
            font-size: 13px;
            font-weight: 700;
            cursor: pointer;
        }

        .mish-product-new-link {
            color: #6d28d9;
            font-size: 13px;
            font-weight: 700;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 5px;
        }

        .mish-product-modal-card {
            width: 100%;
            max-width: 345px;
            max-height: 92vh;
            overflow-y: auto;
            background: var(--white);
            border-radius: 6px;
            box-shadow: 0 18px 45px rgba(0,0,0,.28);
            padding: 22px;
            text-align: left;
        }

        .mish-product-modal-title {
            font-size: 17px;
            font-weight: 800;
            margin-bottom: 20px;
            color: var(--black);
        }

        .mish-product-status-toggle {
            display: inline-flex;
            border: 1px solid var(--border-color);
            border-radius: 4px;
            overflow: hidden;
            margin-bottom: 18px;
        }

        .mish-product-status-toggle button,
        .mish-unit-toggle button {
            border: none;
            background: var(--white);
            padding: 10px 13px;
            font-size: 12px;
            cursor: pointer;
            color: var(--text-dark);
        }

        .mish-product-status-toggle button.active,
        .mish-unit-toggle button.active {
            background: #e5e7eb;
            font-weight: 700;
        }

        .mish-product-field {
            margin-bottom: 14px;
        }

        .mish-product-field label {
            display: block;
            font-size: 11px;
            color: var(--text-gray);
            font-weight: 700;
            margin-bottom: 6px;
        }

        .mish-product-input,
        .mish-product-select {
            width: 100%;
            height: 46px;
            border: 1px solid #9ca3af;
            border-radius: 3px;
            padding: 0 12px;
            font-size: 13px;
            outline: none;
            background: var(--white);
            color: var(--text-dark);
        }

        .mish-product-row {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 10px;
        }

        .mish-unit-toggle {
            display: grid;
            grid-template-columns: repeat(6, 1fr);
            border: 1px solid var(--border-color);
            border-radius: 4px;
            overflow: hidden;
        }

        .mish-product-price-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 10px;
            align-items: center;
        }

        .mish-product-calculated {
            background: #e5e7eb;
            border-radius: 4px;
            padding: 12px;
            min-height: 46px;
            font-size: 12px;
            color: var(--text-gray);
        }

        .mish-product-stock-row {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 10px;
        }

        .mish-product-suffix-input {
            position: relative;
        }

        .mish-product-suffix-input span {
            position: absolute;
            right: 10px;
            top: 33px;
            color: var(--text-gray);
            font-size: 11px;
        }

        .mish-product-footer {
            display: flex;
            justify-content: flex-end;
            gap: 10px;
            margin-top: 18px;
        }

        .mish-products-empty {
            text-align: center;
            color: var(--text-gray);
            padding: 28px;
        }
        /* MISH PRODUCTS INVENTORY CATEGORIES END */

        /* MISH CLEAN PRODUCTS MODULE START */
        .mish-clean-products-shell {
            width: 100%;
            padding: 0;
        }

        .mish-clean-products-tabs {
            display: flex;
            gap: 28px;
            align-items: center;
            margin-bottom: 34px;
            overflow-x: auto;
            white-space: nowrap;
        }

        .mish-clean-products-tab {
            font-size: 13px;
            color: var(--text-gray);
            font-weight: 600;
            padding-bottom: 11px;
            cursor: pointer;
            position: relative;
        }

        .mish-clean-products-tab.active {
            color: var(--black);
            font-weight: 800;
        }

        .mish-clean-products-tab.active::after {
            content: "";
            position: absolute;
            left: 0;
            bottom: 0;
            width: 38px;
            height: 3px;
            border-radius: 8px;
            background: #6d28d9;
        }

        .mish-clean-products-actions {
            display: flex;
            justify-content: flex-end;
            align-items: center;
            gap: 18px;
            margin-bottom: 24px;
        }

        .mish-clean-products-update {
            background: #6d28d9;
            color: var(--white);
            border: none;
            border-radius: 4px;
            padding: 12px 18px;
            font-size: 13px;
            font-weight: 800;
            cursor: pointer;
        }

        .mish-clean-products-new {
            color: #6d28d9;
            font-size: 13px;
            font-weight: 800;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 6px;
        }

        .mish-clean-products-filterbar {
            display: flex;
            gap: 10px;
            align-items: center;
            margin-bottom: 18px;
            flex-wrap: wrap;
        }

        .mish-clean-products-search {
            min-width: 220px;
            height: 52px;
            border: 1px solid #d1d5db;
            border-radius: 4px;
            background: var(--white);
            display: flex;
            align-items: center;
            padding: 0 12px;
            gap: 8px;
        }

        .mish-clean-products-search input,
        .mish-clean-products-state select {
            border: none;
            outline: none;
            background: transparent;
            width: 100%;
            font-size: 13px;
            color: var(--text-dark);
        }

        .mish-clean-products-state {
            width: 135px;
            height: 52px;
            border: 1px solid #d1d5db;
            border-radius: 4px;
            background: var(--white);
            display: flex;
            align-items: center;
            padding: 0 10px;
        }

        .mish-clean-products-tablewrap {
            background: var(--white);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            overflow: hidden;
        }

        .mish-clean-products-table {
            width: 100%;
            border-collapse: collapse;
        }

        .mish-clean-products-table th,
        .mish-clean-products-table td {
            padding: 14px 18px;
            text-align: left;
            font-size: 13px;
            border-bottom: 1px solid #e5e7eb;
        }

        .mish-clean-products-table th {
            color: var(--black);
            font-weight: 800;
        }

        .mish-clean-products-empty {
            padding: 24px 18px;
            color: var(--text-gray);
            font-size: 13px;
        }

        .mish-clean-products-rowactions {
            display: flex;
            justify-content: flex-end;
            align-items: center;
            gap: 14px;
        }

        .mish-clean-product-icon {
            cursor: pointer;
            font-size: 20px;
            color: var(--black);
        }

        .mish-clean-product-icon.delete {
            color: #111827;
        }

        .mish-clean-product-modal-card {
            width: 100%;
            max-width: 345px;
            max-height: 92vh;
            overflow-y: auto;
            background: var(--white);
            border-radius: 6px;
            box-shadow: 0 18px 45px rgba(0,0,0,.28);
            padding: 22px;
            text-align: left;
        }

        .mish-clean-product-modal-title {
            font-size: 17px;
            font-weight: 800;
            margin-bottom: 20px;
            color: var(--black);
        }

        .mish-clean-product-toggle {
            display: inline-flex;
            border: 1px solid var(--border-color);
            border-radius: 4px;
            overflow: hidden;
            margin-bottom: 18px;
        }

        .mish-clean-product-toggle button,
        .mish-clean-unit-toggle button {
            border: none;
            background: var(--white);
            padding: 10px 13px;
            font-size: 12px;
            cursor: pointer;
            color: var(--text-dark);
        }

        .mish-clean-product-toggle button.active,
        .mish-clean-unit-toggle button.active {
            background: #e5e7eb;
            font-weight: 800;
        }

        .mish-clean-product-field {
            margin-bottom: 14px;
        }

        .mish-clean-product-field label {
            display: block;
            font-size: 11px;
            font-weight: 700;
            color: var(--text-gray);
            margin-bottom: 6px;
        }

        .mish-clean-product-input,
        .mish-clean-product-select {
            width: 100%;
            height: 46px;
            border: 1px solid #9ca3af;
            border-radius: 3px;
            padding: 0 12px;
            font-size: 13px;
            outline: none;
            background: var(--white);
            color: var(--text-dark);
        }

        .mish-clean-product-row {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 10px;
        }

        .mish-clean-unit-toggle {
            display: grid;
            grid-template-columns: repeat(6, 1fr);
            border: 1px solid var(--border-color);
            border-radius: 4px;
            overflow: hidden;
        }

        .mish-clean-product-pricegrid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 10px;
            align-items: center;
        }

        .mish-clean-product-calculated {
            background: #e5e7eb;
            border-radius: 4px;
            padding: 12px;
            min-height: 46px;
            font-size: 12px;
            color: var(--text-gray);
        }

        .mish-clean-product-suffix {
            position: relative;
        }

        .mish-clean-product-suffix span {
            position: absolute;
            right: 10px;
            top: 16px;
            color: var(--text-gray);
            font-size: 11px;
        }

        .mish-clean-product-footer {
            display: flex;
            justify-content: flex-end;
            gap: 10px;
            margin-top: 18px;
        }
        /* MISH CLEAN PRODUCTS MODULE END */

/* =========================================
   BELLA VET — funciones Volki con diseño Mish
========================================= */
.bv-bar{display:flex;gap:12px;align-items:center;margin-bottom:16px;flex-wrap:wrap}
.bv-bar .search-container{flex:1;min-width:220px}
.bv-sel{border:1px solid var(--border-color);border-radius:8px;padding:9px 10px;font-size:13px;background:#fff;color:var(--text-dark)}
.bv-new{display:inline-flex;align-items:center;gap:4px;border:0;border-radius:8px;padding:9px 16px;font-size:13px;font-weight:600;cursor:pointer}
.bv-link{background:none;border:0;color:#7c3aed;font-size:12px;font-weight:600;cursor:pointer;display:inline-flex;align-items:center;gap:2px;padding:4px}
.bv-link:hover{text-decoration:underline}
.bv-pill{background:var(--bg-light);border:1px solid var(--border-color);border-radius:999px;padding:6px 12px;font-size:12px;color:var(--text-dark);cursor:pointer;display:inline-flex;align-items:center;gap:4px}
.bv-pill:hover{background:var(--stat-blue)}
.bv-empty{text-align:center;color:var(--text-gray);padding:28px!important;font-size:13px}
.bv-pager{text-align:right;font-size:11px;color:var(--text-gray);padding:10px 4px}
.bv-click{cursor:pointer}.bv-click:hover td{background:var(--bg-light)}
.bv-bar2{display:flex;margin-bottom:8px}
.bv-emptybox{display:flex;align-items:center;justify-content:center;text-align:center;padding:36px 20px;background:#fefefe;border:1px dashed var(--border-color);border-radius:10px;color:var(--text-gray);font-size:14px;font-weight:500;margin-bottom:16px}
.bv-quick{display:flex;gap:10px;flex-wrap:wrap;justify-content:center;margin-top:16px}
.bv-hist{display:flex;flex-direction:column;gap:10px}
.bv-ev{display:flex;justify-content:space-between;align-items:center;border:1px solid var(--border-color);border-radius:10px;padding:12px 16px;cursor:pointer;background:#fff}
.bv-ev:hover{background:var(--bg-light)}.bv-ev p{font-size:12px;margin-top:4px}
.bv-chip{display:inline-block;background:var(--stat-purple);border-radius:999px;padding:3px 10px;font-size:11px;font-weight:700}
.bv-chart{width:100%;max-height:200px;margin-bottom:12px}
.bv-rem{display:flex;justify-content:space-between;align-items:flex-start;border-left:3px solid var(--badge-orange);background:var(--bg-light);border-radius:6px;padding:8px 10px;margin:8px 0;font-size:12px}
.bv-rem span{color:var(--text-gray);font-size:11px}
.bv-form{max-width:760px}.bv-formtitle{font-size:14px;font-weight:700;margin-bottom:10px}
.bv-grid2{display:grid;grid-template-columns:1fr 1fr;gap:0 14px}
.bv-l{display:block;font-size:11px;font-weight:600;color:var(--text-gray);margin:10px 0 3px}
.bv-ta{min-height:70px;resize:vertical;font-family:inherit}
.bv-box .login-input{margin-bottom:2px;width:100%}
.bv-box{max-height:90vh;overflow:auto;text-align:left}
.bv-seg{display:flex;border:1px solid var(--border-color);border-radius:8px;overflow:hidden;margin-bottom:6px}
.bv-seg button{flex:1;border:0;background:#fff;padding:8px;font-size:12px;cursor:pointer}
.bv-seg button.on{background:var(--primary-dark-blue);color:#fff;font-weight:600}
.bv-chk{display:flex;align-items:center;gap:8px;font-size:13px;margin:10px 0}
.bv-acc{border:1px solid var(--border-color);border-radius:8px;padding:8px 12px;margin:10px 0}.bv-acc summary{cursor:pointer;font-size:12px;font-weight:700}
.bv-sub{display:flex;justify-content:space-between;align-items:center;font-size:12px;margin:18px 0 8px}
.bv-addrow{display:grid;grid-template-columns:1fr 160px auto;gap:10px;align-items:center;margin-bottom:8px}
.bv-infoline{display:flex;gap:8px;margin:6px 0}.bv-hint{font-size:11px;color:var(--text-gray);margin-top:2px}
.bv-formfoot{display:flex;justify-content:flex-end;gap:10px;margin-top:20px}
.bv-pick div{display:flex;justify-content:space-between;padding:9px 6px;border-bottom:1px solid var(--border-color);cursor:pointer;font-size:13px}.bv-pick div:hover{background:var(--stat-blue)}.bv-pick span{color:var(--text-gray)}
.bv-cbtn{display:flex;align-items:center;gap:8px;border:1px solid var(--border-color);border-radius:8px;padding:10px 14px;color:var(--text-dark);text-decoration:none;font-size:13px}.bv-cbtn:hover{background:var(--stat-blue)}
.bv-msg{display:flex;justify-content:space-between;gap:12px;border:1px solid var(--border-color);border-radius:8px;padding:10px 12px;margin-bottom:8px;font-size:13px}.bv-msg p{color:var(--text-gray);font-size:12px;margin-top:2px}
#bvToast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%) translateY(20px);background:#111;color:#fff;padding:10px 18px;border-radius:8px;font-size:13px;opacity:0;pointer-events:none;transition:.25s;z-index:3000}#bvToast.show{opacity:1;transform:translateX(-50%)}
.bv-ov{z-index:2000}
.bv-leg{display:flex;flex-wrap:wrap;gap:6px 14px;justify-content:center;font-size:11px;color:var(--text-gray);margin-top:10px}.bv-leg i{display:inline-block;width:9px;height:9px;border-radius:50%;margin-right:4px}
/* agenda */
.bv-agenda{display:grid;grid-template-columns:1fr 230px;gap:20px;align-items:start}
.bv-week{display:grid;grid-template-columns:56px repeat(7,1fr);border:1px solid var(--border-color);border-radius:10px;overflow:auto;background:#fff;max-height:640px}
.bv-wh{position:sticky;top:0;background:#fff;text-align:center;font-size:12px;padding:8px 2px;border-bottom:1px solid var(--border-color);z-index:1}.bv-wh small{font-size:14px;font-weight:600}.bv-wh.now{color:#16a34a;font-weight:700}
.bv-hr{font-size:10px;color:var(--text-gray);text-align:right;padding:4px 6px;border-top:1px solid #f1f1f3}
.bv-cell{min-height:46px;border-top:1px solid #f1f1f3;border-left:1px solid #f1f1f3;padding:2px;cursor:pointer}.bv-cell:hover{background:var(--bg-light)}
.bv-slot{border-radius:5px;padding:3px 5px;font-size:10px;line-height:1.25;margin-bottom:2px;overflow:hidden}.bv-slot small{opacity:.75}
.bv-mini{background:#fff;border:1px solid var(--border-color);border-radius:10px;padding:12px}
.bv-mh{display:flex;align-items:center;justify-content:space-between;font-size:12px;margin-bottom:8px;gap:6px;text-transform:capitalize}
.bv-mg{display:grid;grid-template-columns:repeat(7,1fr);text-align:center;font-size:11px;gap:2px}.bv-mg .dn{color:var(--text-gray);font-weight:600;padding:3px}
.bv-mg .d{padding:6px 0;border-radius:6px;cursor:pointer}.bv-mg .d:hover{background:var(--stat-blue)}.bv-mg .d.o{color:#c4c8d0}.bv-mg .d.w{background:#fce7f3}.bv-mg .d.t{background:var(--stat-green);font-weight:700}
@media(max-width:900px){.bv-agenda{grid-template-columns:1fr}.bv-grid2{grid-template-columns:1fr}.bv-addrow{grid-template-columns:1fr}}
/* Ventas Bella Vet */
.bv-f{display:flex;flex-direction:column;gap:3px;font-size:11px;color:var(--text-gray)}.bv-f input,.bv-f select{border:1px solid var(--border-color);border-radius:8px;padding:8px 10px;font-size:13px;background:#fff;color:var(--text-dark)}
.bv-badge{display:inline-block;background:var(--badge-orange);color:#fff;border-radius:999px;font-size:10px;padding:1px 7px;font-weight:700}
.bv-chip2{background:#e5e7eb;border-radius:4px;font-size:10px;padding:1px 6px;margin-left:4px}.bv-an td{color:#9ca3af}
.bv-debt{background:var(--stat-yellow);border-radius:999px;padding:3px 10px;font-size:12px;font-weight:600;cursor:pointer}
.bv-acts{white-space:nowrap;text-align:right}.bv-acts .material-icons-outlined{cursor:pointer}
.bv-sumbar{display:flex;justify-content:space-between;align-items:center;margin-top:16px;flex-wrap:wrap;gap:12px}.bv-tot{display:flex;gap:28px;font-size:13px}.bv-tot b{font-size:18px;margin-left:6px}
.bv-addsale{grid-template-columns:2fr 1fr 110px 130px auto}.bv-sug table td{font-size:12px}
.bv-sum{text-align:right;margin-top:14px;font-size:13px;line-height:2}.bv-big{font-size:16px}.bv-big b{font-size:20px}
.bv-dhead{display:flex;justify-content:space-between;font-size:13px;line-height:1.9;margin-bottom:12px}.bv-state{display:inline-block;color:#fff;font-size:11px;font-weight:700;border-radius:4px;padding:3px 10px}
@media(max-width:900px){.bv-addsale{grid-template-columns:1fr}}

/* ---- Paginación real, navegación de semana y filtros de turnos (paso 4) ---- */
.bv-pager{display:flex;gap:12px;align-items:center;justify-content:flex-end;flex-wrap:wrap}
.bv-pgnav{display:inline-flex;align-items:center;gap:4px}
.bv-pgsel{border:1px solid var(--border-color);border-radius:6px;padding:3px 6px;font-size:11px;background:#fff;color:var(--text-dark)}
.bv-pgrange{min-width:76px;text-align:center}
.bv-pgb{min-width:28px;height:28px;padding:0 6px;border:1px solid transparent;border-radius:6px;background:none;color:var(--text-dark);font-size:12px;cursor:pointer;display:inline-flex;align-items:center;justify-content:center}
.bv-pgb .material-icons-outlined{font-size:18px}
.bv-pgb:hover:not(:disabled){background:var(--bg-light);border-color:var(--border-color)}
.bv-pgb.on{background:var(--primary-dark-blue);color:#fff;font-weight:700}
.bv-pgb:disabled{opacity:.35;cursor:default}
.bv-pgb:focus-visible,.bv-pgsel:focus-visible{outline:2px solid #7c3aed;outline-offset:1px}
.bv-pgdots{color:var(--text-gray);padding:0 2px}
.bv-agl{min-width:0}
.bv-wnav{display:flex;align-items:center;gap:8px;margin-bottom:10px;font-size:13px}
.bv-wnav b{min-width:190px;text-align:center}
/* foto del paciente (v1.9) */
.bv-photo{display:flex;align-items:center;gap:14px;margin:2px 0 14px}
.bv-photo-img{width:64px;height:64px;border-radius:50%;background:#f3f4f6 center/cover no-repeat;display:flex;align-items:center;justify-content:center;color:#9ca3af;flex:none;overflow:hidden}
.patient-avatar-large{overflow:hidden}


/* =========================================
   ESTILIZACIÓN DE LOGOTIPO Y REPORTES PRO
========================================= */
.sidebar .logo-container {
    height: 82px;
    padding: 12px 18px;
    justify-content: flex-start;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border-bottom: 1px solid #e2e8f0;
}
.bv-brand-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-width: 0;
}
.bv-brand-avatar {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 10px -2px rgba(15, 23, 42, 0.08), 0 0 0 3px rgba(59, 130, 246, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    flex-shrink: 0;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.bv-brand-wrap:hover .bv-brand-avatar {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px -2px rgba(59, 130, 246, 0.18), 0 0 0 3px rgba(59, 130, 246, 0.14);
}
.bv-brand-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 9px;
}
.bv-brand-avatar.fallback {
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
    color: #ffffff;
    border: none;
}
.bv-brand-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.bv-brand-name {
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.bv-brand-sub {
    font-size: 10px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 2px;
}

/* Tarjeta de logo en Datos del negocio */
.business-store-icon {
    width: 116px;
    height: 116px;
    border-radius: 18px;
    background: linear-gradient(145deg, #ffffff, #f1f5f9);
    border: 1.5px dashed #cbd5e1;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.05);
    padding: 8px;
    transition: all 0.2s ease;
}
.business-store-icon:hover {
    border-color: #3b82f6;
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.14);
    transform: translateY(-2px);
}
#bizLogoPreview {
    padding: 6px;
    border-radius: 14px;
    background: #ffffff;
}

/* Reportes Profesionales */
.bv-rep-header {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 18px 22px;
    margin-bottom: 18px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.bv-rep-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px;
}
.bv-rep-presets {
    display: flex;
    gap: 6px;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 10px;
}
.bv-rep-preset {
    border: none;
    background: transparent;
    padding: 6px 12px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-gray);
    cursor: pointer;
    transition: all 0.15s;
}
.bv-rep-preset.active {
    background: var(--white);
    color: var(--black);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.bv-rep-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}
.bv-rep-kpi {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.bv-rep-kpi-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.bv-rep-kpi-lbl {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-gray);
    letter-spacing: 0.04em;
}
.bv-rep-kpi-val {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-dark);
}
.bv-rep-kpi-sub {
    font-size: 11px;
    color: var(--text-gray);
    margin-top: 4px;
}
.bv-rep-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-bottom: 18px;
}
.bv-rep-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.bv-rep-card h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.bv-bar-row {
    margin-bottom: 10px;
}
.bv-bar-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    margin-bottom: 4px;
}
.bv-bar-track {
    width: 100%;
    height: 8px;
    background: #f1f5f9;
    border-radius: 999px;
    overflow: hidden;
}
.bv-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #7c3aed);
    border-radius: 999px;
}
@media(max-width: 900px) {
    .bv-rep-grid { grid-template-columns: 1fr; }
}


/* =========================================
   DISEÑO RESPONSIVO UNIVERSAL (MÓVIL, TABLET Y ESCRITORIO)
========================================= */

/* Grids del módulo de compras y reportes */
.bv-comp-kpis { grid-template-columns: repeat(4, 1fr); }
.bv-comp-hdr-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.bv-comp-pay-grid { display: grid; grid-template-columns: 1fr 1fr 2fr; gap: 12px; align-items: center; }
.bv-comp-item-grid {
    display: grid;
    grid-template-columns: 100px 2fr 130px 95px 115px 85px 70px 90px 70px 75px 90px auto;
    gap: 6px;
    align-items: end;
    margin-bottom: 12px;
}
.bv-rep-split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* Tablas con scroll horizontal fluido en cualquier pantalla */
.table-container,
.mish-inventory-table,
.mish-stock-table-wrap,
.mish-clean-products-tablewrap,
.mish-sales-table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Backdrop y Barra de Navegación Inferior Móvil (oculta en escritorio) */
.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(2px);
    z-index: 1150;
}
.sidebar-backdrop.show { display: block; }

.bv-bottom-nav {
    display: none;
}

/* ---- TABLETS (769px a 1180px) ---- */
@media (max-width: 1180px) {
    .stats-grid,
    .bv-comp-kpis {
        grid-template-columns: repeat(3, 1fr);
        gap: 14px;
    }
    .bv-comp-hdr-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .bv-comp-pay-grid {
        grid-template-columns: 1fr 1fr;
    }
    .bv-comp-item-grid {
        grid-template-columns: repeat(4, 1fr);
        background: #f8fafc;
        padding: 12px;
        border-radius: 10px;
        border: 1px solid var(--border-color);
    }
    .history-layout {
        flex-direction: column;
    }
    .history-sidebar-info {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
        gap: 14px;
    }
    .bv-agenda {
        grid-template-columns: 1fr;
    }
    .bv-mini {
        order: -1;
    }
}

/* ---- MÓVILES Y PANTALLAS PEQUEÑAS (<= 768px) ---- */
@media (max-width: 768px) {
    html, body {
        height: 100dvh;
        overflow-x: hidden;
    }

    /* Login adaptable con teclado virtual */
    #loginPage {
        flex-direction: column;
        height: 100dvh;
        overflow-y: auto;
    }
    .login-left {
        flex: none;
        height: 150px;
        border-bottom-right-radius: 40% 35%;
        border-bottom-left-radius: 40% 35%;
        border-top-right-radius: 0;
    }
    .login-right {
        flex: 1;
        padding: 24px 20px 40px 20px;
        align-items: flex-start;
    }
    .login-box {
        max-width: 100%;
    }
    .login-input,
    .bv-sel,
    .bv-f input,
    .bv-f select,
    .input-text,
    .select-custom,
    .textarea-custom {
        font-size: 16px !important; /* Evita zoom automático en iOS Safari */
        min-height: 44px;
    }
    .login-btn,
    .btn-accept,
    .btn-cancel,
    .action-icon-btn,
    .action-pill-btn {
        min-height: 44px;
    }

    /* Sidebar como Drawer lateral deslizable */
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 270px !important;
        max-width: 82vw;
        z-index: 1200;
        transform: translateX(-105%);
        transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 10px 0 30px rgba(15, 23, 42, 0.22);
        border-right: 1px solid var(--border-color);
    }
    .sidebar.sidebar-open {
        transform: translateX(0);
    }
    .sidebar.sidebar-hidden {
        width: 270px !important;
        transform: translateX(-105%);
    }
    .sidebar.sidebar-hidden.sidebar-open {
        transform: translateX(0);
    }

    /* Topbar y área de contenido */
    .main-wrapper {
        width: 100%;
        min-width: 0;
        height: 100dvh;
    }
    .topbar {
        padding: 0 12px;
        height: 58px;
        padding-top: env(safe-area-inset-top);
    }
    .user-name {
        max-width: 95px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 13px;
    }
    .content {
        padding: 16px 12px calc(84px + env(safe-area-inset-bottom)) 12px;
    }

    /* Barra de navegación inferior móvil */
    .bv-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: calc(62px + env(safe-area-inset-bottom));
        padding-bottom: env(safe-area-inset-bottom);
        background: rgba(255, 255, 255, 0.96);
        backdrop-filter: blur(8px);
        border-top: 1px solid var(--border-color);
        z-index: 1050;
        justify-content: space-around;
        align-items: center;
        box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.06);
    }
    .bv-bnav-item {
        flex: 1;
        height: 100%;
        border: none;
        background: none;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        color: var(--text-gray);
        font-size: 10px;
        font-weight: 600;
        cursor: pointer;
        padding: 4px 2px;
        transition: color 0.15s;
    }
    .bv-bnav-item .material-icons-outlined {
        font-size: 21px;
    }
    .bv-bnav-item.active {
        color: #7c3aed;
        font-weight: 700;
    }

    /* Cabeceras, pills y grids en móvil */
    .inicio-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 20px;
    }
    .pills-container {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
    }
    .pill {
        white-space: nowrap;
        padding: 8px 14px;
    }
    .stats-grid,
    .bv-comp-kpis,
    .bv-rep-kpis {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-bottom: 18px;
    }
    .stat-card {
        padding: 16px 10px;
    }
    .stat-circle {
        width: 54px;
        height: 54px;
        font-size: 18px;
    }
    .charts-grid,
    .bv-rep-grid,
    .bv-rep-split,
    .bv-comp-hdr-grid,
    .bv-comp-pay-grid,
    .bv-comp-item-grid,
    .form-row {
        grid-template-columns: 1fr;
    }

    /* Tabs horizontales deslizables */
    .tabs {
        gap: 18px;
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 2px;
        -webkit-overflow-scrolling: touch;
    }
    .tab {
        padding-bottom: 10px;
        flex-shrink: 0;
    }

    /* Barras de búsqueda y filtros */
    .bv-bar,
    .toolbar-container,
    .bv-rep-header,
    .bv-rep-filters {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .bv-bar .search-container,
    .search-input-container,
    .bv-f,
    .bv-sel {
        width: 100%;
        max-width: 100%;
    }
    .bv-rep-presets {
        width: 100%;
        overflow-x: auto;
        justify-content: space-between;
    }
    .bv-rep-preset {
        flex: 1;
        white-space: nowrap;
        padding: 8px 8px;
    }

    /* Tarjeta de Negocio */
    .business-card,
    .download-box {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        padding: 18px;
    }

    /* Tablas compactas y legibles */
    .data-table th,
    .data-table td {
        padding: 11px 10px;
        font-size: 12px;
        white-space: nowrap;
    }

    /* Modales adaptados a pantalla completa móvil */
    .modal-overlay {
        padding: 10px;
        align-items: flex-end;
    }
    .modal-box,
    .bv-box,
    .mish-sales-modal-box,
    .mish-clean-product-modal-card,
    .mish-stock-modal-card {
        width: 100% !important;
        max-width: 100% !important;
        max-height: 88dvh;
        border-radius: 16px 16px 10px 10px;
        padding: 18px 16px;
        overflow-y: auto;
    }
    .modal-footer-btns {
        flex-direction: column-reverse;
        gap: 8px;
    }
    .modal-footer-btns button {
        width: 100%;
    }

    /* Agenda y Ficha clínica */
    .history-main-content {
        padding: 14px;
    }
    .bv-dhead {
        flex-direction: column;
        gap: 8px;
    }
    .bv-dhead > div {
        text-align: left !important;
    }
    .bv-sumbar {
        flex-direction: column;
        align-items: flex-start;
    }
    .bv-tot {
        flex-direction: column;
        gap: 6px;
    }
    .bv-wnav b {
        min-width: auto;
        font-size: 12px;
    }
}

@keyframes bvModalPop { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: none; } }
