/* smp/e/styles.css */
:root{
  --bg:#f4f2f2;
  --card:#ffffff;
  --card2:#faf8f8;
  --text:#0b0708;
  --muted:#5b5556;
  --line:#ded8d9;
  --shadow:0 12px 34px rgba(0,0,0,.12);
  --radius:18px;

  --ok:#1b8f58;
  --warn:#b87a02;
  --danger:#b91f1d;
  --accent:#c92724;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Arial,"Apple Color Emoji","Segoe UI Emoji";
  color:var(--text);
  background:
    radial-gradient(900px 380px at 20% -8%, rgba(201,39,36,.16), transparent 60%),
    radial-gradient(860px 420px at 85% -6%, rgba(11,7,8,.16), transparent 65%),
    var(--bg);
}

a{color:inherit; text-decoration:none}
code{background:rgba(201,39,36,.06); padding:.1rem .35rem; border-radius:8px}

h1{font-size:16px; margin:0}
h2{font-size:18px; margin:0 0 10px 0}
h3{font-size:16px; margin:0 0 10px 0}
p{margin:8px 0}
.subtle{color:var(--muted); font-size:13px; line-height:1.4}
.small{font-size:12px; color:var(--muted)}

.container{
  max-width:1100px;
  margin:0 auto;
  padding:18px 16px 60px;
}

.card{
  border-radius:var(--radius);
  background:var(--card);
  border:1px solid var(--line);
  box-shadow:var(--shadow);
  padding:16px;
}

.row{display:flex; gap:10px; align-items:center}
.row.wrap{flex-wrap:wrap}
.grid{display:grid; gap:12px}
.grid.cols-2{grid-template-columns:1fr}
@media(min-width:920px){
  .grid.cols-2{grid-template-columns:1fr 1fr}
}

.sep{border:none; border-top:1px solid var(--line); margin:14px 0}

.button{
  border:1px solid var(--line);
  background:rgba(255,255,255,.92);
  color:var(--text);
  padding:10px 12px;
  border-radius:14px;
  cursor:pointer;
  font-weight:600;
  transition:transform .06s ease, background .2s ease, border-color .2s ease, opacity .2s ease;
  user-select:none;
}
.button:hover{transform:translateY(-1px); background:#fff}
.button:active{transform:translateY(0)}
.button:disabled{opacity:.5; cursor:not-allowed; transform:none}

.button.primary{
  background:var(--accent);
  border-color:var(--accent);
  color:#fff;
}
.button.secondary{
  background:#fff;
}
.button.danger{
  background:rgba(185,31,29,.08);
  border-color:rgba(185,31,29,.24);
}

.pill{
  padding:8px 10px;
  border-radius:999px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.92);
  font-size:12px;
  color:var(--muted);
}

.container .badge{
  display:inline-flex;
  gap:8px;
  align-items:center;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.92);
  font-size:12px;
  color:var(--muted);
}
.container .badge.ok{border-color:rgba(27,143,88,.22); background:rgba(27,143,88,.08); color:#1b8f58}
.container .badge.warn{border-color:rgba(184,122,2,.22); background:rgba(184,122,2,.08); color:#8c5b00}

label{display:block; font-size:12px; color:var(--muted); margin-bottom:6px}
input, select{
  width:100%;
  padding:11px 12px;
  border-radius:14px;
  border:1px solid var(--line);
  background:#fff;
  color:var(--text);
  outline:none;
}
input:focus, select:focus{border-color:rgba(201,39,36,.4)}

.stepper{
  display:flex;
  gap:10px;
  align-items:center;
  margin-bottom:14px;
}
.step{
  flex:1;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid var(--line);
  background:#fff;
  display:flex;
  justify-content:space-between;
  align-items:center;
}
.step .t{font-weight:700; font-size:13px}
.step .s{font-size:12px; color:var(--muted)}

.views{position:relative}
.view{display:none}
.view.active{display:block}

.kpis{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:12px;
  margin-top:14px;
}
.kpi{
  padding:12px;
  border-radius:16px;
  background:rgba(255,255,255,.94);
  border:1px solid var(--line);
}
.kpi .k{font-size:20px; font-weight:800}
.kpi .l{font-size:12px; color:var(--muted)}

.spot-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(72px, 1fr));
  gap:8px;
}
.spot{
  padding:10px 6px;
  border-radius:14px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.96);
  text-align:center;
  font-weight:800;
  cursor:pointer;
  user-select:none;
  transition:transform .06s ease, background .2s ease, border-color .2s ease, opacity .2s ease;
}
.spot:hover{transform:translateY(-1px)}
.spot.free{background:rgba(27,143,88,.08); border-color:rgba(27,143,88,.2)}
.spot.hold{background:rgba(184,122,2,.08); border-color:rgba(184,122,2,.2); cursor:not-allowed; opacity:.7}
.spot.reserved{background:rgba(201,39,36,.07); border-color:rgba(201,39,36,.18); cursor:not-allowed; opacity:.75}
.spot.occupied{background:rgba(185,31,29,.1); border-color:rgba(185,31,29,.2); cursor:not-allowed; opacity:.65}
.spot.selected{outline:2px solid rgba(201,39,36,.7)}

.toast{
  position:fixed;
  left:50%;
  bottom:18px;
  transform:translateX(-50%);
  padding:10px 14px;
  border-radius:14px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.96);
  color:var(--text);
  box-shadow:var(--shadow);
  display:none;
  z-index:100;
  max-width:min(520px, calc(100vw - 32px));
  text-align:center;
}

.qrbox{
  display:grid;
  place-items:center;
  padding:12px;
  border-radius:18px;
  border:1px dashed rgba(201,39,36,.28);
  background:rgba(255,255,255,.95);
}

.loading-overlay{
  position:fixed;
  inset:0;
  display:none;
  align-items:center;
  justify-content:center;
  background:rgba(11,7,8,0.25);
  backdrop-filter:blur(3px);
  z-index:400;
}
.loading-overlay.show{display:flex}
.loading-box{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:12px;
  padding:18px 20px;
  border-radius:16px;
  background:rgba(255,255,255,.96);
  border:1px solid rgba(201,39,36,.16);
  box-shadow:var(--shadow);
}
.loading-spinner{
  width:64px;
  height:64px;
  border-radius:50%;
  border:6px solid rgba(0,0,0,.08);
  border-top-color:#c92724;
  animation:spin 1s linear infinite;
}
.loading-msg{
  color:#0b0708;
  font-weight:700;
  letter-spacing:.3px;
}
@keyframes spin { to { transform: rotate(360deg); } }
