:root{
  --bg:#0b1220; --text:#e8efff; --muted:#9fb0d0;
  --accent:#2f7bff; --good:#21d4a4; --warn:#ffcc00; --bad:#ff4d6d;
  --line:rgba(255,255,255,.10); --radius:18px;
  --shadow:0 14px 40px rgba(0,0,0,.35);
  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
}
*{box-sizing:border-box}
html,body{
  min-height:100vh;height:100%}
body{
  min-height:100vh;
  margin:0; font-family:var(--font); color:var(--text);
  background:
    radial-gradient(1100px 600px at 20% -10%, rgba(47,123,255,.20), transparent 60%),
    radial-gradient(900px 500px at 80% 0%, rgba(33,212,164,.12), transparent 60%),
    var(--bg);
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-size: 140% 140%, 120% 120%, auto;
}
a{color:inherit; text-decoration:none}
.container{max-width:1100px; margin:0 auto; padding:22px}
.nav{
  position:sticky; top:0; z-index:50;
  background: rgba(11,18,32,.78);
  backdrop-filter: blur(10px);
  border-bottom:1px solid var(--line);
}
.nav-inner{display:flex; align-items:center; justify-content:space-between; gap:14px; padding:14px 22px; max-width:1100px; margin:0 auto}
.brand{display:flex; align-items:center; gap:10px; font-weight:900; letter-spacing:.2px}
.brand .logo{width:34px; height:34px; border-radius:12px; background:linear-gradient(135deg, var(--accent), var(--good)); box-shadow:var(--shadow)}
.nav-links{display:flex; align-items:center; gap:10px; flex-wrap:wrap; justify-content:flex-end}
.pill{padding:9px 12px; border:1px solid var(--line); border-radius:999px; color:var(--muted); transition:.15s ease}
.pill:hover{border-color: rgba(47,123,255,.55); color:var(--text); transform: translateY(-1px)}
.pill.active{background: rgba(47,123,255,.16); border-color: rgba(47,123,255,.55); color:var(--text)}
.card{
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
  border:1px solid var(--line); border-radius:var(--radius);
  padding:16px; box-shadow:var(--shadow);
}
.grid{display:grid; gap:14px}
.grid.cards{grid-template-columns: repeat(12, 1fr)}
.hr{height:1px; background:var(--line); margin:14px 0}
.muted{color:var(--muted)}
.row{display:flex; gap:12px; flex-wrap:wrap}
.field{display:flex; flex-direction:column; gap:6px; flex:1; min-width:180px}
label{font-size:12px; color:var(--muted)}
input,select,textarea{
  width:100%; padding:10px 12px; border-radius:14px;
  border:1px solid var(--line); background: rgba(0,0,0,.18);
  color:var(--text); outline:none;
}
textarea{min-height:92px; resize:vertical}
input:focus,select:focus,textarea:focus{border-color: rgba(47,123,255,.55); box-shadow: 0 0 0 4px rgba(47,123,255,.12)}
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:10px;
  padding:10px 14px; border-radius:14px; font-weight:800;
  border:1px solid rgba(47,123,255,.55); background: rgba(47,123,255,.18);
  color:var(--text); cursor:pointer; transition:.15s ease;
}
.btn:hover{transform: translateY(-1px)}
.btn.secondary{border-color:var(--line); background: rgba(255,255,255,.06)}
.btn.danger{border-color: rgba(255,77,109,.55); background: rgba(255,77,109,.12)}
.btn.small{padding:7px 10px; border-radius:12px}
.btn.block{width:100%}
.badge{display:inline-flex; align-items:center; gap:8px; padding:6px 10px; border:1px solid var(--line); border-radius:999px; color:var(--muted)}
.badge.good{border-color: rgba(33,212,164,.35); background: rgba(33,212,164,.10); color:#b8ffe9}
.badge.warn{border-color: rgba(255,204,0,.35); background: rgba(255,204,0,.08); color:#fff2b3}
.badge.bad{border-color: rgba(255,77,109,.35); background: rgba(255,77,109,.08); color:#ffc1cd}
.table{width:100%; border-collapse:collapse; border-radius:16px; overflow:hidden; border:1px solid var(--line)}
.table th,.table td{padding:10px 10px; border-bottom:1px solid var(--line); vertical-align:middle}
.table th{font-size:12px; color:var(--muted); text-transform:uppercase; letter-spacing:.06em}
.table tr:hover td{background: rgba(255,255,255,.03)}
.right{text-align:right}
.center{text-align:center}
.flash{padding:10px 12px; border-radius:14px; border:1px solid var(--line); background: rgba(255,255,255,.04); margin-bottom:12px}
.flash.good{border-color: rgba(33,212,164,.35); background: rgba(33,212,164,.08)}
.flash.bad{border-color: rgba(255,77,109,.45); background: rgba(255,77,109,.08)}
.footer{padding:26px 0; color:var(--muted); font-size:12px}
@media (max-width: 860px){
  .container{padding:16px}
  .nav-inner{padding:12px 16px}
  .grid.cards{grid-template-columns: repeat(6, 1fr)}
}
@media (max-width: 520px){
  .grid.cards{grid-template-columns: repeat(2, 1fr)}
  .pill{padding:8px 10px}
}


.table-scroll{width:100%; overflow-x:auto; -webkit-overflow-scrolling:touch;}
.table-scroll .table{min-width:760px;}
@media (max-width: 860px){
  .table-scroll .table{min-width:680px;}
}
@media (max-width: 520px){
  .table-scroll .table{min-width:620px;}
}

@media (min-width: 1200px){
  body{background-size: 180% 180%, 160% 160%, auto;}
}


.hidden-col{display:none !important;}
.colpanel{display:none; padding:12px; border:1px solid rgba(255,255,255,.12); border-radius:14px; background:rgba(20,24,33,.55);}
.colpanel.open{display:block;}
.colgrid{display:grid; grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); gap:8px; margin-top:8px;}
.colitem{display:flex; gap:10px; align-items:center;}


/* Column panel controls */
.colpanel select, .colpanel input[type="text"]{
  width:100%;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(12,16,24,.75);
  color: var(--text);
  outline:none;
}
.colpanel select option{ background:#0b0f17; color:#e9eefc; }
.colgrid{ align-items:start; }
.colitem{ display:flex; align-items:center; gap:10px; }
.colitem input[type="checkbox"]{ width:18px; height:18px; }
.colitem label{ flex:1; }

.btn.tiny{padding:6px 8px; font-size:12px; line-height:1; border-radius:10px;}
.colmove{display:flex; gap:6px;}
.colitem{justify-content:flex-start;}
.colitem label{margin:0;}


select{
  padding:10px 12px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(12,16,24,.75);
  color: var(--text);
}
select option{ background:#0b0f17; color:#e9eefc; }


/* colgrid vertical */
.colgrid{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.colitem{
  padding:8px 10px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:12px;
  background: rgba(12,16,24,.35);
}
.colmove{ margin-left:auto; }

.tc{text-align:center;}

.sortlink{color:inherit; text-decoration:none; border-bottom:1px solid rgba(255,255,255,.25);}
.sortlink:hover{border-bottom-color:rgba(255,255,255,.6);}

.alert{background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.18); padding:10px 12px; border-radius:12px;}
