:root {
  --green: #97c44b;
  --lime: #d3d927;
  --cyan: #00b0d8;
  --blue: #0093c4;
  --sky: #33bcee;
  --ice: #addbf7;
  --ink: #1a2233;
  --muted: #6a7384;
  --bg: #f5f7fa;
  --card: #fff;
  --border: #e2e6ee;
  --err: #c0392b;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg); color: var(--ink);
  min-height: 100vh;
}

.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: .75rem 1rem;
  background: var(--blue); color: #fff;
  position: sticky; top: 0; z-index: 10;
}
.brand { font-weight: 600; letter-spacing: .02em; }
.status { display: flex; gap: .75rem; align-items: center; }
.dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--green); display: inline-block;
}
.dot.offline { background: #e67e22; }
.queue {
  background: #fff; color: var(--blue);
  border-radius: 999px; padding: 2px 8px;
  font-size: .8rem; font-weight: 700;
}

main { padding: 1rem; max-width: 720px; margin: 0 auto; }
.view { animation: fade .15s ease; }
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: 0 1px 2px rgba(0,0,0,.03);
}

h1 { margin: 0 0 .75rem; font-size: 1.25rem; }
label { display: block; margin-top: .75rem; font-size: .9rem; color: var(--muted); }
input[type="password"], input[type="search"], input[type="text"] {
  width: 100%; padding: .75rem; font-size: 1rem;
  border: 1px solid var(--border); border-radius: 8px;
  margin-top: .25rem;
}
input:focus { outline: 2px solid var(--cyan); outline-offset: 1px; }

button {
  appearance: none; border: 0; cursor: pointer;
  background: var(--blue); color: #fff;
  font-size: 1rem; font-weight: 600;
  padding: .75rem 1rem; border-radius: 8px;
  margin-top: 1rem; width: 100%;
}
button:disabled { opacity: .5; cursor: not-allowed; }
button:hover:not(:disabled) { background: var(--cyan); }
.linkbtn {
  background: transparent; color: var(--blue);
  padding: 0; width: auto; margin: 0; font-weight: 500;
}
.linkbtn:hover { background: transparent; text-decoration: underline; color: var(--cyan); }

.muted { color: var(--muted); font-size: .9rem; }
.error { color: var(--err); min-height: 1.2em; margin: .5rem 0 0; font-size: .9rem; }
.hidden { display: none !important; }

.list { list-style: none; padding: 0; margin: .75rem 0 0; }
.list li {
  padding: .85rem .5rem;
  border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  cursor: pointer;
}
.list li:hover { background: #f9fbfd; }
.list li:last-child { border-bottom: 0; }
.list .primary { font-weight: 600; }
.list .sub { color: var(--muted); font-size: .85rem; }
.pill {
  font-size: .72rem; font-weight: 700; padding: 2px 8px;
  border-radius: 999px; background: #eef2f7; color: var(--muted);
  text-transform: uppercase; letter-spacing: .04em;
}
.pill.in { background: var(--green); color: #fff; }

.event-head { display: flex; justify-content: space-between; align-items: start; gap: 1rem; }

/* Badge preview on screen */
#view-badge .card h1 { margin-top: .25rem; }

/* Print */
.print-only { display: none; }
@media print {
  .screen-only, .topbar { display: none !important; }
  .print-only { display: block !important; }
  body, main, #app { background: #fff; margin: 0; padding: 0; }
  @page { size: 4in 3in; margin: 0; }
  .badge {
    width: 4in; height: 3in;
    padding: .2in;
    display: flex; flex-direction: column; align-items: center;
    justify-content: center;
    text-align: center;
    font-family: -apple-system, "Segoe UI", sans-serif;
    color: #000;
  }
  .badge-event { font-size: 10pt; text-transform: uppercase; letter-spacing: .05em; color: #555; }
  .badge-name { font-size: 22pt; font-weight: 800; margin: .08in 0; line-height: 1.1; }
  .badge-company { font-size: 12pt; margin-bottom: .1in; }
  .badge-qr { width: 1in; height: 1in; }
  .badge-id { font-size: 8pt; color: #777; margin-top: .05in; }
}
