:root {
  --verde: #1F6B3A;
  --verde-oscuro: #144a28;
  --oro: #C9A227;
  --fondo: #F4F7F5;
  --texto: #222;
  --borde: #DDE3DF;
  --rojo: #B3261E;
  --rojo-claro: #FDEAEA;
  --amarillo-claro: #FFF9D6;
}

* { box-sizing: border-box; }

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

.topbar {
  background: var(--verde);
  color: white;
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.topbar .marca {
  font-weight: 600;
  font-size: 1.05rem;
}

.topbar a {
  color: white;
  text-decoration: none;
  font-size: 0.9rem;
  opacity: 0.9;
}
.topbar a:hover { opacity: 1; text-decoration: underline; }

.contenedor {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 16px 60px;
}

.contenedor.ancho {
  max-width: 1000px;
}

.card {
  background: white;
  border: 1px solid var(--borde);
  border-radius: 10px;
  padding: 24px;
  margin-bottom: 20px;
}

.login-wrap {
  max-width: 380px;
  margin: 60px auto;
  padding: 0 16px;
}

.login-wrap .card { text-align: center; }

.login-wrap h1 {
  font-size: 1.3rem;
  color: var(--verde-oscuro);
  margin-bottom: 4px;
}
.login-wrap p.sub {
  color: #666;
  margin-top: 0;
  margin-bottom: 24px;
  font-size: 0.9rem;
}

label {
  display: block;
  text-align: left;
  font-size: 0.85rem;
  font-weight: 600;
  margin: 14px 0 6px;
  color: #444;
}

input[type=text], input[type=password] {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--borde);
  border-radius: 7px;
  font-size: 1rem;
}
input[type=text]:focus, input[type=password]:focus {
  outline: none;
  border-color: var(--verde);
}

button, .btn {
  display: inline-block;
  background: var(--verde);
  color: white;
  border: none;
  padding: 11px 18px;
  border-radius: 7px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  margin-top: 18px;
}
button:hover, .btn:hover { background: var(--verde-oscuro); }

.btn.secundario {
  background: white;
  color: var(--verde);
  border: 1px solid var(--verde);
}
.btn.secundario:hover { background: #eef5f0; }

.btn.peligro {
  background: white;
  color: var(--rojo);
  border: 1px solid var(--rojo);
}
.btn.peligro:hover { background: var(--rojo-claro); }

.error {
  background: var(--rojo-claro);
  color: var(--rojo);
  padding: 10px 14px;
  border-radius: 7px;
  font-size: 0.88rem;
  margin-bottom: 6px;
  text-align: left;
}

.aviso {
  background: var(--amarillo-claro);
  border: 1px solid #e8d98a;
  padding: 12px 14px;
  border-radius: 7px;
  font-size: 0.88rem;
  margin-bottom: 16px;
}

h1, h2, h3 { color: var(--verde-oscuro); }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
th, td {
  text-align: left;
  padding: 9px 10px;
  border-bottom: 1px solid var(--borde);
}
th { color: #555; font-weight: 600; font-size: 0.82rem; text-transform: uppercase; }

.recibo-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 4px;
  border-bottom: 1px solid var(--borde);
}
.recibo-item:last-child { border-bottom: none; }
.recibo-item .periodo { font-weight: 600; }
.recibo-item .fecha { color: #888; font-size: 0.82rem; }

.recibo-item-col {
  display: block;
}
.recibo-item-col .recibo-item-fila {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.confirmacion-estado {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.confirmacion-fecha { color: #888; font-size: 0.78rem; }
.confirmacion-comentario-guardado {
  margin-top: 6px;
  padding: 8px 10px;
  background: var(--rojo-claro);
  border-radius: 7px;
  color: #7a2420;
  font-size: 0.85rem;
  font-style: italic;
}

.confirmacion-pendiente { margin-top: 10px; }
.confirmacion-acciones {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}
.confirmacion-acciones .btn,
.confirmacion-acciones button { margin-top: 0; }

.no-conforme-form {
  margin-top: 10px;
  padding: 12px;
  background: var(--fondo);
  border: 1px solid var(--borde);
  border-radius: 8px;
}
.no-conforme-form label {
  margin: 0 0 6px;
}
.no-conforme-form textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--borde);
  border-radius: 7px;
  font-family: inherit;
  font-size: 0.9rem;
  resize: vertical;
}
.no-conforme-form button { margin-top: 10px; }

.oculto { display: none; }

.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge.ok { background: #e3f2e8; color: var(--verde-oscuro); }
.badge.warn { background: var(--amarillo-claro); color: #7a6417; }
.badge.err { background: var(--rojo-claro); color: var(--rojo); }
.badge.info { background: #e8eef7; color: #2c4a75; }

.vacio {
  text-align: center;
  color: #888;
  padding: 40px 0;
}

.footer-nota {
  text-align: center;
  color: #999;
  font-size: 0.78rem;
  margin-top: 30px;
}

.file-input-wrap {
  border: 2px dashed var(--borde);
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  margin: 16px 0;
}
