:root {
    --color-primario: #1f5c3f;
    --color-texto: #1c1c1c;
    --color-borde: #d9d9d9;
    --color-fondo: #f6f7f6;
    --color-error: #b3261e;
    --color-ok: #1f5c3f;
}

* { box-sizing: border-box; }

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

a { color: var(--color-primario); }

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 0.75rem 1.25rem;
    background: white;
    border-bottom: 1px solid var(--color-borde);
}

.topbar-marca { font-weight: 700; }

.topbar-nav { display: flex; gap: 1rem; flex-wrap: wrap; }
.topbar-nav a { text-decoration: none; }

.topbar-usuario { display: flex; align-items: center; gap: 0.75rem; }

.link-boton {
    background: none;
    border: none;
    color: var(--color-primario);
    text-decoration: underline;
    cursor: pointer;
    font: inherit;
    padding: 0;
}

.contenido { max-width: 1000px; margin: 0 auto; padding: 1.5rem 1.25rem 3rem; }

h1 { font-size: 1.4rem; }

.tabla { width: 100%; border-collapse: collapse; background: white; }
.tabla th, .tabla td {
    text-align: left;
    padding: 0.5rem 0.6rem;
    border-bottom: 1px solid var(--color-borde);
    font-size: 0.92rem;
}
.tabla th { background: #eef1ee; }

.acciones-tabla { display: flex; gap: 0.6rem; }

.form-grupo { margin-bottom: 1rem; max-width: 420px; }
.form-grupo label { display: block; font-weight: 600; margin-bottom: 0.25rem; font-size: 0.9rem; }
.form-grupo input[type=text], .form-grupo input[type=number], .form-grupo input[type=password],
.form-grupo input[type=time], .form-grupo input[type=date], .form-grupo input[type=email],
.form-grupo select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--color-borde);
    border-radius: 4px;
    font: inherit;
}
.form-grupo .ayuda { font-size: 0.8rem; color: #555; margin-top: 0.2rem; }
.form-grupo .error { color: var(--color-error); font-size: 0.85rem; margin-top: 0.2rem; }
.form-checkbox { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.75rem; }
.form-checkbox label { font-weight: 600; font-size: 0.9rem; }

.boton {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--color-primario);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font: inherit;
}
.boton.secundario { background: white; color: var(--color-primario); border: 1px solid var(--color-primario); }

.mensaje-ok { background: #e6f4ea; color: var(--color-ok); padding: 0.6rem 0.9rem; border-radius: 4px; margin-bottom: 1rem; }
.mensaje-error { background: #fbeae9; color: var(--color-error); padding: 0.6rem 0.9rem; border-radius: 4px; margin-bottom: 1rem; }

.badge { display: inline-block; padding: 0.15rem 0.5rem; border-radius: 999px; font-size: 0.78rem; }
.badge.activo { background: #e6f4ea; color: var(--color-ok); }
.badge.inactivo { background: #eee; color: #666; }

.pantalla-login {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.tarjeta-login {
    background: white;
    border: 1px solid var(--color-borde);
    border-radius: 8px;
    padding: 2rem;
    width: 100%;
    max-width: 360px;
}
.tarjeta-login h1 { margin-top: 0; font-size: 1.2rem; }
.cambiar-acceso { margin-top: 1rem; font-size: 0.85rem; text-align: center; }
