:root {
  --txt-dark: #1a1a1a;
  --txt-accent: #2f6fed;
  --bg: #f5f6f8;
  --border: #e1e4e8;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: #222;
}

header {
  background: var(--txt-dark);
  color: #fff;
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header h1 {
  font-size: 18px;
  margin: 0;
  font-weight: 600;
}

header .meta {
  font-size: 13px;
  color: #ccc;
}

main {
  padding: 20px 24px;
}

.toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

input[type="text"] {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  min-width: 220px;
}

button, .btn-link {
  padding: 8px 14px;
  border-radius: 6px;
  border: none;
  background: var(--txt-accent);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

button.secondary, .btn-link.secondary {
  background: #fff;
  color: #333;
  border: 1px solid var(--border);
}

button:hover, .btn-link:hover { opacity: 0.9; }

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

th, td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
  white-space: nowrap;
}

th {
  background: #fafbfc;
  font-weight: 600;
  position: sticky;
  top: 0;
}

.estado-pill {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
}

.estado-entregado { background: #2e9e4b; }
.estado-entregado_con_incidencia { background: #1f6b32; }
.estado-en_transito { background: #2f6fed; }
.estado-en_reparto { background: #59a7e8; }
.estado-devolucion { background: #d5433d; }
.estado-cierre_por_incidencia { background: #8a8a8a; }
.estado-atencion { background: #e08a1e; }
.estado-default { background: #999; }

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}

.login-box {
  background: #fff;
  padding: 32px;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  width: 320px;
}

.login-box h2 {
  margin-top: 0;
  font-size: 20px;
}

.login-box input {
  width: 100%;
  margin-bottom: 12px;
}

.login-box button {
  width: 100%;
}

.error-msg {
  color: #c0392b;
  font-size: 13px;
  margin-bottom: 10px;
  min-height: 16px;
}

.empty-state {
  padding: 40px;
  text-align: center;
  color: #777;
}
