/* ============================================
   MODALES y TABS internas
   ============================================ */

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.55);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}

.modal-overlay.active { display: flex; }

.modal {
  background: white;
  border-radius: var(--radio-lg);
  max-width: 780px;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  padding: 28px;
  border: 1px solid var(--borde);
}

.modal.lg { max-width: 920px; }
.modal.sm { max-width: 480px; }

.modal-title {
  font-size: 19px;
  color: var(--marron);
  margin-bottom: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--borde);
  font-family: var(--font-titulo);
  font-weight: 400;
}

.modal-close {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--texto-suave);
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--borde);
  flex-wrap: wrap;
}

/* ===== TABS internas dentro de modal ===== */
.tabs-row {
  display: flex;
  gap: 2px;
  background: var(--nude-light);
  padding: 5px;
  border-radius: var(--radio-md);
  margin-bottom: 18px;
  overflow-x: auto;
}

.tab-item {
  padding: 9px 16px;
  border-radius: var(--radio-sm);
  cursor: pointer;
  font-size: 12px;
  color: var(--texto-suave);
  white-space: nowrap;
  transition: all 0.2s;
  font-weight: 500;
}

.tab-item:hover { background: var(--nude); }
.tab-item.active { background: var(--marron); color: white; }

.tab-content { display: none; }
.tab-content.active { display: block; }

/* ===== LOGIN OVERLAY ===== */
.login-screen {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-card {
  background: #fff;
  border-radius: 16px;
  padding: 48px 40px;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.login-header {
  text-align: center;
  margin-bottom: 32px;
}

.login-logo {
  max-width: 240px;
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto 8px;
}

.login-hint {
  margin-top: 16px;
  font-size: 13px;
  color: var(--texto-suave);
  letter-spacing: 0.5px;
}

.login-form .form-group { margin-bottom: 14px; }

.login-form label {
  font-size: 10px;
  color: var(--texto-suave);
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block;
  margin-bottom: 5px;
}

.login-form input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--borde);
  border-radius: var(--radio-sm);
  font-size: 14px;
  font-family: inherit;
}

.login-error {
  color: var(--error);
  font-size: 12px;
  margin-bottom: 14px;
  display: none;
}

.login-button {
  width: 100%;
  padding: 13px;
  background: var(--marron);
  color: white;
  border: none;
  border-radius: var(--radio-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: 0.5px;
  transition: background 0.2s;
}

.login-button:hover { background: var(--negro); }

.login-demo {
  margin-top: 18px;
  padding: 12px;
  background: var(--nude-light);
  border-radius: var(--radio-sm);
  font-size: 11px;
  color: var(--texto-suave);
  text-align: center;
  line-height: 1.6;
}

.login-demo code {
  background: white;
  padding: 2px 6px;
  border-radius: 3px;
  font-family: 'Courier New', monospace;
}
