:root {
  font-family: Arial, Helvetica, sans-serif;
  color: #1f2937;
  background: #eef2f7;
}

* {
  box-sizing: border-box;
}

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

main {
  flex: 1;
}

button,
input {
  font: inherit;
}

button,
.link-button {
  border: 0;
  border-radius: 8px;
  padding: 12px 18px;
  background: #1d4ed8;
  color: white;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}

button:hover,
.link-button:hover {
  background: #1e40af;
}

a {
  color: #1d4ed8;
}

.page-center {
  display: grid;
  place-items: center;
  padding: 32px 24px;
}

.auth-card,
.welcome-card,
.info-card {
  background: white;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.1);
}

.auth-card {
  width: min(100%, 460px);
  padding: 32px;
}

.brand {
  color: #1d4ed8;
  font-weight: 700;
}

h1 {
  margin: 14px 0 8px;
}

.subtitle,
.footer-text {
  color: #64748b;
}

.form {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}

.form label {
  display: grid;
  gap: 8px;
  font-weight: 700;
}

.form input {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 12px;
  background: white;
}

.form input:focus {
  outline: 3px solid rgba(29, 78, 216, 0.15);
  border-color: #1d4ed8;
}

.code-input {
  text-align: center;
  font-size: 1.8rem;
  letter-spacing: 0.45rem;
}

.message {
  margin: 16px 0 0;
  color: #b91c1c;
  font-weight: 700;
}

.success-message {
  color: #15803d;
}

.footer-text {
  margin-top: 22px;
  text-align: center;
}

.topbar {
  background: #0f172a;
  color: white;
}

.topbar-content {
  max-width: 1000px;
  margin: auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-link {
  color: white;
  font-weight: 700;
  text-decoration: none;
}

.topbar form {
  margin: 0;
}

.secondary-button {
  background: #475569;
  padding: 9px 14px;
}

.dashboard {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 36px 24px;
}

.welcome-card,
.info-card {
  padding: 24px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.info-card h2 {
  margin-top: 0;
}

.site-footer {
  padding: 18px 24px;
  text-align: center;
  color: #64748b;
  font-size: 0.9rem;
}

.center-text {
  text-align: center;
}

@media (max-width: 700px) {
  .grid {
    grid-template-columns: 1fr;
  }

  .auth-card {
    padding: 24px;
  }
}

/* Estilos funcionales básicos. El compañero de diseño puede reemplazarlos. */
select {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 12px;
  background: white;
  font: inherit;
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 20px 0;
}

.stack-links {
  display: grid;
  gap: 10px;
}

.inline-form {
  display: flex;
  align-items: end;
  gap: 12px;
  margin-top: 18px;
}

.inline-form label {
  flex: 1;
  display: grid;
  gap: 8px;
  font-weight: 700;
}

.table-card {
  margin-top: 20px;
  background: white;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.1);
  padding: 20px;
}

.table-wrapper {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 11px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  white-space: nowrap;
}

th {
  background: #f8fafc;
}

@media (max-width: 700px) {
  .inline-form {
    align-items: stretch;
    flex-direction: column;
  }
}
