/* ============================================================
   MourTech CRM — tema preto & dourado
   ============================================================ */
:root {
  --bg: #09090a;
  --bg-2: #0e0e10;
  --surface: #131315;
  --surface-2: #19191c;
  --surface-3: #202024;
  --border: #242428;
  --border-2: #313137;
  --text: #f2eee6;
  --text-2: #c9c4b9;
  --muted: #8f8a80;
  --dim: #5f5b54;

  --gold: #d4af6a;
  --gold-hi: #f1d898;
  --gold-lo: #a8823f;
  --gold-grad: linear-gradient(135deg, #f3dca0 0%, #d4af6a 42%, #a8823f 100%);
  --gold-soft: rgba(212, 175, 106, .12);
  --gold-line: rgba(212, 175, 106, .32);

  --st-planejamento: #a29d93;
  --st-aprovada: #6aa9d8;
  --st-testes: #b18be3;
  --st-finalizada: #5fbf8a;

  --p-baixa: #6cbf8f;
  --p-media: #e3b04b;
  --p-alta: #e8695b;

  --danger: #e8695b;
  --ok: #5fbf8a;
  --warn: #e3b04b;
  --info: #6aa9d8;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, .6);
  --sidebar: 248px;

  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Cormorant Garamond', Georgia, serif;
  --mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--gold); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
::selection { background: rgba(212, 175, 106, .35); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #2a2a2f; border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #3a3a40; }
::-webkit-scrollbar-track { background: transparent; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.hidden { display: none !important; }
.gold-text { background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: .02em; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.grow { flex: 1; min-width: 0; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------------------------------------------------- botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 16px; border-radius: 10px;
  border: 1px solid var(--border-2); background: var(--surface-2);
  font-weight: 500; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .05s, box-shadow .15s;
}
.btn:hover { background: var(--surface-3); border-color: #3e3e45; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn-gold {
  background: var(--gold-grad); color: #1a1408; border: 0; font-weight: 600;
  box-shadow: 0 6px 20px rgba(212, 175, 106, .18), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.btn-gold:hover { background: var(--gold-grad); filter: brightness(1.07); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--border); }
.btn-outline { background: transparent; border-color: var(--gold-line); color: var(--gold); }
.btn-outline:hover { background: var(--gold-soft); border-color: var(--gold); }
.btn-danger { background: transparent; border-color: rgba(232, 105, 91, .4); color: var(--danger); }
.btn-danger:hover { background: rgba(232, 105, 91, .1); border-color: var(--danger); }
.btn-sm { height: 30px; padding: 0 11px; font-size: 13px; border-radius: 8px; }
.btn-lg { height: 46px; padding: 0 22px; font-size: 15px; }
.icon-btn {
  width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: 10px;
  background: transparent; border: 1px solid transparent; color: var(--muted); cursor: pointer; position: relative;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); border-color: var(--border); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn.sm { width: 28px; height: 28px; border-radius: 8px; }
.icon-btn.sm svg { width: 15px; height: 15px; }

/* ---------------------------------------------------------- formulários */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.field .hint { font-size: 12px; color: var(--dim); }
.input, .select, .textarea {
  width: 100%; height: 40px; padding: 0 12px; border-radius: 10px;
  background: var(--bg-2); border: 1px solid var(--border-2); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.textarea { height: auto; min-height: 110px; padding: 10px 12px; resize: vertical; line-height: 1.55; }
.select { appearance: none; padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238f8a80' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.input::placeholder, .textarea::placeholder { color: var(--dim); }
input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(.75) sepia(.6) saturate(3) hue-rotate(5deg); cursor: pointer; }
.input-prefix { position: relative; }
.input-prefix > span { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 13px; pointer-events: none; }
.input-prefix > .input { padding-left: 38px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.form { display: flex; flex-direction: column; gap: 16px; }

.segmented { display: inline-flex; padding: 3px; border-radius: 11px; background: var(--bg-2); border: 1px solid var(--border-2); gap: 3px; }
.segmented button {
  border: 0; background: transparent; height: 32px; padding: 0 14px; border-radius: 8px; cursor: pointer;
  color: var(--muted); font-weight: 500; display: inline-flex; align-items: center; gap: 7px;
}
.segmented button:hover { color: var(--text); }
.segmented button.active { background: var(--surface-3); color: var(--text); box-shadow: 0 1px 0 rgba(255, 255, 255, .05) inset, 0 2px 8px rgba(0, 0, 0, .3); }
.segmented.full { display: flex; }
.segmented.full button { flex: 1; justify-content: center; }

.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; color: var(--text-2); }
.switch input { display: none; }
.switch i { width: 36px; height: 20px; border-radius: 20px; background: var(--surface-3); border: 1px solid var(--border-2); position: relative; transition: .2s; flex: none; }
.switch i::after { content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--muted); transition: .2s; }
.switch input:checked + i { background: var(--gold-soft); border-color: var(--gold); }
.switch input:checked + i::after { left: 18px; background: var(--gold); }

/* ---------------------------------------------------------- login */
.auth {
  min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr;
}
.auth-brand {
  position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: center; align-items: center;
  padding: 48px; border-right: 1px solid var(--border);
  background:
    radial-gradient(900px 500px at 20% 10%, rgba(212, 175, 106, .13), transparent 60%),
    radial-gradient(700px 500px at 90% 100%, rgba(212, 175, 106, .08), transparent 60%),
    var(--bg);
}
.auth-brand::before {
  content: ''; position: absolute; inset: 0; opacity: .5;
  background-image: linear-gradient(rgba(212, 175, 106, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(212, 175, 106, .05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(circle at 50% 45%, #000 0%, transparent 70%);
}
.auth-brand img { width: min(520px, 80%); position: relative; filter: drop-shadow(0 10px 40px rgba(212, 175, 106, .25)); animation: float 7s ease-in-out infinite; }
.auth-brand .tagline { position: relative; margin-top: 28px; font-family: var(--display); font-size: 26px; font-style: italic; color: var(--text-2); text-align: center; }
.auth-brand .tagline small { display: block; font-family: var(--font); font-style: normal; font-size: 12px; letter-spacing: .32em; text-transform: uppercase; color: var(--gold); margin-top: 12px; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.auth-panel { display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: var(--bg-2); }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h1 { font-family: var(--display); font-weight: 600; font-size: 38px; margin: 0 0 6px; line-height: 1.1; }
.auth-card p.lead { color: var(--muted); margin: 0 0 28px; }
.auth-card .btn { width: 100%; }
.auth-card .foot { margin-top: 28px; color: var(--dim); font-size: 12px; text-align: center; }
.form-error { color: var(--danger); font-size: 13px; min-height: 18px; }

/* ---------------------------------------------------------- layout */
.layout { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  background: linear-gradient(180deg, #0d0d0f, #0a0a0b); border-right: 1px solid var(--border);
  padding: 18px 14px;
}
.sidebar .brand { display: flex; align-items: center; justify-content: center; padding: 6px 6px 18px; border-bottom: 1px solid var(--border); margin-bottom: 14px; }
.sidebar .brand img { height: 54px; width: auto; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-label { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); padding: 14px 12px 6px; font-weight: 600; }
.nav a {
  display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 12px; border-radius: 10px;
  color: var(--text-2); font-weight: 500; position: relative; transition: background .15s, color .15s;
}
.nav a svg { width: 18px; height: 18px; color: var(--muted); flex: none; transition: color .15s; }
.nav a:hover { background: var(--surface); color: var(--text); }
.nav a.active { background: linear-gradient(90deg, rgba(212, 175, 106, .14), rgba(212, 175, 106, .02)); color: var(--gold-hi); }
.nav a.active svg { color: var(--gold); }
.nav a.active::before { content: ''; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--gold-grad); }
.nav a .count { margin-left: auto; font-size: 11px; font-weight: 600; background: var(--surface-3); color: var(--text-2); padding: 1px 7px; border-radius: 20px; }
.nav a .count.alert { background: rgba(232, 105, 91, .16); color: var(--danger); }
.sidebar .me {
  margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface); cursor: pointer;
}
.sidebar .me:hover { border-color: var(--border-2); }
.sidebar .me .name { font-weight: 600; font-size: 13px; }
.sidebar .me .role { font-size: 11px; color: var(--muted); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; height: 64px; display: flex; align-items: center; gap: 12px;
  padding: 0 28px; background: rgba(9, 9, 10, .82); backdrop-filter: blur(14px); border-bottom: 1px solid var(--border);
}
.topbar .menu-btn { display: none; }
.topbar .mobile-logo { display: none; height: 30px; }
.search-trigger {
  display: flex; align-items: center; gap: 10px; height: 38px; width: min(380px, 40vw); padding: 0 12px;
  border-radius: 10px; background: var(--surface); border: 1px solid var(--border); color: var(--dim); cursor: pointer;
}
.search-trigger:hover { border-color: var(--border-2); color: var(--muted); }
.search-trigger svg { width: 16px; height: 16px; }
.search-trigger kbd { margin-left: auto; }
kbd { font-family: var(--mono); font-size: 11px; padding: 2px 6px; border-radius: 6px; background: var(--surface-3); border: 1px solid var(--border-2); color: var(--muted); }
.badge-dot { position: absolute; top: 6px; right: 6px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 10px; background: var(--danger); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--bg); }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.live i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(95, 191, 138, .15); }
.live.off i { background: var(--danger); box-shadow: 0 0 0 3px rgba(232, 105, 91, .15); }

.page { padding: 28px; max-width: 1600px; width: 100%; margin: 0 auto; }
.page.enter { animation: fadeIn .25s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.page-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head h1 { font-family: var(--display); font-weight: 600; font-size: 40px; line-height: 1; margin: 0; letter-spacing: -.01em; }
.page-head .sub { color: var(--muted); margin-top: 8px; }
.page-head .actions { margin-left: auto; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.eyebrow { font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--gold); font-weight: 600; margin-bottom: 10px; }

/* ---------------------------------------------------------- cards / paineis */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.panel-head { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.panel-head h3 { margin: 0; font-size: 14px; font-weight: 600; letter-spacing: .01em; }
.panel-head .link { margin-left: auto; font-size: 13px; color: var(--gold); cursor: pointer; background: none; border: 0; }
.panel-body { padding: 18px; }
.empty { padding: 34px 18px; text-align: center; color: var(--dim); }
.empty svg { width: 34px; height: 34px; color: var(--border-2); margin: 0 auto 10px; display: block; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.kpi {
  position: relative; overflow: hidden; padding: 18px 18px 16px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
}
.kpi::after { content: ''; position: absolute; right: -40px; top: -40px; width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle, var(--kpi-glow, rgba(212, 175, 106, .1)), transparent 70%); }
.kpi .k-label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.kpi .k-label svg { width: 15px; height: 15px; color: var(--kpi-color, var(--gold)); }
.kpi .k-value { font-size: 32px; font-weight: 700; letter-spacing: -.02em; margin-top: 10px; line-height: 1.1; }
.kpi .k-value.money { font-size: 24px; }
.kpi .k-foot { font-size: 12px; color: var(--muted); margin-top: 6px; }
.kpi.gold { border-color: var(--gold-line); background: linear-gradient(160deg, rgba(212, 175, 106, .1), var(--surface) 55%); }

.grid-dash { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 20px; }

/* avatar */
.avatar {
  --s: 32px; width: var(--s); height: var(--s); border-radius: 50%; flex: none; overflow: hidden;
  display: grid; place-items: center; font-size: calc(var(--s) * .38); font-weight: 600; color: #1a1408;
  background: var(--gold-grad); border: 1px solid rgba(0, 0, 0, .4);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.xs { --s: 22px; }
.avatar.sm { --s: 26px; }
.avatar.lg { --s: 48px; }
.avatar.xl { --s: 84px; }
.avatar.ring { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--gold-line); }
.avatars { display: flex; }
.avatars .avatar { margin-left: -7px; box-shadow: 0 0 0 2px var(--surface); }
.avatars .avatar:first-child { margin-left: 0; }
.avatars .more { --s: 22px; background: var(--surface-3); color: var(--text-2); font-size: 10px; }

/* tags */
.tag {
  display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 6px;
  font-size: 11px; font-weight: 600; letter-spacing: .02em; white-space: nowrap;
  background: color-mix(in srgb, var(--c, var(--gold)) 14%, transparent);
  color: color-mix(in srgb, var(--c, var(--gold)) 85%, white);
  border: 1px solid color-mix(in srgb, var(--c, var(--gold)) 28%, transparent);
}
.tag .dot, .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--c, var(--gold)); flex: none; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 20px; font-size: 12px; font-weight: 600; white-space: nowrap;
  background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c); }
.prio { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; color: var(--c); text-transform: uppercase; letter-spacing: .05em; }
.prio svg { width: 12px; height: 12px; }
.prio-baixa { --c: var(--p-baixa); }
.prio-media { --c: var(--p-media); }
.prio-alta { --c: var(--p-alta); }
.st-planejamento { --c: var(--st-planejamento); }
.st-aprovada { --c: var(--st-aprovada); }
.st-testes { --c: var(--st-testes); }
.st-finalizada { --c: var(--st-finalizada); }

/* ---------------------------------------------------------- dashboard */
.hero {
  position: relative; overflow: hidden; border-radius: 18px; padding: 28px 30px; margin-bottom: 20px;
  border: 1px solid var(--gold-line);
  background:
    radial-gradient(600px 240px at 100% 0%, rgba(212, 175, 106, .16), transparent 70%),
    linear-gradient(135deg, #16130d, #0f0f11 60%);
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
}
.hero h1 { font-family: var(--display); font-weight: 600; font-size: 42px; line-height: 1.05; margin: 0; }
.hero .sub { color: var(--text-2); margin-top: 8px; }
.hero .hero-side { margin-left: auto; display: flex; align-items: center; gap: 20px; }
.ring-wrap { position: relative; width: 104px; height: 104px; flex: none; }
.ring-wrap svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-wrap .val { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.ring-wrap .val b { font-size: 24px; display: block; line-height: 1; }
.ring-wrap .val small { font-size: 10px; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; }

.pipeline { display: flex; height: 12px; border-radius: 10px; overflow: hidden; background: var(--surface-3); gap: 2px; }
.pipeline span { background: var(--c); transition: flex .4s; min-width: 0; }
.pipeline-legend { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 16px; }
.pipeline-legend div { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--border); cursor: pointer; }
.pipeline-legend div:hover { border-color: var(--border-2); }
.pipeline-legend b { font-size: 20px; }
.pipeline-legend small { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; }

.task-list { display: flex; flex-direction: column; }
.task-row {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 12px 18px;
  border-bottom: 1px solid var(--border); cursor: pointer; transition: background .12s;
}
.task-row:last-child { border-bottom: 0; }
.task-row:hover { background: var(--surface-2); }
.task-row .t-title { font-weight: 500; }
.task-row .t-meta { display: flex; align-items: center; gap: 8px; margin-top: 3px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.task-row .check { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--border-2); display: grid; place-items: center; }
.task-row .check.done { background: var(--ok); border-color: var(--ok); color: #0b1a10; }
.task-row .check svg { width: 13px; height: 13px; }
.due { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.due svg { width: 13px; height: 13px; }
.due.late { color: var(--danger); }
.due.today { color: var(--warn); }

.bars { display: flex; flex-direction: column; gap: 14px; }
.bar-row .bar-top { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; }
.bar { height: 8px; border-radius: 10px; background: var(--surface-3); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 10px; background: var(--c, var(--gold-grad)); }

.feed { display: flex; flex-direction: column; }
.feed-item { display: flex; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--border); }
.feed-item:last-child { border-bottom: 0; }
.feed-item .txt { font-size: 13px; color: var(--text-2); }
.feed-item .txt b { color: var(--text); font-weight: 600; }
.feed-item .when { font-size: 11px; color: var(--dim); margin-top: 2px; }
.feed-item a { cursor: pointer; }

.pay-card { padding: 20px; border-radius: var(--radius); border: 1px solid var(--gold-line);
  background: radial-gradient(400px 160px at 100% 0%, rgba(212, 175, 106, .14), transparent 70%), var(--surface); }
.pay-card .amount { font-size: 30px; font-weight: 700; letter-spacing: -.02em; margin: 6px 0 2px; }
.pay-card .date { color: var(--text-2); }
.countdown { display: inline-flex; align-items: baseline; gap: 4px; margin-top: 14px; padding: 6px 12px; border-radius: 20px; background: var(--gold-soft); color: var(--gold-hi); font-size: 12px; font-weight: 600; }

.team-table { width: 100%; border-collapse: collapse; }
.team-table th { text-align: left; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); font-weight: 600; padding: 10px 18px; border-bottom: 1px solid var(--border); }
.team-table td { padding: 12px 18px; border-bottom: 1px solid var(--border); }
.team-table tr:last-child td { border-bottom: 0; }
.team-table tr.click { cursor: pointer; }
.team-table tr.click:hover td { background: var(--surface-2); }

/* ---------------------------------------------------------- kanban */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .search { position: relative; width: 260px; }
.toolbar .search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--dim); }
.toolbar .search .input { padding-left: 34px; height: 38px; }
.toolbar .select { height: 38px; width: auto; min-width: 150px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: 20px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-2); cursor: pointer; font-weight: 500; font-size: 13px;
  transition: .15s;
}
.chip:hover { border-color: var(--border-2); color: var(--text); }
.chip.active { border-color: var(--c, var(--gold)); background: color-mix(in srgb, var(--c, var(--gold)) 13%, transparent); color: var(--text); }
.chip .n { font-size: 11px; color: var(--muted); font-weight: 600; }

.board { display: grid; grid-template-columns: repeat(4, minmax(270px, 1fr)); gap: 16px; align-items: start; overflow-x: auto; padding-bottom: 12px; }
.column {
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 16px; display: flex; flex-direction: column;
  min-height: 300px; max-height: calc(100vh - 250px); transition: border-color .15s, background .15s;
}
.column.drag-over { border-color: var(--c); background: color-mix(in srgb, var(--c) 5%, var(--bg-2)); }
.column-head { display: flex; align-items: center; gap: 10px; padding: 14px 14px 12px; position: relative; }
.column-head::before { content: ''; position: absolute; top: -1px; left: 16px; right: 16px; height: 2px; border-radius: 0 0 3px 3px; background: var(--c); opacity: .8; }
.column-head h3 { margin: 0; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; }
.column-head .n { font-size: 12px; color: var(--muted); background: var(--surface-2); padding: 1px 8px; border-radius: 20px; font-weight: 600; }
.column-head .icon-btn { margin-left: auto; }
.column-body { padding: 4px 10px 12px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; flex: 1; min-height: 80px; }
.column-empty { border: 1.5px dashed var(--border-2); border-radius: 12px; padding: 22px 10px; text-align: center; color: var(--dim); font-size: 13px; }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 13px;
  cursor: grab; position: relative; transition: border-color .15s, transform .15s, box-shadow .15s;
  user-select: none;
}
.card:hover { border-color: var(--border-2); box-shadow: 0 6px 20px rgba(0, 0, 0, .35); transform: translateY(-1px); }
.card.dragging { opacity: .35; transform: rotate(1.5deg); }
.card:active { cursor: grabbing; }
.card .cover { margin: -12px -13px 10px; height: 120px; border-radius: 11px 11px 0 0; overflow: hidden; background: #000; }
.card .cover img, .card .cover video { width: 100%; height: 100%; object-fit: cover; }
.card .c-top { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.card .c-code { margin-left: auto; color: var(--dim); }
.card .c-title { font-weight: 600; line-height: 1.35; margin-bottom: 6px; word-break: break-word; }
.card .c-desc { font-size: 12.5px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 10px; }
.card .c-foot { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.card .c-icons { display: flex; gap: 10px; color: var(--muted); font-size: 12px; }
.card .c-icons span { display: inline-flex; align-items: center; gap: 4px; }
.card .c-icons svg { width: 13px; height: 13px; }
.card .c-icons .complete { color: var(--ok); }
.card .avatars { margin-left: auto; }
.card .prio-bar { position: absolute; left: -1px; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; background: var(--c); }
.drop-marker { height: 3px; border-radius: 3px; background: var(--gold); box-shadow: 0 0 12px var(--gold); margin: -6px 0; }

/* ---------------------------------------------------------- modal */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, .66); backdrop-filter: blur(4px);
  display: flex; align-items: flex-start; justify-content: center; padding: 5vh 16px; overflow-y: auto;
  animation: fadeIn2 .15s ease;
}
@keyframes fadeIn2 { from { opacity: 0; } }
.modal {
  width: 100%; max-width: 620px; background: var(--surface); border: 1px solid var(--border-2); border-radius: 18px;
  box-shadow: var(--shadow-lg); animation: pop .2s cubic-bezier(.2, .9, .3, 1.2); position: relative; margin-bottom: 5vh;
}
.modal.lg { max-width: 1040px; }
.modal.md { max-width: 760px; }
.modal.sm { max-width: 440px; }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 20px 22px 0; }
.modal-head h2 { margin: 0; font-size: 20px; font-weight: 600; }
.modal-head .icon-btn { margin-left: auto; }
.modal-body { padding: 20px 22px; }
.modal-foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 16px 22px; border-top: 1px solid var(--border); background: var(--bg-2); border-radius: 0 0 18px 18px; }

/* detalhe da tarefa */
.detail { display: grid; grid-template-columns: 1fr 300px; }
.detail-main { padding: 6px 26px 26px; min-width: 0; }
.detail-side { padding: 20px; border-left: 1px solid var(--border); background: var(--bg-2); border-radius: 0 18px 18px 0; display: flex; flex-direction: column; gap: 18px; }
.detail-title { font-size: 26px; font-weight: 700; line-height: 1.25; margin: 14px 0 18px; letter-spacing: -.01em; word-break: break-word; }
.detail h4 { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 26px 0 12px; display: flex; align-items: center; gap: 8px; }
.detail h4 svg { width: 15px; height: 15px; color: var(--gold); }
.detail .desc { white-space: pre-wrap; color: var(--text-2); line-height: 1.65; word-break: break-word; }
.side-item .label { margin-bottom: 7px; display: block; }
.side-item .val { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.code-box { display: inline-flex; align-items: center; gap: 8px; padding: 5px 10px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border-2); cursor: pointer; }
.code-box:hover { border-color: var(--gold-line); }
.code-box svg { width: 13px; height: 13px; color: var(--muted); }

.stepper { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.step {
  position: relative; padding: 10px 10px 9px; border-radius: 10px; border: 1px solid var(--border-2); background: var(--bg-2);
  cursor: pointer; text-align: left; transition: .15s; color: var(--muted);
}
.step:hover { border-color: var(--c); color: var(--text); }
.step .s-n { font-size: 10px; letter-spacing: .1em; font-weight: 700; }
.step .s-l { font-size: 13px; font-weight: 600; display: block; margin-top: 2px; }
.step.done { border-color: color-mix(in srgb, var(--c) 40%, transparent); color: var(--text-2); }
.step.done .s-n { color: var(--c); }
.step.current { border-color: var(--c); background: color-mix(in srgb, var(--c) 14%, var(--bg-2)); color: var(--text); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 14%, transparent); }
.step.current .s-n { color: var(--c); }

.checklist { display: flex; flex-direction: column; gap: 4px; }
.check-item { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; }
.check-item:hover { background: var(--surface-2); }
.check-item input { width: 17px; height: 17px; accent-color: var(--gold); cursor: pointer; flex: none; }
.check-item span { flex: 1; word-break: break-word; }
.check-item.done span { text-decoration: line-through; color: var(--dim); }
.check-item .icon-btn { opacity: 0; }
.check-item:hover .icon-btn { opacity: 1; }
.progress-line { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.progress-line .bar { flex: 1; height: 6px; }

.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.media {
  position: relative; aspect-ratio: 4/3; border-radius: 10px; overflow: hidden; background: #000; border: 1px solid var(--border);
  cursor: zoom-in;
}
.media img, .media video { width: 100%; height: 100%; object-fit: cover; }
.media .play { position: absolute; inset: 0; display: grid; place-items: center; background: linear-gradient(transparent 50%, rgba(0, 0, 0, .6)); pointer-events: none; }
.media .play svg { width: 34px; height: 34px; color: #fff; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .6)); }
.media .rm { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 8px; border: 0; background: rgba(0, 0, 0, .7); color: #fff; cursor: pointer; display: grid; place-items: center; opacity: 0; transition: .15s; }
.media:hover .rm { opacity: 1; }
.media .rm svg { width: 14px; height: 14px; }
.media .name { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 8px 6px; font-size: 11px; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, .75)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.media.uploading { cursor: default; display: grid; place-items: center; background: var(--surface-2); }
.media.uploading .bar { width: 70%; height: 5px; }
.media.uploading small { position: absolute; bottom: 10px; color: var(--muted); font-size: 11px; }

.dropzone {
  border: 1.5px dashed var(--border-2); border-radius: 12px; padding: 20px; text-align: center; color: var(--muted);
  cursor: pointer; transition: .15s; background: var(--bg-2);
}
.dropzone:hover, .dropzone.over { border-color: var(--gold); color: var(--text-2); background: var(--gold-soft); }
.dropzone svg { width: 26px; height: 26px; color: var(--gold); margin: 0 auto 6px; display: block; }
.dropzone small { display: block; color: var(--dim); margin-top: 4px; font-size: 12px; }

.comments { display: flex; flex-direction: column; gap: 14px; }
.comment { display: flex; gap: 10px; }
.comment .bubble { flex: 1; background: var(--surface-2); border: 1px solid var(--border); border-radius: 4px 12px 12px 12px; padding: 10px 12px; min-width: 0; }
.comment .bubble .who { font-size: 12px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.comment .bubble .who small { color: var(--dim); font-weight: 400; }
.comment .bubble .who .icon-btn { margin-left: auto; width: 22px; height: 22px; opacity: 0; }
.comment:hover .bubble .who .icon-btn { opacity: 1; }
.comment .bubble p { margin: 4px 0 0; white-space: pre-wrap; color: var(--text-2); word-break: break-word; }
.comment-box { display: flex; gap: 10px; align-items: flex-start; margin-top: 4px; }
.comment-box .textarea { min-height: 44px; height: 44px; }
.history { display: flex; flex-direction: column; gap: 10px; font-size: 13px; color: var(--muted); }

/* descrição recolhível */
.desc.clamp { max-height: 170px; overflow: hidden; -webkit-mask-image: linear-gradient(#000 60%, transparent); mask-image: linear-gradient(#000 60%, transparent); }
.more-btn { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 4px 0; background: none; border: 0; color: var(--gold); font-weight: 600; font-size: 13px; cursor: pointer; }
.more-btn svg { width: 14px; height: 14px; }
.more-btn:hover { color: var(--gold-hi); }

/* chat da tarefa */
.chat-wrap { border: 1px solid var(--border-2); border-radius: 14px; background: var(--bg-2); overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.chat-wrap.over { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.chat { max-height: 460px; min-height: 120px; overflow-y: auto; padding: 16px 16px 8px; display: flex; flex-direction: column; gap: 10px; }
.chat-empty { margin: auto; text-align: center; color: var(--dim); display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 18px 0; }
.chat-empty svg { width: 28px; height: 28px; color: var(--border-2); margin-bottom: 4px; }
.chat-empty b { color: var(--muted); font-weight: 600; }
.chat-empty span { font-size: 12px; }
.chat-day { display: flex; justify-content: center; margin: 6px 0 2px; }
.chat-day span { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); padding: 3px 10px; border-radius: 20px; }
.chat-event { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--muted); padding: 2px 0; }
.chat-event .pill { height: 20px; font-size: 11px; padding: 0 8px; }
.chat-event small { color: var(--dim); }
.msg { display: flex; align-items: flex-end; gap: 8px; max-width: 82%; }
.msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.msg .bubble { background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px 14px 14px 4px; padding: 8px 12px 6px; min-width: 0; position: relative; }
.msg.mine .bubble { background: linear-gradient(160deg, rgba(212, 175, 106, .2), rgba(212, 175, 106, .08)); border-color: var(--gold-line); border-radius: 14px 14px 4px 14px; }
.msg .who { font-size: 12px; font-weight: 600; color: var(--gold); margin-bottom: 2px; }
.msg p { margin: 0; white-space: pre-wrap; word-break: break-word; color: var(--text); line-height: 1.5; }
.msg .meta { display: flex; align-items: center; justify-content: flex-end; gap: 6px; font-size: 10.5px; color: var(--dim); margin-top: 3px; }
.msg-del { background: none; border: 0; padding: 0; color: var(--dim); cursor: pointer; opacity: 0; display: inline-grid; }
.msg-del svg { width: 12px; height: 12px; }
.msg:hover .msg-del { opacity: 1; }
.msg-del:hover { color: var(--danger); }
.msg-del[data-cedit]:hover { color: var(--gold); }
.msg-edit { min-width: min(420px, 60vw); }
.msg-edit .textarea { min-height: 44px; resize: none; background: var(--bg); }
.msg-media { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; margin-top: 6px; min-width: 220px; }
.msg-media .media { aspect-ratio: 16/10; }
.msg.handoff .bubble { border-color: color-mix(in srgb, var(--st-testes) 45%, transparent); background: linear-gradient(160deg, color-mix(in srgb, var(--st-testes) 16%, transparent), var(--surface-2)); }
.handoff-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--st-testes); margin-bottom: 4px; }
.handoff-tag svg { width: 13px; height: 13px; }
.composer { border-top: 1px solid var(--border); padding: 10px; background: var(--surface); }
.composer-media { margin-bottom: 8px; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.composer-row { display: flex; align-items: flex-end; gap: 8px; }
.composer-row .textarea { min-height: 40px; height: 40px; max-height: 180px; resize: none; padding: 9px 12px; line-height: 1.45; }
.composer-row .btn { height: 40px; width: 44px; padding: 0; flex: none; }
.composer-row .icon-btn { height: 40px; width: 40px; flex: none; }
.composer-hint { font-size: 11px; color: var(--dim); margin: 6px 4px 0; }

/* pull requests */
.pr-chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px 2px 7px; margin: 1px 0; border-radius: 7px; font-size: 12.5px; color: var(--text); background: rgba(177, 139, 227, .14); border: 1px solid rgba(177, 139, 227, .35); vertical-align: middle; }
.pr-chip:hover { background: rgba(177, 139, 227, .24); }
.pr-chip svg { width: 13px; height: 13px; color: var(--st-testes); }
.pr-chip b { color: var(--st-testes); }
.pr-row { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 9px; background: var(--surface); border: 1px solid var(--border); color: var(--text-2); font-size: 13px; }
.pr-row:hover { border-color: rgba(177, 139, 227, .5); color: var(--text); }
.pr-row svg { width: 14px; height: 14px; color: var(--st-testes); flex: none; }
.pr-row b { color: var(--st-testes); font-size: 12px; }
.card .c-icons .pr-count { color: var(--st-testes); }
.history div { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.people-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.person-chip { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px 0 4px; border-radius: 20px; border: 1px solid var(--border-2); background: var(--bg-2); cursor: pointer; font-size: 13px; color: var(--text-2); }
.person-chip:hover { border-color: #444; }
.person-chip.active { border-color: var(--gold); background: var(--gold-soft); color: var(--text); }

.code-field { display: flex; gap: 8px; }
.code-field .input { font-family: var(--mono); letter-spacing: .06em; color: var(--gold-hi); }

/* lightbox */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(0, 0, 0, .94); display: flex; align-items: center; justify-content: center; animation: fadeIn2 .15s; }
.lightbox img, .lightbox video { max-width: 92vw; max-height: 86vh; border-radius: 10px; box-shadow: var(--shadow-lg); }
.lightbox .lb-close { position: absolute; top: 16px; right: 16px; }
.lightbox .lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; background: rgba(255, 255, 255, .08); border: 0; color: #fff; cursor: pointer; display: grid; place-items: center; }
.lightbox .lb-nav:hover { background: rgba(255, 255, 255, .16); }
.lightbox .lb-nav svg { width: 22px; height: 22px; }
.lightbox .lb-prev { left: 20px; }
.lightbox .lb-next { right: 20px; }
.lightbox .lb-cap { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; color: var(--muted); font-size: 13px; }
.lightbox .lb-cap a { margin-left: 10px; }

/* ---------------------------------------------------------- equipe */
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.person {
  position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 22px 20px 18px;
  transition: border-color .15s;
}
.person:hover { border-color: var(--border-2); }
.person::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 74px; background: linear-gradient(135deg, rgba(212, 175, 106, .16), rgba(212, 175, 106, .02)); border-bottom: 1px solid var(--border); }
.person.inactive { opacity: .55; }
.person .p-head { position: relative; display: flex; gap: 14px; align-items: flex-end; }
.person .p-name { font-weight: 700; font-size: 16px; }
.person .p-role { color: var(--muted); font-size: 13px; }
.person .p-actions { position: absolute; top: -10px; right: -8px; display: flex; gap: 2px; }
.person .p-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 18px; }
.person .p-stats div { background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; }
.person .p-stats b { display: block; font-size: 15px; }
.person .p-stats small { color: var(--dim); font-size: 11px; }
.person .p-info { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; font-size: 13px; color: var(--text-2); }
.person .p-info div { display: flex; align-items: center; gap: 9px; min-width: 0; }
.person .p-info svg { width: 15px; height: 15px; color: var(--gold); flex: none; }
.photo-pick { display: flex; align-items: center; gap: 18px; }
.photo-pick .avatar { cursor: pointer; }

/* ---------------------------------------------------------- projetos */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.project { position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.project::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--c); }
.project::after { content: ''; position: absolute; right: -60px; top: -60px; width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--c) 18%, transparent), transparent 70%); pointer-events: none; }
.project .pr-head { display: flex; align-items: flex-start; gap: 12px; }
.project .pr-mark { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); flex: none; }
.project h3 { margin: 0; font-size: 18px; }
.project .pr-desc { color: var(--muted); font-size: 13px; min-height: 20px; }
.project .pr-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.project .pr-stats div { text-align: center; padding: 8px 4px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--border); }
.project .pr-stats b { display: block; font-size: 16px; }
.project .pr-stats small { font-size: 10px; color: var(--dim); text-transform: uppercase; letter-spacing: .05em; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { width: 30px; height: 30px; border-radius: 9px; border: 2px solid transparent; cursor: pointer; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .3); }
.swatch.active { border-color: var(--text); }

/* ---------------------------------------------------------- pagamentos */
.month-nav { display: inline-flex; align-items: center; gap: 4px; padding: 4px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); }
.month-nav b { min-width: 150px; text-align: center; font-weight: 600; }
.payday-banner {
  display: flex; align-items: center; gap: 20px; padding: 20px 24px; border-radius: 16px; margin-bottom: 20px; flex-wrap: wrap;
  border: 1px solid var(--gold-line);
  background: radial-gradient(500px 200px at 0% 0%, rgba(212, 175, 106, .16), transparent 70%), linear-gradient(135deg, #15120c, var(--surface));
}
.payday-banner .cal { width: 64px; height: 70px; border-radius: 12px; overflow: hidden; border: 1px solid var(--gold-line); text-align: center; flex: none; background: var(--bg-2); }
.payday-banner .cal small { display: block; background: var(--gold-grad); color: #1a1408; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: 3px 0; }
.payday-banner .cal b { display: block; font-size: 28px; line-height: 44px; }
.payday-banner h3 { margin: 0; font-size: 18px; }
.payday-banner p { margin: 4px 0 0; color: var(--text-2); }
.payday-banner .done-badge { margin-left: auto; }
.concluded { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 30px; background: rgba(95, 191, 138, .12); color: var(--ok); font-weight: 600; border: 1px solid rgba(95, 191, 138, .3); }
.concluded svg { width: 16px; height: 16px; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; min-width: 860px; }
.table th { text-align: left; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); font-weight: 600; padding: 12px 16px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: rgba(255, 255, 255, .012); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .money { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.person-cell { display: flex; align-items: center; gap: 10px; min-width: 180px; }
.person-cell small { display: block; color: var(--muted); font-size: 12px; }
.lock-note { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--dim); }
.lock-note svg { width: 13px; height: 13px; }
.alert { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: 12px; margin-bottom: 18px; border: 1px solid rgba(232, 105, 91, .35); background: rgba(232, 105, 91, .08); color: #f3b0a8; }
.alert svg { width: 18px; height: 18px; flex: none; color: var(--danger); }
.alert.info { border-color: var(--gold-line); background: var(--gold-soft); color: var(--text-2); flex-wrap: wrap; }
.alert.info > svg { color: var(--gold); }
.alert .btn svg { color: currentColor; width: 14px; height: 14px; }
.section-title { display: flex; align-items: center; gap: 10px; margin: 28px 0 12px; }
.section-title h2 { margin: 0; font-size: 16px; font-weight: 600; }
.section-title .muted { font-size: 13px; }
.sum-box { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--border); }
.sum-box div { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-2); }
.sum-box div.total { border-top: 1px solid var(--border); padding-top: 10px; margin-top: 2px; font-size: 16px; color: var(--text); font-weight: 700; }

/* ---------------------------------------------------------- toasts / menus */
#toasts { position: fixed; bottom: 20px; right: 20px; z-index: 300; display: flex; flex-direction: column; gap: 10px; }
.toast {
  display: flex; align-items: center; gap: 10px; min-width: 260px; max-width: 380px; padding: 12px 16px; border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--border-2); box-shadow: var(--shadow); animation: slideIn .25s ease;
}
.toast svg { width: 18px; height: 18px; flex: none; }
.toast.ok svg { color: var(--ok); }
.toast.err { border-color: rgba(232, 105, 91, .4); }
.toast.err svg { color: var(--danger); }
.toast.out { opacity: 0; transform: translateY(8px); transition: .25s; }
.toast.msg { border-color: var(--gold-line); }
.toast.msg svg { color: var(--gold); }
.toast.clickable { cursor: pointer; }
.toast.clickable:hover { background: var(--surface-3); }
@keyframes slideIn { from { opacity: 0; transform: translateY(10px); } }

.popover {
  position: fixed; z-index: 150; min-width: 220px; background: var(--surface-2); border: 1px solid var(--border-2); border-radius: 12px;
  box-shadow: var(--shadow-lg); padding: 6px; animation: pop .15s;
}
.popover .pop-title { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); padding: 8px 10px 6px; font-weight: 600; }
.popover button.item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; background: none; border-radius: 8px; cursor: pointer; text-align: left; color: var(--text-2); }
.popover button.item:hover { background: var(--surface-3); color: var(--text); }
.popover button.item svg { width: 16px; height: 16px; color: var(--muted); }
.popover hr { border: 0; border-top: 1px solid var(--border); margin: 6px 0; }
.notif-list { width: 380px; max-height: 460px; overflow-y: auto; }
.notif-pop { padding: 0; overflow: hidden; }
.notif-pop .notif-list { padding: 4px 6px 6px; }
.notif-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.notif-head b { font-size: 14px; }
.link-btn { background: none; border: 0; color: var(--gold); font-size: 12px; font-weight: 600; cursor: pointer; padding: 0; }
.link-btn:hover { color: var(--gold-hi); }
.notif-enable { display: flex; align-items: center; gap: 12px; width: calc(100% - 16px); margin: 8px; padding: 10px 12px; border-radius: 10px; border: 1px dashed var(--gold-line); background: var(--gold-soft); cursor: pointer; text-align: left; color: var(--text); }
.notif-enable:hover { border-style: solid; }
.notif-enable svg { width: 18px; height: 18px; color: var(--gold); flex: none; }
.notif-enable b { display: block; font-size: 13px; }
.notif-enable small { color: var(--muted); font-size: 12px; }
.notif.unread { background: rgba(212, 175, 106, .06); }
.notif.unread b { color: var(--text); }
.notif:not(.unread) b { color: var(--text-2); font-weight: 500; }
.notif .clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--muted); margin-top: 2px; }
.notif .when { display: block; color: var(--dim); font-size: 11px; margin-top: 3px; }
.notif .ic-wrap { position: relative; flex: none; height: 30px; }
.notif .ic.mini { position: absolute; right: -5px; bottom: -5px; width: 18px; height: 18px; border-radius: 6px; border: 2px solid var(--surface-2); background: color-mix(in srgb, var(--c) 30%, var(--surface-2)); }
.notif .ic.mini svg { width: 10px; height: 10px; }
.unread-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); flex: none; align-self: center; box-shadow: 0 0 0 3px var(--gold-soft); }
.notif-foot { display: flex; align-items: center; gap: 16px; padding: 10px 14px; border-top: 1px solid var(--border); font-size: 12px; }
.notif-foot .switch i { transform: scale(.85); }
.mention { color: var(--info); font-weight: 600; background: rgba(106, 169, 216, .12); padding: 0 4px; border-radius: 5px; }
.mention.me { color: var(--gold-hi); background: var(--gold-soft); }
.notif { display: flex; gap: 10px; padding: 10px; border-radius: 8px; cursor: pointer; }
.notif:hover { background: var(--surface-3); }
.notif .ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none; background: color-mix(in srgb, var(--c) 15%, transparent); color: var(--c); }
.notif .ic svg { width: 15px; height: 15px; }
.notif b { font-size: 13px; font-weight: 600; display: block; }
.notif small { color: var(--muted); font-size: 12px; }

/* command palette */
.palette { max-width: 600px; }
.palette .p-input { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.palette .p-input svg { width: 18px; height: 18px; color: var(--gold); }
.palette .p-input input { flex: 1; background: none; border: 0; outline: none; font-size: 16px; }
.palette .p-results { max-height: 420px; overflow-y: auto; padding: 8px; }
.palette .p-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; cursor: pointer; }
.palette .p-item.sel, .palette .p-item:hover { background: var(--surface-3); }
.palette .p-item svg { width: 16px; height: 16px; color: var(--muted); }
.palette .p-group { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); padding: 10px 12px 4px; font-weight: 600; }

/* ---------------------------------------------------------- responsivo */
@media (max-width: 1200px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .grid-dash { grid-template-columns: 1fr; }
}
@media (max-width: 980px) {
  .auth { grid-template-columns: 1fr; }
  .auth-brand { min-height: 34vh; border-right: 0; border-bottom: 1px solid var(--border); padding: 32px; }
  .auth-brand .tagline { font-size: 20px; }
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 90; left: 0; top: 0; width: 270px; transform: translateX(-105%); transition: transform .25s ease; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, .55); z-index: 80; }
  .topbar { padding: 0 16px; }
  .topbar .menu-btn { display: inline-grid; }
  .topbar .mobile-logo { display: block; }
  .search-trigger { width: 40px; padding: 0; justify-content: center; }
  .search-trigger span, .search-trigger kbd { display: none; }
  .page { padding: 20px 16px; }
  .board { grid-template-columns: repeat(4, minmax(82vw, 1fr)); scroll-snap-type: x mandatory; margin: 0 -16px; padding: 0 16px 12px; }
  .column { scroll-snap-align: center; max-height: none; }
  .detail { grid-template-columns: 1fr; }
  .detail-side { border-left: 0; border-top: 1px solid var(--border); border-radius: 0 0 18px 18px; }
  .detail-main { padding: 6px 18px 20px; }
  .hero h1 { font-size: 32px; }
  .hero .hero-side { margin-left: 0; }
}
@media (max-width: 640px) {
  .topbar { gap: 6px; padding: 0 12px; }
  .live span, #quick-add span { display: none; }
  #quick-add { width: 36px; padding: 0; }
  .hero { padding: 22px 20px; }
  .hero .hero-side { display: none; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 14px; }
  .kpi .k-value { font-size: 24px; }
  .kpi .k-value.money { font-size: 18px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .page-head h1 { font-size: 32px; }
  .page-head .actions { margin-left: 0; width: 100%; }
  .toolbar .search { width: 100%; }
  .toolbar .select { flex: 1; min-width: 0; }
  .stepper { grid-template-columns: repeat(2, 1fr); }
  .pipeline-legend { grid-template-columns: repeat(2, 1fr); }
  .modal-backdrop { padding: 0; }
  .modal { border-radius: 0; min-height: 100vh; margin: 0; }
  .modal-foot { border-radius: 0; position: sticky; bottom: 0; }
  .notif-list { width: calc(100vw - 32px); }
  #toasts { left: 16px; right: 16px; }
  .toast { max-width: none; }
}
