:root {
  --bg: #f7f3eb; --card: #fff; --ink: #18211f; --muted: #63716d; --line: #e7ded2;
  --brand: #123c36; --brand2: #1f6f5d; --green: #18a560; --gold: #c8913b; --red: #b9483b;
  --soft: #fbfaf7; --shadow: 0 16px 48px rgba(18,31,28,.10); --radius: 18px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif; line-height: 1.45; }
a { color: var(--brand2); }
button, input, select, textarea { font: inherit; }
.page { width: min(1100px, calc(100% - 24px)); margin: 0 auto; }
.hidden { display: none !important; }

header { background: var(--brand); color: #fff; padding: 12px 0; position: sticky; top: 0; z-index: 10; }
.head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.head .brand { display: flex; align-items: center; gap: 10px; font-weight: 900; }
.mark { width: 36px; height: 36px; border-radius: 11px; background: linear-gradient(135deg, #1f6f5d, #2d8d71); display: grid; place-items: center; font-weight: 950; }
.mark-img { height: 36px; width: auto; display: block; }
.head small { color: #9cffd4; display: block; font-weight: 600; font-size: 11px; }

.tabs { display: flex; gap: 6px; overflow: auto; padding: 14px 0 0; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 9px 14px; font-weight: 900; font-size: 13px; color: var(--muted); white-space: nowrap; cursor: pointer; }
.tab.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.tab-badge { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px; background: #d6453a; color: #fff; border-radius: 999px; font-size: 11px; line-height: 18px; text-align: center; }
.tab-badge.hidden { display: none; }
.mod-rev { opacity: 0.55; }

.btn { min-height: 42px; border: 0; border-radius: 999px; padding: 10px 16px; font-weight: 900; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; justify-content: center; }
.btn.primary { background: var(--brand); color: #fff; }
.btn.secondary { background: #fff; color: var(--brand); border: 1px solid var(--line); }
.btn.green { background: var(--green); color: #fff; }
.btn.danger { background: #fff; color: var(--red); border: 1px solid #efc9c0; }
.btn.sm { min-height: 34px; padding: 7px 12px; font-size: 13px; }

.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); margin-bottom: 14px; }
.field { display: grid; gap: 6px; margin-bottom: 12px; }
label { font-size: 12px; font-weight: 900; color: #3f4d49; }
input, select, textarea { width: 100%; min-height: 44px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: #fff; color: var(--ink); outline: none; }
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: rgba(31,111,93,.6); box-shadow: 0 0 0 4px rgba(31,111,93,.08); }
.row2 { display: grid; gap: 12px; }
.row3 { display: grid; gap: 12px; }
@media (min-width: 720px) { .row2 { grid-template-columns: 1fr 1fr; } .row3 { grid-template-columns: 1fr 1fr 1fr; } }

.checks { display: grid; gap: 8px; grid-template-columns: 1fr; }
@media (min-width: 600px) { .checks { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .checks { grid-template-columns: 1fr 1fr 1fr; } }
.check { display: flex; align-items: center; gap: 9px; padding: 9px 11px; background: var(--soft); border: 1px solid var(--line); border-radius: 12px; font-size: 13px; font-weight: 700; }
.check input { width: 18px; height: 18px; min-height: 0; accent-color: var(--brand2); }

.prop-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: #fff; margin-bottom: 8px; }
.prop-row .info { min-width: 0; }
.prop-row .code { display: inline-block; background: #eaf5f1; color: var(--brand2); border-radius: 999px; padding: 3px 8px; font-size: 11px; font-weight: 950; }
.prop-row h4 { margin: 6px 0 2px; font-size: 15px; }
.prop-row .sub { color: var(--muted); font-size: 13px; }
.pill { display: inline-block; border-radius: 999px; padding: 3px 9px; font-size: 11px; font-weight: 900; }
.pill.revision { background: #fff7e8; color: #76521c; }
.pill.publicada { background: #effaf4; color: #0d633b; }
.pill.pausada { background: #f1efe9; color: #6b6256; }

.lead { border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: #fff; margin-bottom: 8px; }
.lead .top { display: flex; justify-content: space-between; gap: 10px; }
.lead .code { color: var(--brand2); font-weight: 900; font-size: 12px; }
.lead .msg { color: var(--muted); font-size: 13px; margin: 6px 0; }

.msg-inline { font-size: 13px; color: var(--muted); margin-left: 8px; }
.notice { border-radius: 14px; padding: 12px; font-size: 13px; margin: 10px 0; }
.notice.danger { background: #fff1ee; border: 1px solid #efc9c0; color: #83372b; }
.notice.ok { background: #effaf4; border: 1px solid #caecd9; color: #0d633b; }

.center-box { max-width: 380px; margin: 60px auto; }
h2 { margin: 0 0 4px; }
.muted { color: var(--muted); }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 16px 0; }

.fotos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 8px; }
.foto-th { position: relative; aspect-ratio: 4/3; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--soft); }
.foto-th[data-portada] { border: 2px solid var(--brand2); }
.foto-th img { width: 100%; height: 100%; object-fit: cover; }
.foto-badge { position: absolute; left: 6px; bottom: 6px; background: var(--brand2); color: #fff; font-size: 10px; font-weight: 900; padding: 2px 7px; border-radius: 999px; }
.foto-del { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(18,33,31,.78); color: #fff; font-weight: 900; cursor: pointer; line-height: 1; }
/* Tarjeta "Actualizar sitio" (solo dueño) */
.deploy-card { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 10px 0 14px; border-left: 4px solid var(--brand); }
.deploy-card .msg-inline { flex-basis: 100%; font-size: 13px; color: var(--brand2); }
.hidden { display: none !important; }
