/* Estilos del módulo: base, componentes y adaptación a pantallas pequeñas. */
:root {
    color-scheme: light;
    --ink: #152e3a;
    --accent: #c9b898;
    --line: #d7dddf;
}
* {
    box-sizing: border-box;
}
body {
    margin: 0;
    background: #f3f1eb;
    color: var(--ink);
    font:
        15px/1.6 Arial,
        sans-serif;
}
header {
    background: #061e2c;
    color: #f5f2ec;
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    padding: 20px 5%;
}
header .brand {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 0.1em;
    margin-right: auto;
}
.brand span {
    font-size: 10px;
    font-weight: 400;
    display: block;
}
header > a:not(.brand),
header > span {
    font-size: 12px;
}
header form {
    margin: 0;
}
nav {
    background: #102c3a;
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
    padding: 15px 5%;
    color: #f5f2ec;
    font-size: 13px;
}
a {
    color: inherit;
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}
main {
    max-width: 1250px;
    margin: auto;
    padding: 40px 24px 70px;
}
h1 {
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.15;
    letter-spacing: -0.04em;
    margin: 0 0 28px;
}
h2 {
    font-size: 21px;
    line-height: 1.3;
    margin: 0 0 16px;
    font-weight: 600;
}
p {
    margin: 12px 0;
}
button,
.button {
    display: inline-block;
    background: var(--ink);
    color: #fff;
    border: 1px solid var(--ink);
    padding: 12px 20px;
    font:
        600 13px Arial,
        sans-serif;
    cursor: pointer;
    text-decoration: none;
}
.secondary {
    background: transparent;
    color: inherit;
    border-color: currentColor;
}
.panel {
    padding: 26px;
    background: #fff;
    border: 1px solid var(--line);
    margin: 22px 0;
}
.narrow {
    max-width: 520px;
}
.muted,
.hint {
    font-size: 13px;
    color: #53636c;
}
.notice {
    background: #e0efe6;
    border-left: 4px solid #387b55;
    padding: 15px;
}
.error {
    background: #f9e6e4;
    border-left: 4px solid #af382b;
    padding: 15px;
    color: #71251d;
}
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 20px;
    margin: 24px 0;
}
.cards .panel {
    margin: 0;
}
.card p {
    font-size: 13px;
    color: #53636c;
}
.card:hover {
    border-color: var(--ink);
    text-decoration: none;
}
.welcome {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin: 18px 0;
}
input,
textarea,
select {
    display: block;
    width: 100%;
    padding: 11px;
    margin-top: 7px;
    border: 1px solid #abb7bd;
    background: #fff;
    color: var(--ink);
    font:
        15px/1.45 Arial,
        sans-serif;
}
input[type="color"] {
    height: 45px;
    max-width: 180px;
    padding: 4px;
}
input[type="checkbox"] {
    display: inline;
    width: auto;
    margin: 0 8px 0 0;
}
label.check {
    display: flex;
    align-items: center;
}
textarea {
    min-height: 115px;
    resize: vertical;
}
.code {
    min-height: 600px;
    font:
        13px/1.6 Consolas,
        monospace;
}
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 24px;
}
.search {
    display: flex;
    gap: 18px;
    align-items: end;
    flex-wrap: wrap;
    margin: 20px 0;
}
.search label {
    flex: 1;
    min-width: 200px;
    margin: 0;
}
.search button {
    height: 44px;
}
.table-wrap {
    overflow-x: auto;
}
table {
    border-collapse: collapse;
    width: 100%;
    font-size: 13px;
    text-align: left;
}
td,
th {
    padding: 14px 12px;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}
th {
    background: #f3f5f5;
}
td form {
    margin: 0;
}
.notes {
    white-space: pre-wrap;
    min-width: 180px;
    max-width: 360px;
    overflow-wrap: anywhere;
}
.actions {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin: 16px 0;
}
.image-library img {
    width: 100%;
    height: 180px;
    object-fit: contain;
    background: #f3f1eb;
}
details summary {
    cursor: pointer;
    font-weight: 600;
}
details {
    margin-top: 22px;
}
.image-library input {
    font-size: 12px;
}
#field-editor h2 {
    border-top: 1px solid var(--line);
    padding-top: 23px;
    margin-top: 30px;
    text-transform: capitalize;
}
footer {
    text-align: center;
    padding: 25px;
    background: #061e2c;
    color: #b0bec6;
    font-size: 12px;
}
:focus-visible {
    outline: 3px solid #926b32;
    outline-offset: 3px;
}
[hidden] {
    display: none !important;
}
/* Adaptación de la distribución según el tamaño de pantalla. */
@media (max-width: 650px) {
    header {
        gap: 15px;
    }
    header .brand {
        width: 100%;
    }
    nav {
        gap: 14px;
    }
    main {
        padding: 30px 18px 50px;
    }
    .form-grid {
        grid-template-columns: 1fr;
    }
    .panel {
        padding: 20px;
    }
    .cards {
        grid-template-columns: 1fr;
    }
    td,
    th {
        padding: 12px 8px;
    }
}
