:root{
  --bg:#0b1020;
  --card:#111a33;
  --muted:#8ea0c9;
  --text:#e8eeff;
  --line:rgba(255,255,255,.10);
  --accent:#6ea8fe;
  --danger:#ff6b6b;
  --ok:#3ddc97;
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
  background: radial-gradient(1200px 800px at 15% 10%, #192a68 0%, var(--bg) 60%);
  color:var(--text);
}
.top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:18px 18px 0;
  gap:12px;
}
.brand{display:flex; gap:12px; align-items:center}
.logo{
  width:54px;height:44px;border-radius:12px;
  background:linear-gradient(135deg, #2d6cdf, #16b3ff);
  display:flex; align-items:center; justify-content:center;
  font-weight:900; letter-spacing:.6px;
  font-size:12px;
}
.name{font-size:18px;font-weight:800;line-height:1.2}
.tag{font-size:12px;color:var(--muted);max-width:70ch}
.actions{display:flex; gap:10px; flex-wrap:wrap}

.wrap{padding:18px}
.card{
  max-width:1040px;
  margin:0 auto;
  background:rgba(17,26,51,.84);
  border:1px solid var(--line);
  border-radius:16px;
  padding:16px;
  backdrop-filter: blur(8px);
}

.controls{
  display:grid;
  grid-template-columns: 1fr 230px;
  gap:12px;
}
@media (max-width: 860px){
  .controls{grid-template-columns:1fr}
}

.field{display:flex; flex-direction:column; gap:6px}
.field span{font-size:12px;color:var(--muted)}
.field input, .field select{
  width:100%;
  padding:10px 11px;
  border-radius:12px;
  border:1px solid var(--line);
  background:rgba(0,0,0,.18);
  color:var(--text);
  outline:none;
  font-size:14px;
}
.field input::placeholder{color:rgba(232,238,255,.45)}

.layout{
  margin-top:14px;
  display:grid;
  grid-template-columns: 1.05fr .95fr;
  gap:12px;
}
@media (max-width: 860px){
  .layout{grid-template-columns:1fr}
}

.list, .detail{
  border:1px solid rgba(255,255,255,.08);
  border-radius:14px;
  background:rgba(0,0,0,.10);
  overflow:hidden;
}

.listHead{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:10px 12px;
  border-bottom:1px solid rgba(255,255,255,.08);
}
.muted{color:rgba(232,238,255,.65); font-size:12px}

.items{max-height:420px; overflow:auto}
.item{
  display:flex;
  gap:10px;
  padding:10px 12px;
  border-bottom:1px solid rgba(255,255,255,.06);
  cursor:pointer;
}
.item:hover{background:rgba(110,168,254,.10)}
.item.active{background:rgba(110,168,254,.16); outline:1px solid rgba(110,168,254,.30)}

.badge{
  min-width:50px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:4px 8px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.14);
  font-weight:900;
  font-variant-numeric: tabular-nums;
  background:rgba(0,0,0,.18);
}

.itemMain{display:flex; flex-direction:column; gap:2px}
.itemPhrase{font-weight:800}
.itemHint{font-size:12px; color:rgba(232,238,255,.65)}

.empty{padding:12px; color:var(--muted); font-size:13px}

.detail{padding:12px}
.detailTop{display:flex; justify-content:space-between; align-items:flex-start; gap:10px}
.code{font-size:28px; font-weight:950; letter-spacing:.5px; font-variant-numeric: tabular-nums}
.phrase{font-size:14px; color:rgba(232,238,255,.85); margin-top:2px; font-weight:800}
.desc{margin-top:10px; line-height:1.55; color:rgba(232,238,255,.88); font-size:13px; white-space:pre-wrap}

.rowBtns{display:flex; gap:10px; flex-wrap:wrap}
.btn{
  border:1px solid rgba(255,255,255,.14);
  background:rgba(110,168,254,.18);
  color:var(--text);
  padding:10px 12px;
  border-radius:12px;
  font-weight:800;
  cursor:pointer;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
}
.btn:hover{border-color:rgba(255,255,255,.24)}
.btn:disabled{opacity:.5; cursor:not-allowed}
.btn.ghost{background:rgba(0,0,0,.18)}
.btn.danger{background:rgba(255,107,107,.14); border-color:rgba(255,107,107,.30)}

.errors{min-height:18px; margin-top:12px; color:var(--danger); font-size:13px}
.hint{margin:10px 0 0; color:var(--muted); font-size:12px; line-height:1.45}
