:root {
    --green-dark: #1e4620;
    --green: #2e7d32;
    --green-light: #e8f5e9;
    --brown: #6d4c25;
    --text: #212121;
    --bg: #fffdf7;
    --max-width: 780px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Verdana, Arial, sans-serif;
    font-size: 18px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
}

.wrap {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

a {
    color: var(--green-dark);
}

a:focus,
button:focus {
    outline: 3px solid #1a73e8;
    outline-offset: 2px;
}

.skip-link {
    position: absolute;
    left: -999px;
    top: 0;
    background: #fff;
    color: var(--text);
    padding: 10px 16px;
    z-index: 100;
}

.skip-link:focus {
    left: 10px;
    top: 10px;
}

.site-header {
    background: var(--green-dark);
    color: #fff;
    padding: 16px 0;
}

.site-header .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.site-header a {
    color: #fff;
    text-decoration: none;
}

.logo {
    font-size: 1.4em;
    font-weight: bold;
}

.logo span {
    font-weight: normal;
    color: #c8e6c9;
}

.site-header nav ul {
    list-style: none;
    display: flex;
    gap: 24px;
    margin: 0;
    padding: 0;
}

.site-header nav a {
    font-size: 1.05em;
    border-bottom: 2px solid transparent;
}

.site-header nav a:hover,
.site-header nav a:focus {
    border-bottom-color: #fff;
}

main {
    padding: 40px 20px 60px;
}

.hero {
    text-align: center;
    padding-bottom: 24px;
    border-bottom: 1px solid #dcdcdc;
    margin-bottom: 32px;
}

.hero h1 {
    color: var(--green-dark);
    font-size: 2.2em;
    margin-bottom: 8px;
}

.tagline {
    font-size: 1.2em;
    max-width: 60ch;
    margin: 0 auto 24px;
}

.button {
    display: inline-block;
    background: var(--green);
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    padding: 14px 28px;
    border-radius: 6px;
    font-size: 1.1em;
}

.button:hover,
.button:focus {
    background: var(--green-dark);
}

section {
    margin-bottom: 40px;
}

h2 {
    color: var(--green-dark);
    border-bottom: 2px solid var(--green-light);
    padding-bottom: 6px;
}

.feature-list,
.steps {
    padding-left: 1.4em;
}

.feature-list li,
.steps li {
    margin-bottom: 10px;
}

code {
    background: var(--green-light);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.95em;
}

.notice {
    background: #fff3e0;
    border: 1px solid #ffb74d;
    padding: 12px 16px;
    border-radius: 6px;
    display: inline-block;
}

.site-footer {
    background: var(--brown);
    color: #fff;
    padding: 20px 0;
    font-size: 0.9em;
}

.site-footer a {
    color: #fff;
}

.site-footer p {
    margin: 4px 0;
}

.alt-option {
    margin-top: 12px;
}

/* Visualmente oculto pero leído por el lector de pantalla (anuncios de
   fv-status/fv-alert): la técnica estándar, no display:none, que también
   lo esconde de la accesibilidad. */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.fv-root {
    max-width: 640px;
}

.fv-summary {
    background: var(--green-light);
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 20px;
    font-weight: bold;
}

.fv-list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
}

.fv-list li {
    margin-bottom: 8px;
}

.fv-list button,
.fv-back {
    width: 100%;
    text-align: left;
    background: #fff;
    border: 2px solid var(--green);
    color: var(--text);
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 1em;
    cursor: pointer;
}

.fv-list button:hover,
.fv-back:hover {
    background: var(--green-light);
}

.fv-back {
    width: auto;
    display: inline-block;
    margin-bottom: 20px;
}

.fv-form {
    max-width: 420px;
}

.fv-field {
    margin-bottom: 16px;
}

.fv-field label {
    display: block;
    font-weight: bold;
    margin-bottom: 4px;
}

.fv-field input,
.fv-field textarea {
    width: 100%;
    padding: 10px;
    font-size: 1em;
    font-family: inherit;
    border: 2px solid var(--brown);
    border-radius: 4px;
    box-sizing: border-box;
}

.fv-submit {
    background: var(--green);
    color: #fff;
    font-weight: bold;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 1.05em;
    cursor: pointer;
}

.fv-submit:hover {
    background: var(--green-dark);
}

.fv-error {
    color: #b71c1c;
    font-weight: bold;
}

.fv-hint {
    color: var(--brown);
    font-size: 0.9em;
}

/* ------------------------------------------------------- panel de admin */

.adm-root {
    max-width: 960px;
}

.adm-section {
    margin-bottom: 36px;
}

.adm-section h2 {
    margin-bottom: 12px;
}

.adm-table-wrap {
    overflow-x: auto;
}

.adm-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95em;
}

.adm-table th,
.adm-table td {
    text-align: left;
    padding: 8px 10px;
    border-bottom: 1px solid #dcdcdc;
    white-space: nowrap;
}

.adm-table th {
    background: var(--green-light);
    color: var(--green-dark);
}

.adm-table button {
    font-size: 0.9em;
    padding: 4px 10px;
    margin: 2px;
    border: 1px solid var(--green);
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
}

.adm-table button:hover {
    background: var(--green-light);
}

.adm-table button.adm-danger {
    border-color: #b71c1c;
    color: #b71c1c;
}

.adm-table button.adm-danger:hover {
    background: #ffebee;
}

.adm-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.85em;
    font-weight: bold;
}

.adm-badge-ok {
    background: #c8e6c9;
    color: #1b5e20;
}

.adm-badge-warn {
    background: #ffe0b2;
    color: #e65100;
}

.adm-badge-bad {
    background: #ffcdd2;
    color: #b71c1c;
}

.adm-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 12px;
}

.adm-stat {
    background: var(--green-light);
    border-radius: 6px;
    padding: 10px 16px;
    min-width: 140px;
}

.adm-stat strong {
    display: block;
    font-size: 1.4em;
    color: var(--green-dark);
}

.adm-inline-form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: flex-end;
    margin-bottom: 16px;
}

.adm-inline-form .fv-field {
    margin-bottom: 0;
}

.adm-inline-form input {
    padding: 8px;
}

.adm-textarea {
    width: 100%;
    font: inherit;
    padding: 8px;
    border: 2px solid var(--brown);
    border-radius: 4px;
    resize: vertical;
}

.adm-price-input {
    width: 6em;
    font: inherit;
    padding: 6px;
    border: 2px solid var(--brown);
    border-radius: 4px;
}

pre.adm-output {
    background: #212121;
    color: #c8e6c9;
    padding: 12px;
    border-radius: 6px;
    overflow-x: auto;
    font-size: 0.85em;
    max-height: 400px;
}
