/* static/style.css — identidad CRENOR */
:root {
  --verde: #00A14A;      /* verde primario */
  --lima: #B7CD46;       /* verde lima (acento) */
  --gris: #f4f6f8;
  --texto: #1a1a1a;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Arial, Helvetica, sans-serif; color: var(--texto); background: var(--gris); }

/* Encabezado + navegación */
.topbar { flex-wrap: wrap; background: #fff; border-bottom: 3px solid var(--verde); padding: 10px 22px;
  display: flex; align-items: center; gap: 28px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.marca { display: inline-flex; }
.logo { height: 40px; width: auto; display: block; }
.nav { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.nav a { color: var(--verde); text-decoration: none; font-weight: bold; font-size: 14px; }
.nav a:hover { text-decoration: underline; }
.nav-disabled { color: #aaa; font-size: 14px; cursor: not-allowed; }

/* Distintivo de entorno: solo aparece en dev, para no confundirlo con produccion. */
.badge-entorno { background: #111; color: #fff; font-weight: bold; font-size: 12px;
                 letter-spacing: .08em; padding: 4px 10px; border-radius: 6px; white-space: nowrap; }
.badge-bloque { display: block; text-align: center; margin: 8px 0 0; }

/* Menú responsivo: el checkbox es el interruptor (sin JS). Oculto pero enfocable. */
.menu-toggle { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.menu-btn { display: none; }
.menu-toggle:focus-visible + .menu-btn { outline: 3px solid var(--lima); outline-offset: 2px; }

/* En pantallas chicas el menú se colapsa tras el botón y ocupa el ancho completo. */
@media (max-width: 900px) {
  .topbar { gap: 12px; padding: 10px 14px; }
  .logo { height: 32px; }
  .menu-btn { display: inline-flex; align-items: center; gap: 8px; margin-left: auto;
              cursor: pointer; color: var(--verde); font-weight: bold; font-size: 15px;
              border: 2px solid var(--verde); border-radius: 8px; padding: 8px 14px; }
  .nav { display: none; width: 100%; flex-direction: column; align-items: stretch; gap: 0; }
  .menu-toggle:checked ~ .nav { display: flex; }
  .nav a { display: block; padding: 12px 4px; border-bottom: 1px solid #e8e8e8; font-size: 15px; }
  .nav a:last-child { border-bottom: none; }
}

.contenido { padding: 18px 22px; }
.titulo-modulo { color: var(--verde); font-size: 22px; margin: 0 0 16px; }

/* Inicio: tarjetas */
.tarjetas { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; max-width: 720px; }
.tarjeta { display: block; background: #fff; border-radius: 8px; padding: 20px; text-decoration: none;
  color: var(--texto); box-shadow: 0 1px 4px rgba(0,0,0,.08); border-top: 4px solid var(--verde); }
.tarjeta:hover { box-shadow: 0 3px 10px rgba(0,0,0,.12); }
.tarjeta h2 { color: var(--verde); font-size: 18px; margin: 0 0 8px; }
.tarjeta p { margin: 0; font-size: 13px; color: #555; }
.tarjeta--inactiva { border-top-color: #ccc; opacity: .6; }
.tarjeta--inactiva h2 { color: #888; }

/* Crédito Simple: layout dos columnas */
.cs-layout { display: grid; grid-template-columns: 320px 1fr; gap: 18px; align-items: start; }
.panel { background: #fff; border-radius: 8px; padding: 16px; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
form label { display: block; font-size: 13px; margin-bottom: 10px; color: #333; }
form input, form select { width: 100%; padding: 7px; margin-top: 3px; border: 1px solid #ccc; border-radius: 5px; }
.resumen { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.resumen div { background: var(--gris); border-radius: 6px; padding: 10px; }
.resumen span { display: block; font-size: 11px; color: #666; }
.resumen strong { font-size: 16px; color: var(--verde); }
.acciones { margin-bottom: 12px; display: flex; gap: 10px; align-items: center; }
.acciones a { display: inline-block; background: var(--verde); color: #fff; padding: 8px 14px; border-radius: 6px; text-decoration: none; }
form button, .acciones button { background: var(--verde); color: #fff; border: none; padding: 8px 14px;
  border-radius: 6px; cursor: pointer; font-weight: bold; font-size: 13px; }
form button:hover, .acciones button:hover { background: #008a3f; }
.panel ul { padding-left: 18px; font-size: 13px; }
.error { color: #b00020; }
.tabla-wrap { overflow: auto; max-height: 70vh; }
table { border-collapse: collapse; width: 100%; font-size: 12px; }
th, td { border: 1px solid #e0e0e0; padding: 5px 7px; text-align: right; white-space: nowrap; }
th { position: sticky; top: 0; background: var(--verde); color: #fff; }
td:first-child, td:nth-child(2) { text-align: center; }
@media (max-width: 800px) { .cs-layout { grid-template-columns: 1fr; } }
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.login-card { width: 320px; display: flex; flex-direction: column; gap: 10px; text-align: center; }
.login-logo { height: 48px; width: auto; margin: 0 auto 8px; }
.login-card h1 { font-size: 18px; color: var(--verde); margin: 0 0 6px; }
.login-card label { text-align: left; font-size: 13px; }
.login-card button { background: var(--verde); color: #fff; border: 0; padding: 9px; border-radius: 6px; cursor: pointer; }

/* Impresión de formatos/documentos */
@media print {
  .topbar, .no-print { display: none !important; }
  .contenido { padding: 0; }
  .panel.documento { border: 0; box-shadow: none; }
}
