/* Panel del servidor de actualizaciones de Adresles. Una sola hoja, sin dependencias.
   Tema: blanco + amarillo, limpio y ordenado. */

:root {
    --ink: #1f2430;
    --muted: #7a8394;
    --line: #ececf1;
    --bg: #fafbfc;
    --card: #ffffff;

    --yellow: #ffcf2d;         /* amarillo de marca */
    --yellow-soft: #fff8e1;    /* fondo suave */
    --yellow-line: #f4e2a6;

    --on-bg: #eaf7ec; --on-ink: #1e7e34;
    --off-bg: #fdecec; --off-ink: #c62828;
    --prod-bg: #fff3d6; --prod-ink: #8a6100;
    --stage-bg: #eef1f6; --stage-ink: #4a5568;

    --ok-bg: #eaf7ec; --ok-ink: #1e7e34;
    --err-bg: #fdecec; --err-ink: #c62828;
    --radius: 12px;
    --shadow: 0 1px 2px rgba(20,25,40,.05), 0 4px 16px rgba(20,25,40,.04);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    padding: 28px 20px 64px;
    background:
        radial-gradient(1200px 240px at 50% -80px, var(--yellow-soft), transparent 70%),
        var(--bg);
    color: var(--ink);
    font: 15px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body.narrow main { max-width: 440px; }
body.wide main { max-width: 1040px; }
main { margin: 0 auto; }

/* ---- cabecera ---- */
.head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    margin: 0 0 24px;
}
.head__brand { display: flex; align-items: center; gap: 12px; }
.brand-dot {
    width: 30px; height: 30px; border-radius: 9px; flex: 0 0 auto;
    background: linear-gradient(135deg, var(--yellow), #ffb300);
    box-shadow: inset 0 0 0 2px rgba(255,255,255,.5), 0 2px 6px rgba(255,176,0,.4);
}
h1 { font-size: 21px; font-weight: 700; margin: 0; letter-spacing: -.01em; }
h2 { font-size: 16px; font-weight: 700; margin: 0; letter-spacing: -.01em; }

.section-title {
    font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
    color: var(--muted); margin: 30px 0 12px; padding-left: 2px;
}

/* ---- tarjetas ---- */
.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px 22px;
    margin-bottom: 18px;
    box-shadow: var(--shadow);
}
.card__head {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    margin: 0 0 16px;
}
.card h3 { font-size: 14px; margin: 0 0 6px; font-weight: 700; }
.counter {
    font-size: 12.5px; color: var(--muted); font-weight: 600;
    background: var(--yellow-soft); border: 1px solid var(--yellow-line);
    padding: 3px 10px; border-radius: 20px;
}

/* ---- formularios ---- */
label { display: block; margin-bottom: 14px; font-size: 13px; font-weight: 600; }
label.inline { display: flex; align-items: center; gap: 8px; font-weight: 400; margin-top: 6px; }

input[type="text"], input[type="password"], select, textarea {
    display: block; width: 100%; margin-top: 6px; padding: 10px 12px;
    border: 1px solid var(--line); border-radius: 9px; font: inherit; font-weight: 400;
    background: #fff; color: var(--ink); transition: border-color .12s, box-shadow .12s;
}
input:focus, select:focus, textarea:focus {
    outline: none; border-color: var(--yellow);
    box-shadow: 0 0 0 3px rgba(255,207,45,.28);
}
input[type="file"] { display: block; margin-top: 6px; font-weight: 400; }
textarea { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin: 0 0 14px; }
legend { font-size: 12px; font-weight: 700; padding: 0 6px; color: var(--muted); }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0 16px; }

button {
    padding: 10px 18px; border: 0; border-radius: 9px;
    background: var(--yellow); color: #4a3a00; font: inherit; font-weight: 700; cursor: pointer;
    transition: filter .12s, transform .02s;
}
button:hover { filter: brightness(1.03); }
button:active { transform: translateY(1px); }
button.link {
    background: none; padding: 0 0 0 10px; font-weight: 500; color: #b07800; text-decoration: underline;
}
button.link:hover { color: #8a6100; }

/* ---- tablas ---- */
.table-wrap { overflow-x: auto; margin: 0 -6px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
thead th {
    font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted);
    font-weight: 700; border-bottom: 2px solid var(--line);
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fcfcfd; }
table.stores tbody tr:hover { background: var(--yellow-soft); }
td.actions { text-align: right; white-space: nowrap; }
td.actions form { display: inline; }
td.hash { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; color: var(--muted); }
.ver { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; font-weight: 600; }

/* ---- pills / badges ---- */
.pill, .tag {
    display: inline-block; padding: 2px 10px; border-radius: 20px;
    font-size: 11.5px; font-weight: 700; line-height: 1.5; white-space: nowrap;
}
.pill--on  { background: var(--on-bg);  color: var(--on-ink); }
.pill--off { background: var(--off-bg); color: var(--off-ink); }
.pill--prod  { background: var(--prod-bg);  color: var(--prod-ink); }
.pill--stage { background: var(--stage-bg); color: var(--stage-ink); }
.tag { background: var(--on-bg); color: var(--on-ink); }
.tag.off { background: var(--off-bg); color: var(--off-ink); }

/* ---- mensajes ---- */
.muted { color: var(--muted); font-size: 13px; }
.ok  { color: var(--ok-ink);  background: var(--ok-bg);  padding: 11px 14px; border-radius: 10px; border: 1px solid #cdeccf; margin: 0 0 16px; }
.error { color: var(--err-ink); background: var(--err-bg); padding: 11px 14px; border-radius: 10px; border: 1px solid #f4c9c9; margin: 0 0 16px; }

code { background: #f4f5f8; padding: 1px 6px; border-radius: 5px; font-size: 12.5px; }
a { color: #b07800; }
a:hover { color: #8a6100; }

@media (max-width: 640px) {
    td.actions { text-align: left; }
    .head { flex-direction: column; align-items: flex-start; }
    .card { padding: 18px 16px; }
}
