/* TECNONOVA BRIDGE 1.2.0 - Interfaz del cliente.
   Aplicación estricta dentro del iframe autorizado. NUNCA en /admin.
   No ocultar menús, formularios, modales ni elementos de autenticación funcionales. */
html.tnv-crm-embedded{
  --tnv-bg:#00131e;
  --tnv-surface:#061e2b;
  --tnv-panel:#0a2636;
  --tnv-panel-alt:#0e2d40;
  --tnv-line:rgba(61,165,208,.22);
  --tnv-text:#eaf6ff;
  --tnv-subtext:#aac3d1;
  --tnv-accent:#22c7ef;
  --tnv-accent-deep:#087ca7;
  --tnv-focus:#65dcff;
  background:var(--tnv-bg)!important;
}
html.tnv-crm-embedded,html.tnv-crm-embedded body{
  width:100%;min-width:0;min-height:100%;margin:0!important;padding:0!important;
  background:var(--tnv-bg)!important;color:var(--tnv-text)!important;
  overflow-x:clip;
  font-family:system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif!important;
  font-size:14px;line-height:1.55;
}
html.tnv-crm-embedded *,html.tnv-crm-embedded *::before,
html.tnv-crm-embedded *::after{box-sizing:border-box}
html.tnv-crm-embedded body:before,html.tnv-crm-embedded body:after{box-shadow:none!important}
html.tnv-crm-embedded #wrapper,html.tnv-crm-embedded #content,
html.tnv-crm-embedded .content,html.tnv-crm-embedded .main-content,
html.tnv-crm-embedded .container,html.tnv-crm-embedded .container-fluid,
html.tnv-crm-embedded main{max-width:100%!important;min-width:0!important}
html.tnv-crm-embedded .container,html.tnv-crm-embedded .container-fluid,
html.tnv-crm-embedded #wrapper{border:0!important;box-shadow:none!important}
html.tnv-crm-embedded a{color:var(--tnv-accent);text-underline-offset:3px}
html.tnv-crm-embedded a:hover,html.tnv-crm-embedded a:focus{color:#8ceaff}
html.tnv-crm-embedded h1,html.tnv-crm-embedded h2,html.tnv-crm-embedded h3,
html.tnv-crm-embedded h4,html.tnv-crm-embedded h5,html.tnv-crm-embedded h6,
html.tnv-crm-embedded .panel-title{color:#fff!important;font-weight:750;letter-spacing:-.015em}
html.tnv-crm-embedded .text-muted,html.tnv-crm-embedded small,
html.tnv-crm-embedded .help-block,html.tnv-crm-embedded .text-secondary{color:var(--tnv-subtext)!important}
html.tnv-crm-embedded label{color:#d7effb!important;font-weight:600}
html.tnv-crm-embedded hr{border-color:var(--tnv-line)!important}
/* Navegación: conservar el menú del cliente, pero no duplicar el logo de la tienda. */
html.tnv-crm-embedded .navbar,html.tnv-crm-embedded .navbar-default,
html.tnv-crm-embedded .navbar-inverse,html.tnv-crm-embedded #header{
  background:var(--tnv-surface)!important;border:0!important;
  border-bottom:1px solid var(--tnv-line)!important;
  box-shadow:none!important;
}
html.tnv-crm-embedded .navbar-brand{display:none!important}
html.tnv-crm-embedded .navbar-nav>li>a,
html.tnv-crm-embedded .navbar-default .navbar-nav>li>a{
  color:var(--tnv-text)!important;background:transparent!important;
  font-weight:600;font-size:13px;
}
html.tnv-crm-embedded .navbar-nav>li.active>a,
html.tnv-crm-embedded .navbar-nav>li>a:hover,
html.tnv-crm-embedded .navbar-nav>li>a:focus{
  color:var(--tnv-accent)!important;background:rgba(34,199,239,.085)!important;
}
html.tnv-crm-embedded .navbar-toggle{
  border:1px solid var(--tnv-line)!important;background:var(--tnv-panel)!important;
}
html.tnv-crm-embedded .navbar-toggle .icon-bar{background:var(--tnv-accent)!important}
html.tnv-crm-embedded .dropdown-menu{
  background:#0a2535!important;border:1px solid var(--tnv-line)!important;
  box-shadow:0 14px 40px rgba(0,0,0,.32)!important;border-radius:10px;
}
html.tnv-crm-embedded .dropdown-menu>li>a{color:var(--tnv-text)!important}
html.tnv-crm-embedded .dropdown-menu>li>a:hover,
html.tnv-crm-embedded .dropdown-menu>li>a:focus{
  background:rgba(34,199,239,.12)!important;color:#fff!important;
}
/* Tarjetas, contenido y acceso/login. No modificar estructura ni flujos de Perfex. */
html.tnv-crm-embedded .panel,html.tnv-crm-embedded .card,
html.tnv-crm-embedded .well,html.tnv-crm-embedded .thumbnail,
html.tnv-crm-embedded .login-panel,html.tnv-crm-embedded .modal-content{
  background:var(--tnv-panel)!important;color:var(--tnv-text)!important;
  border:1px solid var(--tnv-line)!important;border-radius:14px!important;
  box-shadow:0 10px 26px rgba(0,9,18,.13)!important;
}
html.tnv-crm-embedded .panel-heading,html.tnv-crm-embedded .card-header,
html.tnv-crm-embedded .modal-header{
  background:var(--tnv-panel-alt)!important;color:#fff!important;
  border-bottom:1px solid var(--tnv-line)!important;
  border-radius:13px 13px 0 0!important;
}
html.tnv-crm-embedded .panel-body,html.tnv-crm-embedded .card-body,
html.tnv-crm-embedded .panel-footer,html.tnv-crm-embedded .modal-body,
html.tnv-crm-embedded .modal-footer{
  background:transparent!important;color:var(--tnv-text)!important;
}
html.tnv-crm-embedded .panel-footer,html.tnv-crm-embedded .modal-footer{
  border-top:1px solid var(--tnv-line)!important;
}
/* Formularios: campos claros, legibles incluso con autocompletado. */
html.tnv-crm-embedded input:not([type=checkbox]):not([type=radio]):not([type=hidden]),
html.tnv-crm-embedded select,html.tnv-crm-embedded textarea,
html.tnv-crm-embedded .form-control{
  background:#f6fbff!important;color:#122b3e!important;
  border:1px solid #abc9d9!important;border-radius:9px!important;
  box-shadow:none!important;max-width:100%;
}
html.tnv-crm-embedded .form-control::placeholder,
html.tnv-crm-embedded input::placeholder,html.tnv-crm-embedded textarea::placeholder{color:#687e91!important;opacity:1}
html.tnv-crm-embedded input:focus,html.tnv-crm-embedded select:focus,
html.tnv-crm-embedded textarea:focus,html.tnv-crm-embedded .form-control:focus{
  border-color:var(--tnv-accent)!important;
  box-shadow:0 0 0 3px rgba(34,199,239,.18)!important;
  outline:0;
}
html.tnv-crm-embedded input[type=checkbox],html.tnv-crm-embedded input[type=radio]{accent-color:#0ab5e2}
html.tnv-crm-embedded .input-group-addon{
  background:var(--tnv-panel-alt)!important;color:var(--tnv-text)!important;
  border-color:var(--tnv-line)!important;
}
/* Botones: mantener colores de estado (danger/success/warning) propios de Perfex. */
html.tnv-crm-embedded .btn-primary,html.tnv-crm-embedded button.btn-primary,
html.tnv-crm-embedded input.btn-primary{
  background:linear-gradient(110deg,#0bbfe8,#287cfa)!important;
  border-color:#17b8e6!important;color:#fff!important;
  font-weight:700;border-radius:9px!important;
  box-shadow:0 4px 14px rgba(4,163,214,.15)!important;
}
html.tnv-crm-embedded .btn-primary:hover,html.tnv-crm-embedded .btn-primary:focus{
  background:linear-gradient(110deg,#08afd7,#236be2)!important;
  border-color:#42d4f8!important;color:#fff!important;
}
html.tnv-crm-embedded .btn-default,
html.tnv-crm-embedded .btn-secondary{
  background:var(--tnv-panel-alt)!important;color:var(--tnv-text)!important;
  border:1px solid var(--tnv-line)!important;border-radius:9px!important;
}
html.tnv-crm-embedded .btn-default:hover,html.tnv-crm-embedded .btn-secondary:hover{
  background:#134058!important;color:#fff!important;
}
html.tnv-crm-embedded .btn:focus-visible,html.tnv-crm-embedded a:focus-visible,
html.tnv-crm-embedded .navbar-toggle:focus-visible{outline:2px solid var(--tnv-focus)!important;outline-offset:2px}
/* Tablas, listados, paginación y navegación interna. */
html.tnv-crm-embedded .table,html.tnv-crm-embedded table.table{
  color:var(--tnv-text)!important;background:transparent!important;
}
html.tnv-crm-embedded .table thead th,
html.tnv-crm-embedded .table>thead>tr>th{
  color:#d5ebf8!important;background:var(--tnv-panel-alt)!important;
  border-color:var(--tnv-line)!important;
}
html.tnv-crm-embedded .table>tbody>tr>td,
html.tnv-crm-embedded .table>tbody>tr>th,
html.tnv-crm-embedded .table>tfoot>tr>td{
  border-color:var(--tnv-line)!important;background:transparent!important;
  color:var(--tnv-text)!important;
}
html.tnv-crm-embedded .table-striped>tbody>tr:nth-of-type(odd){background:rgba(39,127,163,.08)!important}
html.tnv-crm-embedded .table-hover>tbody>tr:hover{background:rgba(34,199,239,.10)!important}
html.tnv-crm-embedded .table-responsive{max-width:100%;overflow-x:auto;overscroll-behavior-inline:contain}
html.tnv-crm-embedded .nav-tabs{border-bottom:1px solid var(--tnv-line)!important}
html.tnv-crm-embedded .nav-tabs>li>a{border-radius:9px 9px 0 0;color:#c7e6f7!important}
html.tnv-crm-embedded .nav-tabs>li.active>a,
html.tnv-crm-embedded .nav-tabs>li.active>a:focus{
  background:var(--tnv-panel)!important;border-color:var(--tnv-line)!important;
  border-bottom-color:var(--tnv-panel)!important;color:#fff!important;
}
html.tnv-crm-embedded .pagination>li>a,html.tnv-crm-embedded .pagination>li>span{
  background:var(--tnv-panel)!important;color:var(--tnv-text)!important;
  border-color:var(--tnv-line)!important;
}
html.tnv-crm-embedded .pagination>.active>a{background:var(--tnv-accent-deep)!important;color:#fff!important}
/* Estados y utilidades: avisos nunca se ocultan. */
html.tnv-crm-embedded .alert{border-radius:10px!important;border-width:1px!important}
html.tnv-crm-embedded .alert-info{color:#c4ecff!important;background:#063852!important;border-color:#1b739e!important}
html.tnv-crm-embedded .alert-success{color:#c8f7dc!important;background:#0b3b2a!important;border-color:#238b60!important}
html.tnv-crm-embedded .alert-warning{color:#fff0bc!important;background:#433513!important;border-color:#968137!important}
html.tnv-crm-embedded .alert-danger{color:#ffccd0!important;background:#4a2028!important;border-color:#b64b5a!important}
html.tnv-crm-embedded .label-default,html.tnv-crm-embedded .badge{
  background:#164358;color:#eaf7ff;
}
/* Una sola cabecera de marca visible: la de WordPress.
   Mantenemos la navegación funcional de Perfex dentro del iframe. */
html.tnv-crm-embedded footer,html.tnv-crm-embedded .footer,
html.tnv-crm-embedded .copyright,html.tnv-crm-embedded .footer-container{
  display:none!important;
}
@media (max-width:767px){
 html.tnv-crm-embedded .container,html.tnv-crm-embedded .container-fluid{
   padding-left:12px!important;padding-right:12px!important;
 }
 html.tnv-crm-embedded .panel,html.tnv-crm-embedded .card{
   border-radius:12px!important;
 }
 html.tnv-crm-embedded .navbar-nav{margin:0!important}
 html.tnv-crm-embedded .navbar-collapse{max-width:100%;overflow-x:hidden}
 html.tnv-crm-embedded .table-responsive{border:0!important}
 html.tnv-crm-embedded .btn{max-width:100%}
}
@media (prefers-reduced-motion:reduce){
 html.tnv-crm-embedded *,html.tnv-crm-embedded *::before,
 html.tnv-crm-embedded *::after{scroll-behavior:auto!important;transition:none!important}
}


/* v1.2.1 — formularios integrados con el estilo Tecnonova */
html.tnv-crm-embedded .panel_s,
html.tnv-crm-embedded .panel.panel_s,
html.tnv-crm-embedded .ticket-form,
html.tnv-crm-embedded .proposal-wrapper,
html.tnv-crm-embedded .estimate-wrapper,
html.tnv-crm-embedded .invoice-wrapper,
html.tnv-crm-embedded .contract-wrapper,
html.tnv-crm-embedded .project-overview,
html.tnv-crm-embedded .login-container,
html.tnv-crm-embedded .register-form,
html.tnv-crm-embedded form{
  background:transparent!important;
}
html.tnv-crm-embedded .panel_s,
html.tnv-crm-embedded .panel.panel_s,
html.tnv-crm-embedded .card,
html.tnv-crm-embedded .well,
html.tnv-crm-embedded .thumbnail,
html.tnv-crm-embedded .login-panel,
html.tnv-crm-embedded .modal-content,
html.tnv-crm-embedded .content,
html.tnv-crm-embedded .kan-ban-content,
html.tnv-crm-embedded .ticket-area,
html.tnv-crm-embedded .ticket-reply{
  background:linear-gradient(180deg,rgba(8,31,45,.98),rgba(7,24,36,.98))!important;
}
html.tnv-crm-embedded .panel_s .panel-body,
html.tnv-crm-embedded .panel.panel_s .panel-body,
html.tnv-crm-embedded .panel_s .panel-footer,
html.tnv-crm-embedded .panel.panel_s .panel-footer{
  background:transparent!important;
}
html.tnv-crm-embedded input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]),
html.tnv-crm-embedded select,
html.tnv-crm-embedded textarea,
html.tnv-crm-embedded .form-control{
  background:#08283a!important;
  color:#eef8ff!important;
  border:1px solid rgba(84,180,223,.34)!important;
}
html.tnv-crm-embedded .form-control::placeholder,
html.tnv-crm-embedded input::placeholder,
html.tnv-crm-embedded textarea::placeholder{
  color:#9cb9c9!important;
}
html.tnv-crm-embedded select option,
html.tnv-crm-embedded optgroup{
  background:#0c2b3d!important;color:#eef8ff!important;
}
html.tnv-crm-embedded input[type=file]{
  background:#0a2636!important;
  color:#eef8ff!important;
  border:1px dashed rgba(84,180,223,.42)!important;
  border-radius:10px!important;
  padding:10px 12px!important;
}
html.tnv-crm-embedded input[type=file]::file-selector-button{
  background:linear-gradient(110deg,#0bbfe8,#287cfa)!important;
  color:#fff!important;border:0!important;border-radius:8px!important;
  padding:9px 12px!important;margin-right:10px!important;cursor:pointer;
}
html.tnv-crm-embedded .bootstrap-select>.dropdown-toggle,
html.tnv-crm-embedded .btn-default.dropdown-toggle,
html.tnv-crm-embedded .bootstrap-select.btn-group .dropdown-toggle,
html.tnv-crm-embedded .bootstrap-select.btn-group.open .dropdown-toggle{
  background:#08283a!important;
  color:#eef8ff!important;
  border:1px solid rgba(84,180,223,.34)!important;
  border-radius:10px!important;
  box-shadow:none!important;
}
html.tnv-crm-embedded .bootstrap-select .filter-option,
html.tnv-crm-embedded .bootstrap-select .filter-option-inner,
html.tnv-crm-embedded .bootstrap-select .filter-option-inner-inner{
  color:#eef8ff!important;
}
html.tnv-crm-embedded .bootstrap-select.btn-group .dropdown-menu,
html.tnv-crm-embedded .bootstrap-select .dropdown-menu,
html.tnv-crm-embedded .select2-dropdown{
  background:#082131!important;
  border:1px solid rgba(84,180,223,.26)!important;
  border-radius:12px!important;
  box-shadow:0 16px 36px rgba(0,0,0,.34)!important;
}
html.tnv-crm-embedded .bootstrap-select .dropdown-menu>li>a,
html.tnv-crm-embedded .bootstrap-select .dropdown-menu li a span.text,
html.tnv-crm-embedded .select2-results__option{
  color:#eaf7ff!important;
}
html.tnv-crm-embedded .bootstrap-select .dropdown-menu>li>a:hover,
html.tnv-crm-embedded .bootstrap-select .dropdown-menu>li>a:focus,
html.tnv-crm-embedded .bootstrap-select .dropdown-menu>.selected>a,
html.tnv-crm-embedded .select2-results__option--highlighted[aria-selected]{
  background:rgba(34,199,239,.16)!important;
  color:#fff!important;
}
html.tnv-crm-embedded .select2-container--default .select2-selection--single,
html.tnv-crm-embedded .select2-container--default .select2-selection--multiple{
  background:#08283a!important;
  border:1px solid rgba(84,180,223,.34)!important;
  border-radius:10px!important;
  color:#eef8ff!important;
  min-height:42px!important;
}
html.tnv-crm-embedded .select2-container--default .select2-selection--single .select2-selection__rendered,
html.tnv-crm-embedded .select2-container--default .select2-selection--multiple .select2-selection__rendered,
html.tnv-crm-embedded .select2-search--inline .select2-search__field{
  color:#eef8ff!important;
}
html.tnv-crm-embedded .select2-container--default .select2-selection--single .select2-selection__arrow b{
  border-top-color:#cfefff!important;
}
html.tnv-crm-embedded .note-editor.note-frame,
html.tnv-crm-embedded .tox-tinymce{
  border:1px solid rgba(84,180,223,.24)!important;
  border-radius:12px!important;
  overflow:hidden;
}
html.tnv-crm-embedded .note-editor .note-toolbar,
html.tnv-crm-embedded .tox .tox-editor-header{
  background:#0d3146!important;
  border-bottom:1px solid rgba(84,180,223,.22)!important;
}
html.tnv-crm-embedded .note-editor .note-editing-area,
html.tnv-crm-embedded .note-editor .note-editable,
html.tnv-crm-embedded .tox .tox-edit-area__iframe{
  background:#08283a!important;
  color:#eef8ff!important;
}
html.tnv-crm-embedded .form-group,
html.tnv-crm-embedded .customer-profile-group,
html.tnv-crm-embedded .ticket-form .row,
html.tnv-crm-embedded .ticket-reply .row{
  color:var(--tnv-text)!important;
}


/* v1.2.2 — limpieza de navegación embebida y formularios más integrados */
html.tnv-crm-embedded body.login,
html.tnv-crm-embedded body.authentication,
html.tnv-crm-embedded body[class*="login"]{
  background:linear-gradient(180deg,#02131e,#041d2b)!important;
}
html.tnv-crm-embedded .login-panel,
html.tnv-crm-embedded .login-container .panel_s,
html.tnv-crm-embedded .register-form .panel_s{
  max-width:420px!important;
  margin-inline:auto!important;
}
html.tnv-crm-embedded .panel_s .panel-heading,
html.tnv-crm-embedded .panel.panel_s .panel-heading{
  background:transparent!important;
  border-bottom-color:rgba(84,180,223,.18)!important;
}
html.tnv-crm-embedded .panel_s .panel-heading h4,
html.tnv-crm-embedded .panel.panel_s .panel-heading h4{
  font-size:15px!important;
  letter-spacing:.01em!important;
}


/* v1.2.3: campos de archivo coherentes con el portal y sin recortes forzados.
   Los :not igualan la especificidad del selector base que antes los dejaba blancos. */
html.tnv-crm-embedded input[type="file"]:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
html.tnv-crm-embedded input.form-control[type="file"]:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
html.tnv-crm-embedded .form-group input[type="file"]:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]){
  display:block!important;
  box-sizing:border-box!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  min-height:46px!important;
  height:auto!important;
  padding:6px 10px!important;
  background:#0a2a3b!important;
  color:#eaf7ff!important;
  border:1px solid rgba(84,180,223,.42)!important;
  border-radius:10px!important;
  line-height:30px!important;
  font:inherit!important;
  font-size:13px!important;
  cursor:pointer!important;
  box-shadow:none!important;
}
html.tnv-crm-embedded input[type="file"]:not([type="checkbox"]):not([type="radio"]):not([type="hidden"])::file-selector-button,
html.tnv-crm-embedded input[type="file"]:not([type="checkbox"]):not([type="radio"]):not([type="hidden"])::-webkit-file-upload-button{
  display:inline-block;
  vertical-align:middle;
  margin-right:12px!important;
  padding:8px 13px!important;
  min-height:32px!important;
  background:linear-gradient(110deg,#087dab,#2167b7)!important;
  color:#ffffff!important;
  border:1px solid rgba(128,214,255,.48)!important;
  border-radius:8px!important;
  box-shadow:none!important;
  font:inherit!important;
  font-weight:700!important;
  font-size:12px!important;
  cursor:pointer!important;
}
/* Ajustar el botón + de varios adjuntos sin comprimir el input. */
html.tnv-crm-embedded .form-group:has(> input[type="file"]),
html.tnv-crm-embedded .form-group:has(.input-group input[type="file"]){min-width:0!important}
html.tnv-crm-embedded .input-group:has(input[type="file"]){
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
  width:100%!important;
  min-width:0!important;
}
html.tnv-crm-embedded .input-group:has(input[type="file"]) input[type="file"]{
  flex:1 1 auto!important;
  width:1%!important;
  min-width:0!important;
}
html.tnv-crm-embedded .input-group:has(input[type="file"]) .input-group-btn,
html.tnv-crm-embedded .input-group:has(input[type="file"]) .btn{
  flex:0 0 auto!important;
}
@media(max-width:500px){
  html.tnv-crm-embedded input[type="file"]:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]){
    font-size:12px!important;
    padding:6px!important;
  }
  html.tnv-crm-embedded input[type="file"]::file-selector-button{padding:7px 9px!important;margin-right:7px!important}
}
