/* Reset y base */
html,
body {
  height: 100%;
  margin: 0;
  font-family: Arial, sans-serif;
  background-color: #f9f9f9;
  color: #333;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header */
header.main-header {
  background-color: #4caf50;
  color: white;
  padding: 1.5rem 1rem;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}
h2 {
  text-align: center;
}
/* Contenido principal */
main.main-content {
  flex: 1;
  padding: 1.5rem 1rem;
  margin: 0 auto;
  box-sizing: border-box;
  text-align: center;
}

/* Cards container */
.cards-container {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1rem;
}

/* Cada card */
.card {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
  flex: 1 1 300px;
  max-width: 320px;
  box-sizing: border-box;
  transition: box-shadow 0.3s ease;
}
.card-residentes {
  background-color: #e6f2ff; /* Azul claro */
}

.card-conserjes {
  background-color: #fff3cd; /* Amarillo claro */
}

.card-admins {
  background-color: #e2f7e1; /* Verde claro */
}

.card:hover {
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.card h4 {
  margin-bottom: 1rem;
  color: #004080;
  font-size: 1.3rem;
  border-bottom: 2px solid rgba(0, 0, 0, 0.1);
  padding-bottom: 0.5rem;
}

.card ul {
  text-align: left;
  list-style: none;
  padding-left: 0;
}

.card ul li {
  text-align: left;
  margin-bottom: 0.6rem;
  font-size: 1rem;
  line-height: 1.4;
}

/* Botones */
.auth-links {
  margin-top: 2rem;
  text-align: center;
}

.btn {
  display: inline-block;
  background-color: #4caf50;
  color: white;
  padding: 0.7rem 1.5rem;
  margin: 0 0.5rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

.btn:hover {
  background-color: #45a049;
}

.btn.secondary {
  background-color: #2196f3;
}

.btn.secondary:hover {
  background-color: #0b7dda;
}

.btn.small {
  padding: 0.4rem 0.7rem;
  font-size: 0.85rem;
}

.btn.danger {
  background-color: #e53935;
  color: #fff;
}

.btn.danger:hover {
  background-color: #c62828;
}
/* Footer sticky */
footer {
  background-color: #333;
  color: white;
  padding: 1rem 0;
  text-align: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.auth-form {
  max-width: 400px;
  margin: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-form input {
  padding: 0.8rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.auth-form button {
  padding: 0.8rem;
  background-color: #4caf50;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
}

.auth-form button:hover {
  background-color: #45a049;
}

.auth-form select {
  padding: 0.8rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.form {
  max-width: 500px;
  margin: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.form input[type="text"],
.form input[type="number"],
.form input[type="date"],
.form input[type="email"],
.form input[type="password"],
.form select {
  padding: 0.6rem;
  border: 1px solid #ccc;
  border-radius: 5px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.card-pedidos {
  background-color: #fff5e6;
  border: 1px solid #f0c674;
  border-radius: 12px;
  padding: 1.5rem;
  margin-top: 1rem;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.card-pedidos h3 {
  margin-top: 0;
  color: #e67e22;
}

.dashboard-section {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

.dashboard-section .btn {
  min-width: 180px;
  text-align: center;
}

.main-header h1 {
  color: #1a73e8;
}

.dashboard-section .btn {
  background-color: #1a73e8;
  color: #fff;
}

.dashboard-section .btn:hover {
  background-color: #1558b0;
}

.table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem auto;
}
.table th,
.table td {
  padding: 0.75rem;
  border-bottom: 1px solid #ddd;
  text-align: left;
}
.table th {
  background-color: #f2f2f2;
}

@media (max-width: 600px) {
  .tabla-responsive {
    width: 100%;
    overflow-x: hidden;
  }

  .table {
    border: 0;
    width: 100%;
  }

  .table thead {
    display: none;
  }

  .table tr {
    display: block;
    margin-bottom: 1.5rem;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    padding: 1rem;
  }

  .table td {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-direction: column;
    border: none;
    border-bottom: 1px solid #eee;
    padding: 0.75rem 0;
  }

  .table td::before {
    content: attr(data-label);
    font-weight: bold;
    color: #444;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    display: block;
    text-align: left;
    width: 100%;
  }

  .table td:last-child {
    border-bottom: none;
  }

  .table td a.btn {
    display: inline-block;
    margin-top: 0.5rem;
  }
}
/* Footer */
footer.site-footer {
  padding: 0 1.875em;
}
footer.site-footer .footer-inner {
  color: #78909c;
  font-family: "Open Sans";
  font-size: 14px;
  line-height: 1.5;
  padding: 2.45em 1.125em;
}
footer.site-footer .footer-inner a {
  color: #6a7074;
}
.scroll-container {
    max-height: 300px;
    overflow-y: auto;
    padding-right: 10px; /* para evitar ocultar el contenido tras la barra */
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1rem;
    background-color: #f9f9f9;
}

.scroll-container::-webkit-scrollbar {
    width: 6px;
}

.scroll-container::-webkit-scrollbar-thumb {
    background-color: #bbb;
    border-radius: 4px;
}

.scroll-container::-webkit-scrollbar-thumb:hover {
    background-color: #999;
}
.main-header {
    text-align: center;
    padding: 30px 20px;
    background-color: #f9f9f9;
    border-bottom: 2px solid #e0e0e0;
    font-family: 'Segoe UI', sans-serif;
}

.main-header h1 {
    font-size: 50px;
    margin: 0;
}

.main-header .subtitle {
    font-size: 20px;
    color: #666;
    margin-bottom: 15px;
}

.main-header .welcome {
    margin-top: 10px;
    font-size: 16px;
    color: #444;
}

.main-header .btn-logout {
    color: #d9534f;
    text-decoration: none;
    font-weight: bold;
}

.main-header .btn-logout:hover {
    text-decoration: underline;
}

.user-nav {
    margin-top: 15px;
}

.user-nav a {
    display: inline-block;
    margin: 5px 10px;
    padding: 8px 14px;
    background-color: #2375d8;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.user-nav a:hover {
    background-color: #1a5cb5;
}
.welcome-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap; /* permite que salte a línea en pantallas pequeñas */
    font-size: 16px;
    color: #444;
    margin-top: 10px;
}

.welcome-text {
    font-weight: normal;
}

.btn-logout {
    color: #d9534f;
    text-decoration: none;
    font-weight: bold;
    margin-left: 10px;
}

.btn-logout:hover {
    text-decoration: underline;
}

/* 📱 Responsivo para pantallas pequeñas (menos de 600px) */
@media (max-width: 600px) {
    .welcome-container {
        flex-direction: column;
        align-items: center;
    }

    .btn-logout {
        margin-left: 0;
        margin-top: 5px;
    }
}
.main-footer {
    background-color: #f5f5f5;
    padding: 20px;
    text-align: center;
    font-family: 'Segoe UI', sans-serif;
    font-size: 14px;
    color: #666;
    border-top: 1px solid #ddd;
}

.footer-credit {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.footer-credit span {
    font-weight: 500;
    color: #333;
}

.footer-logo {
    height: 24px;
    vertical-align: middle;
    transition: transform 0.3s ease;
}

.footer-credit a:hover .footer-logo {
    transform: scale(1.1);
}
