:root{
  --bg:#0b0f1a;
  --bg2:#0e1424;
  --card: rgba(255,255,255,.06);
  --card2: rgba(255,255,255,.04);
  --text:#eaf0ff;
  --muted:#a7b2cc;
  --line: rgba(255,255,255,.12);

  --g:#27B721;
  --c:#008ACC;
  --b:#2127B7;

  --r:#B72127;
  --y:#A37700;

  --radius:16px;
  --shadow: 0 16px 40px rgba(0,0,0,.35);
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Helvetica Neue", sans-serif;
}

*{box-sizing:border-box}
body{
  margin:0;
  font-family:var(--sans);
  color:var(--text);
  background:
    radial-gradient(1200px 600px at 15% 0%, rgba(33,39,183,.35), transparent 60%),
    radial-gradient(1000px 550px at 85% 10%, rgba(0,138,204,.25), transparent 55%),
    radial-gradient(900px 500px at 65% 90%, rgba(39,183,33,.18), transparent 55%),
    linear-gradient(180deg, var(--bg), var(--bg2));
  min-height:100vh;
}

a{color:inherit;text-decoration:none}
.wrap{max-width:1180px;margin:0 auto;padding:22px}
.topbar{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:14px 16px;
  border:1px solid var(--line);
  border-radius:var(--radius);
  background: rgba(10,14,26,.55);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}
.brand{display:flex;align-items:center;gap:12px}
.logo{
  width:36px;height:36px;border-radius:12px;
  background: linear-gradient(135deg, rgba(33,39,183,.95), rgba(0,138,204,.9), rgba(39,183,33,.85));
  box-shadow: 0 12px 28px rgba(0,138,204,.18);
}
.brand .t{font-weight:800;font-size:14px;letter-spacing:.2px}
.brand .s{font-size:12px;color:var(--muted);margin-top:2px}

.right{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end}
.pill{
  display:flex;align-items:center;gap:10px;
  padding:8px 10px;border:1px solid var(--line);border-radius:999px;
  background: rgba(255,255,255,.04);
  font-size:12px;color:var(--muted);
}
.pill strong{color:var(--text)}
.mono{font-family:var(--mono)}

.status-dot{
  width:8px;height:8px;border-radius:999px;display:inline-block;flex:none;
  box-shadow: 0 0 0 4px rgba(255,255,255,.04);
}
.status-open{background:#27B721}
.status-closed{background:#7f8aa8}
.status-accepted{background:#27B721}
.status-pending{background:#A37700}
.status-lost{background:#B72127}
.status-running{
  width:12px;height:12px;border-radius:999px;display:inline-block;flex:none;
  border:2px solid rgba(0,138,204,.35);
  border-top-color:#00b3ff;
  animation: spin .8s linear infinite;
}

.grid{
  display:grid;
  grid-template-columns: 1.2fr .8fr;
  gap:16px;
  margin-top:16px;
}
@media (max-width: 980px){
  .grid{grid-template-columns:1fr}
  .right{justify-content:flex-start}
}

.card{
  border:1px solid var(--line);
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding:16px;
  backdrop-filter: blur(10px);
}
.card h2{margin:0 0 10px 0;font-size:15px}
.muted{color:var(--muted)}
.sep{height:1px;background:var(--line);margin:14px 0}

.row{display:flex;gap:10px;flex-wrap:wrap;align-items:end}
.field{display:flex;flex-direction:column;gap:6px;min-width:220px;flex:1}
label{font-size:12px;color:var(--muted)}
input, select, textarea{
  width:100%;
  padding:10px 11px;
  border-radius:12px;
  border:1px solid var(--line);
  background: rgba(0,0,0,.18);
  color: var(--text);
  outline:none;
  transition: .15s box-shadow, .15s border-color;
}
textarea{min-height:92px;resize:vertical}
input:focus, select:focus, textarea:focus{
  border-color: rgba(0,138,204,.8);
  box-shadow: 0 0 0 4px rgba(0,138,204,.22);
}

.btn{
  border:1px solid transparent;
  background: linear-gradient(135deg, rgba(0,138,204,.95), rgba(33,39,183,.9));
  color:white;
  padding:9px 12px;
  border-radius:12px;
  cursor:pointer;
  font-weight:800;
  font-size:13px;
  transition:.15s transform, .15s opacity;
  box-shadow: 0 12px 28px rgba(0,138,204,.18);
}
.btn:hover{transform: translateY(-1px)}
.btn:active{transform: translateY(0px);opacity:.92}
.btn.secondary{
  background: rgba(255,255,255,.04);
  border-color: var(--line);
  box-shadow:none;
}
.btn.good{
  background: linear-gradient(135deg, rgba(39,183,33,.95), rgba(0,138,204,.65));
}
.btn.danger{
  background: rgba(183,33,39,.18);
  border:1px solid rgba(183,33,39,.55);
  color:#ffd6d6;
  box-shadow:none;
}
.btn.warn{
  background: rgba(163,119,0,.18);
  border:1px solid rgba(163,119,0,.55);
  color:#ffe9b8;
  box-shadow:none;
}
.btn.is-loading{
  position:relative;
  pointer-events:none;
  opacity:.86;
  padding-left:34px;
}
.btn.is-loading::before{
  content:"";
  position:absolute;
  left:12px;
  top:50%;
  width:14px;height:14px;
  margin-top:-7px;
  border-radius:999px;
  border:2px solid rgba(255,255,255,.35);
  border-top-color:#fff;
  animation: spin .7s linear infinite;
}

.table{
  width:100%;
  border-collapse: collapse;
  overflow:hidden;
  border-radius: 14px;
  border:1px solid var(--line);
}
.table th, .table td{
  padding:10px 10px;
  text-align:left;
  border-bottom:1px solid var(--line);
  font-size:13px;
  vertical-align:top;
}
.table th{color:var(--muted);font-weight:800;background: rgba(0,0,0,.16)}
.table tr:last-child td{border-bottom:none}

.tag{
  display:inline-flex;align-items:center;gap:6px;
  padding:5px 9px;border-radius:999px;
  border:1px solid var(--line);
  font-size:12px;color:var(--muted);
  background: rgba(0,0,0,.12);
}
.tag.good{border-color: rgba(39,183,33,.55); color:#ccffd0}
.tag.bad{border-color: rgba(183,33,39,.55); color:#ffd0d0}
.tag.warn{border-color: rgba(163,119,0,.55); color:#ffe9b8}
.tag.running{border-color: rgba(0,138,204,.55); color:#ccf3ff}

.navline{
  display:flex;gap:10px;flex-wrap:wrap;align-items:center;justify-content:space-between;
  margin-top:14px;
}
.links{display:flex;gap:8px;flex-wrap:wrap}
.link{
  display:inline-flex;align-items:center;gap:8px;
  padding:8px 10px;border-radius:12px;border:1px solid var(--line);
  background: rgba(255,255,255,.04);
  font-size:13px;font-weight:800;color:var(--text);
}
.link:hover{border-color: rgba(0,138,204,.75)}

.hint{
  margin-top:12px;
  padding:10px 12px;
  border:1px dashed rgba(255,255,255,.18);
  border-radius:14px;
  color:var(--muted);
  font-size:12px;
  background: rgba(0,0,0,.12);
}

.task-toast-host{
  position:fixed;
  top:14px;
  right:14px;
  width:min(420px, calc(100vw - 28px));
  display:flex;
  flex-direction:column;
  gap:10px;
  z-index:9999;
  pointer-events:none;
}
.task-toast{
  border:1px solid var(--line);
  background: rgba(10,14,26,.9);
  backdrop-filter: blur(8px);
  border-radius:14px;
  box-shadow: var(--shadow);
  padding:10px 12px;
  pointer-events:auto;
}
.task-toast .row{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:8px;
}
.task-toast .title{
  display:flex;
  align-items:center;
  gap:8px;
  font-size:13px;
  font-weight:800;
}
.task-toast .meta{
  margin-top:6px;
  font-size:12px;
  color:var(--muted);
}
.task-toast.ok{border-color: rgba(39,183,33,.55)}
.task-toast.warn{border-color: rgba(163,119,0,.55)}
.task-toast.error{border-color: rgba(183,33,39,.55)}
.task-toast.info{border-color: rgba(0,138,204,.55)}

@keyframes spin{
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
