:root{
  --accent:#3c0399; --accent-2:#041858;
  --bg:#f1f5f9; --panel:#fff; --text:#0f172a; --muted:#64748b; --line:#e2e8f0;
  --ok:#15803d; --ok-bg:#dcfce7; --err:#b91c1c; --err-bg:#fee2e2; --warn:#9a3412; --warn-bg:#fff7ed;
  --radius:18px; --shadow:0 10px 30px rgba(2,8,23,.08);
}
*{box-sizing:border-box}
html,body{margin:0}
body{
  font:16px/1.55 system-ui,-apple-system,"Segoe UI",Roboto,Ubuntu,"Helvetica Neue",Arial,sans-serif;
  color:var(--text);
  background:radial-gradient(1200px 700px at 50% -20%, rgba(60,3,153,.14), transparent 60%), var(--bg);
  min-height:100vh; display:flex; flex-direction:column;
}
a{color:var(--accent)}
.topbar{
  display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap;
  padding:10px 18px; background:linear-gradient(90deg,var(--accent),var(--accent-2)); color:#fff;
}
.brand img{height:42px; display:block}
.topbar nav{display:flex; align-items:center; gap:14px; flex-wrap:wrap; font-size:.92rem}
.topbar nav a{color:#fff; text-decoration:none; opacity:.9}
.topbar nav a:hover{opacity:1; text-decoration:underline}
.who{opacity:.75; max-width:200px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}

.container{width:100%; max-width:640px; margin:0 auto; padding:18px 14px 30px; flex:1}
.container.wide{max-width:1100px}
.card{background:var(--panel); border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow); padding:22px; margin-bottom:16px}
.card.center{text-align:center}
.card.warning{background:var(--warn-bg); border-color:#fed7aa; color:var(--warn)}
.card.warning p{margin:.3em 0 0}
h1{font-size:1.5rem; margin:0 0 10px; line-height:1.2}
h2{font-size:1.15rem; margin:18px 0 10px}
.card > h2:first-child{margin-top:0}
.muted{color:var(--muted)}
.small{font-size:.85rem}
.mt{margin-top:16px}
.hero-logo{height:110px; margin:4px 0 8px}
.steps{text-align:left; max-width:420px; margin:22px auto 0; color:var(--muted); padding-left:22px}
.steps li{margin:6px 0}

.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:6px;
  border:1px solid transparent; border-radius:999px; padding:10px 18px; font:inherit; font-weight:600;
  cursor:pointer; text-decoration:none; background:#eef2ff; color:var(--accent); transition:transform .05s, filter .15s;
}
.btn:active{transform:scale(.97)}
.btn:disabled{opacity:.5; cursor:not-allowed}
.btn-primary{background:linear-gradient(90deg,var(--accent),var(--accent-2)); color:#fff; box-shadow:0 6px 18px rgba(60,3,153,.28)}
.btn-primary:hover{filter:brightness(1.1)}
.btn-ghost{background:transparent; border-color:var(--line); color:var(--text)}
.btn-ghost:hover{background:#f8fafc}
.btn-lg{padding:14px 26px; font-size:1.05rem; margin-top:14px}
.btn-sm{padding:6px 12px; font-size:.85rem}

.flash{border-radius:12px; padding:12px 16px; margin-bottom:14px; font-weight:500}
.flash-ok{background:var(--ok-bg); color:var(--ok)}
.flash-error{background:var(--err-bg); color:var(--err)}
.flash-warn{background:var(--warn-bg); color:var(--warn); border:1px solid #fed7aa}

.lockers-mine{display:grid; gap:12px}
.locker-card{
  display:grid; grid-template-columns:auto 1fr; grid-template-areas:"code meta" "actions actions" "status status";
  gap:10px 16px; align-items:center; border:1px solid var(--line); border-radius:16px; padding:14px 16px; background:#fafaff;
}
.locker-code{grid-area:code; font-size:2.4rem; font-weight:800; color:var(--accent); letter-spacing:1px; line-height:1}
.locker-meta{grid-area:meta; display:flex; flex-direction:column; gap:4px; font-size:.9rem}
.locker-actions{grid-area:actions; display:flex; gap:10px; flex-wrap:wrap}
.locker-actions form{margin:0}
.locker-actions .js-open{flex:1; min-width:150px; padding:13px 18px; font-size:1.05rem}
.open-status{grid-area:status; font-weight:600; font-size:.95rem}
.open-status:empty{display:none}
.open-status.ok{color:var(--ok)} .open-status.err{color:var(--err)} .open-status.wait{color:var(--muted)}

.tag{display:inline-block; padding:2px 10px; border-radius:999px; font-size:.8rem; font-weight:600; background:#f1f5f9; color:#334155; width:max-content}
.tag-power{background:#fef9c3; color:#854d0e}
.tag-free{background:var(--ok-bg); color:var(--ok)}
.tag-busy{background:#ede9fe; color:var(--accent)}
.tag-off{background:var(--err-bg); color:var(--err)}
.st-done{background:var(--ok-bg); color:var(--ok)}
.st-failed,.st-expired{background:var(--err-bg); color:var(--err)}
.st-pending,.st-sent{background:#e0f2fe; color:#075985}

.reserve-grid{display:grid; grid-template-columns:1fr 1fr; gap:12px}
.choice{
  display:flex; flex-direction:column; gap:4px; align-items:flex-start; text-align:left;
  padding:18px; border-radius:16px; border:2px solid var(--line); background:#fff; font:inherit; cursor:pointer;
}
.choice:hover:not(:disabled){border-color:var(--accent); background:#faf5ff}
.choice:disabled{opacity:.45; cursor:not-allowed}
.choice-title{font-weight:700}
.choice-sub{color:var(--muted); font-size:.9rem}
@media (max-width:440px){ .reserve-grid{grid-template-columns:1fr} }

.admin-head{display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap}
.kiosk{display:flex; align-items:center; gap:8px; padding:8px 14px; border-radius:999px; font-weight:600; font-size:.9rem; flex-wrap:wrap}
.kiosk small{font-weight:400; opacity:.75}
.kiosk .dot{width:10px; height:10px; border-radius:50%; background:currentColor}
.kiosk.on{background:var(--ok-bg); color:var(--ok)}
.kiosk.off{background:var(--err-bg); color:var(--err)}
.table-wrap{overflow-x:auto}
.admin-table{width:100%; border-collapse:collapse; font-size:.92rem}
.admin-table th,.admin-table td{padding:9px 10px; border-bottom:1px solid var(--line); text-align:left; vertical-align:top}
.admin-table th{font-size:.78rem; text-transform:uppercase; letter-spacing:.5px; color:var(--muted)}
.row-busy{background:#faf5ff}
.row-off{opacity:.55}
.actions-cell{display:flex; flex-wrap:wrap; gap:6px; align-items:center}
.actions-cell form{margin:0}
.actions-cell .open-status{width:100%; font-size:.85rem}
.actions{display:flex; gap:10px; flex-wrap:wrap}
.actions form{margin:0}
.filters{display:flex; gap:8px; flex-wrap:wrap; margin:8px 0 6px}
.filters input{padding:9px 12px; border:1px solid var(--line); border-radius:10px; font:inherit}

.foot{text-align:center; color:var(--muted); font-size:.82rem; padding:16px}

.testbanner{background:#fde047; color:#713f12; text-align:center; font-weight:700; font-size:.85rem; padding:6px}
.stack-form{display:grid; gap:14px; margin-top:12px}
.stack-form label{display:grid; gap:6px; font-weight:600}
.stack-form input{padding:12px 14px; border:1px solid var(--line); border-radius:12px; font:inherit}
