/* ==============================
   CLIENTES - LISTADO
================================ */

.clientes-wrapper {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  background: #f5f5f5;
}

/* HEADER */
.clientes-header {
  background: var(--color-primary-dark);
  color: var(--color-card);
  padding: 12px;
  border-bottom: 1px solid #e5e5e5;
}

.clientes-header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.clientes-title {
  margin: 0;
  font-size: 18px;
}

.clientes-btn-add {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--color-primary);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
}

.clientes-search {
  margin-top: 10px;
}

.clientes-search input {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #ddd;
}

/* LISTADO */
.clientes-list {
  flex: 1;
  overflow-y: auto;
  background: #fff;
}

.clientes-letter {
  padding: 8px 12px;
  font-weight: bold;
  background: #f0f0f0;
  border-bottom: 1px solid #e5e5e5;
}

.clientes-row {
  padding: 14px 12px;
  border-bottom: 1px solid #eee;
  cursor: pointer;
}

.clientes-row:hover {
  background: #f9f9f9;
}

.clientes-name {
  font-size: 15px;
  font-weight: 500;
}

/* INACTIVO */
.clientes-inactivo {
  opacity: 0.4;
}

/* FOOTER FILTROS */
.clientes-footer {
  position: sticky;
  bottom: 0;

  display: flex;
  border-top: 1px solid #e5e5e5;
  background: #1e4fd8;

  z-index: 20;
}

.clientes-filter {
  flex: 1;
  padding: 12px;
  border: none;
  background: none;
  font-size: 14px;
  cursor: pointer;
  font-weight: bold;
  color: #fff;
}

.clientes-filter.active {
  color: #c9d635;
  font-weight: bold;
}

/* ==============================
   CLIENTES - ROW 2 COLUMNS
================================ */

.clientes-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ==============================
   CLIENTES - SELECT
================================ */

.clientes-field select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  background: #fff;
}

/* ==============================
   CLIENTES - TEXTAREA
================================ */

.clientes-field textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px; /* igual que inputs */
  font-size: 14px;
  resize: none; /* evita que rompa el layout en móvil */
  box-sizing: border-box;
}

/* ==============================
   CLIENTES - FORM
================================ */

.clientes-form {
  padding: 16px;
  background: #fff;
}

.clientes-field {
  margin-bottom: 14px;
}

.clientes-field label {
  display: block;
  font-size: 13px;
  margin-bottom: 6px;
}

.clientes-field input[type='text'] {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #ddd;
}

.clientes-switch label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.clientes-actions {
  margin-top: 20px;
}

.clientes-btn-primary {
  width: 100%;
  padding: 12px;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  cursor: pointer;
}

/* ==============================
   CLIENTES - FORM HEADER (STICKY)
================================ */

.clientes-header-form {
  display: flex;
  justify-content: space-between;
  align-items: center;

  position: sticky;
  top: 0px; /* altura del header global */

  z-index: 30;
  background: var(--color-primary-dark);

  padding: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.clientes-header-actions {
  display: flex;
  gap: 8px;
}

/* ==============================
   CLIENTES - SWITCH (CUSTOM)
================================ */

.clientes-switch-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 18px;
  padding: 6px 0;
}

.clientes-switch-label {
  font-size: 14px;
  color: #374151;
}

/* SWITCH BASE */
.clientes-switch {
  position: relative;
  width: 42px;
  height: 24px;
}

.clientes-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

/* SLIDER */
.clientes-switch-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #e5e7eb;
  border-radius: 999px;
  transition: 0.3s;
}

.clientes-switch-slider::before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  top: 3px;
  background-color: white;
  border-radius: 50%;
  transition: 0.3s;
}

/* CHECKED */
.clientes-switch input:checked + .clientes-switch-slider {
  background-color: var(--color-primary);
}

.clientes-switch input:checked + .clientes-switch-slider::before {
  transform: translateX(18px);
}

/* ==============================
   CLIENTES - INLINE ROWS
================================ */

.clientes-inline-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

/* SELECT */
.clientes-inline-select {
  min-width: 110px;
  padding: 6px 8px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 13px;
  background: #fff;
}

/* INPUT */
.clientes-inline-input {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 13px;
}

/* REMOVE BUTTON */
.clientes-inline-remove {
  border: none;
  background: #fee2e2;
  color: #991b1b;
  border-radius: 6px;
  padding: 6px 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.clientes-inline-remove:hover {
  background: #fecaca;
}

/* ==============================
   SECTION HEADER INLINE
================================ */

.clientes-section-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Ajuste botón ADD */
.clientes-section-inline .global-btn-add {
  font-size: 12px;
  padding: 4px 8px;
}
