:root{font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#17362d;background:#f3f6f2;--green:#174c3c;--gold:#bd9450;--line:#dce5dc;--muted:#61766b;font-size:16px}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button{cursor:pointer}button:focus-visible,a:focus-visible{outline:3px solid #bd9450;outline-offset:3px}.top{background:var(--green);color:white;display:flex;align-items:center;justify-content:space-between;padding:16px max(18px,calc((100vw - 960px)/2));gap:12px}.brand{display:flex;gap:10px;align-items:center}.brand img{width:45px;height:45px;border-radius:12px}.brand strong{font-size:20px;display:block}.brand small{color:#d7e4d9;font-size:11px}.local{font-size:11px;border:1px solid #90ab9b;padding:5px 8px;border-radius:20px;white-space:nowrap}main{max-width:960px;margin:auto;padding:22px 16px 110px}h1{font-size:27px;letter-spacing:-.6px;margin:0 0 4px}h2{font-size:19px;margin:0 0 12px}h3{font-size:16px;margin:0}p{margin:7px 0;line-height:1.5}.muted,small{color:var(--muted)}.intro{margin-bottom:20px}.row{display:flex;align-items:center;gap:10px;justify-content:space-between;flex-wrap:wrap}.grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.card{background:white;border:1px solid var(--line);border-radius:17px;padding:16px;margin-bottom:12px;box-shadow:0 3px 12px #174c3c06}.grid .card{margin:0}.metric{font-size:clamp(19px,4.5vw,30px);font-weight:750;letter-spacing:-.7px;margin-top:7px;overflow-wrap:anywhere}.hero{background:var(--green);color:white;border:0;padding:20px;margin:18px 0}.hero small{color:#d4e3d7}.hero button{background:#f0d69e;color:#17362d}.btn{border:0;border-radius:11px;background:var(--green);color:white;padding:12px 15px;font-weight:650;min-height:44px;display:inline-flex;align-items:center;justify-content:center;text-decoration:none}.btn.secondary{background:#e9f0e9;color:var(--green)}.btn.danger{background:#fbe9e6;color:#a32d20}.btn.outline{background:white;border:1px solid var(--line);color:var(--green)}.btn.full{width:100%}.actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:13px}.pill{display:inline-block;font-size:12px;font-weight:650;padding:5px 9px;border-radius:20px;background:#e1f0e4;color:#205c3b}.pill.partial{background:#fff0d7;color:#855310}.pill.unpaid{background:#fbe8e4;color:#9b3329}.pill.cancel{background:#eee;color:#656565}.pending{color:#935b13}.money{font-variant-numeric:tabular-nums}.bar{height:9px;background:#e6eee7;border-radius:20px;overflow:hidden;margin:12px 0}.bar span{display:block;background:#328461;height:100%}nav{position:fixed;bottom:0;left:0;right:0;display:flex;justify-content:center;background:white;border-top:1px solid var(--line);padding:7px 5px max(8px,env(safe-area-inset-bottom));z-index:3;box-shadow:0 -4px 20px #17362d08}nav button{border:0;background:none;color:var(--muted);font-size:11px;flex:1;max-width:155px;padding:5px 1px;display:grid;justify-items:center;gap:4px;border-radius:10px}nav button.active{background:#e5efe6;color:var(--green);font-weight:700}nav svg{width:23px;height:23px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.calendar{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:5px}.weekday{text-align:center;font-size:11px;color:var(--muted);padding:6px 0}.day{border:1px solid var(--line);background:#f5f8f4;border-radius:8px;min-height:40px;aspect-ratio:1.12;color:#355347;position:relative;font-weight:600}.day.paid{background:#d8ebda;color:#205c3b}.day.partial{background:#fbe7bf;color:#855310}.day.unpaid{background:#f8dcd6;color:#9b3329}.day.selected{outline:2px solid var(--green);outline-offset:1px}.day.today:after{content:'';width:5px;height:5px;border-radius:50%;background:currentColor;position:absolute;bottom:4px;left:calc(50% - 2px)}.legend{display:flex;gap:10px;flex-wrap:wrap;margin:12px 0;font-size:11px}.legend span:before{content:'';display:inline-block;width:9px;height:9px;border-radius:3px;background:var(--swatch);margin-right:4px}.empty{text-align:center;padding:24px 12px;color:var(--muted)}label{display:block;font-size:13px;font-weight:650;margin:12px 0 5px}input,textarea,select{width:100%;border:1px solid #cbd9cd;border-radius:10px;background:#fff;color:#17362d;padding:11px;min-height:44px}textarea{resize:vertical;min-height:75px}input[type=file]{font-size:13px}dialog{width:min(96%,600px);max-height:90dvh;overflow:auto;border:0;border-radius:20px;padding:20px;color:#17362d;box-shadow:0 15px 60px #0004}dialog::backdrop{background:#132e26aa}.close{border:0;background:#e9f0e9;border-radius:50%;height:38px;width:38px;font-size:25px;color:var(--green)}.error{color:#a32d20;font-size:13px;margin-top:10px}.notice{border-left:4px solid var(--gold);background:#fff8e9;padding:12px;border-radius:8px;margin:12px 0;font-size:13px}.payment{border-top:1px solid var(--line);padding:12px 0}.receipt{max-width:150px;max-height:110px;object-fit:contain;border-radius:8px;display:block;margin-top:8px}.search{margin:12px 0}.sw{font-size:12px;color:var(--muted)}#toast{position:fixed;bottom:85px;left:50%;transform:translateX(-50%);background:#17362d;color:white;padding:12px 18px;border-radius:12px;max-width:90%;width:max-content;z-index:10;display:none}#toast.show{display:block}.total{font-size:22px;font-weight:750}.section{margin-top:22px}@media(min-width:700px){.grid.metrics{grid-template-columns:repeat(4,1fr)}.day{aspect-ratio:2.2}.two{display:grid;grid-template-columns:1fr 1fr;gap:12px}.two label{margin-top:10px}}@media(max-width:350px){.card{padding:12px}.btn{padding:10px}.local{display:none}}

[hidden]{display:none!important}

/* Tema del establecimiento: no modifica los colores de estado de las reservas. */
:root{--on-primary:#fff;--theme-soft:#e5efe6;--theme-bg:#f3f6f2;--theme-line:#dce5dc;--theme-ink:#17362d;--theme-muted:#61766b;--theme-accent:#174c3c;background:var(--theme-bg);color:var(--theme-ink);--line:var(--theme-line);--muted:var(--theme-muted)}
.top,.hero,.btn{color:var(--on-primary)}
.brand small,.hero small{color:var(--on-primary);opacity:.86}.local{border-color:currentColor}
.btn.secondary,.close,nav button.active{background:var(--theme-soft);color:var(--theme-accent)}
.btn.outline{color:var(--theme-accent)}.btn.danger{color:#a32d20}.hero button{color:#17362d}
input,textarea,select,dialog{color:var(--theme-ink)}input,textarea,select{border-color:var(--theme-line)}
.day:not(.paid):not(.partial):not(.unpaid){background:var(--theme-bg);color:var(--theme-accent)}.day.selected{outline-color:var(--theme-accent)}
.theme-choice{display:flex;align-items:center;gap:12px}.theme-choice input{width:76px;height:48px;padding:5px;cursor:pointer}.theme-choice span{font-variant-numeric:tabular-nums;font-size:13px}
.theme-presets{display:flex;gap:8px;flex-wrap:wrap;margin:10px 0}.theme-presets button{background:white;color:#303030;border:1px solid var(--theme-line);border-radius:10px;padding:7px;display:grid;justify-items:center;gap:5px;font-size:11px;min-width:50px}.theme-presets button span{background:var(--swatch);width:27px;height:27px;border-radius:50%}.theme-help{font-size:13px}

/* v0.5: estados del calendario con contraste alto, independientes del tema. */
:root{--cal-free:#cbd5e1;--cal-paid:#15803d;--cal-partial:#f59e0b;--cal-unpaid:#b91c1c}
.day:not(.paid):not(.partial):not(.unpaid){background:var(--cal-free);color:#1e293b;border-color:#94a3b8}
.day.paid{background:var(--cal-paid);color:#fff;border-color:#166534}
.day.partial{background:var(--cal-partial);color:#422006;border-color:#b45309}
.day.unpaid{background:var(--cal-unpaid);color:#fff;border-color:#991b1b}
.legend{font-size:12px;gap:10px 14px}
.legend span{display:inline-flex;align-items:center;gap:5px}
.legend span:before{width:14px;height:14px;margin-right:0;border:1px solid #0002;flex-shrink:0}

/* v0.6: horarios de 24 horas, sin el reloj modal del sistema. */
.time-field{min-width:0}.time-parts{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:end;gap:8px}.time-parts>div{min-width:0}.time-parts select{width:100%;min-width:0;min-height:48px;padding:9px 10px;font-size:20px;font-weight:650;font-variant-numeric:tabular-nums}.time-caption{display:block;font-size:12px;color:var(--muted);margin-bottom:4px}.time-colon{font-size:23px;font-weight:700;align-self:end;padding-bottom:10px}.two>div{min-width:0}

/* v0.7: superficies pastel; los estados de pago conservan sus colores intensos. */
:root{--theme-header:#cce0d7;--theme-hero:#ddebe4}
.top{background:var(--theme-header);color:var(--theme-ink)}
.brand small,.hero small{color:var(--theme-muted);opacity:1}
.local{color:var(--theme-accent);border-color:var(--theme-accent)}
.hero{background:var(--theme-hero);color:var(--theme-ink);border:1px solid var(--theme-line)}
.hero button{background:var(--green);color:var(--on-primary)}

/* Colaboración voluntaria */
.support-cbu{width:100%;font-variant-numeric:tabular-nums;font-family:ui-monospace,monospace;font-size:clamp(14px,4.2vw,18px);letter-spacing:0;user-select:all;-webkit-user-select:all;background:var(--surface,#fff)}

.contact-card .contact-email{overflow-wrap:anywhere;font-weight:650}.contact-email a{color:var(--theme-accent);text-decoration:none}.contact-email a:hover{text-decoration:underline}.contact-card .btn{text-align:center;white-space:normal}
