:root {
  color-scheme: dark;
  --bg: #0c0d11;
  --s1: #14161c;
  --s2: #1b1e26;
  --s3: #232733;
  --line: #262a35;
  --line2: #333847;
  --text: #e7e9ef;
  --muted: #8a90a2;
  --dim: #5f6577;
  --accent: #7c5cff;
  --accent2: #4f8cff;
  --ok: #3ecf8e;
  --warn: #f5b74f;
  --bad: #ff6b6b;
  --r: 12px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font: 14.5px/1.5 Inter, "Segoe UI", system-ui, -apple-system, sans-serif; -webkit-font-smoothing: antialiased; min-height: 100vh; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
svg { flex: none; }
.hidden { display: none !important; }
.i { display: contents; }

/* botões */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--line2); background: var(--s2); cursor: pointer; font-weight: 550; white-space: nowrap; transition: background .15s, border-color .15s, transform .1s, filter .15s; }
.btn:hover { background: var(--s3); border-color: #444b5e; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: default; pointer-events: none; }
.btn.primary { background: linear-gradient(135deg, var(--accent), var(--accent2)); border-color: transparent; color: #fff; }
.btn.primary:hover { filter: brightness(1.12); }
.btn.danger { background: transparent; color: var(--bad); border-color: #4a2a30; }
.btn.danger:hover { background: #2a171b; border-color: var(--bad); }
.btn.sm { height: 30px; padding: 0 11px; font-size: 13px; border-radius: 8px; }
.icon-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--muted); cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.icon-btn:hover { background: var(--s3); color: var(--text); border-color: var(--line2); }
.icon-btn.del:hover { color: var(--bad); border-color: #4a2a30; background: #2a171b; }

/* campos */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12.5px; color: var(--muted); font-weight: 550; }
.input { height: 40px; width: 100%; padding: 0 12px; border-radius: 9px; border: 1px solid var(--line2); background: #0f1116; outline: none; transition: border-color .15s, box-shadow .15s; }
.input:hover { border-color: #444b5e; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(124, 92, 255, .18); }
select.input { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a90a2' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
.suffix { display: flex; align-items: center; border-radius: 9px; border: 1px solid var(--line2); background: #0f1116; transition: border-color .15s, box-shadow .15s; }
.suffix:hover { border-color: #444b5e; }
.suffix:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(124, 92, 255, .18); }
.suffix input { flex: 1; min-width: 0; height: 40px; padding: 0 4px 0 12px; border: 0; background: transparent; outline: none; }
.suffix span { padding-right: 12px; color: var(--dim); }

/* login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px 16px; background: radial-gradient(800px 400px at 50% -10%, rgba(124, 92, 255, .16), transparent 70%); }
.login-box { width: 100%; max-width: 360px; background: var(--s1); border: 1px solid var(--line); border-radius: 16px; padding: 30px 26px; box-shadow: 0 20px 60px rgba(0, 0, 0, .35); }
.login-box .brand { justify-content: center; margin-bottom: 24px; font-size: 19px; }
.login-box form { display: flex; flex-direction: column; gap: 12px; }
.login-box .btn { height: 42px; margin-top: 4px; }
.form-erro { color: var(--bad); font-size: 13px; min-height: 18px; margin: -2px 0 0; }

/* topo */
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; letter-spacing: -.01em; }
.brand img { width: 28px; height: 28px; }
.top { position: sticky; top: 0; z-index: 10; background: rgba(12, 13, 17, .85); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top-in { max-width: 1080px; margin: 0 auto; display: flex; align-items: center; gap: 22px; height: 60px; padding: 0 20px; }
.nav { display: flex; gap: 4px; flex: 1; }
.nav a { display: flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 8px; color: var(--muted); font-weight: 550; transition: background .15s, color .15s; }
.nav a:hover { background: var(--s2); color: var(--text); }
.nav a.on { background: var(--s2); color: var(--text); }
.me { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.avatar { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--s3); color: var(--text); font-weight: 700; font-size: 13px; text-transform: uppercase; }

/* página */
.wrap { max-width: 1080px; margin: 0 auto; padding: 28px 20px 80px; }
.head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
h1 { margin: 0; font-size: 22px; letter-spacing: -.02em; }
.vazio { border: 1px dashed var(--line2); border-radius: var(--r); padding: 48px 20px; text-align: center; color: var(--muted); }

/* projetos */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.card { position: relative; display: flex; flex-direction: column; gap: 12px; background: var(--s1); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; transition: border-color .15s, transform .15s, box-shadow .15s; }
.card:hover { border-color: var(--line2); transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.card.drag { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(124, 92, 255, .2); }
.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.card-name { font-weight: 650; font-size: 16px; line-height: 32px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-tools { display: flex; gap: 2px; margin: 0 -6px 0 0; opacity: .6; transition: opacity .15s; }
.card:hover .card-tools { opacity: 1; }
.dom { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; color: var(--muted); font-size: 13.5px; transition: color .15s; }
.dom span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.dom:hover { color: var(--text); }
.row-title.dom { color: var(--text); font-size: 14.5px; }
a.dom:hover .ext { opacity: 1; transform: translate(1px, -1px); }
.ext { opacity: .5; transition: opacity .15s, transform .15s; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--dim); flex: none; }
.dot.pronto { background: var(--ok); box-shadow: 0 0 0 3px rgba(62, 207, 142, .15); }
.dot.configurando { background: var(--warn); animation: pulse 1.2s infinite; }
.dot.erro { background: var(--bad); }
@keyframes pulse { 50% { opacity: .35; } }
.meta { font-size: 12.5px; color: var(--dim); }
.drop { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 16px; border: 1px dashed var(--line2); border-radius: 10px; color: var(--dim); font-size: 13px; transition: border-color .15s, background .15s, color .15s; }
.card:hover .drop { border-color: #3d4354; color: var(--muted); }
.card.drag .drop { border-color: var(--accent); background: rgba(124, 92, 255, .07); color: var(--text); }
.drop-btns { display: flex; gap: 8px; }
.prog { display: flex; flex-direction: column; gap: 8px; padding: 16px; border: 1px solid var(--line2); border-radius: 10px; font-size: 13px; color: var(--muted); }
.bar { height: 6px; border-radius: 6px; background: var(--s3); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent2)); transition: width .2s; }

/* listas */
.panel { background: var(--s1); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.row { display: flex; align-items: center; gap: 14px; padding: 13px 16px; border-top: 1px solid var(--line); transition: background .15s; }
.row:first-child { border-top: 0; }
.row:hover { background: var(--s2); }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row-title { font-weight: 600; display: flex; align-items: center; gap: 9px; overflow: hidden; }
.row-title span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-sub { font-size: 12.5px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-sub.bad { color: var(--bad); }
.row-tools { display: flex; align-items: center; gap: 4px; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--s3); color: var(--muted); white-space: nowrap; }
.pill.pronto { background: rgba(62, 207, 142, .12); color: var(--ok); }
.pill.configurando { background: rgba(245, 183, 79, .12); color: var(--warn); }
.pill.erro { background: rgba(255, 107, 107, .12); color: var(--bad); }
.add { display: flex; gap: 10px; margin-bottom: 16px; }
.add .suffix { flex: 1; max-width: 420px; }
.add .btn { height: 42px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 99px; background: var(--s3); color: var(--muted); font-size: 12px; font-weight: 550; }

/* escolha de projetos */
.picks { display: flex; flex-wrap: wrap; gap: 8px; }
.pick { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line2); background: transparent; cursor: pointer; color: var(--muted); font-size: 13px; transition: all .15s; }
.pick:hover { border-color: #4a5164; color: var(--text); }
.pick.on { border-color: var(--accent); background: rgba(124, 92, 255, .14); color: var(--text); }
.pick svg { display: none; }
.pick.on svg { display: block; }

/* modal */
.modal-bg { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(5, 6, 9, .65); backdrop-filter: blur(3px); animation: fade .15s; }
.modal { width: 100%; max-width: 440px; max-height: calc(100vh - 32px); overflow: auto; background: var(--s1); border: 1px solid var(--line2); border-radius: 16px; padding: 22px; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); animation: up .18s; }
.modal h2 { margin: 0 0 18px; font-size: 17px; }
.modal form { display: flex; flex-direction: column; gap: 14px; }
.modal p { margin: 0 0 18px; color: var(--muted); }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { opacity: 0; transform: translateY(8px) scale(.98); } }

/* avisos */
#toasts { position: fixed; z-index: 60; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.toast { padding: 10px 14px; border-radius: 10px; background: var(--s3); border: 1px solid var(--line2); box-shadow: 0 10px 30px rgba(0, 0, 0, .4); font-size: 13.5px; animation: up .18s; max-width: calc(100vw - 32px); }
.toast.bad { border-color: #5a2a31; color: #ffb3b3; }
.toast.ok { border-color: #1f4a39; }

/* dica no hover */
[data-tip] { position: relative; }
[data-tip]:hover::after { content: attr(data-tip); position: absolute; z-index: 20; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); padding: 5px 9px; border-radius: 7px; background: #000; border: 1px solid var(--line2); color: var(--text); font-size: 12px; font-weight: 500; white-space: nowrap; pointer-events: none; }

@media (max-width: 640px) {
  .top-in { gap: 10px; padding: 0 16px; }
  .brand b { display: none; }
  .nav a { padding: 7px 9px; }
  .nav a svg { display: none; }
  .me .nome, .me .avatar { display: none; }
  .nav { gap: 0; overflow-x: auto; }
  .wrap { padding: 22px 16px 60px; }
  .grid { grid-template-columns: 1fr; }
  .add { flex-direction: column; }
  .add .suffix { max-width: none; }
  .row { flex-wrap: wrap; }
}
.form-erro:empty { display: none; }
