/* ============================================================
   VARIABLES GLOBALES
   ============================================================ */
:root {
  --color-bg: #f4f7f6;
  --color-text: #222;
  --color-accent: #2196f3;
  --color-nav-bg: rgb(126, 188, 224);
  --color-nav-border: #e0e0e0;
}

/* ============================================================
   BASE GENERAL
   ============================================================ */
body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
}

.contenedor {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
}

/* ============================================================
   LOGIN
   ============================================================ */
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 120px);
  padding: 2rem 1rem;
  box-sizing: border-box;
}

.login-card {
  background: #fff;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  width: 100%;
  max-width: 380px;
  text-align: center;
}

.login-card h2 {
  margin-bottom: 1rem;
  color: var(--color-accent);
}

.login-img img {
  border-radius: 50%;
  margin-bottom: 1rem;
}

label {
  display: block;
  margin-top: 1rem;
  text-align: left;
  color: #333;
  font-size: 0.95rem;
}

input[type="email"],
input[type="password"] {
  width: 100%;
  padding: 0.6rem;
  margin-top: 0.3rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
}

.password-container {
  position: relative;
}

.toggle-password {
  position: absolute;
  right: 10px;
  top: 55%;
  transform: translateY(-50%);
  cursor: pointer;
  color: #666;
}

.btn-login {
  width: 100%;
  background: var(--color-accent);
  color: white;
  border: none;
  padding: 0.8rem;
  margin-top: 1.5rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s;
}

.btn-login:hover {
  background: #1976d2;
}

.error-msg {
  color: crimson;
  margin-top: 0.8rem;
}

.login-links {
  margin-top: 1.5rem;
  font-size: 0.9rem;
}

.login-links a {
  color: var(--color-accent);
  text-decoration: none;
}

.login-links a:hover {
  text-decoration: underline;
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--color-nav-bg);
  padding: 0.8rem 1.2rem;
  position: sticky;
  top: 0;
  z-index: 100;
  flex-wrap: wrap;
}

.navbar .logo a {
  color: #fff;
  font-weight: bold;
  text-decoration: none;
  font-size: 1.2rem;
  letter-spacing: 0.4px;
}

.menu {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.menu a {
  color: #fff;
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.menu a:hover {
  text-decoration: underline;
}

/* ============================================================
   USUARIO Y BOTÓN SALIR
   ============================================================ */
.menu-usuario {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-left: 1rem;
}

.menu-usuario span {
  color: #fff;
  font-weight: 500;
}

.logout {
  background: crimson;
  color: #fff !important;
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
  font-weight: bold;
  text-decoration: none;
  transition: background 0.2s;
}

.logout:hover {
  background: #a3122f;
}

/* ============================================================
   IMAGEN PRINCIPAL (Index)
   ============================================================ */
.imagen-principal {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

.imagen-principal img {
  width: 550px;
  max-width: 90%;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* ============================================================
   DASHBOARD (Principal)
   ============================================================ */
.dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.card {
  background: white;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
  text-align: center;
}

.card h3 {
  color: var(--color-accent);
  margin-bottom: 0.5rem;
}

.card p {
  color: #444;
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.card .btn {
  display: inline-block;
  background: var(--color-accent);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.2s;
}

.card .btn:hover {
  background: #1976d2;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  margin-top: auto;
  padding: 1rem 1.5rem;
  background: #fff;
  border-top: 1px solid #ddd;
  color: #333;
  font-size: 0.9rem;
  width: 100%;
  text-align: center;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.footer-content a {
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 600;
}

.footer-content a:hover {
  text-decoration: underline;
}

.version {
  font-size: 0.85rem;
  color: #666;
}

/* ============================================================
   TEXTO DE BIENVENIDA
   ============================================================ */
.texto-bienvenida {
  text-align: center;
  margin-top: 1.5rem;
}

.texto-bienvenida h2 {
  font-size: 1.2rem;
  color: #333;
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* ============================================================
   TABLAS Y CLIENTES
   ============================================================ */
.acciones-clientes {
  margin: 1rem 0;
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.btn {
  background: var(--color-accent);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s;
}

.btn:hover {
  background: #1976d2;
}

.btn-secundario {
  background: #ccc;
  color: #000;
  padding: 0.4rem 0.9rem;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.9rem;
}

.btn-secundario:hover {
  background: #bbb;
}

/* TABLA GENERAL */
.tabla {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  background: #fff;
  box-shadow: 0 3px 10px rgba(0,0,0,0.05);
  border-radius: 8px;
  overflow: hidden;
}

.tabla th {
  background: var(--color-nav-bg);
  color: #fff;
  text-align: left;
  padding: 0.75rem;
  font-weight: 600;
}

.tabla td {
  padding: 0.7rem;
  border-bottom: 1px solid #ddd;
}

.tabla tr:nth-child(even) {
  background: #f9f9f9;
}

.tabla a {
  text-decoration: none;
  color: #333;
}

.tabla a:hover {
  color: var(--color-accent);
}

/* ÍCONOS DE ACCIÓN (SÓLIDOS Y AZULES) */
.acciones {
  text-align: center;
}

.acciones a {
  display: inline-block;
  margin: 0 0.4rem;
}

.acciones i {
  font-size: 1.3rem;
  color: var(--color-accent);
  transition: transform 0.2s, color 0.2s;
}

.acciones i:hover {
  transform: scale(1.25);
  color: #1976d2;
}

/* ESTADOS Y MENSAJES */
.verde {
  color: #2e7d32;
  font-weight: 600;
}

.rojo {
  color: #c62828;
  font-weight: 600;
}

.success-msg {
  background: #c8e6c9;
  padding: 0.6rem;
  border-radius: 6px;
  color: #256029;
  margin-bottom: 1rem;
}

.error-msg {
  background: #ffcdd2;
  padding: 0.6rem;
  border-radius: 6px;
  color: #b71c1c;
  margin-bottom: 1rem;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .menu {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
  }

  .menu a, .menu-usuario {
    padding: 0.4rem 0;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }

  .imagen-principal img {
    width: 90%;
  }
}

/* ÍCONOS COLORIDOS */
.acciones {
  text-align: center;
}

.acciones a {
  display: inline-block;
  margin: 0 0.5rem;
  transition: transform 0.2s ease;
}

.acciones i {
  font-size: 1.3rem;
  transition: transform 0.2s ease, filter 0.2s ease;
}

/* efecto suave al pasar el mouse */
.acciones a:hover i {
  transform: scale(1.25);
  filter: brightness(1.2);
}

/* BOTÓN SECUNDARIO (Ver todos / Ver solo activos) */
.btn-secundario {
  background: #e0e0e0;
  color: #333;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid #ccc;
  transition: all 0.2s ease;
  cursor: pointer;
  line-height: 1.2rem;
}

.btn-secundario i {
  font-size: 0.95rem;
}

.btn-secundario:hover {
  background: #d5d5d5;
  color: #000;
  border-color: #bbb;
}


/* CONTENEDOR DE ACCIONES */
.acciones-clientes {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 1rem 0;
}

/* BOTONES PRINCIPALES */
.btn {
  background: var(--color-accent);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: background 0.2s ease;
}

.btn:hover {
  background: #1976d2;
}

/* BOTÓN SECUNDARIO (Ver todos / activos) */
.btn-secundario {
  background: #e0e0e0;
  color: #333;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid #ccc;
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-secundario:hover {
  background: #d5d5d5;
  color: #000;
  border-color: #bbb;
}

