:root {
  --bg: #05060a;
  --text: #f3f5fb;
  --muted: #9aa3b8;
  --faint: #6b7489;
  --accent: #7c8cff;
  --accent-2: #b77cff;
  --good: #5ee1b5;
  --warn: #ffb86b;
  --bad: #ff6b7a;
  --glass: rgba(255, 255, 255, 0.055);
  --glass-strong: rgba(255, 255, 255, 0.09);
  --glass-border: rgba(255, 255, 255, 0.13);
  --glass-hi: rgba(255, 255, 255, 0.22);
  --radius: 20px;
  --radius-sm: 12px;
  --sidebar: 268px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14.5px/1.5 -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
::selection { background: rgba(124, 140, 255, 0.4); }
* { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.16); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- fundo líquido ---------- */
.bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.55; will-change: transform; }
.blob.b1 { width: 46vmax; height: 46vmax; left: -12vmax; top: -14vmax; background: radial-gradient(circle at 30% 30%, #4b5bff, transparent 65%); animation: float1 26s ease-in-out infinite alternate; }
.blob.b2 { width: 40vmax; height: 40vmax; right: -10vmax; top: 18vh; background: radial-gradient(circle at 60% 40%, #a24bff, transparent 65%); animation: float2 32s ease-in-out infinite alternate; opacity: .42; }
.blob.b3 { width: 36vmax; height: 36vmax; left: 22vw; bottom: -18vmax; background: radial-gradient(circle at 50% 50%, #12b8a6, transparent 65%); animation: float3 36s ease-in-out infinite alternate; opacity: .32; }
@keyframes float1 { to { transform: translate(14vmax, 10vmax) scale(1.15); } }
@keyframes float2 { to { transform: translate(-12vmax, -8vmax) scale(1.1); } }
@keyframes float3 { to { transform: translate(10vmax, -12vmax) scale(1.2); } }
.grain { position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .05; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }
@media (prefers-reduced-motion: reduce) { .blob { animation: none; } * { transition: none !important; } }

/* ---------- vidro ---------- */
.glass {
  position: relative;
  background: linear-gradient(135deg, var(--glass-strong), var(--glass));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  backdrop-filter: blur(26px) saturate(170%);
  -webkit-backdrop-filter: blur(26px) saturate(170%);
  box-shadow: inset 0 1px 0 var(--glass-hi), inset 0 -1px 0 rgba(255,255,255,.04), 0 10px 40px -12px rgba(0,0,0,.6);
}
.glass::before { /* brilho especular */
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(120% 80% at 0% 0%, rgba(255,255,255,.14), transparent 45%);
  mask: linear-gradient(#000, transparent 70%); -webkit-mask: linear-gradient(#000, transparent 70%);
  opacity: .8;
}

/* ---------- app shell ---------- */
#app { position: relative; z-index: 1; display: flex; height: 100dvh; gap: 14px; padding: 14px; }
.sidebar { width: var(--sidebar); flex: none; display: flex; flex-direction: column; padding: 18px 14px; gap: 6px; overflow: hidden; }
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 16px; font-weight: 700; font-size: 19px; letter-spacing: -.02em; }
.logo { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 6px 20px -4px rgba(124,140,255,.7), inset 0 1px 0 rgba(255,255,255,.5); }
.nav { display: flex; flex-direction: column; gap: 3px; }
.nav-item { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: var(--radius-sm); color: var(--muted); text-decoration: none; border: 1px solid transparent; transition: all .2s var(--ease); background: none; text-align: left; width: 100%; }
.nav-item:hover { background: rgba(255,255,255,.06); color: var(--text); }
.nav-item.active { background: rgba(255,255,255,.1); color: var(--text); border-color: var(--glass-border); box-shadow: inset 0 1px 0 rgba(255,255,255,.15); }
.nav-item .dot { width: 10px; height: 10px; border-radius: 4px; flex: none; }
.nav-item .count { margin-left: auto; font-size: 12px; color: var(--faint); }
.nav-title { display: flex; align-items: center; justify-content: space-between; padding: 16px 12px 6px; font-size: 11.5px; letter-spacing: .09em; text-transform: uppercase; color: var(--faint); }
.projects-nav { overflow-y: auto; flex: 1; min-height: 0; margin: 0 -6px; padding: 0 6px; }
.me { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; background: rgba(255,255,255,.06); border: 1px solid var(--glass-border); cursor: pointer; text-align: left; width: 100%; margin-top: 8px; }
.me:hover { background: rgba(255,255,255,.1); }
.me .who { min-width: 0; flex: 1; }
.me .who b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me .who small { color: var(--faint); font-size: 12px; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 18px; }
.menu-btn { display: none; }
.search { position: relative; flex: 1; max-width: 460px; }
.search input { width: 100%; padding: 10px 14px 10px 40px; border-radius: 13px; border: 1px solid var(--glass-border); background: rgba(0,0,0,.25); outline: none; transition: border-color .2s, box-shadow .2s; }
.search input:focus { border-color: rgba(124,140,255,.7); box-shadow: 0 0 0 4px rgba(124,140,255,.15); }
.search > .ico { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.search-results { position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 30; padding: 6px; max-height: 340px; overflow-y: auto; background: rgba(14,16,26,.92); }
.search-results button { display: flex; gap: 10px; align-items: center; width: 100%; padding: 9px 10px; border-radius: 10px; background: none; border: 0; text-align: left; }
.search-results button:hover { background: rgba(255,255,255,.08); }
.search-results small { color: var(--faint); margin-left: auto; white-space: nowrap; }
.spacer { flex: 1; }
.content { flex: 1; min-height: 0; overflow: auto; border-radius: var(--radius); padding: 2px; }
.page { padding: 6px 4px 30px; animation: rise .45s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.page-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 4px 4px 18px; }
.page-head h1 { margin: 0; font-size: 26px; letter-spacing: -.02em; font-weight: 700; }
.page-head p { margin: 2px 0 0; color: var(--muted); }

/* ---------- controles ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 15px; border-radius: 12px; border: 1px solid var(--glass-border); background: rgba(255,255,255,.07); transition: all .2s var(--ease); white-space: nowrap; }
.btn:hover { background: rgba(255,255,255,.14); transform: translateY(-1px); }
.btn:active { transform: none; }
.btn.primary { background: linear-gradient(135deg, #6a7bff, #a46bff); border-color: rgba(255,255,255,.3); box-shadow: 0 8px 24px -8px rgba(124,140,255,.9), inset 0 1px 0 rgba(255,255,255,.4); font-weight: 600; }
.btn.primary:hover { filter: brightness(1.1); }
.btn.danger { color: #ff9aa6; }
.btn.danger:hover { background: rgba(255,107,122,.18); }
.btn.ghost { background: none; border-color: transparent; }
.btn.ghost:hover { background: rgba(255,255,255,.08); }
.btn.icon { padding: 9px; }
.btn.sm { padding: 6px 10px; font-size: 13px; border-radius: 10px; }
.input, .select, .textarea { width: 100%; padding: 10px 13px; border-radius: 12px; border: 1px solid var(--glass-border); background: rgba(0,0,0,.28); outline: none; transition: border-color .2s, box-shadow .2s; }
.input:focus, .select:focus, .textarea:focus { border-color: rgba(124,140,255,.75); box-shadow: 0 0 0 4px rgba(124,140,255,.15); }
.select { appearance: none; padding-right: 32px; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%239aa3b8' stroke-width='2' stroke-linecap='round'><path d='M2 4l4 4 4-4'/></svg>"); background-repeat: no-repeat; background-position: right 12px center; }
.select option { background: #12141f; color: var(--text); }
.textarea { resize: vertical; min-height: 90px; line-height: 1.55; }
input[type=date] { color-scheme: dark; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label, .lbl { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--faint); }
.row { display: flex; gap: 12px; } .row > * { flex: 1; min-width: 0; }
.seg { display: inline-flex; padding: 4px; border-radius: 14px; background: rgba(0,0,0,.28); border: 1px solid var(--glass-border); gap: 2px; }
.seg button { display: flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 10px; border: 0; background: none; color: var(--muted); transition: all .2s; }
.seg button.active { background: rgba(255,255,255,.14); color: var(--text); box-shadow: inset 0 1px 0 rgba(255,255,255,.2); }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 12px; background: rgba(255,255,255,.08); border: 1px solid var(--glass-border); color: var(--muted); white-space: nowrap; }
.chip.over { color: #ff9aa6; background: rgba(255,107,122,.14); border-color: rgba(255,107,122,.35); }
.chip.today { color: #ffd08f; background: rgba(255,184,107,.14); border-color: rgba(255,184,107,.35); }
.chip.ok { color: #8cf0cc; background: rgba(94,225,181,.12); border-color: rgba(94,225,181,.3); }
.avatar { flex: none; display: grid; place-items: center; border-radius: 50%; font-weight: 700; color: #0b0d16; border: 2px solid rgba(5,6,10,.7); text-shadow: 0 1px 0 rgba(255,255,255,.25); }
.avatars { display: flex; } .avatars .avatar + .avatar { margin-left: -8px; }
.ico { display: inline-flex; flex: none; }
.empty { text-align: center; padding: 50px 20px; color: var(--muted); }
.empty .big { font-size: 40px; margin-bottom: 6px; }

/* ---------- filtros ---------- */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 4px 14px; }
.toolbar .select { width: auto; min-width: 150px; padding-top: 8px; padding-bottom: 8px; }
.progress { height: 7px; border-radius: 7px; background: rgba(255,255,255,.1); overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: 7px; background: linear-gradient(90deg, var(--accent), var(--good)); transition: width .5s var(--ease); }

/* ---------- quadro kanban ---------- */
.board { display: flex; gap: 14px; align-items: flex-start; overflow-x: auto; padding: 2px 4px 20px; height: 100%; scroll-snap-type: x proximity; }
.column { width: 300px; flex: none; max-height: 100%; display: flex; flex-direction: column; border-radius: 18px; padding: 12px 10px 10px; scroll-snap-align: start; background: linear-gradient(160deg, rgba(255,255,255,.07), rgba(255,255,255,.03)); border: 1px solid var(--glass-border); backdrop-filter: blur(22px) saturate(160%); -webkit-backdrop-filter: blur(22px) saturate(160%); box-shadow: inset 0 1px 0 rgba(255,255,255,.14); transition: box-shadow .2s, border-color .2s; }
.column.over { border-color: rgba(124,140,255,.6); box-shadow: 0 0 0 3px rgba(124,140,255,.18), inset 0 1px 0 rgba(255,255,255,.14); }
.col-head { display: flex; align-items: center; gap: 8px; padding: 2px 6px 10px; }
.col-head h3 { margin: 0; font-size: 14px; font-weight: 650; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.col-head .n { color: var(--faint); font-size: 12px; background: rgba(255,255,255,.08); padding: 1px 8px; border-radius: 999px; }
.col-head .tick { color: var(--good); }
.cards { display: flex; flex-direction: column; gap: 9px; overflow-y: auto; min-height: 28px; padding: 2px 2px 4px; flex: 1; }
.card { position: relative; padding: 11px 12px 10px; border-radius: 14px; cursor: grab; user-select: none; -webkit-user-select: none; background: linear-gradient(145deg, rgba(255,255,255,.12), rgba(255,255,255,.05)); border: 1px solid rgba(255,255,255,.14); box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 6px 18px -8px rgba(0,0,0,.7); transition: transform .18s var(--ease), border-color .2s, background .2s; -webkit-touch-callout: none; }
.card:hover { border-color: rgba(255,255,255,.3); transform: translateY(-2px); }
.card .labels { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.card .labels i { height: 6px; min-width: 34px; border-radius: 6px; display: block; }
.card .title { font-weight: 550; word-break: break-word; line-height: 1.38; }
.card.done .title { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(255,255,255,.3); }
.card .meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.card .meta .avatars { margin-left: auto; }
.card.placeholder { opacity: .25; border-style: dashed; }
.drag-ghost { position: fixed; z-index: 200; pointer-events: none; transform: rotate(2.5deg) scale(1.03); box-shadow: 0 24px 50px -10px rgba(0,0,0,.8), inset 0 1px 0 rgba(255,255,255,.3); opacity: .96; cursor: grabbing; }
body.dragging, body.dragging * { cursor: grabbing !important; }
.add-card { display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 8px; padding: 9px 10px; border-radius: 12px; background: none; border: 1px dashed transparent; color: var(--muted); text-align: left; }
.add-card:hover { background: rgba(255,255,255,.07); color: var(--text); border-color: var(--glass-border); }
.add-form { margin-top: 8px; display: flex; flex-direction: column; gap: 8px; }
.add-form textarea { min-height: 62px; }
.add-form .actions { display: flex; gap: 8px; }
.column.ghost-col { background: rgba(255,255,255,.03); border-style: dashed; }
.prio { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; }

/* ---------- lista ---------- */
.group { margin: 0 4px 16px; border-radius: 18px; overflow: hidden; }
.group-head { display: flex; align-items: center; gap: 10px; padding: 13px 16px; font-weight: 650; }
.group-head .n { color: var(--faint); font-weight: 400; }
.trow { display: grid; grid-template-columns: 24px minmax(0, 1fr) 130px 160px 110px 110px; gap: 12px; align-items: center; padding: 10px 16px; border-top: 1px solid rgba(255,255,255,.07); cursor: pointer; transition: background .15s; }
.trow:hover { background: rgba(255,255,255,.06); }
.trow.head { color: var(--faint); font-size: 11.5px; letter-spacing: .07em; text-transform: uppercase; cursor: default; padding-top: 7px; padding-bottom: 7px; }
.trow.head:hover { background: none; }
.trow .t { min-width: 0; font-weight: 520; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trow.done .t { color: var(--muted); text-decoration: line-through; }
.tick-btn { width: 20px; height: 20px; border-radius: 50%; border: 2px solid rgba(255,255,255,.3); background: none; display: grid; place-items: center; padding: 0; color: #06130e; transition: all .2s; }
.tick-btn:hover { border-color: var(--good); }
.tick-btn.on { background: var(--good); border-color: var(--good); }
.quick-add { display: flex; gap: 8px; padding: 10px 16px; border-top: 1px solid rgba(255,255,255,.07); }
.quick-add input { flex: 1; }

/* ---------- calendário ---------- */
.cal { margin: 0 4px; padding: 14px; }
.cal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.cal-head h2 { margin: 0; font-size: 18px; text-transform: capitalize; flex: 1; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-dow { text-align: center; font-size: 11.5px; color: var(--faint); letter-spacing: .08em; text-transform: uppercase; padding: 4px 0; }
.cal-day { min-height: 104px; padding: 6px; border-radius: 12px; background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.07); display: flex; flex-direction: column; gap: 4px; overflow: hidden; }
.cal-day.out { opacity: .35; }
.cal-day.today { border-color: rgba(124,140,255,.7); background: rgba(124,140,255,.1); }
.cal-day .d { font-size: 12px; color: var(--muted); font-weight: 600; }
.cal-task { font-size: 12px; padding: 3px 7px; border-radius: 7px; background: rgba(255,255,255,.1); border: 0; border-left: 3px solid var(--accent); text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 100%; }
.cal-task:hover { background: rgba(255,255,255,.2); }
.cal-task.done { opacity: .5; text-decoration: line-through; }
.cal-more { font-size: 11px; color: var(--faint); padding-left: 4px; }

/* ---------- início / equipe ---------- */
.grid { display: grid; gap: 14px; }
.grid.stats { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin: 0 4px 14px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); margin: 0 4px 14px; }
.grid.cards-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin: 0 4px; }
.stat { padding: 18px 20px; }
.stat .k { color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 8px; }
.stat .v { font-size: 34px; font-weight: 700; letter-spacing: -.03em; margin-top: 4px; }
.panel { padding: 18px 20px; }
.panel h3 { margin: 0 0 12px; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.list-item { display: flex; align-items: center; gap: 11px; padding: 9px 8px; border-radius: 11px; background: none; border: 0; width: 100%; text-align: left; }
button.list-item:hover { background: rgba(255,255,255,.07); }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .grow .tt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item small { color: var(--faint); }
.proj-card { padding: 18px; cursor: pointer; transition: transform .25s var(--ease), box-shadow .25s; text-align: left; border-radius: var(--radius); }
.proj-card:hover { transform: translateY(-4px); }
.proj-card h4 { margin: 10px 0 2px; font-size: 16px; }
.proj-card p { margin: 0 0 14px; color: var(--muted); font-size: 13px; min-height: 20px; }
.proj-card .bar { height: 4px; border-radius: 4px; width: 42px; }
.person { padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.person .top { display: flex; align-items: center; gap: 13px; }
.person h4 { margin: 0; font-size: 16px; }
.person .links { display: flex; flex-wrap: wrap; gap: 8px; }
.person .info { color: var(--muted); font-size: 13px; display: flex; flex-direction: column; gap: 4px; }
.link-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 10px; font-size: 13px; text-decoration: none; background: rgba(255,255,255,.07); border: 1px solid var(--glass-border); }
.link-btn:hover { background: rgba(255,255,255,.15); }
.link-btn.wa { color: #7dffb0; } .link-btn.tg { color: #7cc7ff; }

/* ---------- modais ---------- */
#modals { position: relative; z-index: 100; }
.overlay { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 5vh 16px; overflow-y: auto; background: rgba(2,3,8,.62); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; } }
.modal { width: 100%; max-width: 520px; padding: 24px; background: linear-gradient(135deg, rgba(40,44,66,.82), rgba(18,20,32,.88)); animation: pop .35s var(--ease); margin: auto 0; }
.modal.wide { max-width: 940px; }
@keyframes pop { from { opacity: 0; transform: translateY(18px) scale(.97); } }
.modal h2 { margin: 0 0 4px; font-size: 21px; letter-spacing: -.02em; }
.modal .sub { margin: 0 0 20px; color: var(--muted); }
.modal .actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }
.modal-x { position: absolute; top: 14px; right: 14px; z-index: 2; }
.task-modal { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 26px; }
.task-title { width: 100%; background: none; border: 1px solid transparent; font-size: 23px; font-weight: 700; letter-spacing: -.02em; padding: 6px 8px; margin: -6px -8px 4px; border-radius: 10px; outline: none; }
.task-title:hover { background: rgba(255,255,255,.05); }
.task-title:focus { background: rgba(0,0,0,.25); border-color: rgba(124,140,255,.6); }
.sec { margin-top: 22px; }
.sec > h4 { margin: 0 0 10px; font-size: 12px; letter-spacing: .07em; text-transform: uppercase; color: var(--faint); display: flex; align-items: center; gap: 8px; }
.side-box { display: flex; flex-direction: column; gap: 16px; }
.chk { display: flex; align-items: center; gap: 10px; padding: 6px 4px; border-radius: 9px; }
.chk:hover { background: rgba(255,255,255,.05); }
.chk span { flex: 1; min-width: 0; word-break: break-word; }
.chk.done span { color: var(--muted); text-decoration: line-through; }
.chk .x { opacity: 0; } .chk:hover .x { opacity: 1; }
@media (hover: none) { .chk .x { opacity: .7; } }
.cm { display: flex; gap: 10px; margin-bottom: 14px; }
.cm .bubble { flex: 1; min-width: 0; padding: 9px 13px; border-radius: 4px 14px 14px 14px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.08); }
.cm .bubble header { display: flex; gap: 8px; align-items: baseline; font-size: 13px; }
.cm .bubble header small { color: var(--faint); }
.cm .bubble p { margin: 3px 0 0; white-space: pre-wrap; word-break: break-word; }
.pick { display: flex; flex-wrap: wrap; gap: 7px; }
.pick button { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px 5px 6px; border-radius: 999px; border: 1px solid var(--glass-border); background: rgba(255,255,255,.05); color: var(--muted); font-size: 13px; transition: all .2s; }
.pick button.on { background: rgba(124,140,255,.22); border-color: rgba(124,140,255,.6); color: var(--text); }
.pick.lb button { padding: 4px 11px; }
.pick.lb button.on { color: #0b0d16; font-weight: 600; }
.log { font-size: 12.5px; color: var(--muted); padding: 3px 0; }
.log small { color: var(--faint); }

.menu { position: fixed; z-index: 150; min-width: 190px; padding: 6px; background: rgba(18,20,32,.94); animation: pop .2s var(--ease); }
.menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 11px; border-radius: 9px; background: none; border: 0; text-align: left; }
.menu button:hover { background: rgba(255,255,255,.1); }
.menu button.danger { color: #ff9aa6; }
.menu hr { border: 0; border-top: 1px solid rgba(255,255,255,.1); margin: 5px 0; }
.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 300; padding: 11px 18px; border-radius: 14px; animation: pop .3s var(--ease); background: rgba(20,22,34,.92); }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatches button { width: 28px; height: 28px; border-radius: 9px; border: 2px solid transparent; }
.swatches button.on { border-color: #fff; box-shadow: 0 0 0 2px rgba(255,255,255,.25); }
.welcome-users { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; max-height: 240px; overflow-y: auto; }
.welcome-users button { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--glass-border); background: rgba(255,255,255,.05); text-align: left; }
.welcome-users button:hover { background: rgba(255,255,255,.12); }
.or { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 12px; margin: 4px 0 14px; }
.or::before, .or::after { content: ''; flex: 1; border-top: 1px solid rgba(255,255,255,.1); }

/* ---------- responsivo ---------- */
.scrim { display: none; }
@media (max-width: 960px) {
  #app { padding: 8px; gap: 8px; }
  .sidebar { position: fixed; z-index: 90; top: 8px; bottom: 8px; left: 8px; width: min(300px, 86vw); transform: translateX(-115%); transition: transform .35s var(--ease); background: linear-gradient(135deg, rgba(34,38,58,.92), rgba(14,16,26,.95)); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; z-index: 80; background: rgba(0,0,0,.55); backdrop-filter: blur(4px); }
  .menu-btn { display: inline-flex; }
  .task-modal { grid-template-columns: 1fr; gap: 6px; }
  .trow { grid-template-columns: 24px minmax(0, 1fr) 100px; }
  .trow .c-assign, .trow .c-label, .trow .c-prio { display: none; }
  .trow.head .c-due { display: block; }
  .column { width: 84vw; max-width: 340px; }
  .page-head h1 { font-size: 22px; }
}
@media (max-width: 640px) {
  .topbar { padding: 8px 10px; gap: 8px; }
  .topbar .hide-sm { display: none; }
  .overlay { padding: 0; align-items: stretch; }
  .modal { max-width: none; border-radius: 0; min-height: 100dvh; margin: 0; padding: 20px 16px 28px; }
  .row { flex-direction: column; gap: 0; }
  .cal-day { min-height: 68px; padding: 4px; }
  .cal-task { font-size: 10.5px; padding: 2px 4px; }
  .grid.two, .grid.cards-grid { grid-template-columns: 1fr; }
  .toolbar .select { min-width: 0; flex: 1; }
  .seg button span.t { display: none; }
}

@media (max-width: 640px) {
  .toolbar .select { flex: 1 1 calc(50% - 6px); width: auto; }
  .toolbar .input { width: 100% !important; }
  .toolbar .seg { width: 100%; } .toolbar .seg button { flex: 1; justify-content: center; }
  .page-head .hide-sm { display: none; }
}

/* ================= refino v2: botões ================= */
.btn {
  min-height: 38px; font-weight: 550; letter-spacing: -.005em;
  background: linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.05));
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 1px 2px rgba(0,0,0,.35);
  position: relative; overflow: hidden; isolation: isolate;
}
.btn:hover { background: linear-gradient(180deg, rgba(255,255,255,.2), rgba(255,255,255,.08)); border-color: rgba(255,255,255,.26); transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255,255,255,.26), 0 6px 16px -6px rgba(0,0,0,.6); }
.btn:active { transform: translateY(0) scale(.97); box-shadow: inset 0 1px 3px rgba(0,0,0,.35); transition-duration: .08s; }
.btn:focus-visible, .nav-item:focus-visible, .card:focus-visible, .tick-btn:focus-visible, .pick button:focus-visible, .seg button:focus-visible { outline: 2px solid rgba(160,172,255,.95); outline-offset: 2px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn.primary { background: linear-gradient(135deg, #6f7fff 0%, #a56dff 100%); border-color: rgba(255,255,255,.35); text-shadow: 0 1px 1px rgba(30,20,80,.45); }
.btn.primary::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%); transform: translateX(-120%); transition: transform .7s var(--ease); }
.btn.primary:hover::after { transform: translateX(120%); }
.btn.primary:hover { background: linear-gradient(135deg, #7d8bff, #b17cff); filter: none; box-shadow: 0 12px 28px -10px rgba(140,120,255,.95), inset 0 1px 0 rgba(255,255,255,.45); }
.btn.danger { background: linear-gradient(180deg, rgba(255,107,122,.14), rgba(255,107,122,.05)); border-color: rgba(255,107,122,.3); }
.btn.danger:hover { background: linear-gradient(180deg, rgba(255,107,122,.28), rgba(255,107,122,.1)); border-color: rgba(255,107,122,.55); color: #ffb3bb; }
.btn.ghost { background: none; border-color: transparent; box-shadow: none; }
.btn.ghost:hover { background: rgba(255,255,255,.09); box-shadow: none; transform: none; }
.btn.icon { width: 38px; padding: 0; }
.btn.sm { min-height: 32px; padding: 5px 12px; }
.btn.icon.sm { width: 32px; padding: 0; }
.modal-x { border-radius: 50%; width: 34px !important; min-height: 34px !important; background: rgba(255,255,255,.08); }
.seg { padding: 4px; }
.seg button { min-height: 32px; font-weight: 550; }
.seg button:hover:not(.active) { color: var(--text); background: rgba(255,255,255,.06); }
.seg button.active { background: linear-gradient(180deg, rgba(255,255,255,.2), rgba(255,255,255,.1)); box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 2px 8px -2px rgba(0,0,0,.5); }
.pick button:hover { background: rgba(255,255,255,.12); color: var(--text); transform: translateY(-1px); }
.add-card { border-radius: 12px; font-weight: 500; }
.add-card:hover { border-style: solid; }
.nav-item { font-weight: 500; }
.tick-btn:active { transform: scale(.85); }
.chip { font-weight: 500; }

/* ================= subtarefas / progresso ================= */
.progress.lg { height: 10px; flex: 1; }
.progress i.full { background: linear-gradient(90deg, var(--good), #9be15d); box-shadow: 0 0 14px rgba(94,225,181,.6); }
.big-prog { display: flex; align-items: center; gap: 12px; margin: 10px 0 0; }
.big-prog b { font-size: 18px; letter-spacing: -.02em; min-width: 46px; text-align: right; }
.big-prog small { color: var(--faint); white-space: nowrap; }
.cprog { display: flex; align-items: center; gap: 8px; margin-top: 9px; }
.cprog .progress { flex: 1; height: 5px; }
.cprog span { font-size: 11.5px; font-weight: 650; color: var(--muted); min-width: 32px; text-align: right; }
.ctext { cursor: text; border-radius: 6px; } .ctext:hover { background: rgba(255,255,255,.06); }
.chk .input { flex: 1; }

/* ================= emojis / ícones ================= */
.title-row { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.title-row .task-title { flex: 1; min-width: 0; }
.emoji-title { flex: none; width: 46px; height: 46px; border-radius: 14px; border: 1px dashed rgba(255,255,255,.22); background: rgba(255,255,255,.05); color: var(--faint); font-size: 26px; display: grid; place-items: center; padding: 0; transition: all .2s var(--ease); }
.emoji-title:hover { background: rgba(255,255,255,.12); color: var(--text); transform: scale(1.06); }
.emoji-title.has { border-style: solid; border-color: transparent; background: rgba(255,255,255,.07); }
.temoji { margin-right: 6px; }
.emoji-field { display: flex; gap: 8px; }
.pemoji { width: 14px; text-align: center; font-size: 14px; line-height: 1; flex: none; }
.proj-emoji { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 24px; border: 1px solid; flex: none; }
.emoji-pop { width: 300px; padding: 8px; z-index: 260; }
.emoji-tabs { display: flex; gap: 4px; margin-bottom: 6px; align-items: center; }
.emoji-tabs button { width: 34px; height: 34px; border-radius: 10px; border: 0; background: none; font-size: 18px; padding: 0; justify-content: center; }
.emoji-tabs button.on { background: rgba(255,255,255,.14); }
.emoji-tabs .rm { margin-left: auto; width: auto; padding: 0 10px; font-size: 12px; color: #ff9aa6; }
.emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; max-height: 210px; overflow-y: auto; }
.emoji-grid button { width: auto; height: 34px; padding: 0; justify-content: center; font-size: 20px; border-radius: 9px; }
.emoji-grid button:hover { transform: scale(1.25); background: rgba(255,255,255,.14); }
.desc-tools { display: flex; margin-top: 4px; }

/* ================= descrição / links / anexos ================= */
.desc-view { white-space: pre-wrap; word-break: break-word; padding: 10px 13px; border-radius: 12px; border: 1px solid transparent; cursor: text; line-height: 1.6; min-height: 44px; }
.desc-view:hover { background: rgba(255,255,255,.05); border-color: var(--glass-border); }
a.autolink { color: #9fb0ff; text-decoration: underline; text-decoration-color: rgba(159,176,255,.4); text-underline-offset: 2px; word-break: break-all; }
a.autolink:hover { color: #c3ceff; text-decoration-color: currentColor; }
.attach-link { display: flex; align-items: center; gap: 12px; padding: 9px 12px; margin-bottom: 8px; border-radius: 14px; text-decoration: none; background: rgba(255,255,255,.05); border: 1px solid var(--glass-border); transition: all .2s var(--ease); }
.attach-link:hover { background: rgba(255,255,255,.1); transform: translateY(-1px); }
.attach-link .ai { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(124,140,255,.2); color: #aab6ff; flex: none; }
.attach-link .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.attach-link b, .attach-link small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.attach-link small { color: var(--faint); }
.attach-link .x, .thumb .x { opacity: .0; } .attach-link:hover .x, .thumb:hover .x { opacity: 1; }
@media (hover: none) { .attach-link .x, .thumb .x { opacity: .9; } }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-bottom: 10px; }
.thumb { position: relative; aspect-ratio: 4/3; border-radius: 14px; overflow: hidden; cursor: zoom-in; border: 1px solid var(--glass-border); background: rgba(0,0,0,.3); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s var(--ease); }
.thumb:hover img { transform: scale(1.06); }
.thumb .x { position: absolute; top: 5px; right: 5px; background: rgba(0,0,0,.65); border-radius: 50%; }
.attach-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.attach-actions small { color: var(--faint); }
.lightbox { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; background: rgba(2,3,8,.88); backdrop-filter: blur(10px); animation: fade .2s; padding: 20px; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 14px; box-shadow: 0 30px 80px rgba(0,0,0,.7); }
.card .cover { display: block; width: calc(100% + 24px); margin: -11px -12px 10px; height: 120px; object-fit: cover; border-radius: 13px 13px 0 0; pointer-events: none; }

.modal-x { position: absolute !important; top: 14px; right: 14px; }

/* ================= instalar app + notificações ================= */
.bell { position: relative; overflow: visible; }
.bell-badge { position: absolute; top: -5px; right: -5px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: #fff; background: linear-gradient(135deg, #ff6b7a, #ff4d6d); border: 2px solid #0b0d16; box-shadow: 0 3px 10px rgba(255,77,109,.6); animation: pop .4s var(--ease); }
.notif-pop { width: min(360px, calc(100vw - 16px)); padding: 14px; z-index: 160; }
.np-head { display: flex; align-items: center; margin-bottom: 10px; padding: 0 2px; }
.np-card { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: rgba(255,255,255,.06); border: 1px solid var(--glass-border); }
.np-card .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.np-card small { color: var(--muted); font-size: 12px; }
.np-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: rgba(255,255,255,.08); color: var(--muted); flex: none; }
.np-ic.on { background: rgba(94,225,181,.18); color: var(--good); }
.np-note { color: var(--muted); font-size: 13px; margin: 0; padding: 4px; }
.notif-pop .list-item { width: 100%; }
.steps { display: flex; flex-direction: column; gap: 10px; }
.step { display: flex; align-items: center; gap: 12px; padding: 11px 13px; border-radius: 14px; background: rgba(255,255,255,.06); border: 1px solid var(--glass-border); }
.step .n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: linear-gradient(135deg, #6f7fff, #a56dff); flex: none; }
.step .si { color: #aab6ff; flex: none; }
@media (max-width: 640px) { #installBtn { width: 38px; padding: 0; } }
.notif-pop .np-card .btn, .notif-pop .np-head .btn { width: auto; flex: none; display: inline-flex; padding: 5px 12px; }
.notif-pop .np-card .grow b { font-size: 14px; }

/* ================= v3: login ================= */
.login-wrap { flex: 1; display: grid; place-items: center; padding: 16px; overflow-y: auto; }
.login-card { width: 100%; max-width: 440px; padding: 32px 28px; animation: pop .45s var(--ease); background: linear-gradient(135deg, rgba(40,44,66,.7), rgba(18,20,32,.82)); }
.login-card h1 { margin: 14px 0 2px; font-size: 30px; letter-spacing: -.03em; }
.login-card h2 { margin: 12px 0 4px; font-size: 22px; letter-spacing: -.02em; }
.login-card .sub { margin: 0 0 18px; color: var(--muted); }
.logo.big { width: 52px; height: 52px; border-radius: 16px; }
.who-big { display: flex; align-items: center; gap: 14px; margin: 6px 0 18px; }
.who-big h2 { margin: 0; }
.login-links { display: flex; justify-content: space-between; margin-top: 14px; }
input.pin { letter-spacing: .35em; font-size: 20px; text-align: center; }
.welcome-users button { min-height: 58px; }

/* ================= v3: switches / notificações ================= */
.switch { position: relative; display: inline-block; width: 44px; height: 26px; flex: none; cursor: pointer; }
.switch input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch .knob { position: absolute; inset: 0; border-radius: 999px; background: rgba(255,255,255,.14); border: 1px solid var(--glass-border); transition: background .25s; }
.switch .knob::after { content: ''; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.5); transition: transform .25s var(--ease); }
.switch input:checked + .knob { background: linear-gradient(135deg, #5ee1b5, #3fc79a); }
.switch input:checked + .knob::after { transform: translateX(18px); }
.switch input:focus-visible + .knob { outline: 2px solid rgba(160,172,255,.95); outline-offset: 2px; }
.np-stack { display: flex; flex-direction: column; gap: 8px; }
.np-ic.wa { color: #7dffb0; background: rgba(37,211,102,.16); } .np-ic.tg { color: #7cc7ff; background: rgba(42,171,238,.16); }
.notif-pop { max-height: calc(100dvh - 90px); overflow-y: auto; }

/* ================= v3: cronômetro na barra ================= */
.timer-wrap { display: flex; align-items: center; gap: 6px; }
.timer-chip { display: inline-flex; align-items: center; gap: 9px; max-width: 260px; padding: 6px 12px; border-radius: 12px; border: 1px solid rgba(255,107,122,.4); background: rgba(255,107,122,.12); }
.timer-chip .tt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; max-width: 120px; }
.timer-chip .tm { font-variant-numeric: tabular-nums; font-size: 13px; }
.rec { width: 9px; height: 9px; border-radius: 50%; background: #ff4d6d; animation: blink 1.2s ease-in-out infinite; flex: none; }
@keyframes blink { 50% { opacity: .25; } }
@media (max-width: 760px) { .timer-chip .tt { display: none; } }

/* ================= v3: subtarefas, menções, dependências, tempo ================= */
.sub-meta { display: inline-flex; align-items: center; gap: 4px; flex: none; position: relative; }
.sub-pill { display: inline-flex; align-items: center; gap: 4px; min-height: 26px; padding: 2px 8px; border-radius: 999px; border: 1px solid transparent; background: none; color: var(--faint); font-size: 12px; }
.sub-pill:hover { background: rgba(255,255,255,.1); color: var(--text); border-color: var(--glass-border); }
.sub-pill.over { color: #ff9aa6; }
.hidden-date { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
.mention { color: #b8c2ff; background: rgba(124,140,255,.2); padding: 0 5px; border-radius: 6px; font-weight: 550; }
.mention-pop { position: fixed; z-index: 270; padding: 5px; min-width: 200px; }
.mention-pop button.on { background: rgba(255,255,255,.14); }
.dep { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; margin-bottom: 6px; background: rgba(255,255,255,.05); border: 1px solid var(--glass-border); }
.dep .grow { flex: 1; min-width: 0; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dep .grow:hover { text-decoration: underline; }
.dep.done .grow { color: var(--muted); text-decoration: line-through; }
.time-top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.time-total { font-size: 18px; letter-spacing: -.02em; }
.time-manual { display: flex; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.time-manual .input { flex: 1 1 110px; min-width: 0; } .time-manual input[type=number] { flex: 0 0 96px; }
.te { display: flex; align-items: center; gap: 10px; padding: 5px 4px; font-size: 13px; }
.te .grow { flex: 1; min-width: 0; }
.te small { color: var(--faint); }

/* ================= v3: novo projeto / modelos / importar ================= */
.tabs3 { display: flex; width: 100%; margin-bottom: 16px; } .tabs3 button { flex: 1; justify-content: center; }
.tpl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.tpl { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 14px; border-radius: 16px; text-align: left; background: rgba(255,255,255,.05); border: 1px solid var(--glass-border); transition: all .2s var(--ease); }
.tpl:hover { background: rgba(255,255,255,.1); transform: translateY(-2px); }
.tpl.on { border-color: rgba(124,140,255,.8); background: rgba(124,140,255,.16); box-shadow: 0 0 0 3px rgba(124,140,255,.15); }
.tpl .ti { font-size: 26px; line-height: 1; margin-bottom: 4px; }
.tpl small { color: var(--muted); font-size: 12px; line-height: 1.35; } .tpl .cnt { color: var(--faint); margin-top: 4px; }
.tpl .tdel { position: absolute; top: 8px; right: 8px; opacity: .6; padding: 4px; border-radius: 8px; } .tpl .tdel:hover { background: rgba(255,107,122,.25); opacity: 1; }
.dropzone { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 26px 16px; border-radius: 18px; border: 2px dashed rgba(255,255,255,.2); background: rgba(255,255,255,.03); color: var(--muted); margin-bottom: 12px; transition: all .2s; }
.dropzone:hover { border-color: rgba(124,140,255,.7); background: rgba(124,140,255,.08); color: var(--text); }
.dropzone small { color: var(--faint); }
.import-sum { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: rgba(94,225,181,.1); border: 1px solid rgba(94,225,181,.3); margin-bottom: 12px; color: var(--good); }
.import-sum > div { display: flex; flex-direction: column; color: var(--text); min-width: 0; } .import-sum small { color: var(--muted); }

/* ================= v3: linha do tempo ================= */
.tl { margin: 0 4px; overflow: auto; max-height: calc(100dvh - 300px); min-height: 200px; position: relative; padding: 0; }
.tl-head { position: sticky; top: 0; z-index: 6; display: flex; height: 56px; background: rgba(14,16,26,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--glass-border); }
.tl-corner { position: sticky; left: 0; z-index: 7; flex: none; display: flex; align-items: flex-end; padding: 0 14px 8px; color: var(--faint); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; background: rgba(14,16,26,.98); border-right: 1px solid var(--glass-border); }
.tl-scale { position: relative; flex: none; }
.tl-months { position: relative; height: 26px; }
.tl-m { position: absolute; top: 0; height: 26px; padding: 4px 8px; font-size: 12px; font-weight: 600; text-transform: capitalize; border-left: 1px solid rgba(255,255,255,.12); white-space: nowrap; overflow: hidden; }
.tl-days { position: relative; height: 28px; }
.tl-days span { position: absolute; top: 0; text-align: center; font-size: 11px; line-height: 28px; color: var(--faint); }
.tl-days span.wk { opacity: .55; } .tl-days span.td { color: #fff; font-weight: 700; background: rgba(124,140,255,.4); border-radius: 8px; }
.tl-body { position: relative; }
.tl-row { display: flex; border-bottom: 1px solid rgba(255,255,255,.05); }
.tl-label { position: sticky; left: 0; z-index: 4; flex: none; display: flex; align-items: center; padding: 0 14px; font-size: 13.5px; font-weight: 520; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: rgba(14,16,26,.96); border-right: 1px solid var(--glass-border); cursor: pointer; }
.tl-label:hover { background: rgba(30,34,52,.98); }
.tl-track { position: relative; flex: none; }
.tl-bar { position: absolute; top: 8px; height: 26px; border-radius: 9px; cursor: grab; touch-action: none; display: flex; align-items: center; padding: 0 10px; overflow: hidden; color: #fff; font-size: 12.5px; font-weight: 600; background: color-mix(in srgb, var(--c) 55%, #14172a); border: 1px solid color-mix(in srgb, var(--c) 80%, #fff 10%); box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 4px 12px -6px rgba(0,0,0,.7); user-select: none; }
.tl-bar:active { cursor: grabbing; }
.tl-bar .fill { position: absolute; inset: 0 auto 0 0; background: rgba(255,255,255,.2); pointer-events: none; }
.tl-bar span { position: relative; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 2px rgba(0,0,0,.5); pointer-events: none; }
.tl-bar .h { position: absolute; right: 0; top: 0; bottom: 0; width: 9px; cursor: ew-resize; background: linear-gradient(90deg, transparent, rgba(255,255,255,.35)); }
.tl-bar.done { background: color-mix(in srgb, #5ee1b5 45%, #14172a); border-color: #5ee1b5; }
.tl-bar.late { background: color-mix(in srgb, #ff6b7a 50%, #14172a); border-color: #ff6b7a; }
.tl-bar.blocked { background-image: repeating-linear-gradient(135deg, rgba(0,0,0,.22) 0 6px, transparent 6px 12px); }
.tl-today { position: absolute; top: 0; width: 2px; background: linear-gradient(#ff7ca8, transparent); z-index: 3; pointer-events: none; opacity: .8; }
.tl-arrows { position: absolute; top: 0; left: 0; pointer-events: none; z-index: 2; }

/* ================= v3: relatórios ================= */
.legend { display: flex; gap: 16px; margin: -4px 0 6px; color: var(--muted); font-size: 13px; } .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
.chart { width: 100%; } .chart svg { display: block; max-width: 100%; height: auto; }
.workload { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; border-top: 1px solid rgba(255,255,255,.07); }
.workload:first-of-type { border-top: 0; } .workload .grow { flex: 1; min-width: 0; }
.wl-top { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; } .wl-top small, .workload small { color: var(--muted); }
.wl-bar { display: flex; height: 8px; border-radius: 8px; background: rgba(255,255,255,.08); overflow: hidden; margin: 6px 0 5px; }
.wl-bar i { display: block; height: 100%; } .wl-bar .ok { background: linear-gradient(90deg, #6f7fff, #5ee1b5); } .wl-bar .bad { background: #ff6b7a; }

/* ================= v3: paleta de comandos ================= */
.palette-wrap { align-items: flex-start; padding-top: 12vh; z-index: 250; }
.palette { width: 100%; max-width: 620px; padding: 0; overflow: hidden; background: linear-gradient(135deg, rgba(34,38,58,.94), rgba(14,16,26,.96)); animation: pop .25s var(--ease); }
.palette-top { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--glass-border); color: var(--muted); }
.palette-input { flex: 1; background: none; border: 0; outline: 0; font-size: 17px; color: var(--text); min-width: 0; }
.palette-list { max-height: min(55vh, 420px); overflow-y: auto; padding: 8px; }
.palette-list button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border-radius: 12px; border: 0; background: none; text-align: left; color: var(--muted); }
.palette-list button.on { background: rgba(124,140,255,.22); color: var(--text); }
.palette-list .pt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.palette-list small { color: var(--faint); white-space: nowrap; }
.kk { display: inline-flex; gap: 4px; }
kbd { display: inline-block; min-width: 22px; padding: 1px 7px; border-radius: 7px; font: 600 11.5px/1.6 ui-monospace, monospace; text-align: center; color: var(--muted); background: rgba(255,255,255,.08); border: 1px solid var(--glass-border); border-bottom-width: 2px; }
.keys { display: flex; flex-direction: column; } .keyrow { display: flex; justify-content: space-between; gap: 16px; padding: 9px 2px; border-top: 1px solid rgba(255,255,255,.07); } .keyrow:first-child { border-top: 0; } .keyrow > span:first-child { white-space: nowrap; } .keyrow > span:last-child { color: var(--muted); text-align: right; }

@media (max-width: 640px) {
  .tpl-grid { grid-template-columns: 1fr; }
  .tl { max-height: calc(100dvh - 330px); }
  .login-card { padding: 26px 20px; }
  .palette-wrap { padding-top: 4vh; }
}

/* ================= impressão (PDF) ================= */
@media print {
  body { background: #fff !important; color: #111 !important; overflow: visible !important; height: auto !important; }
  .bg, .grain, .sidebar, .topbar, .scrim, .no-print, #modals, .toast { display: none !important; }
  #app { display: block !important; height: auto !important; padding: 0 !important; }
  .main, .content { display: block !important; overflow: visible !important; height: auto !important; }
  .glass, .panel, .stat { background: #fff !important; border: 1px solid #ccc !important; box-shadow: none !important; backdrop-filter: none !important; color: #111 !important; break-inside: avoid; }
  .glass::before { display: none !important; }
  * { color: #111 !important; text-shadow: none !important; }
  .progress, .wl-bar { background: #ddd !important; }
  .chip { border-color: #999 !important; background: #f2f2f2 !important; }
  .page-head p, small, .lbl { color: #555 !important; }
  .grid.two { grid-template-columns: 1fr 1fr; }
}

/* ================= v3.1: fotos e administração ================= */
.avatar.img { object-fit: cover; background: #1b1e30; display: block; }
.photo-editor { display: flex; align-items: center; gap: 16px; padding: 12px 14px; margin: 0 0 16px; border-radius: 16px; background: rgba(255,255,255,.05); border: 1px solid var(--glass-border); }
.photo-editor .avatar { border-width: 3px; }
.pe-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.pe-actions small { flex-basis: 100%; color: var(--faint); }
.person .badges { display: flex; gap: 6px; margin-top: 4px; flex-wrap: wrap; }

/* ================= v4: prazos, calendário geral, orçamentos ================= */
.chip.soon { color: #ffd9a8; background: rgba(255,184,107,.08); border-color: rgba(255,184,107,.28); }
.chip.blue { color: #b4c0ff; background: rgba(124,140,255,.16); border-color: rgba(124,140,255,.4); }
.cal-nav { display: inline-flex; gap: 6px; align-items: center; margin-left: auto; }
.seg-wrap { flex-wrap: wrap; }
.gday { cursor: pointer; transition: background .15s, border-color .15s; }
.gday:hover { background: rgba(255,255,255,.07); }
.gday.dropping { background: rgba(124,140,255,.22); border-color: rgba(124,140,255,.8); }
.gday .d { display: flex; justify-content: space-between; align-items: center; }
.bday { font-size: 13px; }
.cal-task.late { border-left-color: var(--bad) !important; color: #ffb3bb; }
.cal-task.quote { border-left-color: #5ee1b5; }
.cal-task[draggable=true] { cursor: grab; }
.agenda { display: flex; flex-direction: column; }
.agenda .group { margin-bottom: 12px; }
.agenda-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 16px; border: 0; border-top: 1px solid rgba(255,255,255,.07); background: none; text-align: left; }
button.agenda-row:hover { background: rgba(255,255,255,.06); }
.agenda-row .at { width: 56px; flex: none; color: var(--faint); font-size: 12.5px; }
.agenda-row .dot { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.agenda-row .grow { flex: 1; min-width: 0; } .agenda-row .grow .tt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .agenda-row small { color: var(--faint); }
.agenda-late { display: block; padding: 0 16px 8px 84px; color: #ff9aa6; margin-top: -6px; }

.qlist { display: flex; flex-direction: column; gap: 10px; margin: 0 4px; }
.qrow { display: grid; grid-template-columns: 110px minmax(0, 1fr) 130px 120px auto auto auto; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 18px; cursor: pointer; transition: transform .2s var(--ease), background .2s; }
.qrow:hover { transform: translateY(-2px); }
.qrow small { display: block; color: var(--faint); font-size: 12px; }
.qnum b { font-variant-numeric: tabular-nums; } .qmain { min-width: 0; } .qmain b, .qmain small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qval { text-align: right; } .qval b { font-size: 16px; letter-spacing: -.01em; }
.qst { min-height: 28px; gap: 4px; cursor: pointer; font-weight: 600; }
.qst:hover { filter: brightness(1.2); }
.qtotals { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.06); border: 1px solid var(--glass-border); }
.qtotals div { display: flex; justify-content: space-between; color: var(--muted); } .qtotals .tt { color: var(--text); font-size: 18px; font-weight: 700; padding-top: 6px; border-top: 1px solid rgba(255,255,255,.1); }
.qtotwrap { display: flex; align-items: flex-end; margin-bottom: 14px; }
.qitems { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.qi { display: grid; grid-template-columns: minmax(0, 1fr) 62px 86px 110px 110px 34px; gap: 8px; align-items: center; }
.qi.head { color: var(--faint); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; }
.qi .r { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.qactions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.qdisc { align-items: flex-end; }

/* folha de impressão do orçamento */
.print-sheet { display: none; }
@media print {
  body.printing-quote > *:not(.print-sheet) { display: none !important; }
  body.printing-quote { background: #fff !important; overflow: visible !important; height: auto !important; }
  .print-sheet { display: block !important; position: static; color: #111 !important; background: #fff; font: 13px/1.5 -apple-system, 'Segoe UI', Roboto, sans-serif; padding: 10mm; }
  .print-sheet * { color: #111 !important; }
  .print-sheet header { display: flex; justify-content: space-between; gap: 20px; border-bottom: 2px solid #111; padding-bottom: 12px; margin-bottom: 16px; }
  .print-sheet h1 { margin: 0 0 4px; font-size: 22px; } .print-sheet .ps-num { text-align: right; } .print-sheet .ps-num b { font-size: 18px; }
  .print-sheet .lbl { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: #666 !important; }
  .print-sheet .ps-client { margin-bottom: 16px; } .print-sheet .ps-title { margin-top: 6px; font-size: 15px; font-weight: 600; }
  .print-sheet table { width: 100%; border-collapse: collapse; margin-bottom: 14px; }
  .print-sheet th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #555 !important; border-bottom: 1px solid #999; padding: 6px 8px; }
  .print-sheet td { padding: 8px; border-bottom: 1px solid #ddd; } .print-sheet .r { text-align: right; white-space: nowrap; }
  .print-sheet .ps-totals { margin-left: auto; width: 55%; } .print-sheet .ps-totals div { display: flex; justify-content: space-between; padding: 4px 8px; }
  .print-sheet .ps-totals .tt { font-size: 17px; font-weight: 700; border-top: 2px solid #111; margin-top: 4px; padding-top: 8px; }
  .print-sheet .ps-notes { margin-top: 18px; } .print-sheet .ps-notes p { white-space: pre-wrap; margin: 4px 0 0; }
  .print-sheet footer { margin-top: 24px; padding-top: 10px; border-top: 1px solid #bbb; color: #555 !important; white-space: pre-wrap; font-size: 11.5px; }
}

@media (max-width: 900px) {
  .qrow { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'main val' 'num st' 'valid valid'; row-gap: 8px; }
  .qrow .qmain { grid-area: main; } .qrow .qval { grid-area: val; } .qrow .qnum { grid-area: num; display: flex; gap: 10px; align-items: center; } .qrow .qst { grid-area: st; justify-self: end; } .qrow .qvalid { grid-area: valid; }
  .qrow > .chip:not(.qst), .qrow > .avatar { display: none; }
  .qi { grid-template-columns: minmax(0, 1fr) 54px 70px 96px 34px; } .qi .lt, .qi.head span:nth-child(5) { display: none; }
}
.qtotals div { gap: 14px; }
