* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: #f0f2f5;
  color: #1a1a2e;
  padding: 20px;
  line-height: 1.5;
}

.container { max-width: 900px; margin: 0 auto; }

.card {
  background: #fff;
  border-radius: 10px;
  padding: 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  margin-bottom: 16px;
}

/* Login */
.login-card { max-width: 420px; margin: 60px auto; }
.login-card header { text-align: center; margin-bottom: 24px; }
.login-card header h1 { color: #29417a; font-size: 1.5rem; }
.login-card header p { color: #888; font-size: 0.85rem; margin-top: 4px; }

.login-card form { display: flex; flex-direction: column; gap: 12px; }
.login-card label { font-weight: 600; font-size: 0.85rem; color: #444; margin-top: 8px; }
.login-card input,
.login-card select {
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
}
.login-card input:focus,
.login-card select:focus { outline: 2px solid #29417a; border-color: #29417a; }

.login-card button {
  margin-top: 12px;
  padding: 12px;
  background: #29417a;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.login-card button:hover { background: #1e3060; }

.error {
  background: #fde2e2;
  color: #a30000;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.hint {
  margin-top: 18px;
  font-size: 0.8rem;
  color: #888;
  text-align: center;
}

/* Mis entregas */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}
.page-header h1 { color: #29417a; font-size: 1.5rem; }
.page-header p { color: #666; font-size: 0.9rem; }

.btn-logout {
  background: #e74c3c;
  color: #fff;
  padding: 8px 16px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
}
.btn-logout:hover { background: #c0392b; }

.resumen {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.stat-card {
  background: #fff;
  border-radius: 8px;
  padding: 16px;
  text-align: center;
  box-shadow: 0 1px 6px rgba(0,0,0,0.06);
  border-top: 4px solid #29417a;
}
.stat-card.ok { border-top-color: #27ae60; }
.stat-card.warning { border-top-color: #e67e22; }
.stat-card .num { font-size: 2rem; font-weight: 800; color: #29417a; }
.stat-card.ok .num { color: #27ae60; }
.stat-card.warning .num { color: #e67e22; }
.stat-card .label { font-size: 0.78rem; color: #888; margin-top: 2px; }

.pendientes-banner {
  background: #fff4e6;
  border-left: 4px solid #e67e22;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 16px;
  font-size: 0.9rem;
}
.pendientes-banner strong { color: #c0660e; margin-right: 8px; }
.chip {
  display: inline-block;
  background: #e67e22;
  color: #fff;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 700;
  margin: 2px 4px 2px 0;
}

.ok-banner {
  background: #e8f7ee;
  border-left: 4px solid #27ae60;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 16px;
  color: #1e8449;
  font-weight: 600;
}

/* Tabla */
table.entregas { width: 100%; border-collapse: collapse; }
table.entregas thead th {
  background: #29417a;
  color: #fff;
  text-align: left;
  padding: 10px 12px;
  font-size: 0.85rem;
}
table.entregas thead th:first-child { border-radius: 6px 0 0 0; }
table.entregas thead th:last-child { border-radius: 0 6px 0 0; }
table.entregas tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid #eee;
  font-size: 0.9rem;
  vertical-align: top;
}
table.entregas tbody tr.row-pend { background: #fffaf2; }
table.entregas .col-pnum { font-weight: 700; color: #29417a; width: 80px; }
table.entregas .col-estado { width: 130px; }

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
}
.badge-ok { background: #d4edda; color: #155724; }
.badge-pend { background: #f8d7da; color: #721c24; }

.archivo-list { list-style: none; padding: 0; margin: 0; }
.archivo-list li {
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 0.78rem;
  color: #555;
  padding: 2px 0;
}
.muted { color: #aaa; }

code {
  background: #f0f2f5;
  padding: 1px 6px;
  border-radius: 3px;
  font-family: 'Consolas', monospace;
  font-size: 0.85rem;
}

@media (max-width: 600px) {
  .page-header { flex-direction: column; align-items: flex-start; }
  table.entregas { font-size: 0.85rem; }
  table.entregas .col-archivos { word-break: break-all; }
}
