:root{--brand:#006940;--deep:#00331E;--navy:#0F2A1F;--yellow:#FECF3E;--bg:#F4F8F2;--card:#fff;--line:#D7E3DB;--muted:#4B6157;--ok:#006940;--bad:#B3261E;--link:#006940}
*{box-sizing:border-box}
body{margin:0;font-family:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;background:var(--bg);color:var(--navy);line-height:1.45}
h1{font-size:1.5rem;margin:0 0 1rem}h2{font-size:1.05rem;margin:1.6rem 0 .6rem}
a{color:var(--link)}
.top{display:flex;align-items:center;gap:1.5rem;background:var(--brand);border-bottom:4px solid var(--yellow);color:#fff;padding:.7rem 1.25rem;flex-wrap:wrap}
.top a{color:#fff;text-decoration:none;font-weight:600}.top nav{display:flex;gap:1.1rem;flex:1;flex-wrap:wrap}
.top nav a{opacity:.85}.top nav a:hover{opacity:1;text-decoration:underline}
.brand{display:flex;align-items:center;gap:.5rem;font-weight:800;font-size:1.05rem}
.logo{display:inline-flex;width:34px;height:34px;border-radius:10px;background:var(--yellow);overflow:hidden;align-items:center;justify-content:center}.logo img{width:34px;height:34px;display:block}
.brand small{font-weight:600;font-size:.8rem;opacity:.85;margin-left:.2rem}
main{max-width:1200px;margin:0 auto;padding:1.5rem 1.25rem 3rem}
.head{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-bottom:.5rem}.head h1{margin:0}
.cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:.8rem}
.card{background:var(--card);border:1px solid var(--line);border-radius:14px;padding:.9rem 1rem}
.card .n{font-size:1.6rem;font-weight:800}.card .l{color:var(--muted);font-size:.85rem}
.table-wrap{overflow-x:auto;background:var(--card);border:1px solid var(--line);border-radius:14px}
table{border-collapse:collapse;width:100%;font-size:.9rem}
th,td{padding:.6rem .8rem;text-align:left;border-bottom:1px solid var(--line);vertical-align:top;white-space:nowrap}
th{font-size:.78rem;color:var(--muted);font-weight:700;background:#F0F6F1}tr:last-child td{border-bottom:0}
.num{text-align:right}.muted{color:var(--muted);font-size:.85rem}
.badge{display:inline-block;padding:.12rem .55rem;border-radius:999px;font-size:.78rem;font-weight:700;background:#E4F0E8}
.badge.ok,.badge.paid,.badge.confirmed,.badge.active,.badge.completed{background:#DDF0E4;color:#004A2C}
.badge.off,.badge.cancelled,.badge.failed,.badge.expired,.badge.refunded{background:#FDECEA;color:var(--bad)}
.badge.upcoming,.badge.created,.badge.awaitingpayment{background:#FFF1CC;color:#7A5200}
.btn{display:inline-block;background:var(--yellow);color:var(--deep);border:0;border-radius:12px;padding:.65rem 1.1rem;font-weight:800;font-size:.95rem;text-decoration:none;cursor:pointer}
.btn.small{padding:.45rem .8rem;font-size:.85rem}
button.link{background:none;border:0;color:var(--link);cursor:pointer;font:inherit;padding:0}
.link{color:var(--link)}
.top .logout{margin:0}.top button.link{color:#fff;opacity:.9}
.filters{display:flex;gap:.8rem;align-items:flex-end;flex-wrap:wrap;margin-bottom:1rem}
.filters label,.form label{display:flex;flex-direction:column;gap:.25rem;font-size:.85rem;font-weight:600}
input,select{font:inherit;padding:.5rem .6rem;border:1px solid #B9CCBF;border-radius:10px;background:#fff;color:var(--navy)}
.form{background:var(--card);border:1px solid var(--line);border-radius:14px;padding:1.2rem;max-width:760px;display:flex;flex-direction:column;gap:.8rem}
.two{display:grid;grid-template-columns:1fr 1fr;gap:.8rem}.three{display:grid;grid-template-columns:repeat(3,1fr);gap:.8rem}
.two>div,.three>div{display:flex;flex-direction:column}
.form .check{flex-direction:row;align-items:center;gap:.5rem}.form .check input{width:auto}
.row{display:flex;gap:1rem;align-items:center;margin-top:.4rem}
.error{color:var(--bad);font-size:.9rem}
form.inline{display:inline;margin:0}.actions{display:flex;gap:.8rem}
.pager{display:flex;gap:1rem;align-items:center;justify-content:center;margin-top:1rem}
.login-page{display:flex;min-height:100vh;align-items:center;justify-content:center;background:var(--brand)}
.login-card{background:#fff;border-radius:18px;padding:1.6rem;width:min(92vw,360px);display:flex;flex-direction:column;gap:.6rem}
.login-card .brand{color:var(--deep);margin-bottom:.6rem}.login-card{border-top:5px solid var(--yellow)}.login-card label{font-weight:600;font-size:.85rem}
@media(max-width:640px){.two,.three{grid-template-columns:1fr}}
.ok-msg{color:var(--ok);font-weight:600}
td form.inline input{padding:.3rem .5rem;width:9rem}
textarea{font:inherit;padding:.5rem .6rem;border:1px solid #B9CCBF;border-radius:10px;background:#fff;color:var(--navy);resize:vertical}
.form table.hours{width:auto}.form table.hours td,.form table.hours th{padding:.3rem .8rem .3rem 0;text-align:left}
.form table.hours input[type=checkbox]{width:1.1rem;height:1.1rem}

.btn:hover{filter:brightness(.96)}
a:hover{color:var(--deep)}
input:focus,select:focus,textarea:focus{outline:2px solid var(--yellow);outline-offset:1px;border-color:var(--brand)}
.card .n{color:var(--brand)}
.map{height:420px;border:1px solid var(--line);border-radius:14px;margin:0 0 1rem;z-index:0}
.map-note{margin:.2rem 0 1rem}
.pb-pin{width:42px;height:52px;position:relative}
.pb-pin .head{width:42px;height:42px;border-radius:50%;background:#fff;border:3px solid var(--brand);overflow:hidden;display:flex;align-items:center;justify-content:center;box-shadow:0 2px 6px rgba(0,51,30,.35)}
.pb-pin .head img{width:36px;height:36px;display:block}
.pb-pin .tail{position:absolute;left:14px;top:40px;width:0;height:0;border-left:7px solid transparent;border-right:7px solid transparent;border-top:10px solid var(--brand)}
.pb-pin.off .head{border-color:#7A8A81;opacity:.75}.pb-pin.off .tail{border-top-color:#7A8A81}
.map-pop b{font-size:1rem}.map-pop div{margin-top:.15rem}.map-pop a{font-weight:700}
.map .map-pop a{color:var(--brand)}

/* Parking photos */
.photo-upload{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:14px 0}
.photo-upload input[type=file]{display:none}
.photo-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:14px;margin-top:6px}
.photo-card{position:relative;background:#fff;border:1px solid var(--line,#e3e8e5);border-radius:12px;overflow:hidden}
.photo-card img{display:block;width:100%;aspect-ratio:4/3;object-fit:cover;background:#eef2ef}
.photo-badge{position:absolute;top:8px;left:8px}
.photo-actions{display:flex;flex-wrap:wrap;gap:4px 10px;padding:8px 10px;align-items:center}
.link.danger{color:#b3261e}
.btn.ghost{background:transparent;border:2px solid var(--brand,#006940);color:var(--brand,#006940)}

/* Banners */
.banner-thumb{width:120px;aspect-ratio:16/9;object-fit:cover;border-radius:8px;display:block;background:#eef2ef}
.banner-preview{max-width:420px;width:100%;aspect-ratio:16/9;object-fit:cover;border-radius:12px;border:1px solid var(--line);background:#eef2ef}
.banner-preview[hidden]{display:none}
.ok-box{background:#DDF0E4;border:1px solid #0B8450;color:#00331E;border-radius:10px;padding:.7rem 1rem;margin:.6rem 0;max-width:760px;font-weight:600}

/* Reports */
.chips{display:flex;gap:.4rem;flex-wrap:wrap;margin-bottom:.8rem}
.chip{display:inline-block;padding:.3rem .75rem;border:1px solid var(--line);border-radius:999px;background:var(--card);color:var(--navy);text-decoration:none;font-size:.85rem;font-weight:600}
.chip.on{background:var(--brand);border-color:var(--brand);color:#fff}
.trend{font-weight:700;font-size:.8rem}.trend.up{color:var(--ok)}.trend.down{color:var(--bad)}.trend.flat{color:var(--muted)}
.small{font-size:.82rem}
.insights{margin:.2rem 0 0;padding-left:1.2rem}.insights li{margin:.25rem 0}
tr.total td{font-weight:800;background:#EEF5EF}
.bars{display:flex;align-items:flex-end;gap:3px;height:150px;background:var(--card);border:1px solid var(--line);border-radius:14px;padding:.8rem .8rem 0;margin-bottom:.8rem;overflow-x:auto}
.bar{flex:1 0 8px;max-width:48px;height:100%;display:flex;flex-direction:column;justify-content:flex-end;align-items:stretch;position:relative}
.bar .fill{display:block;background:var(--brand);border-radius:4px 4px 0 0;min-height:2px}
.bar small{display:block;text-align:center;font-size:.65rem;color:var(--muted);height:1.2em;overflow:hidden}
.hours{display:flex;gap:3px;height:190px;background:var(--card);border:1px solid var(--line);border-radius:14px;padding:.8rem .8rem 0;margin-bottom:.4rem}
.hour{flex:1;display:flex;flex-direction:column;min-width:0}
.hour .stack{flex:1;display:flex;flex-direction:column;justify-content:flex-end;border-radius:4px;overflow:hidden}
.hour .free{display:block;background:#E1ECE4}.hour .used{display:block;background:var(--brand)}
.hour.peak .used{background:#C0392B}.hour.quiet .free{background:#FFE9A8}
.hour.off{opacity:.4}
.hour small{display:block;text-align:center;font-size:.62rem;color:var(--muted);height:1.3em;white-space:nowrap;overflow:visible}
.key{margin-left:.8rem;font-size:.8rem}.key i{display:inline-block;width:.7rem;height:.7rem;border-radius:2px;margin:0 .25rem 0 .6rem;vertical-align:middle}
.k-used{background:var(--brand)}.k-free{background:#E1ECE4;border:1px solid var(--line)}
.tag{display:inline-block;padding:.08rem .5rem;border-radius:999px;font-size:.72rem;font-weight:700}.tag.peak{background:#FBE0DC;color:#8E2A1F}.tag.quiet{background:#FFF1CC;color:#7A5200}
table.heat{font-size:.72rem;text-align:center}table.heat th,table.heat td{padding:.3rem .25rem;min-width:2.1rem}
table.heat td{background:rgba(0,105,64,var(--o,0));color:#0F2A1F}
.btn.ghost{background:transparent}
@media print{
  .top,.filters,.chips,.logout,[data-print],.head a.link{display:none!important}
  body{background:#fff}main{max-width:none;padding:0}
  .card,.table-wrap,.bars,.hours{break-inside:avoid;box-shadow:none}
}

/* Pager */
.pager{display:flex;align-items:center;justify-content:space-between;gap:.8rem;flex-wrap:wrap;margin:.9rem 0 0}
.pager .pages{display:flex;align-items:center;gap:.25rem;flex-wrap:wrap}
.pg{display:inline-block;min-width:2rem;text-align:center;padding:.3rem .6rem;border:1px solid var(--line);border-radius:8px;background:var(--card);color:var(--navy);text-decoration:none;font-size:.85rem;font-weight:600}
.pg:hover{border-color:var(--brand)}
.pg.on{background:var(--brand);border-color:var(--brand);color:#fff}
.gap{color:var(--muted);padding:0 .15rem}
.search{display:flex;gap:.5rem;align-items:flex-end;flex-wrap:wrap;margin:0 0 1rem}
.search input[type=search]{min-width:16rem}
@media print{.pager{display:none!important}}
