:root {
  --bg: #0f1115;
  --panel: #181b22;
  --panel-2: #20242e;
  --border: #2a2f3a;
  --text: #e8ebf0;
  --muted: #9aa3b2;
  --accent: #4f8cff;
  --free: #2ecc71;
  --occupied: #e74c3c;
  --reserved: #f1c40f;
  --radius: 12px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1000px; margin: 0 auto; padding: 24px 16px; }
header.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--border); background: var(--panel);
}
header.topbar .brand { font-weight: 700; font-size: 18px; }
header.topbar .brand span { color: var(--accent); }
h1 { font-size: 24px; margin: 0 0 4px; }
.muted { color: var(--muted); }
.card {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; margin-bottom: 14px;
}
.btn {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  background: var(--accent); color: #fff; border: none; border-radius: 8px;
  padding: 9px 14px; font-size: 14px; font-weight: 600;
}
.btn:hover { filter: brightness(1.08); }
.btn.secondary { background: var(--panel-2); color: var(--text); border: 1px solid var(--border); }
.btn.danger { background: var(--occupied); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
input, select {
  background: var(--panel-2); border: 1px solid var(--border); color: var(--text);
  border-radius: 8px; padding: 9px 11px; font-size: 14px; width: 100%;
}
label.field { display: block; margin-bottom: 10px; }
label.field span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 0; }

/* floor plan */
.floor {
  position: relative; background: var(--panel-2);
  border: 1px dashed var(--border); border-radius: var(--radius);
  height: 460px; overflow: hidden; touch-action: none;
}
.table {
  position: absolute; width: 84px; height: 84px; border-radius: 12px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border: 2px solid rgba(255,255,255,.15); color: #0b0d11; font-weight: 700;
  user-select: none; cursor: grab;
}
.table.free { background: var(--free); }
.table.occupied { background: var(--occupied); color: #fff; }
.table.reserved { background: var(--reserved); }
.table .seats { font-size: 11px; font-weight: 600; opacity: .85; }
.table.selected { outline: 3px solid var(--accent); outline-offset: 2px; }
.legend { display: flex; gap: 16px; font-size: 13px; margin: 10px 0; flex-wrap: wrap; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: middle; }
.rlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.rlist .card { margin: 0; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.pill.free { background: rgba(46,204,113,.18); color: var(--free); }
.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  background: var(--panel); border: 1px solid var(--border); padding: 12px 18px;
  border-radius: 10px; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 50;
}
.toast.show { opacity: 1; }
.hidden { display: none !important; }
