/* ====== Reset básico ====== */
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: #f6f7fb;
  color: #1f2937;
}
a { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: underline;background-color: #6b7280; }


/* ====== Layout ====== */
.container {
  max-width: 980px;
  margin: 0 auto;
  padding: 24px 16px;
}
.card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

/* ====== Header ====== */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.brand {
  font-weight: 800;
  letter-spacing: 0.3px;
}
.nav a { margin-left: 10px; }

/* ====== Tipografía ====== */
h1, h2, h3 { margin: 0 0 12px; }
h2 { font-size: 22px; }
h3 { font-size: 18px; }
.muted { color: #6b7280; }

/* ====== Formularios ====== */
.form {
  display: grid;
  gap: 12px;
}
label { font-size: 14px; font-weight: 600; }
input, select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  outline: none;
  background: #fff;
}
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
  background-color: #6b7280;
}

.btn {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid #1d4ed8;
  background: #2563eb;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  background-color: #6b7280;
}
.btn:hover { filter: brightness(0.95); }
.btn.secondary {
  background: #fff;
  color: #1d4ed8;
}
.btn.secondary:hover { background: #eff6ff; }

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 720px) {
  .row { grid-template-columns: 1fr; }
}

/* ====== Alertas ====== */
.alert {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid;
  margin: 10px 0;
}
.alert.ok {
  background: #ecfdf5;
  border-color: #10b981;
  color: #065f46;
}
.alert.err {
  background: #fef2f2;
  border-color: #ef4444;
  color: #7f1d1d;
}

/* ====== Tabla ====== */
.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
}
th, td {
  padding: 10px 12px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
  font-size: 14px;
}
th {
  background: #f3f4f6;
  font-weight: 800;
}
tr:hover td { background: #fafafa; }

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
}

/* ====== Timeline mensajes ====== */
.msg {
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 14px;
  padding: 12px 14px;
  margin: 10px 0;
}
.msg .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  color: #374151;
}
.msg .meta b { color: #111827; }
.msg .content { margin: 8px 0 0; white-space: pre-wrap; }
hr.sep {
  border: 0;
  border-top: 1px solid #e5e7eb;
  margin: 16px 0;
}
.login-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: linear-gradient(180deg, #f5f5f7 0%, #e9ecf3 100%);
}

.login-box {
  width: 100%;
  max-width: 380px;
  padding: 40px;
  border-radius: 22px;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(20px);
  box-shadow: 
    0 10px 40px rgba(0,0,0,0.08),
    0 2px 6px rgba(0,0,0,0.04);
  text-align: center;
}

.login-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 6px;
}

.login-subtitle {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 30px;
}

.login-input {
  width: 100%;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  background: #fafafa;
  margin-bottom: 16px;
  font-size: 15px;
}

.login-input:focus {
  border-color: #0071e3;
  background: white;
  box-shadow: 0 0 0 3px rgba(0,113,227,0.15);
}

.login-btn {
  width: 100%;
  padding: 14px;
  border-radius: 14px;
  border: none;
  background: #0071e3;
  color: white;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: all .2s ease;
}

.login-btn:hover {
  background: #0062c4;
  transform: translateY(-1px);
}

.login-footer {
  margin-top: 20px;
  font-size: 14px;
}
/* bloque sugerencias en login */
.login-box + .login-box { margin-top: 16px; }
.help-text { font-size: 12px; color: #6b7280; margin-top: -10px; margin-bottom: 14px; }

/* GRID LOGIN 2 COLUMNAS */

.login-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  width: 100%;
  max-width: 900px;
}

/* Responsive (móvil) */
@media (max-width: 900px) {
  .login-grid {
    grid-template-columns: 1fr;
  }
}
.login-box {
  min-height: 420px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

