* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }  

  .form-register {
    width: 95%;
    background: #565f68;
    padding: 30px;
    margin: auto;
    margin-top: 5px;
    border-radius: 7px;
    font-family: 'calibri';
    color: white;
    box-shadow: 3px 6px 9px #000;
  }
  .form-register2 {
    width: 100%;
    background: #b3bcc5;
    padding: 10px;
    margin: auto;
    margin-top: 5px;
    border-radius: 10px;
    font-family: 'calibri';
    font-size: 22px;
    color: rgb(0, 0, 0);
    box-shadow: 1px 2px 3px #000;
  }
  
  .form-register h4 {
    font-size: 22px;
    margin-bottom: 20px;
  }
  
  .Vcontrol {
    width: 100%;
    background: #ffffff;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 16px;
    border: 1px solid #061025;
    font-family: 'calibri';
    font-size: 18px;
    color: rgb(0, 0, 0);
  }
  
  .form-register p {
    height: 40px;
    text-align: center;
    font-size: 18px;
    line-height: 40px;
  }
  
  .form-register a {
    color: rgb(0, 0, 0);
    text-decoration: none;
  }
  
  .form-register a:hover {
    color: rgb(0, 0, 0);
    text-decoration: underline;
  }
  
  .form-register .botons {
    width: 100%;
    background: #1f53c5;
    border: none;
    padding: 12px;
    color: white;
    margin: 16px 0;
    font-size: 16px;
  }
#reg_px{
  display: none;
}
#add_est{
  display: none;
}
.form-label {
	display: block;
	font-weight: 700;
	padding: 10px;
	cursor: pointer;
}
.form1 {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
}
.formulario_reg-incorrecto .form-control{
  color: rgb(165, 16, 16);
}
.formulario_reg-correcto .form-control{
  color: rgb(10, 126, 25);
}

.form-control{
  width: 100%;
	background: #fff;
	border: 1px solid;
	border-radius: 3px;
	height: 45px;
	line-height: 45px;
	padding: 0 40px 0 10px;
	transition: .3s ease all;
}
.form-control:focus{
  border: 3px solid #325d8f;
	outline: none;
	box-shadow: 3px 0px 30px rgba(163,163,163, 0.4);
}
.email_error{
	display: none;
}
.email_error-activo{
	display: block;
}
#guardar_form1{
  display: none;
}
#guardar_form2{
  display: none;
}
.mycheckbox input:checked ~ span::after{
  background: rgba(14, 178, 14, 0.781);
  transform: scale(0.9) translate(33px);
}
.mycheckbox input:checked ~ span .on{
  transform: translate(30px);
  opacity: 1;
}
.mycheckbox input:checked ~ span .off{
  transform: translate(30px);
  opacity: 0;
}
.mycheckbox input:checked ~ span i{
  transform: translate(30px);
}
.mycheckbox input{
  display: none;
}
.mycheckbox span{
  display: inline-block;
  width: 60px;
  height: 30px;
  background: rgba(175, 187, 192, 0.905);
  border-radius: 30px;
  cursor: pointer;
  box-shadow: inset 2px 2px 2px rgb(67, 67, 67);

  position: relative;

}
.mycheckbox span::after {
  content: "";
  display: inline-block;
  width: 30px;
  height: 30px;
  transform: scale(0.9);
  border-radius: 30px;
  background: rgba(255, 0, 0, 0.653);
  transition: 0.5s;
  box-shadow: inset 2px 2px 2px rgb(122, 121, 121);
}

.mycheckbox i {
  position: relative;
  left: 7px;
  top: 7px;
  z-index: 1;
  color: white;
  transition: 0.5s;
}
.mycheckbox .on{
  opacity: 0;
  transition: 0.5s;
}
.mycheckbox .off{
  opacity: 1;
  transition: 0.5s;
}

/* ===== Tablero principal y configuración del laboratorio ===== */
.sj-dashboard,
.sj-config-page { background: #f4f7fb; min-height: 100vh; color: #102a4c; }
.sj-dashboard-hero,
.sj-config-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.sj-dashboard-brand { display: flex; align-items: center; gap: 18px; min-width: 0; }
.sj-dashboard-logo-wrap { width: 88px; height: 88px; flex: 0 0 88px; display: grid; place-items: center; background: #fff; border: 1px solid #e2e8f0; border-radius: 18px; box-shadow: 0 8px 25px rgba(16,42,76,.08); overflow: hidden; }
.sj-dashboard-logo { width: 78px; height: 78px; object-fit: contain; }
.sj-dashboard-eyebrow { display: block; margin-bottom: 5px; color: #1769c2; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.sj-dashboard-hero h1,
.sj-config-heading h1 { margin: 0; color: #082d5b; font-size: clamp(26px,3vw,38px); font-weight: 800; }
.sj-dashboard-hero p,
.sj-config-heading p,
.sj-section-heading p { margin: 5px 0 0; color: #667085; }
.sj-btn-primary { background: #0d5db8; border: 1px solid #0d5db8; color: #fff !important; font-weight: 700; }
.sj-btn-primary:hover { background: #084b96; border-color: #084b96; }
.sj-btn-outline { background: #fff; border: 1px solid #ccd6e3; color: #164e8c !important; font-weight: 700; }
.sj-btn-outline:hover { background: #edf5ff; border-color: #8bb7e7; }

.sj-quick-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; margin-bottom: 18px; }
.sj-quick-card { display: flex; align-items: center; gap: 14px; min-height: 104px; padding: 20px; color: #17395f; background: #fff; border: 1px solid #e0e7ef; border-radius: 14px; box-shadow: 0 7px 22px rgba(16,42,76,.06); text-decoration: none !important; transition: transform .18s ease, box-shadow .18s ease; }
.sj-quick-card:hover { color: #0d5db8; transform: translateY(-2px); box-shadow: 0 12px 28px rgba(16,42,76,.11); }
.sj-quick-card > i { width: 46px; height: 46px; flex: 0 0 46px; display: grid; place-items: center; color: #0d5db8; background: #eaf3ff; border-radius: 12px; font-size: 20px; }
.sj-quick-card span { display: grid; gap: 3px; }
.sj-quick-card strong { font-size: 16px; }
.sj-quick-card small { color: #7a8798; }
.sj-quick-primary { color: #fff; background: linear-gradient(135deg,#0b5bb6,#173d78); border-color: transparent; }
.sj-quick-primary:hover { color: #fff; }
.sj-quick-primary > i { color: #fff; background: rgba(255,255,255,.16); }
.sj-quick-primary small { color: #dceaff; }

.sj-metric-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; margin-bottom: 18px; }
.sj-metric-card { display: flex; align-items: center; gap: 13px; padding: 17px; color: #17395f !important; background: #fff; border: 1px solid #e0e7ef; border-radius: 12px; text-decoration: none !important; }
.sj-metric-card span:last-child { display: grid; }
.sj-metric-card small { color: #667085; font-weight: 600; }
.sj-metric-card strong { color: #102f56; font-size: 25px; }
.sj-metric-icon { width: 42px; height: 42px; flex: 0 0 42px; display: grid; place-items: center; border-radius: 10px; }
.sj-metric-icon.blue { color:#1769c2; background:#eaf3ff; }.sj-metric-icon.amber { color:#b76a00; background:#fff3dc; }.sj-metric-icon.teal { color:#087c72; background:#def7f3; }.sj-metric-icon.violet { color:#6941c6; background:#f1eafe; }
.sj-secondary-links { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.sj-secondary-links a { padding: 8px 13px; color: #365a82; background: #fff; border: 1px solid #dce4ed; border-radius: 999px; font-size: 13px; font-weight: 700; text-decoration: none; }
.sj-secondary-links a:hover { color: #0d5db8; border-color: #8bb7e7; }

.sj-patient-card,
.sj-config-card { padding: 24px; margin-bottom: 20px; background: #fff; border: 1px solid #e0e7ef; border-radius: 14px; box-shadow: 0 7px 22px rgba(16,42,76,.055); }
.sj-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.sj-section-heading h2,
.sj-config-card h2 { margin: 0; color: #102f56; font-size: 22px; font-weight: 800; }
.sj-patient-card .table thead th { color: #47617d; background: #f4f7fb; border-bottom: 1px solid #dbe3ec; font-size: 12px; letter-spacing: .035em; text-transform: uppercase; }
.sj-patient-card .table td { color: #344b65; border-color: #e7edf4; vertical-align: middle; }
.sj-folio { color: #0d5db8; font-weight: 800; }
.sj-patient-actions { white-space: nowrap; }

.sj-config-page { padding-bottom: 40px; }
.sj-config-card h2 { margin-bottom: 18px; }
.sj-logo-panel { display: flex; align-items: center; gap: 22px; }
.sj-logo-panel h2 { margin-bottom: 7px; }
.sj-logo-panel p,
.sj-config-help { color: #667085; }
.sj-logo-preview { width: 130px; height: 130px; flex: 0 0 130px; display: grid; place-items: center; overflow: hidden; background: #f8fafc; border: 1px dashed #b9c5d3; border-radius: 16px; }
.sj-logo-preview img { width: 116px; height: 116px; object-fit: contain; }
.sj-file-input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.sj-config-card .form-label { color: #334e6d; font-weight: 700; }
.sj-config-card .form-control { min-height: 43px; border-color: #ccd6e3; }
.sj-config-card .form-control:focus { border-color: #5599dd; box-shadow: 0 0 0 .2rem rgba(13,93,184,.12); }
.sj-config-actions { display: flex; justify-content: flex-end; gap: 10px; }

@media (max-width: 1100px) { .sj-quick-grid,.sj-metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 767.98px) {
  .sj-dashboard-hero,.sj-config-heading,.sj-section-heading { align-items: flex-start; flex-direction: column; }
  .sj-dashboard-brand { align-items: flex-start; }
  .sj-dashboard-logo-wrap { width:72px;height:72px;flex-basis:72px; }.sj-dashboard-logo { width:64px;height:64px; }
  .sj-quick-grid,.sj-metric-grid { grid-template-columns: 1fr; }
  .sj-logo-panel { align-items: flex-start; flex-direction: column; }
  .sj-config-actions { flex-direction: column-reverse; }.sj-config-actions .btn { width:100%; }
}

/* ===== Registro de pacientes ===== */
.patient-register-page { min-height:100vh; padding-bottom:38px; color:#153554; background:#f4f7fb; }
.patient-register-header { display:flex; align-items:center; justify-content:space-between; gap:20px; margin-bottom:22px; }
.patient-register-header h1 { margin:0; color:#082d5b; font-size:clamp(28px,3vw,38px); font-weight:800; }
.patient-register-header p { margin:5px 0 0; color:#667085; }
.patient-register-eyebrow { display:block; margin-bottom:4px; color:#1769c2; font-size:12px; font-weight:800; letter-spacing:.1em; text-transform:uppercase; }
.patient-form-card { padding:24px; margin-bottom:18px; background:#fff; border:1px solid #dfe7f0; border-radius:14px; box-shadow:0 7px 22px rgba(16,42,76,.055); }
.patient-card-title { display:flex; align-items:flex-start; gap:13px; margin-bottom:20px; }
.patient-card-title > span { width:42px; height:42px; flex:0 0 42px; display:grid; place-items:center; color:#0d5db8; background:#eaf3ff; border-radius:11px; }
.patient-card-title h2 { margin:0; color:#102f56; font-size:21px; font-weight:800; }
.patient-card-title p { margin:3px 0 0; color:#667085; }
.patient-form-card .form-label { padding:0; margin-bottom:7px; color:#334e6d; font-weight:700; cursor:default; }
.patient-form-card .form-control { min-height:44px; padding:8px 11px; border:1px solid #cbd6e2; border-radius:8px; line-height:normal; box-shadow:none; }
.patient-form-card .form-control:focus { border:1px solid #418ad2; box-shadow:0 0 0 .2rem rgba(13,93,184,.12); }
.patient-help { display:block; margin-top:6px; color:#7a8798; }
.patient-copy-phone { display:flex; align-items:flex-end; padding-bottom:10px; }
.patient-check { display:flex; align-items:center; gap:9px; margin:0; color:#405b78; cursor:pointer; }
.patient-check input { width:18px; height:18px; accent-color:#0d5db8; }
.patient-field-error { display:none; margin-top:5px; color:#b42318; }
.was-validated .form-control:invalid { border-color:#d92d20; }
.was-validated .form-control:invalid + .patient-field-error { display:block; }
.patient-switch-row { display:flex; align-items:center; justify-content:space-between; gap:20px; margin:0; cursor:pointer; }
.patient-switch-row span { display:grid; gap:3px; }
.patient-switch-row strong { color:#153b65; font-size:16px; }
.patient-switch-row small { color:#667085; }
.patient-switch-row input { width:44px; height:23px; accent-color:#0d5db8; }
.patient-portal-fields { display:none; padding-top:20px; margin-top:18px; border-top:1px solid #e5eaf0; }
.patient-portal-fields.is-visible { display:flex; }
.patient-password-wrap { position:relative; }
.patient-password-wrap .form-control { padding-right:45px; }
.patient-password-wrap button { position:absolute; top:3px; right:4px; width:38px; height:38px; color:#54708d; background:transparent; border:0; }
.patient-username-wrap { position:relative; }
.patient-username-wrap .form-control { padding-right:190px; background:#f8fafc; font-weight:700; }
.patient-username-wrap > span { position:absolute; top:12px; right:11px; color:#40805a; font-size:12px; font-weight:700; }
.patient-password-actions { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.patient-password-actions button { padding:3px 0; color:#0d5db8; background:transparent; border:0; font-size:12px; font-weight:800; }
.patient-credentials { display:flex; align-items:center; justify-content:space-between; gap:24px; padding:22px; margin-bottom:20px; color:#fff; background:linear-gradient(135deg,#0b5bb6,#173d78); border-radius:14px; box-shadow:0 9px 28px rgba(13,65,124,.2); }
.patient-credentials h2 { margin:0; color:#fff; font-size:21px; font-weight:800; }
.patient-credentials p { margin:4px 0 0; color:#dceaff; }
.patient-credentials .patient-register-eyebrow { color:#bcdcff; }
.patient-credential-values { display:flex; align-items:center; gap:16px; }
.patient-credential-values > span { display:grid; min-width:120px; padding:9px 12px; background:rgba(255,255,255,.12); border-radius:8px; }
.patient-credential-values small { color:#cfe3fa; }
.patient-credential-values strong { color:#fff; font-size:16px; }
.patient-form-actions { position:sticky; bottom:0; z-index:5; display:flex; justify-content:flex-end; gap:10px; padding:14px 0; background:linear-gradient(to bottom,rgba(244,247,251,0),#f4f7fb 28%); }
.patient-btn-primary,.patient-btn-outline { display:inline-flex; align-items:center; justify-content:center; gap:7px; min-height:42px; padding:9px 16px; border-radius:8px; font-weight:700; text-decoration:none!important; }
.patient-btn-primary { color:#fff!important; background:#0d5db8; border:1px solid #0d5db8; }
.patient-btn-primary:hover { background:#084b96; border-color:#084b96; }
.patient-btn-primary:disabled { opacity:.65; cursor:wait; }
.patient-btn-outline { color:#164e8c!important; background:#fff; border:1px solid #cbd6e2; }
.patient-btn-outline:hover { background:#edf5ff; border-color:#8bb7e7; }
#guardar_paciente { display:inline-flex!important; }
.patient-success,.patient-duplicate { display:flex; align-items:center; justify-content:space-between; gap:18px; }
.patient-success-actions { display:flex; gap:8px; }
@media (max-width:767.98px) {
  .patient-register-header,.patient-success,.patient-duplicate { align-items:flex-start; flex-direction:column; }
  .patient-form-card { padding:20px 16px; }
  .patient-copy-phone { align-items:center; padding-top:4px; }
  .patient-switch-row { align-items:flex-start; }
  .patient-form-actions,.patient-success-actions { width:100%; flex-direction:column-reverse; }
  .patient-credentials,.patient-credential-values { width:100%; align-items:stretch; flex-direction:column; }
  .patient-username-wrap .form-control { padding-right:11px; }
  .patient-username-wrap > span { position:static; display:block; margin-top:6px; }
  .patient-form-actions .btn,.patient-success-actions .btn,.patient-duplicate .btn { width:100%; }
}

/* =========================================================
   COTIZACIONES — bloque restaurado
   Selectores aislados para no alterar ventas, tablero o pacientes.
   ========================================================= */
.cotizacion-page{background:#f5f7fb;min-height:calc(100vh - 56px);color:#172033;font-family:"Segoe UI",Arial,sans-serif}
.cotizacion-container{max-width:1240px;padding-top:28px;padding-bottom:48px}
.cotizacion-page-header{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;margin-bottom:24px}
.cotizacion-page-header h1{margin:0;color:#172b4d;font-size:32px;font-weight:750;letter-spacing:-.02em}
.cotizacion-page-header p{margin:4px 0 0;color:#667085;font-size:16px}
.cotizacion-tipo{width:min(360px,100%)}
.cotizacion-tipo label,.cotizacion-buscador-wrap>label{display:block;margin-bottom:7px;color:#26344d;font-size:14px;font-weight:650}
.cotizacion-tipo .form-control{height:46px;padding:0 38px 0 13px;border:1px solid #cbd5e1;border-radius:7px;box-shadow:none;line-height:normal}
.cotizacion-tipo .form-control:focus{border:1px solid #2563eb;box-shadow:0 0 0 3px rgba(37,99,235,.12)}
.cotizacion-card{padding:25px 28px;background:#fff;border:1px solid #dce3ec;border-radius:11px;box-shadow:0 5px 18px rgba(20,38,63,.055)}
.cotizacion-empresa-card{display:flex;align-items:center;justify-content:space-between;gap:24px;margin-bottom:20px;padding:18px 22px;background:#eef4ff;border:1px solid #cbdcff;border-radius:9px}
.cotizacion-empresa-card[hidden]{display:none}.cotizacion-empresa-card label{display:block;margin:0 0 3px;color:#173f70;font-size:15px;font-weight:750}.cotizacion-empresa-card p{margin:0;color:#5d6f86;font-size:13px}.cotizacion-empresa-card .form-control{width:min(430px,100%);height:44px;padding:0 38px 0 12px;border:1px solid #aebed4;border-radius:7px;box-shadow:none;line-height:normal}
.cotizacion-card-title{display:flex;align-items:center;gap:11px;margin-bottom:22px;color:#1553b7}
.cotizacion-card-title h2{margin:0;font-size:21px;font-weight:700}
.cotizacion-toolbar{max-width:760px;position:relative}
.cotizacion-input-action{display:flex;gap:12px;align-items:stretch}
.cotizacion-input-icon{position:relative;flex:1}
.cotizacion-input-icon>i{position:absolute;left:14px;top:50%;transform:translateY(-50%);color:#8290a4;z-index:1}
.cotizacion-input-icon input{width:100%;height:48px;padding:10px 14px 10px 42px;border:1px solid #cbd5e1;border-radius:7px;color:#172033;font-size:15px;outline:none}
.cotizacion-input-icon input:focus{border-color:#2563eb;box-shadow:0 0 0 3px rgba(37,99,235,.12)}
#cot_agregar_estudio{min-width:130px;border-radius:7px;font-weight:650}
.cotizacion-resultados-busqueda{display:none;position:absolute;top:79px;left:0;right:142px;z-index:30;max-height:300px;overflow-y:auto;background:#fff;border:1px solid #cbd5e1;border-radius:7px;box-shadow:0 12px 28px rgba(15,23,42,.16)}
.cotizacion-resultado-item{display:flex;width:100%;justify-content:space-between;gap:20px;padding:12px 14px;background:#fff;border:0;border-bottom:1px solid #edf1f6;text-align:left;color:#26344d;cursor:pointer}
.cotizacion-resultado-item:hover{background:#f1f6ff}.cotizacion-resultado-item strong{white-space:nowrap;color:#1553b7}
.cotizacion-feedback{min-height:22px;margin-top:7px;font-size:13px}.cotizacion-feedback.is-error{color:#b42318}.cotizacion-feedback.is-success{color:#087443}
.cotizacion-aviso-cantidad{margin:12px 0 18px;padding:10px 13px;background:#eef5ff;border:1px solid #cfe0ff;border-radius:7px;color:#254f86;font-size:14px}
.cotizacion-aviso-cantidad i{margin-right:7px}
.cotizacion-tabla-responsive{margin-top:16px;border:1px solid #dce3ec;border-radius:8px;overflow-x:auto}
.cotizacion-table{margin:0;color:#26344d}.cotizacion-table thead th{padding:13px 12px;background:#f7f9fc;border:0;border-bottom:1px solid #dce3ec;color:#344054;font-size:13px;white-space:nowrap}
.cotizacion-table tbody td{padding:13px 12px;vertical-align:middle;border-top:1px solid #edf1f6;font-size:14px}
.cotizacion-cantidad-input{width:86px;height:38px;padding:5px 9px;border:1px solid #aeb9c8;border-radius:6px;text-align:center;font-weight:700;color:#172b4d}
.cotizacion-cantidad-input:focus{outline:0;border-color:#2563eb;box-shadow:0 0 0 3px rgba(37,99,235,.12)}
.cotizacion-cantidad-fija{display:inline-flex;align-items:center;justify-content:center;width:40px;height:34px;background:#f2f4f7;border-radius:5px;font-weight:700}
.cotizacion-eliminar{padding:7px 10px;background:#fff;border:1px solid #f1b7b7;border-radius:6px;color:#c62828;cursor:pointer}.cotizacion-eliminar:hover{background:#fff2f2}
.cotizacion-empty-state{padding:44px 18px;text-align:center;color:#8793a4}.cotizacion-empty-state i{font-size:42px;margin-bottom:12px}.cotizacion-empty-state p{margin:0 0 3px;font-size:17px;font-weight:650}.cotizacion-empty-state span{font-size:14px}
.cotizacion-resumen{display:grid;grid-template-columns:repeat(4,1fr);margin-top:20px;border:1px solid #dce3ec;border-radius:8px;background:#fbfcfe}
.cotizacion-resumen>div{display:flex;justify-content:center;align-items:center;gap:12px;padding:17px 14px;border-right:1px solid #dce3ec}.cotizacion-resumen>div:last-child{border-right:0}
.cotizacion-resumen span{color:#667085;font-size:13px}.cotizacion-resumen strong{color:#172b4d;font-size:17px}.cotizacion-resumen .cotizacion-total strong{color:#1553b7;font-size:21px}
.cotizacion-actions{display:flex;justify-content:flex-end;gap:14px;margin-top:22px}
.cotizacion-btn-descuento,.cotizacion-btn-generar{min-height:48px;padding:10px 22px;border-radius:7px;font-weight:700}
.cotizacion-btn-descuento{background:#fff;border:1px solid #cbd5e1;color:#1d4f91}.cotizacion-btn-generar{background:#173f70;border:1px solid #173f70;color:#fff}.cotizacion-btn-generar:hover{background:#0f315b;color:#fff}.cotizacion-btn-generar:disabled{opacity:.55;cursor:not-allowed}
@media(max-width:768px){
  .cotizacion-container{padding:18px 12px 36px!important}.cotizacion-page-header{align-items:stretch;flex-direction:column}.cotizacion-tipo{width:100%}
  .cotizacion-card{padding:19px 15px}.cotizacion-input-action{flex-direction:column}#cot_agregar_estudio{width:100%}
  .cotizacion-empresa-card{align-items:stretch;flex-direction:column}.cotizacion-empresa-card .form-control{width:100%}
  .cotizacion-resultados-busqueda{top:137px;right:0}.cotizacion-resumen{grid-template-columns:1fr 1fr}.cotizacion-resumen>div:nth-child(2){border-right:0}.cotizacion-resumen>div:nth-child(-n+2){border-bottom:1px solid #dce3ec}
  .cotizacion-actions{flex-direction:column}.cotizacion-actions .btn{width:100%}
  .cotizacion-table thead{display:none}.cotizacion-table,.cotizacion-table tbody,.cotizacion-table tr,.cotizacion-table td{display:block;width:100%}
  .cotizacion-table tr{padding:10px 12px;border-bottom:1px solid #dce3ec}.cotizacion-table tbody td{display:flex;justify-content:space-between;gap:18px;padding:8px 0;border:0;text-align:right}
  .cotizacion-table tbody td:before{content:attr(data-label);font-weight:700;color:#344054;text-align:left}.cotizacion-eliminar{width:100%}
}

/* =========================================================
   NUEVA VENTA
   Estilos aislados para no modificar las demás pantallas.
   ========================================================= */
.venta-page {
  background: #f5f7fb;
  min-height: calc(100vh - 56px);
  color: #172033;
  font-family: "Segoe UI", Arial, sans-serif;
}

.venta-container {
  max-width: 1240px;
  padding-top: 28px;
  padding-bottom: 48px;
}

.venta-page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.venta-page-header h1 {
  margin: 0;
  color: #172b4d;
  font-size: 32px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.venta-page-header p {
  margin: 4px 0 0;
  color: #667085;
  font-size: 16px;
}

.venta-tipo {
  width: min(360px, 100%);
}

.venta-tipo label,
.venta-field label,
.venta-control-bloque > label {
  display: block;
  margin-bottom: 7px;
  color: #26344d;
  font-size: 14px;
  font-weight: 650;
}

.venta-tipo .form-control {
  height: 46px;
  padding: 0 38px 0 13px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  box-shadow: none;
  line-height: normal;
}

.venta-tipo .form-control:focus {
  border: 1px solid #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

.venta-card {
  margin-bottom: 24px;
  padding: 25px 28px;
  background: #fff;
  border: 1px solid #dce3ec;
  border-radius: 11px;
  box-shadow: 0 5px 18px rgba(20, 38, 63, .055);
}

.venta-card-title {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 22px;
  color: #1553b7;
}

.venta-card-title svg,
.venta-card-title i {
  width: 25px;
  height: 25px;
}

.venta-card-title h2 {
  margin: 0;
  font-size: 21px;
  font-weight: 700;
}

.venta-paciente-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr 1.4fr auto;
  gap: 18px;
  align-items: end;
}

.venta-field .Vcontrol {
  width: 100%;
  height: 46px;
  margin: 0;
  padding: 10px 13px;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  color: #172033;
  font-family: inherit;
  font-size: 15px;
}

.venta-field .Vcontrol:focus,
.venta-input-icon input:focus {
  border-color: #2563eb;
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

.venta-field .Vcontrol:disabled {
  background: #f8fafc;
  color: #475467;
  opacity: 1;
}

.venta-usar-paciente .btn {
  height: 46px;
  white-space: nowrap;
}

.venta-btn-descuento {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding: 9px 15px;
  background: #fff;
  border: 1px solid #dc3545;
  border-radius: 7px;
  color: #c52233;
  font-weight: 650;
}

.venta-btn-descuento:hover,
.venta-btn-descuento:focus {
  background: #fff1f2;
  color: #a61b29;
}

.venta-info-card {
  padding-bottom: 17px;
}

.venta-table {
  margin: 0 !important;
  color: #26344d;
  border-collapse: separate;
  border-spacing: 0;
}

.venta-table thead th {
  padding: 12px 13px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #d6dee9;
  color: #25324a;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.venta-table tbody td {
  padding: 13px;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: middle;
  font-size: 14px;
}

.paciente-table thead th {
  background: #fff;
  border-top: 0;
}

.venta-estudios-card {
  padding-bottom: 20px;
}

.venta-estudios-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: end;
  margin-bottom: 18px;
}

.venta-estudios-controles {
  display: grid;
  gap: 18px;
  max-width: 720px;
}

.venta-input-action {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.venta-input-icon {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
}

.venta-input-icon > svg,
.venta-input-icon > i {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 13px;
  width: 16px;
  transform: translateY(-50%);
  color: #7a899d;
  pointer-events: none;
}

.venta-input-icon input {
  width: 100%;
  height: 46px;
  padding: 9px 13px 9px 41px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  background: #fff;
  color: #172033;
  font-size: 15px;
}

.venta-input-action .btn {
  min-height: 46px;
  padding: 9px 17px;
  border-radius: 7px;
  font-weight: 650;
  white-space: nowrap;
}

.venta-btn-cotizacion {
  background: #fff;
  border: 1px solid #1553b7;
  color: #1553b7;
}

.venta-btn-cotizacion:hover,
.venta-btn-cotizacion:focus {
  background: #eff6ff;
  color: #0c4098;
}

.venta-btn-procesar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: 190px;
  min-height: 48px;
  margin-bottom: 3px;
  padding: 11px 18px;
  background: #13a15f;
  border: 1px solid #13a15f;
  border-radius: 7px;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(19, 161, 95, .18);
}

.venta-btn-procesar:hover,
.venta-btn-procesar:focus {
  background: #0d874e;
  border-color: #0d874e;
  color: #fff;
}

.cotizacion-feedback {
  min-height: 18px;
  margin-top: 5px;
  color: #667085;
  font-size: 13px;
}

.cotizacion-feedback.is-success { color: #087a46; }
.cotizacion-feedback.is-error { color: #c52233; }
.cotizacion-feedback.is-loading { color: #1553b7; }

.venta-seleccion-actual {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 30px;
  margin: 2px 0 17px;
  padding: 11px 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  color: #475467;
  font-size: 13px;
}

.venta-tabla-responsive {
  border: 1px solid #dce3ec;
  border-radius: 8px;
  overflow-x: auto;
}

.venta-detalle-table .link_delete {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #c52233;
  font-weight: 600;
  text-decoration: none;
}

.venta-detalle-table .link_delete:hover { text-decoration: underline; }

.venta-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 170px;
  margin-top: -1px;
  padding: 28px;
  border: 1px solid #dce3ec;
  border-radius: 0 0 8px 8px;
  background: #fff;
  color: #667085;
  text-align: center;
}

.venta-empty-state svg,
.venta-empty-state i {
  width: 42px;
  height: 42px;
  margin-bottom: 12px;
  color: #8ea9d0;
}

.venta-empty-state p { margin: 0; }

.venta-resumen-fila td {
  padding: 17px !important;
  background: #f8fafc;
  text-align: center;
}

.venta-resumen-fila td:last-child { background: #eff6ff; }

.venta-resumen-fila span,
.venta-resumen-fila strong {
  display: block;
}

.venta-resumen-fila span {
  margin-bottom: 5px;
  color: #667085;
  font-size: 12px;
}

.venta-resumen-fila strong {
  color: #172b4d;
  font-size: 20px;
}

.venta-resumen-fila td:last-child strong { color: #1553b7; }

.venta-confirmacion-cotizacion {
  color: #344054;
  text-align: left;
}

.venta-confirmacion-cotizacion p { margin: 7px 0; }

.venta-page .dataTables_wrapper .dataTables_length,
.venta-page .dataTables_wrapper .dataTables_filter,
.venta-page .dataTables_wrapper .dataTables_info,
.venta-page .dataTables_wrapper .dataTables_paginate {
  display: none !important;
}

.venta-page .dataTables_wrapper table.dataTable.no-footer {
  border-bottom: 0;
}

.venta-page .dataTables_empty {
  display: none !important;
}

@media (max-width: 991.98px) {
  .venta-page-header {
    align-items: stretch;
    flex-direction: column;
  }

  .venta-tipo { width: 100%; }

  .venta-paciente-grid {
    grid-template-columns: 1fr 1fr;
  }

  .venta-estudios-toolbar {
    grid-template-columns: 1fr;
  }

  .venta-btn-procesar {
    width: 100%;
  }
}

@media (max-width: 767.98px) {
  .venta-container {
    padding-right: 13px !important;
    padding-left: 13px !important;
    padding-top: 18px;
  }

  .venta-page-header h1 { font-size: 27px; }

  .venta-card {
    padding: 20px 16px;
    border-radius: 9px;
  }

  .venta-paciente-grid { grid-template-columns: 1fr; }

  .venta-input-action { flex-direction: column; }

  .venta-input-action .btn { width: 100%; }

  .venta-seleccion-actual { flex-direction: column; }

  .venta-tabla-responsive {
    border: 0;
    overflow: visible;
  }

  .venta-table thead { display: none; }

  .venta-table,
  .venta-table tbody,
  .venta-table tr,
  .venta-table td {
    display: block;
    width: 100% !important;
  }

  .venta-table tbody tr {
    margin-bottom: 12px;
    overflow: hidden;
    border: 1px solid #dce3ec;
    border-radius: 8px;
  }

  .venta-table tbody td {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 10px 12px;
    text-align: right;
  }

  .venta-table tbody td::before {
    content: attr(data-label);
    color: #475467;
    font-weight: 700;
    text-align: left;
  }

  .venta-detalle-table tbody td:nth-child(1)::before { content: "Código"; }
  .venta-detalle-table tbody td:nth-child(2)::before { content: "Estudio"; }
  .venta-detalle-table tbody td:nth-child(3)::before { content: "Descuento"; }
  .venta-detalle-table tbody td:nth-child(4)::before { content: "Costo"; }
  .venta-detalle-table tbody td:nth-child(5)::before { content: "Acciones"; }

  .venta-table tfoot,
  .venta-table tfoot tr,
  .venta-table tfoot td {
    display: block;
    width: 100% !important;
  }

  .venta-resumen-fila td {
    border-bottom: 1px solid #dce3ec;
  }
}
