/* PWGBoards - modern, responsive, minimal */
:root{
  --bg: #0b1220;
  --panel: rgba(255,255,255,.07);
  --panel2: rgba(255,255,255,.10);
  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.64);
  --stroke: rgba(255,255,255,.12);
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --radius: 18px;
  --radius2: 14px;
  --pad: 14px;
  --accent: #66e3ff;
  --danger: #ff5c7a;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  color: var(--text);
  background:
    radial-gradient(900px 500px at 15% 0%, rgba(102,227,255,.18), transparent 60%),
    radial-gradient(900px 500px at 85% 20%, rgba(255,92,122,.16), transparent 55%),
    radial-gradient(1100px 700px at 50% 110%, rgba(120,255,160,.12), transparent 60%),
    var(--bg);
  overflow-x:hidden;
}

.topbar{
  position:sticky; top:0; z-index:20;
  display:flex; align-items:center; justify-content:space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--stroke);
  backdrop-filter: blur(14px);
  background: rgba(10,18,32,.72);
}

.brand{
  display:flex; align-items:center; gap:12px;
  cursor:pointer;
  user-select:none;
}
.logo{
  width:40px; height:40px;
  border-radius: 14px;
  display:grid; place-items:center;
  background: linear-gradient(135deg, rgba(102,227,255,.35), rgba(255,92,122,.25));
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: var(--shadow);
  font-weight:800;
  letter-spacing:.5px;
}
.title .name{ font-weight:800; line-height:1.1; }
.title .sub{ font-size:12px; color: var(--muted); margin-top:2px; }

.actions{ display:flex; align-items:center; gap:10px; }

.btn{
  display:inline-flex; align-items:center; gap:8px;
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.06);
  color: var(--text);
  padding: 9px 12px;
  border-radius: 14px;
  cursor:pointer;
  transition: transform .12s ease, background .12s ease, border-color .12s ease, box-shadow .12s ease;
  box-shadow: 0 6px 14px rgba(0,0,0,.22);
}
.btn:hover{ transform: translateY(-1px); background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.18); }
.btn:active{ transform: translateY(0); }
.btn.primary{
  background: linear-gradient(135deg, rgba(102,227,255,.25), rgba(102,227,255,.10));
  border-color: rgba(102,227,255,.35);
}
.btn.danger{
  background: rgba(255,92,122,.12);
  border-color: rgba(255,92,122,.35);
}
.btn .ico{ width:18px; height:18px; display:inline-flex; }
.btn svg{ width:18px; height:18px; }

.hide-sm{ display:inline; }
@media (max-width:520px){
  .hide-sm{ display:none; }
  .btn{ padding: 9px 10px; border-radius: 13px; }
}

.app{
  padding: 16px 14px 26px;
  max-width: 1200px;
  margin: 0 auto;
}

.section-head{
  display:flex; align-items:flex-end; justify-content:space-between;
  gap: 12px;
  margin: 12px 2px 14px;
}
.section-head h1{
  font-size: 18px;
  margin:0;
  letter-spacing:.2px;
}
.section-head .meta{
  font-size: 12px;
  color: var(--muted);
}

.grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 14px;
}
@media (max-width:980px){ .grid{ grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width:640px){ .grid{ grid-template-columns: 1fr; } }

.card{
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.06);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
}
.card:hover{ transform: translateY(-2px); background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.18); }
.card .row{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
}
.badge{
  width: 12px; height: 12px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.25);
  flex: 0 0 auto;
}
.card .title{
  font-weight:800;
  display:flex; align-items:center; gap:10px;
}
.card .desc{
  color: var(--muted);
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.35;
}

.iconbtn{
  width: 36px; height: 36px;
  border-radius: 14px;
  display:grid; place-items:center;
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.05);
  cursor:pointer;
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
}
.iconbtn:hover{ transform: translateY(-1px); background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.18); }
.iconbtn.danger{ border-color: rgba(255,92,122,.35); background: rgba(255,92,122,.10); }
.iconbtn svg{ width:18px; height:18px; }

/* Board view */
.boardbar{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  margin: 6px 2px 12px;
}
.boardbar .left{
  display:flex; align-items:center; gap:12px;
}
.boardname{
  font-size: 18px;
  font-weight: 900;
  display:flex; align-items:center; gap:10px;
}
.boardname .dot{
  width: 12px; height: 12px; border-radius:999px;
  border:1px solid rgba(255,255,255,.25);
}
.smallnote{ font-size:12px; color: var(--muted); }

.lists-wrap{
  display:flex;
  gap: 12px;
  align-items:flex-start;
  overflow-x:auto;
  padding-bottom: 12px;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
}
.lists-wrap::-webkit-scrollbar{ height: 10px; }
.lists-wrap::-webkit-scrollbar-thumb{ background: rgba(255,255,255,.14); border-radius:999px; }
.lists-wrap::-webkit-scrollbar-track{ background: rgba(255,255,255,.06); border-radius:999px; }

.list{
  flex: 0 0 320px;
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.06);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  scroll-snap-align: start;
  overflow:hidden;
}
.list-head{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  padding: 12px 12px 10px;
  border-bottom: 1px solid rgba(255,255,255,.10);
}
.list-head .name{
  font-weight:900;
  display:flex; align-items:center; gap:10px;
}
.list-head .badge{ width:10px; height:10px; }

.list-body{
  padding: 10px 10px 12px;
}
.cards{
  display:flex;
  flex-direction:column;
  gap: 10px;
  min-height: 12px;
}
.carditem{
  border:1px solid rgba(255,255,255,.10);
  background: rgba(12,18,32,.55);
  border-radius: 14px;
  padding: 10px 10px;
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
}
.carditem:hover{
  transform: translateY(-1px);
  background: rgba(12,18,32,.72);
  border-color: rgba(255,255,255,.16);
}
.carditem .top{
  display:flex; align-items:flex-start; justify-content:space-between; gap:10px;
}
.carditem .t{
  font-weight:800;
  display:flex; align-items:center; gap:10px;
}
.carditem .t .badge{ width:10px; height:10px; }
.carditem .meta{
  margin-top:6px;
  color: rgba(255,255,255,.62);
  font-size: 12px;
  line-height:1.35;
  white-space: pre-wrap;
}

.footer-actions{
  margin-top: 14px;
  display:flex; gap:10px; flex-wrap:wrap;
}

/* Narrow viewport behavior: show 1 list per screen width */
@media (max-width: 560px){
  .lists-wrap{ gap: 10px; padding-bottom: 14px; }
  .list{ flex: 0 0 calc(100% - 6px); }
}

/* Drag hints */
.drag-handle{ cursor: grab; }
.sortable-ghost{ opacity: .35; }
.sortable-chosen{ transform: rotate(.2deg); }

.toast{
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  max-width: min(560px, calc(100vw - 24px));
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(10,18,32,.82);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: 13px;
  opacity: 0;
  pointer-events:none;
  transition: opacity .18s ease, transform .18s ease;
}
.toast.show{
  opacity: 1;
  transform: translateX(-50%) translateY(-2px);
}

/* Menus */
.menubtn{
  width: 36px; height: 36px;
  border-radius: 14px;
  display:grid; place-items:center;
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.05);
  cursor:pointer;
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
}
.menubtn:hover{ transform: translateY(-1px); background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.18); }
.menubtn svg{ width:18px; height:18px; }

.menuwrap{ position: relative; }
.menu{
  position:absolute;
  top: 42px;
  right: 0;
  min-width: 180px;
  border:1px solid rgba(255,255,255,.16);
  background: rgba(10,18,32,.92);
  backdrop-filter: blur(14px);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 8px;
  z-index: 50;
}
.menu[hidden]{ display:none; }
.menu .row{
  display:flex; align-items:center; justify-content:space-between;
  gap:10px;
  padding: 8px 10px;
  border-radius: 12px;
}
.menu .row:hover{ background: rgba(255,255,255,.06); }
.menu .label{ font-size: 13px; color: var(--muted); }

.menu-btn{
  width:100%;
  text-align:left;
  border:1px solid transparent;
  background: transparent;
  color: var(--text);
  padding: 9px 10px;
  border-radius: 12px;
  cursor:pointer;
  transition: background .12s ease, border-color .12s ease, transform .12s ease;
  display:flex; align-items:center; gap:10px;
}
.menu-btn:hover{ background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.10); transform: translateY(-1px); }
.menu-btn:active{ transform: translateY(0); }
.menu-btn.danger{ color: rgba(255,255,255,.92); }
.menu-btn.danger:hover{ background: rgba(255,92,122,.14); border-color: rgba(255,92,122,.22); }
.menu hr{
  border: none;
  border-top: 1px solid rgba(255,255,255,.10);
  margin: 8px 6px;
}
