:root { --bg:#0b0f14; --card:#121826; --muted:#9aa4b2; --border:#233044; --accent:#4ea1ff; }
*{ box-sizing:border-box; font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial; }
body{ margin:0; background:var(--bg); color:#e6edf3; }
header{ padding:14px 18px; border-bottom:1px solid var(--border); display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap;}
h1{ margin:0; font-size:16px; letter-spacing:.3px; }
button{ background:var(--accent); border:0; color:#071019; padding:10px 12px; border-radius:10px; font-weight:700; cursor:pointer; }
button.secondary{ background:transparent; color:#e6edf3; border:1px solid var(--border); }
.container{ padding:14px 14px 24px; }

.toolbar{
  display:flex; gap:10px; align-items:center; flex-wrap:wrap;
}
.toolbar .group{
  display:flex; gap:10px; align-items:center; flex-wrap:wrap;
  padding:8px; border:1px solid var(--border); border-radius:14px;
  background: rgba(255,255,255,.03);
}
.toolbar label{ margin:0; font-size:12px; color:var(--muted); }
.toolbar select{
  width:auto; min-width:180px;
  background:#0b1220; border:1px solid var(--border);
  color:#e6edf3; padding:9px 10px; border-radius:10px;
}

.tabs{ display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.tab{
  background:transparent; color:#e6edf3; border:1px solid var(--border);
  padding:8px 10px; border-radius:999px; cursor:pointer; font-weight:800; font-size:12px;
}
.tab.active{ background:rgba(78,161,255,.18); border-color:#2f4564; }

.board{ display:flex; gap:12px; overflow:auto; padding-bottom:10px; scroll-behavior:smooth; }
.col{ min-width:320px; background:rgba(255,255,255,.03); border:1px solid var(--border); border-radius:14px; }
.col.collapsed{ min-width:180px; }
.colhead{ padding:10px 12px; border-bottom:1px solid var(--border); display:flex; justify-content:space-between; align-items:center; cursor:pointer; user-select:none; }
.colhead .name{ font-weight:900; font-size:13px; display:flex; gap:8px; align-items:center; }
.colhead .count{ color:var(--muted); font-size:12px; }
.caret{ color:var(--muted); font-size:12px; }

.cards{ padding:10px; display:flex; flex-direction:column; gap:10px; }
.col.collapsed .cards{ display:none; }

.card{ background:var(--card); border:1px solid var(--border); border-radius:14px; padding:10px 10px; cursor:pointer; }
.card:hover{ border-color:#2f4564; }
.card .top{ display:flex; justify-content:space-between; gap:10px; }
.card .cust{ font-weight:900; }
.card .meta{ color:var(--muted); font-size:12px; margin-top:6px; line-height:1.3; }
.pill{ display:inline-block; padding:3px 8px; border:1px solid var(--border); border-radius:999px; font-size:12px; color:var(--muted); }

.modalback{
  position:fixed; inset:0; background:rgba(0,0,0,.62);
  display:none; align-items:flex-start; justify-content:center;
  padding:18px; overflow:auto; /* ✅ scrollable */
}
.modal{
  width:min(980px, 100%);
  max-height:90vh;             /* ✅ fit viewport */
  background:#0f1624; border:1px solid var(--border); border-radius:16px; overflow:hidden;
  display:flex; flex-direction:column; /* ✅ allow inner scroll */
}
.modhead{ padding:12px 14px; border-bottom:1px solid var(--border); display:flex; justify-content:space-between; align-items:center; gap:10px; }
.modbody{
  padding:14px;
  display:grid; grid-template-columns: 1.2fr .8fr; gap:14px;
  overflow:auto; flex:1; /* ✅ scroll inner */
}
.panel{ background:rgba(255,255,255,.03); border:1px solid var(--border); border-radius:14px; padding:12px; }
label{ display:block; font-size:12px; color:var(--muted); margin-top:10px; }
input, select, textarea{
  width:100%; margin-top:6px; background:#0b1220; border:1px solid var(--border);
  color:#e6edf3; padding:10px; border-radius:10px;
}
textarea{ min-height:72px; }
.row{ display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.row3{ display:grid; grid-template-columns:1.2fr .7fr .7fr; gap:10px; }
.hr{ height:1px; background:var(--border); margin:12px 0; }
.small{ font-size:12px; color:var(--muted); }
.actions{ display:flex; gap:10px; justify-content:flex-end; padding:12px 14px; border-top:1px solid var(--border); align-items:center; }

.tablelike{ display:flex; flex-direction:column; gap:10px; }
.styleitem{ border:1px solid var(--border); border-radius:12px; padding:10px; background:#0b1220; }
.styleitem .row3{ margin-top:6px; }
.notice{ color:#ffcc66; font-size:12px; margin-top:8px; }
.success{ color:#7ee787; font-size:12px; margin-top:8px; }
.error{ color:#ff7b72; font-size:12px; margin-top:8px; }

.loginwrap{ max-width:420px; margin:80px auto; padding:16px; background:rgba(255,255,255,.03); border:1px solid var(--border); border-radius:16px; }
.loginwrap h2{ margin:0 0 12px; font-size:18px; }
