/* Tarefas da Curva: estilos. Cores da Curva: laranja #FF5F34, azul #006DF6, escuro #1B232E. */

:root {
  --orange: #FF5F34;
  --orange-h: #E04A22;
  --blue: #006DF6;
  --dark: #1B232E;
  --bg: #F5F6F8;
  --surface: #FFFFFF;
  --surface-2: #F2F3F5;
  --border: #E4E6EA;
  --text: #1F2328;
  --text-2: #4A4F57;
  --muted: #8A9099;
  --ok: #16a34a;
  --err: #dc2626;
  --shadow: 0 4px 20px rgba(0, 0, 0, .06);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, .18);
  --radius: 8px;
  --sidebar: 248px;
  --topbar: 56px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12161C;
    --surface: #1A1F27;
    --surface-2: #222833;
    --border: #2D3440;
    --text: #E8EAED;
    --text-2: #B8BDC6;
    --muted: #7D8590;
    --shadow: 0 4px 20px rgba(0, 0, 0, .3);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Titillium Web", Helvetica, Arial, sans-serif;
  font-size: 14px; line-height: 1.45; color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
body.noscroll { overflow: hidden; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 18px; margin: 0; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
h2 { font-size: 15px; margin: 0 0 10px; font-weight: 650; }
h3 { font-size: 13px; margin: 0; font-weight: 650; text-transform: uppercase; letter-spacing: .03em; color: var(--text-2); }
.icon { flex: none; display: block; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.pad { padding: 12px; }
.grow { flex: 1; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.ellipsis { max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-center { display: inline-flex; align-items: center; gap: 8px; }
.row-gap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.row-gap.nowrap { flex-wrap: nowrap; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.ok-text { color: var(--ok); }
.err-text { color: var(--err); }
.ghost-text { color: var(--muted); }
.boot { display: grid; place-items: center; height: 100vh; color: var(--muted); gap: 12px; }
.empty { padding: 40px 16px; text-align: center; color: var(--muted); }

/* ---------------------------------------------------------------- botões e campos */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 14px; border-radius: 6px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap;
  text-decoration: none !important;
}
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--orange); border-color: var(--orange); color: #fff; }
.btn.primary:hover { background: var(--orange-h); }
.btn.success { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.danger { background: var(--err); border-color: var(--err); color: #fff; }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.small { height: 28px; padding: 0 10px; font-size: 12.5px; }
.btn.block { width: 100%; height: 42px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 6px; border: 0;
  background: transparent; color: var(--text-2); cursor: pointer; flex: none;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn.on { color: var(--orange); }
.icon-btn.tiny { width: 26px; height: 26px; }
.icon-btn.primary-icon { background: var(--orange); color: #fff; }
.link-btn { background: none; border: 0; color: var(--blue); cursor: pointer; font: inherit; padding: 6px; }

.input {
  width: 100%; height: 36px; padding: 0 10px; border: 1px solid var(--border); border-radius: 6px;
  background: var(--surface); color: var(--text); font: inherit; font-size: 14px;
}
textarea.input { height: auto; padding: 8px 10px; resize: vertical; line-height: 1.45; }
.input:focus, .tv-title:focus, .add-input:focus { outline: 2px solid color-mix(in srgb, var(--blue) 40%, transparent); outline-offset: -1px; border-color: var(--blue); }
.input.compact { height: 32px; width: auto; max-width: 220px; }
.input.big { height: 46px; font-size: 16px; border: 0; background: transparent; }
.input.date { width: auto; min-width: 150px; }
select.input { padding-right: 6px; }
.color { width: 32px; height: 28px; padding: 0; border: 1px solid var(--border); border-radius: 6px; background: none; cursor: pointer; flex: none; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field > span { font-size: 12.5px; color: var(--text-2); font-weight: 600; }
.form { display: flex; flex-direction: column; gap: 12px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; user-select: none; white-space: nowrap; }
.checks { display: flex; flex-wrap: wrap; gap: 6px 16px; }

/* ---------------------------------------------------------------- moldura */

.shell { display: flex; min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar); background: var(--dark); color: #C9CED6;
  display: flex; flex-direction: column; z-index: 40; overflow-y: auto; padding-bottom: env(safe-area-inset-bottom);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 16px 16px 10px; color: #fff; font-weight: 700; font-size: 15px; }
.nav { padding: 4px 8px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 6px; color: #C9CED6;
  text-decoration: none !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nav-item span { overflow: hidden; text-overflow: ellipsis; }
.nav-item:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav-item.active { background: rgba(255, 95, 52, .18); color: #fff; }
.nav-item.active .icon { color: var(--orange); }
.nav-section { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #7D8590; }
.nav-section .icon-btn { color: #9AA1AB; }
.spaces { padding: 0 8px; flex: 1; }
.space-head {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 10px; border: 0; background: none; color: #E6E8EB;
  font: inherit; font-weight: 600; cursor: pointer; border-radius: 6px; text-align: left;
}
.space-head:hover { background: rgba(255, 255, 255, .05); }
.space-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.space-dot { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.space.collapsed .space-lists { display: none; }
.space.collapsed .space-head .icon { transform: rotate(-90deg); }
.space-lists { padding-left: 12px; }
.space-lists .nav-item { padding: 5px 10px; font-size: 13.5px; }
.sidebar-foot { padding: 8px; border-top: 1px solid rgba(255, 255, 255, .08); }
.me-btn { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border: 0; background: none; color: #E6E8EB; font: inherit; cursor: pointer; border-radius: 6px; }
.me-btn:hover { background: rgba(255, 255, 255, .06); }
.me-name { flex: 1; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.main { flex: 1; margin-left: var(--sidebar); min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30; height: var(--topbar); display: flex; align-items: center; gap: 10px;
  padding: 0 16px; background: var(--surface); border-bottom: 1px solid var(--border);
}
.top-title { display: flex; align-items: center; gap: 4px; min-width: 150px; flex: 1 1 auto; overflow: hidden; }
.top-title > * { flex: none; }
.top-title > .crumbs, .top-title > h1 { flex: 0 1 auto; min-width: 0; }
.top-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.top-right { display: flex; align-items: center; gap: 8px; flex: none; }
.top-search { width: 240px; height: 34px; border: 1px solid var(--border); border-radius: 6px; padding: 0 10px; background: var(--surface-2); color: var(--text); font: inherit; }
.content { flex: 1; padding: 16px; min-width: 0; }
.crumbs { display: flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; }
.crumbs h1 { min-width: 70px; flex: 0 1 auto; }
.crumb-space { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 0 100 auto; min-width: 0; }
.crumb-sep { color: var(--muted); }
.scrim { display: none; }
.only-mobile, .only-xs { display: none !important; }

.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.seg button { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border: 0; background: var(--surface); color: var(--text-2); font: inherit; cursor: pointer; }
.seg button.on { background: var(--surface-2); color: var(--text); font-weight: 600; }

/* ---------------------------------------------------------------- peças */

.avatar { display: inline-grid; place-items: center; border-radius: 50%; color: #fff; font-weight: 700; flex: none; letter-spacing: -.02em; }
.avatar.more { background: var(--surface-2); color: var(--text-2); font-size: 10px; }
.avatar.bot { width: 28px; height: 28px; background: var(--blue); }
.avatars { display: inline-flex; }
.avatars .avatar { border: 2px solid var(--surface); margin-left: -6px; }
.avatars .avatar:first-child { margin-left: 0; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 12px; border: 1px solid;
  font: inherit; font-size: 12px; font-weight: 600; white-space: nowrap; cursor: default;
}
button.pill { cursor: pointer; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; display: inline-block; }
.tag { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px; border-radius: 4px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.tag-x { border: 0; background: none; color: inherit; cursor: pointer; padding: 0 0 0 2px; font-size: 14px; line-height: 1; }
.fchip { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 4px; font-size: 11.5px; font-weight: 600; margin-right: 4px; white-space: nowrap; }
.fval { font-size: 12px; color: var(--text-2); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fval b { font-weight: 600; color: var(--muted); }
.prio { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; }
.due { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-2); white-space: nowrap; }
.due.late { color: var(--err); font-weight: 600; }
.due.today { color: var(--orange); font-weight: 600; }
.meta-count { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.mention { color: var(--blue); font-weight: 600; }
.banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-radius: var(--radius); margin: 0 0 12px; }
.banner.warn { background: #FFF6E5; color: #8A5A00; border: 1px solid #F5D9A0; }
@media (prefers-color-scheme: dark) { .banner.warn { background: #3A2E12; color: #F5D9A0; border-color: #5A4718; } }

/* ---------------------------------------------------------------- quadro e cartões */

.board { display: flex; gap: 12px; align-items: flex-start; overflow-x: auto; padding-bottom: 16px; min-height: calc(100vh - var(--topbar) - 120px); scroll-snap-type: x proximity; }
.col { flex: 0 0 290px; background: var(--surface-2); border-radius: var(--radius); display: flex; flex-direction: column; max-height: calc(100vh - var(--topbar) - 130px); scroll-snap-align: start; }
.col-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; font-weight: 650; border-top: 3px solid transparent; border-radius: var(--radius) var(--radius) 0 0; }
.col-name { flex: 1; }
.col-count { color: var(--muted); font-weight: 500; font-size: 12px; }
.col-body { display: flex; flex-direction: column; gap: 8px; padding: 4px 8px 10px; overflow-y: auto; min-height: 60px; }
.col-empty { color: var(--muted); font-size: 12.5px; text-align: center; padding: 14px 6px; border: 1px dashed var(--border); border-radius: 6px; }
.col-add { display: flex; align-items: center; gap: 6px; padding: 8px; border: 0; background: none; color: var(--muted); font: inherit; cursor: pointer; border-radius: 6px; }
.col-add:hover { background: var(--surface); color: var(--text); }
.col-closed .card { opacity: .85; }
.my-board .col-late .col-head { color: var(--err); }
.my-board .col-today .col-head { color: var(--orange); }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 11px; cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04); display: flex; flex-direction: column; gap: 6px;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: manipulation;
}
.card:hover { border-color: color-mix(in srgb, var(--blue) 35%, var(--border)); }
.card.closed .card-title { text-decoration: line-through; color: var(--muted); }
.card-title { font-weight: 550; word-break: break-word; }
.card-path { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-parent { display: flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-tags, .card-fields { display: flex; flex-wrap: wrap; gap: 4px; }
.card-fields { flex-direction: column; gap: 2px; }
.card-fields .fchip { align-self: flex-start; }
.card-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.card-input { min-height: 60px; }
.drag-ghost { position: fixed; top: 0; left: 0; z-index: 1000; pointer-events: none; box-shadow: var(--shadow-lg); opacity: .95; }
.drag-source { opacity: .35; }
.drag-placeholder { border: 2px dashed color-mix(in srgb, var(--blue) 50%, transparent); border-radius: var(--radius); background: color-mix(in srgb, var(--blue) 6%, transparent); flex: none; }
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }

.quick-add { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 6px 6px 6px 12px; margin-bottom: 14px; color: var(--muted); }
.quick-add .input { border: 0; height: 34px; background: transparent; }
.quick-add .input:focus { outline: none; }

/* ---------------------------------------------------------------- lista */

.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.filters .input[type=search] { width: 220px; }
.list-desc { color: var(--text-2); margin: -4px 0 12px; white-space: pre-wrap; }
.ltable-scroll { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.ltable { min-width: max-content; }
.lrow { display: grid; grid-template-columns: var(--cols); align-items: center; border-bottom: 1px solid var(--border); min-height: 40px; }
.lrow:hover:not(.lhead):not(.ladd) { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
.lhead { font-size: 12px; color: var(--muted); font-weight: 600; min-height: 34px; position: sticky; top: 0; background: var(--surface); z-index: 2; }
.lhead > div { padding: 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lcell { padding: 4px 8px; min-width: 0; display: flex; align-items: center; gap: 6px; }
.ltitle { gap: 6px; flex-wrap: wrap; }
.tlink { color: var(--text); font-weight: 500; word-break: break-word; }
.lrow.closed .tlink { color: var(--muted); text-decoration: line-through; }
.lfield { font-size: 12.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; line-height: 32px; }
.lgroup { border-bottom: 1px solid var(--border); background: var(--surface); position: sticky; left: 0; }
.lgroup-head { display: flex; align-items: center; gap: 8px; padding: 10px 10px; border: 0; background: none; font: inherit; cursor: pointer; color: var(--text-2); }
.ladd { min-height: 36px; }
.add-input { width: 100%; height: 30px; border: 0; background: none; color: var(--text); font: inherit; padding: 0 6px; border-radius: 4px; }
.caret { border: 0; background: none; padding: 2px; color: var(--muted); cursor: pointer; display: inline-grid; place-items: center; }
.caret-space { width: 18px; flex: none; }
.chk { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border); background: var(--surface); color: transparent; cursor: pointer; display: grid; place-items: center; padding: 0; flex: none; }
.chk:hover { border-color: var(--ok); color: var(--ok); }
.chk.on { background: var(--ok); border-color: var(--ok); color: #fff; }
.cell-btn { border: 0; background: none; font: inherit; color: var(--text-2); cursor: pointer; padding: 4px 6px; border-radius: 4px; display: inline-flex; align-items: center; gap: 6px; min-height: 28px; white-space: nowrap; }
.cell-btn:hover { background: var(--surface-2); }
.cell-btn.late { color: var(--err); font-weight: 600; }
.cell-btn.wide { flex-wrap: wrap; white-space: normal; text-align: left; }
.row-mobile-meta { display: none; }

/* ---------------------------------------------------------------- janelas */

.overlay { position: fixed; inset: 0; background: rgba(15, 18, 24, .45); z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px 16px; overflow-y: auto; }
.modal { background: var(--surface); border-radius: 10px; box-shadow: var(--shadow-lg); width: 100%; max-width: 560px; display: flex; flex-direction: column; max-height: 88vh; }
.modal.small { max-width: 420px; }
.modal.wide { max-width: 860px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 6px 20px; }
.modal-head h2 { margin: 0; font-size: 16px; }
.modal-body { padding: 8px 20px 16px; overflow-y: auto; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.json { background: var(--surface-2); padding: 12px; border-radius: 6px; overflow: auto; font-size: 12px; max-height: 60vh; }

.popover { position: fixed; z-index: 200; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow-lg); overflow: hidden; }
.popover.sheet { left: 0 !important; right: 0; bottom: 0; top: auto !important; width: 100% !important; border-radius: 14px 14px 0 0; max-height: 70vh; overflow-y: auto; padding-bottom: env(safe-area-inset-bottom); }
.sheet-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, .35); z-index: 199; }
.menu { padding: 4px; }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; background: none; color: var(--text); font: inherit; cursor: pointer; border-radius: 6px; text-align: left; }
.menu-item:hover { background: var(--surface-2); }
.menu-item.danger { color: var(--err); }
.menu-sep { height: 1px; background: var(--border); margin: 4px 0; }
.pick { display: flex; flex-direction: column; }
.pick > .input { border: 0; border-bottom: 1px solid var(--border); border-radius: 0; height: 40px; }
.pick-items { max-height: 300px; overflow-y: auto; padding: 4px; }
.pick-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; padding: 8px 10px; border: 0; background: none; color: var(--text); font: inherit; cursor: pointer; border-radius: 6px; text-align: left; }
.pick-item:hover { background: var(--surface-2); }
.pick-item.on { font-weight: 600; }
.pick-item.on .icon { color: var(--ok); }
.pick-item.create { color: var(--blue); justify-content: flex-start; }

#toasts { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 500; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; padding-bottom: env(safe-area-inset-bottom); }
.toast { background: var(--dark); color: #fff; padding: 10px 16px; border-radius: 8px; box-shadow: var(--shadow-lg); max-width: 90vw; transition: opacity .3s, transform .3s; }
.toast.error { background: var(--err); }
.toast.out { opacity: 0; transform: translateY(8px); }

/* ---------------------------------------------------------------- tarefa */

.task-modal { max-width: 1120px; height: 88vh; max-height: 88vh; }
.task-modal .modal-body { padding: 0; height: 100%; overflow: hidden; display: flex; }
.task-view { display: flex; flex-direction: column; width: 100%; min-height: 0; }
.task-view.dropping { outline: 3px dashed var(--blue); outline-offset: -8px; }
.tv-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px 10px 20px; border-bottom: 1px solid var(--border); }
.tv-crumbs { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; }
.tv-head-actions { display: flex; gap: 2px; }
.tv-body { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 380px; min-height: 0; }
.tv-main { overflow-y: auto; padding: 18px 24px 40px; }
.tv-side { border-left: 1px solid var(--border); display: flex; flex-direction: column; min-height: 0; background: color-mix(in srgb, var(--surface-2) 45%, var(--surface)); }
.tv-title { width: 100%; border: 0; background: none; font: inherit; font-size: 22px; font-weight: 700; color: var(--text); resize: none; padding: 4px 6px; margin: 0 -6px 10px; border-radius: 6px; overflow: hidden; line-height: 1.3; }
.props { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 24px; margin-bottom: 18px; }
.prop { display: grid; grid-template-columns: 130px minmax(0, 1fr); align-items: center; min-height: 38px; gap: 8px; }
.prop-label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.prop-value { min-width: 0; }
.prop-value .input:not(.date):not(.compact) { height: 32px; }
.person { display: inline-flex; align-items: center; gap: 5px; margin-right: 6px; }
.tags-edit { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.mini-add { width: 24px; height: 22px; border: 1px dashed var(--border); border-radius: 4px; background: none; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.tv-section { margin-top: 20px; }
.tv-section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; min-height: 30px; }
.desc { white-space: normal; word-break: break-word; padding: 8px 10px; margin: 0 -10px; border-radius: 6px; cursor: text; display: block; width: calc(100% + 20px); text-align: left; font: inherit; color: var(--text); border: 0; background: none; }
.desc:hover { background: var(--surface-2); }
.empty-desc { color: var(--muted); }
.desc-edit { min-height: 160px; margin-bottom: 8px; }
.subtasks { display: flex; flex-direction: column; gap: 2px; }
.progress { height: 4px; background: var(--surface-2); border-radius: 2px; overflow: hidden; margin-bottom: 6px; }
.progress span { display: block; height: 100%; background: var(--ok); }
.sub { display: flex; align-items: center; gap: 8px; padding: 6px 4px; border-radius: 6px; flex-wrap: wrap; }
.sub:hover { background: var(--surface-2); }
.sub-title { flex: 1; color: var(--text); min-width: 140px; }
.sub.closed .sub-title { text-decoration: line-through; color: var(--muted); }
.subtasks .input { margin-top: 6px; }
.files { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.file { display: flex; align-items: center; gap: 10px; border: 1px solid var(--border); border-radius: 8px; padding: 6px; min-width: 0; }
.file-thumb { width: 52px; height: 52px; border-radius: 6px; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; flex: none; }
.file-thumb img { width: 100%; height: 100%; object-fit: cover; }
.file-ext { font-size: 11px; font-weight: 700; color: var(--muted); }
.file-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.file-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); font-weight: 500; }
.drop-hint { padding: 14px; border: 1px dashed var(--border); border-radius: 8px; text-align: center; }
.tabs { display: flex; gap: 4px; padding: 8px 12px 0; border-bottom: 1px solid var(--border); }
.tabs button { border: 0; background: none; padding: 8px 10px; font: inherit; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button.on { color: var(--text); font-weight: 600; border-bottom-color: var(--orange); }
.tv-feed { flex: 1; overflow-y: auto; padding: 12px 14px; min-height: 0; }
.comment { display: flex; gap: 10px; margin-bottom: 14px; }
.comment-main { flex: 1; min-width: 0; }
.comment-head { display: flex; align-items: center; gap: 8px; }
.comment-head .icon-btn { margin-left: auto; }
.comment-body { word-break: break-word; margin-top: 2px; }
.act { font-size: 13px; padding: 6px 0; border-bottom: 1px solid var(--border); color: var(--text-2); }
.composer { position: relative; padding: 10px 12px; border-top: 1px solid var(--border); background: var(--surface); padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
.composer textarea { min-height: 44px; }
.composer-actions { display: flex; justify-content: flex-end; margin-top: 6px; }
.mentions { position: absolute; bottom: 100%; left: 12px; right: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow-lg); }
.mentions:empty { display: none; }
.mentions .pick-item { justify-content: flex-start; }

/* ---------------------------------------------------------------- telas avulsas */

.auth { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: var(--dark); }
.auth-card { width: 100%; max-width: 380px; background: var(--surface); border-radius: 12px; padding: 28px 24px; box-shadow: var(--shadow-lg); }
.auth-brand { display: flex; align-items: center; gap: 12px; font-size: 18px; font-weight: 700; margin-bottom: 20px; }
.auth-error { color: var(--err); min-height: 18px; font-size: 13px; }
.search-box { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 0 14px; margin-bottom: 12px; color: var(--muted); }
.settings { max-width: 640px; display: flex; flex-direction: column; gap: 14px; }
.settings .input[type=password] { margin-top: 8px; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.panel.archived, tr.archived, .admin-row.archived { opacity: .55; }
.panel-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.panel-head h2 { margin: 0; flex: 1; }
.toggle-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); cursor: pointer; }
.toggle-row input { width: 18px; height: 18px; }
.admin-tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--border); margin: -4px 0 16px; }
.admin-tabs a { padding: 9px 12px; color: var(--muted); white-space: nowrap; border-bottom: 2px solid transparent; text-decoration: none; }
.admin-tabs a.on { color: var(--text); font-weight: 600; border-bottom-color: var(--orange); }
.admin-body { display: flex; flex-direction: column; gap: 14px; align-items: stretch; }
.admin-body > .btn { align-self: flex-start; }
.rows { display: flex; flex-direction: column; }
.admin-row { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.status-dots { display: inline-flex; gap: 3px; }
.status-editor { display: flex; flex-direction: column; gap: 6px; }
.status-row { display: flex; align-items: center; gap: 8px; }
.status-row .input { flex: 1; max-width: none; }
.tbl-scroll { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.tbl td { padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td .btn { margin-left: 4px; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; }
.stat.good { border-left: 4px solid var(--ok); }
.stat.bad { border-left: 4px solid var(--err); }
.stat-label { font-size: 12px; color: var(--muted); }
.stat-value { font-weight: 600; margin-top: 2px; word-break: break-word; }

/* ---------------------------------------------------------------- v1.1: barra lateral, início, notificações, automações */

.space-head { cursor: pointer; user-select: none; }
.nav-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.space-more { border: 0; background: none; color: #9AA1AB; cursor: pointer; padding: 2px 4px; border-radius: 4px; display: inline-grid; place-items: center; opacity: 0; flex: none; }
.space-head:hover .space-more, .nav-item:hover .space-more, .space-more:focus { opacity: 1; }
.space-more:hover { background: rgba(255, 255, 255, .1); color: #fff; }
@media (hover: none) { .space-more { opacity: .7; } }
.add-list { display: flex; align-items: center; gap: 8px; width: 100%; padding: 5px 10px; border: 0; background: none; color: #7D8590; font: inherit; font-size: 13px; cursor: pointer; border-radius: 6px; text-align: left; }
.add-list:hover { background: rgba(255, 255, 255, .05); color: #fff; }
.rename-input { font: inherit; font-size: inherit; font-weight: inherit; color: inherit; background: rgba(255, 255, 255, .08); border: 1px solid var(--orange); border-radius: 4px; padding: 1px 6px; min-width: 0; width: 100%; outline: none; }
.top-title .rename-input { color: var(--text); background: var(--surface); font-size: 18px; font-weight: 650; max-width: 360px; }
.badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--orange); color: #fff; font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; flex: none; }
.bell-btn { position: relative; }
.badge.top { position: absolute; top: 2px; right: 0; transform: scale(.85); }
.color.big { width: 80px; height: 48px; }

.home-section { margin-bottom: 18px; }
.home-h { display: flex; align-items: center; gap: 8px; font-size: 14px; margin: 6px 0 10px; color: var(--text-2); }
.hlist { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.hgroup { padding: 8px 14px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--border); }
.hgroup-late { color: var(--err); }
.hgroup-today { color: var(--orange); }
.hrow { display: flex; align-items: center; gap: 12px; padding: 9px 14px; border-bottom: 1px solid var(--border); cursor: pointer; }
.hrow:hover { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
.hrow.closed .hrow-title { text-decoration: line-through; color: var(--muted); }
.hrow-main { flex: 1; min-width: 0; }
.hrow-title { font-weight: 550; word-break: break-word; }
.hrow-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); margin-top: 2px; }
.hrow-sub .where { display: inline-flex; align-items: center; gap: 5px; }
.hrow-sub .space-dot { width: 8px; height: 8px; }
.hrow-sub .icon { display: inline; vertical-align: -2px; }
.hrow-meta { display: flex; align-items: center; gap: 10px; flex: none; }

.notif-list { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-top: 10px; }
.notif { display: flex; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--border); cursor: pointer; align-items: flex-start; }
.notif:last-child { border-bottom: 0; }
.notif:hover { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
.notif:not(.read) { background: color-mix(in srgb, var(--orange) 6%, var(--surface)); }
.notif:not(.read) .notif-title { font-weight: 650; }
.notif-icon { width: 30px; height: 30px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; color: var(--text-2); flex: none; }
.notif:not(.read) .notif-icon { color: var(--orange); }
.notif-main { flex: 1; min-width: 0; }
.notif-body { color: var(--text-2); font-size: 13px; margin-top: 2px; white-space: pre-wrap; word-break: break-word; }
.notif-meta { margin-top: 4px; }
.notif-actions { display: flex; gap: 2px; flex: none; }

.auto-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); flex-wrap: wrap; }
.auto-row > input { margin-top: 3px; width: 18px; height: 18px; }
.auto-main { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 2px; }
.auto-when { color: var(--blue); font-weight: 600; }
.action-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; background: var(--surface-2); display: flex; flex-direction: column; gap: 8px; }
.action-head { display: flex; align-items: center; gap: 8px; }
.action-head select { flex: 1; font-weight: 600; }
.action-num { width: 22px; height: 22px; border-radius: 50%; background: var(--orange); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; flex: none; }
.extra-filters summary { cursor: pointer; color: var(--text-2); font-size: 13px; padding: 4px 0; }
.extra-filters[open] summary { margin-bottom: 8px; }
.lgroup-wrap { position: relative; }
.lrow.ltop { cursor: default; }
.tlink { cursor: pointer; }
.tlink:hover { text-decoration: underline; color: var(--blue); }

/* vistas salvas */
.views-bar { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--border); margin: -4px 0 12px; padding-bottom: 6px; }
.vtab { display: inline-flex; align-items: center; height: 32px; padding: 0 4px; border: 0; background: none; color: var(--muted); font: inherit; cursor: pointer; border-radius: 6px; }
button.vtab { padding: 0 12px; }
.vtab.on { color: var(--text); font-weight: 600; background: var(--surface-2); box-shadow: inset 0 -2px 0 var(--orange); }
.vtab-name { border: 0; background: none; color: inherit; font: inherit; cursor: pointer; padding: 0 8px; height: 32px; }
.vtab-more { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 2px; border-radius: 4px; display: inline-grid; place-items: center; }
.vtab:hover:not(.on) { color: var(--text); background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
.btn.active { border-color: var(--blue); color: var(--blue); }
.field-filters { display: flex; flex-direction: column; gap: 6px; margin: -4px 0 12px; }
.field-filters:empty { display: none; }
.ffilter { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* permissões */
.banner.info { background: color-mix(in srgb, var(--blue) 10%, var(--surface)); color: var(--text); border: 1px solid color-mix(in srgb, var(--blue) 30%, transparent); }
.banner.ok { background: color-mix(in srgb, var(--ok) 10%, var(--surface)); color: var(--text); border: 1px solid color-mix(in srgb, var(--ok) 30%, transparent); }
.banner .icon { display: inline; vertical-align: -3px; }
.perm-grid { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.perm-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px; border-bottom: 1px solid var(--border); }
.perm-row:last-child { border-bottom: 0; }
.perm-row.default { background: var(--surface-2); font-weight: 600; }
.perm-row select { min-width: 190px; }
.ro-badge { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); border: 1px solid var(--border); border-radius: 4px; padding: 2px 6px; white-space: nowrap; }
.task-view.readonly .tv-main input:disabled, .task-view.readonly .tv-main select:disabled, .task-view.readonly .tv-main textarea:disabled { opacity: .8; cursor: default; }
.chk:disabled { cursor: default; opacity: .6; }
.task-view.readonly .desc, .task-view.readonly .tv-main .btn:disabled { pointer-events: none; }
.task-view.readonly .tv-main .btn:disabled { opacity: .5; }

/* importação */
.modal.import-modal { max-width: 1240px; height: 90vh; max-height: 90vh; }
.import-modal .modal-body { flex: 1; padding-bottom: 0; }
.import h3 { margin: 18px 0 6px; }
.import .tbl td { vertical-align: top; }
.import code { font-size: 11.5px; background: var(--surface-2); color: var(--muted); padding: 1px 5px; border-radius: 4px; }
.import details summary { cursor: pointer; padding: 6px 0; }
.import-actions {
  position: sticky; bottom: 0; z-index: 4; justify-content: flex-end; margin-top: 18px;
  padding: 12px 0 16px; background: var(--surface); border-top: 1px solid var(--border);
}
.check.wrap { white-space: normal; align-items: flex-start; }
.check.wrap input { margin-top: 3px; }
.imp-file { max-width: 560px; }
.imp-intro { margin: 0 0 10px; color: var(--text-2); }
.imp-review .stats { grid-template-columns: minmax(0, 1fr); }

/* passos */
.imp-steps { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0 0 16px; }
.imp-steps button {
  display: inline-flex; align-items: center; gap: 8px; padding: 3px 12px 3px 3px; border: 1px solid var(--border); border-radius: 16px;
  background: var(--surface); color: var(--muted); font: inherit; font-size: 13px; cursor: default;
}
.imp-steps button:enabled { cursor: pointer; color: var(--text-2); }
.imp-steps button:enabled:hover { background: var(--surface-2); }
.imp-steps .n { width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--surface-2); font-size: 12px; font-weight: 700; }
.imp-steps .cur button { border-color: var(--orange); color: var(--text); font-weight: 600; }
.imp-steps .cur .n { background: var(--orange); color: #fff; }
.imp-steps .done .n { background: var(--ok); color: #fff; }

/* passo 2: colunas à esquerda, tarefa de exemplo à direita */
.imp-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; }
.imp-count { font-weight: 600; }
.imp-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: 18px; align-items: start; }
.imp-left { min-width: 0; }
section.imp-group { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
section.imp-group > h3, section.imp-group > p { margin: 0; }
details.imp-group { margin-bottom: 14px; border-top: 1px solid var(--border); padding-top: 6px; }
details.imp-group > summary { font-weight: 600; color: var(--text-2); }
details.imp-group > p { margin: 0 0 8px; }
.imp-col { display: flex; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); transition: border-color .12s; }
.imp-col:not(.on) { background: var(--surface-2); }
.imp-col:not(.on) .imp-col-head b { color: var(--muted); }
.imp-col.focus { border-color: var(--orange); box-shadow: 0 0 0 1px var(--orange); }
.imp-col-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.imp-col-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.imp-fill { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.imp-bar { width: 44px; height: 4px; border-radius: 2px; background: var(--border); overflow: hidden; display: inline-block; }
.imp-bar span { display: block; height: 100%; background: var(--blue); }
.imp-help { font-size: 12.5px; color: var(--text-2); }
.imp-ex { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.imp-ex .link-btn { padding: 0; font-size: 12.5px; }
.imp-ex-val { font-weight: 600; }
.imp-ctl { margin-top: 2px; }
.imp-ctl .input.compact { height: 30px; font-size: 13px; }
.imp-how { font-size: 12px; color: var(--text-2); border-left: 3px solid var(--blue); padding-left: 8px; }
.imp-warn { font-size: 12px; color: #b45309; margin-top: 2px; }
@media (prefers-color-scheme: dark) { .imp-warn { color: #f5b454; } }

/* switch liga/desliga */
.switch { position: relative; display: inline-block; width: 34px; height: 20px; flex: none; margin-top: 1px; cursor: pointer; }
.switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.switch input:disabled { cursor: default; }
.switch-ui { position: absolute; inset: 0; border-radius: 10px; background: var(--border); transition: background .15s; }
.switch-ui::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .3); transition: transform .15s; }
.switch input:checked + .switch-ui { background: var(--ok); }
.switch input:checked + .switch-ui::after { transform: translateX(14px); }
.switch input:disabled + .switch-ui { opacity: .55; }
.switch input:focus-visible + .switch-ui { outline: 2px solid var(--blue); outline-offset: 2px; }

/* tarefa de exemplo */
.imp-right {
  position: sticky; top: 0; max-height: calc(90vh - 150px); overflow-y: auto; z-index: 2;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow);
}
.imp-right-head {
  position: sticky; top: 0; z-index: 3; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 12px; background: var(--surface); border-bottom: 1px solid var(--border);
}
.imp-right-head .btn.small { width: 30px; padding: 0; font-size: 16px; }
.imp-right-head .input.compact { width: 150px; height: 28px; font-size: 12.5px; }
.imp-hint { margin: 10px 12px 0; padding: 8px 10px; border-radius: 6px; font-size: 12.5px; background: color-mix(in srgb, var(--orange) 10%, transparent); }
.imp-hint:empty { display: none; }
.imp-hint .link-btn { padding: 0; font-size: 12.5px; }
.imp-task { display: flex; flex-direction: column; gap: 14px; padding: 12px 14px 18px; }
.imp-t-title { font-size: 18px; font-weight: 650; line-height: 1.3; margin-top: -8px; }
.imp-props { display: flex; flex-direction: column; gap: 2px; }
.imp-prop { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 10px; align-items: baseline; padding: 3px 4px; border-radius: 4px; font-size: 13px; }
.imp-prop .k { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.imp-prop .v { min-width: 0; overflow-wrap: anywhere; }
.imp-sec h4 { margin: 0 0 6px; font-size: 11.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.imp-desc { display: flex; flex-direction: column; gap: 4px; padding: 8px 10px; border-radius: 6px; background: var(--surface-2); font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 240px; overflow-y: auto; }
.imp-tag { background: color-mix(in srgb, var(--text-2) 12%, transparent); color: var(--text-2); }
.imp-out { border-top: 1px dashed var(--border); padding-top: 6px; }
.imp-out > summary { font-size: 12.5px; color: var(--muted); }
.imp-out .imp-prop { color: var(--muted); font-size: 12px; }
.imp-task [data-k] { cursor: pointer; }
.imp-task .hl { outline: 2px solid var(--orange); outline-offset: 1px; border-radius: 4px; background: color-mix(in srgb, var(--orange) 10%, transparent); }
.progress.big { height: 10px; border-radius: 5px; margin: 8px 0 14px; }
.progress span { transition: width .3s; }

/* ---------------------------------------------------------------- celular */

@media (max-width: 1300px) {
  .top-search { display: none; }
  .top-actions .btn > span { display: none; }
  .top-actions .btn { padding: 0 9px; }
}

@media (max-width: 1100px) {
  .tv-body { grid-template-columns: minmax(0, 1fr) 320px; }
  .props { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; box-shadow: var(--shadow-lg); }
  body.sidebar-open .sidebar { transform: none; }
  body.sidebar-open .scrim { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .4); z-index: 35; }
  .main { margin-left: 0; }
  .only-mobile { display: inline-grid !important; }
  .top-search { display: none; }
  .topbar { padding: 0 8px; gap: 6px; padding-top: env(safe-area-inset-top); height: calc(var(--topbar) + env(safe-area-inset-top)); }
  .content { padding: 12px; }

  /* Tarefa em tela cheia, comentários abaixo */
  .overlay { padding: 0; }
  .modal { max-height: 100vh; }
  .task-modal { height: 100vh; height: 100dvh; max-height: none; border-radius: 0; max-width: none; }
  .task-modal .modal-body { overflow-y: auto; display: block; }
  .tv-head { position: sticky; top: 0; background: var(--surface); z-index: 3; padding: calc(8px + env(safe-area-inset-top)) 8px 8px 14px; }
  .tv-body { display: block; }
  .tv-main { overflow: visible; padding: 14px 16px 10px; }
  .tv-side { border-left: 0; border-top: 1px solid var(--border); }
  .tv-feed { overflow: visible; }
  .composer { position: sticky; bottom: 0; }

  /* Importação: tarefa de exemplo em cima, presa no topo, colunas embaixo */
  .modal.import-modal { height: 100vh; height: 100dvh; max-height: none; }
  .imp-split { grid-template-columns: minmax(0, 1fr); }
  .imp-right { order: -1; max-height: 42vh; }
}

@media (max-width: 640px) {
  .hide-xs { display: none !important; }
  .only-xs { display: inline-flex !important; }
  .icon-btn.only-xs { display: inline-grid !important; }
  h1 { font-size: 16px; }
  .crumb-space, .crumb-sep { display: none; }
  .modal:not(.task-modal) { max-width: none; border-radius: 14px 14px 0 0; margin-top: auto; }
  .overlay { align-items: flex-end; }
  .grid2 { grid-template-columns: 1fr; }
  .prop { grid-template-columns: 104px minmax(0, 1fr); }
  .tv-title { font-size: 19px; }
  .filters .input[type=search] { width: 100%; flex: 1 1 100%; max-width: none; }
  .filters .input.compact { flex: 1; max-width: none; }
  .input, .top-search { font-size: 16px; } /* evita o zoom automático do iPhone */

  .board { scroll-snap-type: x mandatory; min-height: 0; }
  .col { flex-basis: 86vw; max-height: none; }
  .col-body { overflow: visible; }
  .my-board { flex-direction: column; align-items: stretch; overflow: visible; }
  .my-board .col { flex-basis: auto; }

  /* Lista vira cartões compactos */
  .ltable-scroll { overflow: visible; }
  .ltable { min-width: 0; }
  .lhead { display: none; }
  .lrow { grid-template-columns: 34px minmax(0, 1fr) !important; }
  .lrow > .lcell:nth-child(n+3) { display: none; }
  .row-mobile-meta { display: flex; align-items: center; gap: 8px; width: 100%; flex-wrap: wrap; margin-top: 2px; }
  .ladd { grid-template-columns: 0 1fr !important; }
  .hrow { flex-wrap: wrap; gap: 8px 10px; padding: 10px 12px; }
  .hrow-meta { width: 100%; padding-left: 30px; flex-wrap: wrap; gap: 8px; }
  .notif-actions { flex-direction: column; }
}
