:root{
  --bg:#0b0f17;
  --panel:#111827;
  --panel2:#0f1626;
  --text:#e5e7eb;
  --muted:#9ca3af;
  --border:#263042;
  --shadow: 0 10px 35px rgba(0,0,0,.35);

  --tile:#0b1221;
  --tileBorder:#2a3447;

  --good:#16a34a;   /* green */
  --warn:#ca8a04;   /* yellow */
  --bad:#374151;    /* gray */
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  background: radial-gradient(1200px 500px at 30% 0%, #1a2450 0%, var(--bg) 55%);
  color:var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
}

.topbar{
  position:sticky; top:0;
  z-index:5;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:14px 16px;
  background:rgba(11,15,23,.75);
  backdrop-filter: blur(10px);
  border-bottom:1px solid rgba(38,48,66,.6);
}

.brand{ display:flex; align-items:center; gap:12px; }
.logo{
  width:38px; height:38px;
  display:grid; place-items:center;
  border-radius:12px;
  background: linear-gradient(135deg, #60a5fa, #a78bfa);
  color:#0b0f17;
  font-weight:900;
}
.title{ font-weight:800; letter-spacing:.2px; font-size:18px; }
.subtitle{ color:var(--muted); font-size:12px; margin-top:2px; }

.actions{ display:flex; gap:8px; flex-wrap:wrap; justify-content:flex-end; }

.container{
  max-width:1100px;
  margin:0 auto;
  padding:18px 16px 28px;
}

.status{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
  margin-bottom:14px;
}

.message{
  min-height:22px;
  color:var(--muted);
  font-size:14px;
}
.mini{ color:var(--muted); font-size:13px; }
.dot{ margin: 0 6px; opacity:.6; }

.boards{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap:14px;
}

.board{
  background: rgba(17,24,39,.7);
  border:1px solid rgba(38,48,66,.8);
  border-radius:18px;
  box-shadow: var(--shadow);
  padding:12px 12px 14px;
}
.board-title{
  font-size:12px;
  color:var(--muted);
  margin:2px 2px 10px;
  letter-spacing:.3px;
  text-transform:uppercase;
}

.grid{
  display:grid;
  gap:6px;
  justify-content:center;
}

.row{
  display:grid;
  grid-template-columns: repeat(5, 1fr);
  gap:6px;
}

.tile{
  width:52px; height:52px;
  border-radius:12px;
  background: rgba(11,18,33,.8);
  border: 1px solid rgba(42,52,71,.9);
  display:grid;
  place-items:center;
  font-weight:800;
  font-size:20px;
  text-transform:uppercase;
  user-select:none;
  transition: transform .08s ease, background .15s ease, border-color .15s ease;
}
.tile.filled{ border-color: rgba(96,165,250,.45); }
.tile.pop{ transform: scale(1.04); }

.tile.good{ background: rgba(22,163,74,.9); border-color: rgba(22,163,74,1); }
.tile.warn{ background: rgba(202,138,4,.9); border-color: rgba(202,138,4,1); }
.tile.bad{ background: rgba(55,65,81,.95); border-color: rgba(55,65,81,1); }

.keyboard{
  margin-top:18px;
  background: rgba(17,24,39,.55);
  border:1px solid rgba(38,48,66,.75);
  border-radius:18px;
  box-shadow: var(--shadow);
  padding:12px;
}
.kb-row{
  display:flex;
  gap:8px;
  justify-content:center;
  margin:8px 0;
  flex-wrap:wrap;
}
.key{
  height:44px;
  min-width:36px;
  padding:0 12px;
  border-radius:14px;
  border:1px solid rgba(38,48,66,.9);
  background: rgba(15,22,38,.9);
  color:var(--text);
  font-weight:700;
  cursor:pointer;
  user-select:none;
  transition: transform .06s ease, background .15s ease, border-color .15s ease;
}
.key:active{ transform: scale(.98); }
.key.wide{ min-width:84px; }
.key.good{ background: rgba(22,163,74,.55); border-color: rgba(22,163,74,.85); }
.key.warn{ background: rgba(202,138,4,.55); border-color: rgba(202,138,4,.85); }
.key.bad{ background: rgba(55,65,81,.75); border-color: rgba(55,65,81,1); }

.btn{
  height:36px;
  padding:0 12px;
  border-radius:14px;
  border:1px solid rgba(38,48,66,.85);
  background: rgba(15,22,38,.9);
  color:var(--text);
  font-weight:700;
  cursor:pointer;
}
.btn:hover{ border-color: rgba(96,165,250,.45); }
.btn-ghost{ background: transparent; }
.btn-primary{
  background: linear-gradient(135deg, #60a5fa, #a78bfa);
  color:#0b0f17;
  border-color: transparent;
}

.modal{
  position:fixed; inset:0;
  background: rgba(0,0,0,.55);
  display:grid; place-items:center;
  padding:16px;
}
.modal.hidden{ display:none; }
.modal-card{
  width:min(720px, 100%);
  border-radius:20px;
  background: rgba(17,24,39,.95);
  border:1px solid rgba(38,48,66,.9);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.modal-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:12px 12px 10px;
  border-bottom:1px solid rgba(38,48,66,.65);
}
.modal-title{ font-weight:800; }
.modal-body{
  padding:14px 12px;
  color:var(--text);
}
.modal-body p{ margin:0 0 10px; color:var(--text); }
.modal-body .muted{ color:var(--muted); }
.modal-foot{
  padding:12px;
  border-top:1px solid rgba(38,48,66,.65);
  display:flex;
  justify-content:flex-end;
}

@media (max-width: 800px){
  .boards{ grid-template-columns: 1fr; }
  .tile{ width:48px; height:48px; font-size:18px; }
}