/* Solinski Corp AB — identidade: preto Pantone Black C, branco, cinza; âmbar só para prazos; faixa holográfica do logo como único acento. */
:root {
  --ink: #000000;
  --panel: #141414;
  --raised: #1F1F1F;
  --line: #2C2C2C;
  --line-soft: #222222;
  --text: #FFFFFF;
  --muted: #A3A3A3;
  --dim: #6B6B6B;
  --amber: #F2A900;
  --red: #E5484D;
  --green: #30A46C;
  --violet: #6E56CF;
  --holo: linear-gradient(90deg, #ff4d6d, #ffb74d, #ffee58, #66bb6a, #29b6f6, #7e57c2, #ff4d6d);
  --radius: 10px;
  --radius-sm: 6px;
  --font: "Avenir Next", "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--ink); color: var(--text); font-family: var(--font);
  font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased;
  padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px);
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* ---------- barra superior */
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 24px; padding: 10px 20px 12px; background: var(--ink); }
.brand { display: flex; align-items: center; gap: 14px; }
.brand-logo { height: 26px; width: auto; display: block; }
.brand-ab { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; letter-spacing: .18em; font-size: 14px; color: var(--muted); border-left: 1px solid var(--line); padding-left: 14px; }
.aby-mark { width: 18px; height: 18px; }
.topnav { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.topnav a { padding: 7px 12px; border-radius: 999px; color: var(--muted); font-weight: 500; }
.topnav a:hover, .topnav a[aria-current="page"] { color: var(--text); background: var(--panel); }
.holo-line { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--holo); background-size: 200% 100%; opacity: .85; }
.avatar { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--raised); border: 1px solid var(--line); font-size: 12px; font-weight: 600; color: var(--text); }
.avatar-link { padding: 2px !important; }
.inline { display: inline; }

/* ---------- botões e campos */
.btn, .btn-primary, .btn-ghost, .btn-danger { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; font-weight: 500; line-height: 1; white-space: nowrap; transition: background .12s, border-color .12s; }
.btn:hover { background: var(--raised); border-color: #3a3a3a; }
.btn-primary { background: var(--text); color: var(--ink); border-color: var(--text); }
.btn-primary:hover { background: #e6e6e6; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--text); background: var(--panel); }
.btn-danger { color: var(--red); border-color: transparent; background: transparent; }
.btn-danger:hover { background: rgba(229,72,77,.12); }
.btn-sm { padding: 5px 10px; font-size: 13px; }
.field { width: 100%; padding: 9px 12px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--ink); color: var(--text); }
.field:focus { border-color: #4a4a4a; outline: none; }
textarea.field { min-height: 90px; resize: vertical; }
select.field { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
label.lbl { display: block; font-size: 13px; color: var(--muted); margin: 0 0 6px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.small { font-size: 13px; }
.hint { font-size: 13px; color: var(--muted); margin: 6px 0 0; }
hr.sep { border: 0; border-top: 1px solid var(--line-soft); margin: 18px 0; }
.check { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.check input { width: 18px; height: 18px; accent-color: var(--text); }

/* ---------- páginas */
.page { max-width: 1180px; margin: 0 auto; padding: 28px 20px 60px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
h1 { font-size: 26px; font-weight: 600; margin: 0; letter-spacing: -.01em; }
h2 { font-size: 17px; font-weight: 600; margin: 0 0 12px; }
.panel { background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 18px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 860px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* ---------- login */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(420px, 100%); }
.login-logo { display: block; width: 100%; max-width: 360px; margin: 0 auto 28px; }
.login-card .panel { padding: 26px; }
.login-sub { color: var(--muted); margin: 0 0 20px; }
.login-ab { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 600; letter-spacing: .14em; margin: 0 0 4px; }
.login-ab img { width: 26px; height: 26px; }
.alert { padding: 10px 12px; border-radius: var(--radius-sm); background: rgba(229,72,77,.12); color: #ff8a8f; margin-bottom: 14px; font-size: 14px; }
.alert-ok { background: rgba(48,164,108,.14); color: #6ad39a; }

/* ---------- início */
.boards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.board-tile { display: block; padding: 16px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line-soft); min-height: 92px; position: relative; overflow: hidden; }
.board-tile:hover { border-color: #3a3a3a; background: var(--raised); }
.board-tile .name { font-weight: 600; display: block; margin-bottom: 4px; }
.board-tile .meta { font-size: 13px; color: var(--muted); }
.board-tile.new { border-style: dashed; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.task-list { list-style: none; margin: 0; padding: 0; }
.task-list li { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line-soft); cursor: pointer; }
.task-list li:last-child { border-bottom: 0; }
.task-list .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-list .b { font-size: 12px; color: var(--dim); }
.empty { padding: 26px 10px; text-align: center; color: var(--muted); }
.empty svg { width: 54px; height: 54px; display: block; margin: 0 auto 8px; opacity: .8; }

/* ---------- quadro */
.board-page { padding: 18px 20px 0; max-width: none; height: calc(100vh - 56px); display: flex; flex-direction: column; }
.board-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.board-head h1 { font-size: 22px; }
.board-head .vis { font-size: 12px; color: var(--muted); border: 1px solid var(--line); padding: 3px 9px; border-radius: 999px; }
.board-tools { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.board-tools .field { width: 220px; padding: 7px 11px; }
.lists { flex: 1; display: flex; gap: 14px; overflow-x: auto; overflow-y: hidden; padding-bottom: 18px; align-items: flex-start; scroll-snap-type: x proximity; }
.list { flex: 0 0 290px; max-height: 100%; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius); scroll-snap-align: start; }
.list-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px 8px; cursor: grab; }
.list-head h3 { margin: 0; font-size: 15px; font-weight: 600; flex: 1; }
.list-head .count { font-size: 12px; color: var(--muted); }
.list-head .count.over { color: var(--amber); }
.list-head .done-mark { color: var(--green); font-size: 12px; }
.cards { flex: 1; overflow-y: auto; padding: 4px 10px 10px; display: flex; flex-direction: column; gap: 8px; min-height: 40px; }
.card { background: var(--raised); border: 1px solid var(--line-soft); border-radius: var(--radius-sm); padding: 10px 12px; cursor: pointer; position: relative; }
.card:hover { border-color: #3a3a3a; }
.card.dragging { opacity: .55; }
.card .cover { height: 6px; border-radius: 4px; margin: -4px -4px 8px; }
.card .title { font-weight: 500; display: block; word-wrap: break-word; }
.card.done .title { color: var(--muted); text-decoration: line-through; }
.card .labels { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 6px; }
.label-dot { height: 6px; width: 34px; border-radius: 3px; }
.card .foot { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.card .foot .right { margin-left: auto; display: flex; gap: 4px; }
.avatar.xs { width: 22px; height: 22px; font-size: 10px; }
.due { display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: 999px; border: 1px solid var(--line); }
.due.soon { color: var(--amber); border-color: rgba(242,169,0,.5); }
.due.late { color: var(--red); border-color: rgba(229,72,77,.55); }
.due.ok { color: var(--green); border-color: rgba(48,164,108,.5); }
.pending-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); display: inline-block; }
.paw { width: 14px; height: 14px; }
.paw.urgente { color: var(--red); } .paw.alta { color: var(--amber); } .paw.media { color: var(--muted); } .paw.baixa { color: var(--dim); }
.add-card { margin: 0 10px 10px; }
.add-card input { width: 100%; padding: 8px 10px; border-radius: var(--radius-sm); border: 1px dashed var(--line); background: transparent; color: var(--text); }
.add-card input:focus { border-style: solid; outline: none; border-color: #4a4a4a; }
.list.new-list { background: transparent; border-style: dashed; flex-basis: 260px; }
.list.new-list form { padding: 10px; }
.sleeping { padding: 18px 8px; text-align: center; color: var(--dim); font-size: 13px; }
.sleeping svg { width: 44px; height: 44px; display: block; margin: 0 auto 4px; opacity: .7; }
.list.sortable-ghost { opacity: .4; }
details.menu { position: relative; }
details.menu summary { list-style: none; cursor: pointer; }
details.menu summary::-webkit-details-marker { display: none; }
details.menu .menu-body { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; width: 300px; background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: 0 16px 40px rgba(0,0,0,.6); }
.member-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 14px; }
.member-row .r { color: var(--dim); font-size: 12px; }
.member-row form { margin-left: auto; }
@media (max-width: 760px) {
  .board-page { height: auto; }
  .lists { flex-direction: column; overflow: visible; align-items: stretch; }
  .list { flex-basis: auto; max-height: none; }
  .topbar { gap: 12px; padding: 10px 14px 12px; }
  .brand-logo { height: 20px; } .brand-ab { display: none; }
  .topnav a:not(.avatar-link) { display: none; }
  .board-tools .field { width: 100%; }
}

/* ---------- modal do cartão */
.modal[hidden] { display: none; }
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: start center; overflow-y: auto; padding: 40px 12px; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.72); }
.modal-panel { position: relative; width: min(880px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 30px 80px rgba(0,0,0,.7); }
body.modal-open { overflow: hidden; }
.card-detail { display: grid; grid-template-columns: 1fr 240px; gap: 0; }
.card-main { padding: 24px 26px; border-right: 1px solid var(--line-soft); min-width: 0; }
.card-side { padding: 24px 20px; display: flex; flex-direction: column; gap: 18px; }
.card-side h4 { margin: 0 0 8px; font-size: 12px; color: var(--muted); font-weight: 500; }
.card-side .stack { display: flex; flex-direction: column; gap: 6px; }
.card-title-input { width: 100%; font-size: 22px; font-weight: 600; background: transparent; border: 1px solid transparent; border-radius: 6px; padding: 4px 6px; margin-left: -6px; }
.card-title-input:hover, .card-title-input:focus { border-color: var(--line); background: var(--ink); outline: none; }
.card-crumb { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.close-x { position: absolute; top: 12px; right: 14px; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--raised); cursor: pointer; display: grid; place-items: center; color: var(--muted); }
.close-x:hover { color: var(--text); }
.section { margin-top: 22px; }
.section h3 { font-size: 14px; font-weight: 600; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.prose { color: var(--text); }
.prose p { margin: 0 0 8px; }
.prose code { background: var(--ink); padding: 1px 5px; border-radius: 4px; }
.prose a { color: var(--amber); text-decoration: underline; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 13px; border: 1px solid var(--line); background: var(--raised); cursor: pointer; }
.chip.on { background: var(--text); color: var(--ink); border-color: var(--text); }
.chip .sw { width: 10px; height: 10px; border-radius: 50%; }
.assignee { display: flex; align-items: center; gap: 8px; padding: 6px 0; }
.assignee .nm { flex: 1; font-size: 14px; }
.assignee .st { font-size: 12px; color: var(--muted); }
.assignee .st.wait { color: var(--amber); }
.assignee .st.ok { color: var(--green); }
.accept-box { border: 1px solid rgba(242,169,0,.5); background: rgba(242,169,0,.08); border-radius: var(--radius); padding: 14px 16px; display: flex; gap: 14px; align-items: center; }
.accept-box p { margin: 0; flex: 1; }
.checklist li { display: flex; align-items: center; gap: 10px; padding: 6px 0; list-style: none; }
.checklist li.done span { text-decoration: line-through; color: var(--muted); }
.checklist li span { flex: 1; }
.checklist { margin: 0; padding: 0; }
.progress { height: 6px; background: var(--ink); border-radius: 3px; overflow: hidden; margin: 6px 0 8px; }
.progress i { display: block; height: 100%; background: var(--green); }
.comment { padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.comment:last-child { border: 0; }
.comment .who { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.comment .who b { color: var(--text); font-weight: 600; }
.activity li { font-size: 13px; color: var(--muted); padding: 4px 0; list-style: none; }
.activity li b { color: var(--text); font-weight: 500; }
.activity { padding: 0; margin: 0; }
.att { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 14px; }
.att .sz { color: var(--dim); font-size: 12px; }
.att form { margin-left: auto; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 13px; color: var(--muted); }
.kv b { color: var(--text); font-weight: 500; }
@media (max-width: 720px) { .card-detail { grid-template-columns: 1fr; } .card-main { border-right: 0; border-bottom: 1px solid var(--line-soft); } }

/* ---------- indicadores */
.stat { padding: 16px 18px; }
.stat .n { font-size: 30px; font-weight: 600; letter-spacing: -.02em; }
.stat .l { color: var(--muted); font-size: 13px; }
.stat.warn .n { color: var(--amber); } .stat.bad .n { color: var(--red); } .stat.good .n { color: var(--green); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-weight: 500; color: var(--muted); font-size: 13px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 10px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.bar { height: 8px; background: var(--ink); border-radius: 4px; overflow: hidden; min-width: 80px; }
.bar i { display: block; height: 100%; background: var(--text); }
.bar.over i { background: var(--amber); }
.wrap-x { overflow-x: auto; }

/* ---------- toasts */
#toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 60; pointer-events: none; }
.toast { background: var(--raised); border: 1px solid var(--line); color: var(--text); padding: 10px 16px; border-radius: 999px; font-size: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.6); }
.toast-erro { border-color: rgba(229,72,77,.6); color: #ff8a8f; }
