/* =========================
   ParkPilot UI — v1
   Clean • legível • instrumento
   ========================= */

:root{
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f6f7f9;

  --text: #0f172a;           /* slate-900 */
  --muted: rgba(15,23,42,.62);
  --border: rgba(15,23,42,.10);

  --primary: #0ea5e9;        /* sky-500 */
  --primary-ink: #ffffff;

  --danger: #ef4444;         /* red-500 */
  --danger-ink: #ffffff;

  --shadow: 0 10px 30px rgba(15,23,42,.08);
  --radius: 16px;

  --focus: 0 0 0 4px rgba(14,165,233,.18);

  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Arial, "Apple Color Emoji","Segoe UI Emoji";
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a{ color: inherit; }
a:hover{ opacity:.9; }

.wrap{
  width: min(1100px, calc(100% - 28px));
  margin: 0 auto;
}

.row{ display:flex; align-items:center; }
.grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

/* =========================
   Header / Footer
   ========================= */
.appHeader{
  position: sticky;
  top:0;
  z-index:10;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.appHeader .wrap{ padding: 12px 0; }

.brand{
  font-weight: 900;
  letter-spacing: -.02em;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  gap:10px;
}

.appFooter{
  margin: 26px 0 30px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

/* =========================
   Typography helpers
   ========================= */
h1,h2,h3{ margin: 0 0 8px; letter-spacing: -.02em; }
h1{ font-size: 28px; }
h2{ font-size: 20px; }
h3{ font-size: 16px; }

.small{ font-size: 12px; }
.muted{ color: var(--muted); }

.title{ font-weight: 900; letter-spacing: -.01em; }
.big{ font-size: 28px; font-weight: 900; letter-spacing: -.03em; }

/* =========================
   Surfaces
   ========================= */
.card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px;
}

.badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 12px;
  font-weight: 800;
}

.tag{
  display:inline-flex;
  align-items:center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(14,165,233,.25);
  background: rgba(14,165,233,.10);
  color: rgba(2,132,199,.95);
  font-size: 12px;
  font-weight: 800;
}

/* =========================
   Buttons
   ========================= */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  text-decoration:none;
  font-weight: 900;
  cursor: pointer;
  transition: transform .06s ease, background .2s ease, opacity .2s ease;
  user-select:none;
}

.btn:hover{ transform: translateY(-1px); }
.btn:active{ transform: translateY(0); }

.btn.small{ padding: 8px 10px; border-radius: 10px; font-size: 12px; }
.btn.primary{
  background: var(--primary);
  border-color: rgba(2,132,199,.35);
  color: var(--primary-ink);
}
.btn.danger{
  background: var(--danger);
  border-color: rgba(220,38,38,.35);
  color: var(--danger-ink);
}
.btn.ghost{
  background: transparent;
}

.btn:focus{ outline:none; box-shadow: var(--focus); }

/* =========================
   Inputs
   ========================= */
.input, select.input{
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: box-shadow .15s ease, border-color .15s ease;
}
.input:focus, select.input:focus{
  box-shadow: var(--focus);
  border-color: rgba(14,165,233,.35);
}

label{ display:block; margin-bottom:6px; }

/* =========================
   Alerts (messages)
   ========================= */
.alerts{ margin: 14px 0; display:flex; flex-direction:column; gap:8px; }
.alert{
  background: rgba(14,165,233,.10);
  border: 1px solid rgba(14,165,233,.25);
  color: rgba(2,132,199,.95);
  padding: 10px 12px;
  border-radius: 14px;
  font-weight: 700;
}

/* =========================
   Live cards actions
   ========================= */
.actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top: 10px;
}

/* =========================
   Responsive tweaks
   ========================= */
@media (max-width: 560px){
  .wrap{ width: calc(100% - 18px); }
  .big{ font-size: 24px; }
  h1{ font-size: 24px; }
  .btn{ width: 100%; }
  .btn.small{ width:auto; }
}
