#gestionSection{margin-top:32px}.gestion-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:16px}.gestion-grid form{display:flex;flex-direction:column;gap:9px;padding:18px;border:1px solid #67438b;border-radius:14px;background:#201334}.gestion-grid input,.gestion-grid select,.gestion-grid textarea{width:100%;min-height:40px;box-sizing:border-box;padding:9px;border:1px solid #73598b;border-radius:8px;background:#130d20;color:#fff}.gestion-grid label{font-size:13px;color:#ded0ed}.gestion-grid button,.gestion-row button,.gestion-actions button,.gestion-dialog button{padding:10px 13px;margin:4px;border:0;border-radius:8px;background:#7c3aed;color:white;cursor:pointer}.gestion-row{padding:12px;margin:8px 0;border:1px solid #5b4575;border-radius:10px;overflow-wrap:anywhere}.gestion-dialog{max-width:min(600px,95vw);background:#21132f;color:#fff;border:1px solid #a855f7;border-radius:14px}.gestion-dialog pre{white-space:pre-wrap;overflow-wrap:anywhere}

#gestionNetflix,#gestionRenewals{margin-top:24px}
.gestion-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,390px),1fr));gap:16px;margin-top:16px}
.gestion-account-card{background:#081e29;border:1px solid #426477;border-radius:14px;padding:17px;min-width:0;overflow-wrap:anywhere}
.gestion-card-head{display:flex;justify-content:space-between;align-items:flex-start;gap:10px;margin-bottom:14px}
.gestion-card-head h3{margin:0;font-size:17px;color:#f4faff}
.gestion-status{font-size:11px;font-weight:800;padding:6px 9px;border-radius:20px;white-space:nowrap}
.gestion-status.busy{color:#ffe3a2;background:#684513}.gestion-status.free{color:#b9ffe0;background:#16533f}
.gestion-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}
.gestion-field{min-width:0;display:flex;flex-direction:column;gap:4px}
.gestion-field small{font-size:10px;letter-spacing:.04em;color:#91b6c5}
.gestion-field strong{font-size:13px;font-weight:600;color:#fff;overflow-wrap:anywhere}
.gestion-card-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:17px}
.gestion-card-actions button{border:0;border-radius:9px;padding:10px 12px;background:linear-gradient(#68f2ff,#09a7bc);color:#03222b;font-weight:700;cursor:pointer}
@media(max-width:480px){.gestion-fields{grid-template-columns:1fr}}

.gestion-platform-tabs{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0 18px}
.gestion-platform-tab{border:1px solid #477c88;border-radius:10px;padding:10px 14px;background:#092c38;color:#e4faff;cursor:pointer;font-weight:700}
.gestion-platform-tab.active{background:#32c4d4;color:#03242d;border-color:#32c4d4}
.gestion-platform-tab:hover{filter:brightness(1.15)}

/* Estados diferenciados por significado */
.gestion-status.active{background:#135d3b;color:#b9ffda;border:1px solid #28b86b}
.gestion-status.soon{background:#75460d;color:#ffe4a0;border:1px solid #e6a72c}
.gestion-status.expired{background:#6b2028;color:#ffd3d8;border:1px solid #ec5669}
.gestion-status.available{background:#104f68;color:#bdefff;border:1px solid #27bfe8}
.gestion-status.occupied{background:#36326c;color:#dedbff;border:1px solid #8b83ed}
.gestion-status.closed{background:#35414b;color:#e0e5eb;border:1px solid #788997}

/* Registro de cuentas: ocupada rojo, disponible verde */
#gestionSection .gestion-status.occupied{background:#80202c;color:#fff0f0;border:1px solid #ff4c60}
#gestionSection .gestion-status.available{background:#135d3b;color:#c3ffdc;border:1px solid #2fca76}
/* Asignaciones/clientes: activo verde, por vencer naranja, vence hoy amarillo, disponible celeste */
#gestionRenewals .gestion-status.active{background:#135d3b;color:#c3ffdc;border:1px solid #2fca76}
#gestionRenewals .gestion-status.soon{background:#7a3e0c;color:#ffddba;border:1px solid #f08c27}
#gestionRenewals .gestion-status.today{background:#7d6500;color:#fff9c4;border:1px solid #f4d22d}
#gestionRenewals .gestion-status.available{background:#10546b;color:#d4f8ff;border:1px solid #28c8f2}
#gestionRenewals .gestion-status.overdue{background:#702431;color:#ffe3e6;border:1px solid #e7546b}

.gestion-whatsapp-renew{background:#147d55!important;color:#fff!important;border-color:#21b877!important}
.gestion-whatsapp-renew:disabled{opacity:.5;cursor:not-allowed}

.gestion-customer-picker{position:relative;display:flex;align-items:center}
.gestion-customer-picker input{width:100%;padding-right:46px}
.gestion-customer-picker #gCustomerToggle{position:absolute;right:3px;top:3px;bottom:3px;width:38px;min-width:38px;padding:0;border:0;background:transparent;color:inherit;cursor:pointer;font-size:23px;box-shadow:none}
.gestion-customer-options{position:absolute;top:calc(100% + 3px);left:0;right:0;z-index:1000;max-height:240px;overflow-y:auto;background:#171026;border:1px solid #6d568a;border-radius:9px;box-shadow:0 12px 30px #0009}
.gestion-customer-options[hidden]{display:none}
.gestion-customer-choice{display:block;width:100%;text-align:left;background:transparent;color:#fff;border:0;border-radius:0;box-shadow:none;padding:11px 12px;cursor:pointer;font-size:13px}
.gestion-customer-choice:hover,.gestion-customer-choice.selected{background:#176ab7;color:#fff}
.gestion-customer-empty{padding:12px;color:#c7b9d5;font-size:13px}

/* Lista de clientes: colores discretos, sin gradientes de los botones generales */
.gestion-customer-options .gestion-customer-choice{
  background:#1b1827!important;
  background-image:none!important;
  color:#e9e5f0!important;
  border:0!important;
  border-bottom:1px solid #322b3d!important;
  border-radius:0!important;
  box-shadow:none!important;
  text-shadow:none!important;
  transform:none!important;
  font-weight:400!important;
}
.gestion-customer-options .gestion-customer-choice:hover,
.gestion-customer-options .gestion-customer-choice.selected,
.gestion-customer-options .gestion-customer-choice:focus{
  background:#302b40!important;
  background-image:none!important;
  color:#fff!important;
  border-color:#494154!important;
  box-shadow:none!important;
  outline:none!important;
}
.gestion-customer-picker #gCustomerToggle{
  background:transparent!important;
  background-image:none!important;
  border:0!important;
  box-shadow:none!important;
  color:#c8bed8!important;
}

/* Prioridad superior a los botones turquesa globales de admin.css */
body.dashboard-body .dashboard-section .gestion-customer-picker .gestion-customer-options button.gestion-customer-choice,
body.dashboard-body .dashboard-section button.gestion-customer-choice:not(.product-disable):not(.product-enable){
  display:block!important;width:100%!important;min-height:0!important;
  margin:0!important;padding:10px 12px!important;text-align:left!important;
  background:#211a30!important;background-image:none!important;
  color:#e9e4f2!important;border:0!important;border-bottom:1px solid #3d334e!important;
  border-radius:0!important;box-shadow:none!important;text-shadow:none!important;
  transform:none!important;font-size:13px!important;font-weight:400!important;
}
body.dashboard-body .dashboard-section .gestion-customer-picker .gestion-customer-options button.gestion-customer-choice:hover,
body.dashboard-body .dashboard-section .gestion-customer-picker .gestion-customer-options button.gestion-customer-choice.selected,
body.dashboard-body .dashboard-section .gestion-customer-picker .gestion-customer-options button.gestion-customer-choice:focus{
  background:#3a3050!important;background-image:none!important;
  color:#fff!important;border-color:#554664!important;box-shadow:none!important;
}
body.dashboard-body .dashboard-section .gestion-customer-picker #gCustomerToggle{
  background:transparent!important;background-image:none!important;
  color:#d0c4df!important;border:0!important;box-shadow:none!important;
}
.gestion-customer-options{overflow-x:hidden!important;}

/* Estado de cuenta caída: discreto, visible y persistente. */
.gestion-status.down{background:#67232d!important;color:#ffe1e5!important;border:1px solid #e76b79!important}
.gestion-card-actions .gestion-down-button{background:#422c3d!important;color:#ffe0e5!important;border:1px solid #8e5263!important;box-shadow:none!important}
.gestion-card-actions .gestion-down-button:hover{background:#593747!important}

/* CAÍDO: fondo negro y texto blanco */
.gestion-status.down{background:#000!important;color:#fff!important;border:1px solid #555!important;text-shadow:none!important}

.gestion-account-modes{display:flex;flex-wrap:wrap;gap:10px;margin:12px 0}.gestion-account-modes button{background:#19152b!important;color:#e7e5f4!important;border:1px solid #655477!important;box-shadow:none!important}.gestion-account-modes button.active{background:#34304e!important;border-color:#a5a0d0!important;color:white!important}

.gestion-renewal-filters{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0 18px}
.gestion-renewal-filters .gestion-renewal-filter{background:#1b1830!important;color:#e4e5ed!important;border:1px solid #506078!important;box-shadow:none!important;text-shadow:none!important;padding:9px 13px;border-radius:9px;cursor:pointer}
.gestion-renewal-filters .gestion-renewal-filter:hover{background:#2b2941!important}
.gestion-renewal-filters .gestion-renewal-filter.active{background:#34304e!important;color:#fff!important;border-color:#9b91ca!important}

.gestion-password-view{display:flex;flex-direction:column;align-items:flex-start;gap:5px;min-width:0}
.gestion-password-label{font-size:10px;color:#86c8e0;letter-spacing:.04em}
.gestion-password-value{overflow-wrap:anywhere;user-select:text}
button.gestion-reveal-password{background:#201a36!important;color:#f2ebff!important;border:1px solid #625678!important;box-shadow:none!important;border-radius:7px!important;padding:6px 10px!important;font-size:12px!important;min-height:0!important}
button.gestion-reveal-password:hover{background:#322745!important}

.gestion-notice-check{display:inline-flex;align-items:center;gap:9px;cursor:pointer;color:#d9e7ec;font-size:13px;margin:10px 0 2px;user-select:none}
.gestion-notice-check input{width:17px;height:17px;accent-color:#36ad79;cursor:pointer;flex-shrink:0}
.gestion-notice-check input:disabled{cursor:wait}

.gestion-date-groups{display:grid;gap:12px;margin-top:16px}.gestion-date-group{min-width:0;border:1px solid rgba(70,200,215,.35);border-radius:12px;padding:14px}.gestion-date-group>summary{cursor:pointer;font-weight:700;color:inherit;padding:4px 0}.gestion-date-group>.gestion-cards{margin-top:12px}

/* Historial de ventas: buscador */
#gestionSales .g-sales-search{display:flex;align-items:center;gap:12px;width:100%;max-width:520px;box-sizing:border-box;margin:18px 0 22px;padding:0 15px;background:#081c28;border:1px solid #238b9c;border-radius:12px;transition:border-color .2s,box-shadow .2s;}
#gestionSales .g-sales-search:focus-within{border-color:#55dfec;box-shadow:0 0 0 3px rgba(85,223,236,.15);}
#gestionSales .g-sales-search span{font-size:19px;flex-shrink:0;color:#55dfec;}
#gestionSales #gSalesSearch{flex:1;min-width:0;width:100%;height:48px;margin:0;padding:0;border:0;outline:none;box-shadow:none;background:transparent;color:#e6f8fb;font:inherit;font-size:14px;}
#gestionSales #gSalesSearch::placeholder{color:#a4c4ce;opacity:1;}

#gestionSales .g-cancel-sale{background:#a62336!important;color:#fff!important;border:1px solid #ef7180!important;box-shadow:none!important;margin:8px 0 0 8px;}

.g-password-line{display:flex;align-items:center;gap:8px;min-width:0}.g-password-line strong{overflow-wrap:anywhere;min-width:0}.g-password-eye{display:inline-flex!important;align-items:center;justify-content:center;flex:0 0 34px;width:34px;height:34px;padding:0!important;margin:0!important;border:1px solid #35c9d5!important;border-radius:8px!important;background:#0a2935!important;color:#62e4ec!important;box-shadow:none!important}.g-password-eye:hover{background:#124653!important}.g-password-eye:focus-visible{outline:2px solid #62e4ec;outline-offset:2px}

.gestion-account-picker #gAccountToggle{position:absolute;right:3px;top:3px;bottom:3px;width:38px;min-width:38px;padding:0;border:0;background:transparent;color:inherit;cursor:pointer;font-size:23px;box-shadow:none}

/* Flecha discreta del selector de cuentas: sin estilo global de botones. */
body.dashboard-body .dashboard-section .gestion-account-picker button#gAccountToggle{
  display:flex!important;align-items:center!important;justify-content:center!important;
  width:38px!important;min-width:38px!important;min-height:0!important;
  height:auto!important;margin:0!important;padding:0!important;
  background:transparent!important;background-image:none!important;border:0!important;
  border-radius:0!important;box-shadow:none!important;text-shadow:none!important;
  transform:none!important;color:#d0c4df!important;font-size:0!important;
}
body.dashboard-body .dashboard-section .gestion-account-picker button#gAccountToggle::before{
  content:"";display:block;width:8px;height:8px;box-sizing:border-box;
  border-right:2px solid currentColor;border-bottom:2px solid currentColor;
  transform:translateY(-2px) rotate(45deg);
}
body.dashboard-body .dashboard-section .gestion-account-picker button#gAccountToggle:focus-visible{outline:2px solid #a99ac4!important;outline-offset:-4px;}

.g-renew-dialog{width:min(480px,90vw);max-height:90vh;overflow:auto;box-sizing:border-box;background:#0b2934;color:#fff;border:1px solid #21d5e3;border-radius:18px;padding:22px;margin:auto}.g-renew-dialog::backdrop{background:#040912c9}.g-renew-form{display:grid;gap:12px}.g-renew-form label{display:grid;gap:6px}.g-renew-form input,.g-renew-form select{width:100%;box-sizing:border-box;background:#10202e;color:#fff;border:1px solid #35616f;border-radius:8px;padding:10px}.g-renew-preview{max-width:100%;max-height:250px;object-fit:contain}.g-renew-preview[hidden]{display:none}.g-renew-error{color:#ffb4a9;margin:0}

.gestion-card-actions .g-cancel-sale{background:#a62336!important;color:#fff!important;border:1px solid #ef7180!important;box-shadow:none!important;}

/* Assignment actions only: balanced grid and separate cancellation. */
body.dashboard-body .dashboard-section .gestion-card-actions.gestion-assignment-actions {
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;align-items:stretch;
}
body.dashboard-body .dashboard-section .gestion-card-actions.gestion-assignment-actions > button {
  width:100%!important;min-width:0!important;max-width:100%!important;min-height:48px!important;
  height:auto!important;margin:0!important;box-sizing:border-box;white-space:normal!important;
  overflow-wrap:anywhere;text-align:center;line-height:1.25;padding:9px 7px!important;
}
body.dashboard-body .dashboard-section .gestion-card-actions.gestion-assignment-actions > button.g-cancel-sale {
  grid-column:1/-1;background:#a62336!important;background-image:none!important;
  color:#fff!important;border:1px solid #ef7180!important;box-shadow:none!important;text-shadow:none!important;
}
body.dashboard-body .dashboard-section .gestion-card-actions.gestion-assignment-actions > button.g-cancel-sale:hover {background:#bd3045!important;}
body.dashboard-body .dashboard-section .gestion-card-actions.gestion-assignment-actions > button:nth-last-child(2):nth-child(odd) {grid-column:1/-1;}
@media(max-width:360px){body.dashboard-body .dashboard-section .gestion-card-actions.gestion-assignment-actions{grid-template-columns:1fr;}}

/* Buscador de asignaciones */
#gestionRenewals .g-assignment-search{display:flex;align-items:center;gap:12px;width:100%;max-width:520px;box-sizing:border-box;margin:18px 0 22px;padding:0 15px;background:#081c28;border:1px solid #238b9c;border-radius:12px;transition:border-color .2s,box-shadow .2s;}
#gestionRenewals .g-assignment-search:focus-within{border-color:#55dfec;box-shadow:0 0 0 3px rgba(85,223,236,.15);}
#gestionRenewals .g-assignment-search span{font-size:19px;flex-shrink:0;color:#55dfec;}
#gestionRenewals #gAssignmentSearch{flex:1;min-width:0;width:100%;height:48px;margin:0;padding:0;border:0;outline:none;box-shadow:none;background:transparent;color:#e6f8fb;font:inherit;font-size:14px;}
#gestionRenewals #gAssignmentSearch::placeholder{color:#a4c4ce;opacity:1;}

/* Indicar con claridad el filtro seleccionado, incluso con el tema global. */
body.dashboard-body #gestionRenewals #gRenewalFilters button.gestion-renewal-filter[aria-pressed="true"]{background:#124653!important;background-image:none!important;color:#fff!important;border:2px solid #76f1ff!important;box-shadow:inset 0 0 0 1px #76f1ff!important;}
