:root {
  --pine:   #1E3A32;
  --gold:   #B0863A;
  --ivory:  #F8F3E8;
  --cream:  #EDE7D6;
  --text:   #1a1a1a;
  --muted:  #6b7280;
  --radius: 12px;
  --shadow: 0 2px 12px rgba(0,0,0,.10);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; font-family: 'Instrument Sans', system-ui, sans-serif; background: var(--ivory); color: var(--text); }

/* ── Layout ─────────────────────────────── */
.layout    { display: flex; min-height: 100vh; }
.sidebar   { width: 240px; background: var(--pine); color: #fff; display: flex; flex-direction: column; flex-shrink: 0; }
.main      { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.content   { flex: 1; padding: 1.5rem 2rem; overflow-y: auto; }

/* ── Sidebar ─────────────────────────────── */
.sidebar-brand { padding: 1.5rem 1.25rem 1rem; border-bottom: 1px solid rgba(255,255,255,.1); }
.sidebar-brand h1 { font-size: 1.1rem; font-weight: 700; letter-spacing: .03em; color: var(--gold); }
.sidebar-brand small { display: block; font-size: .7rem; opacity: .6; margin-top: 2px; }
.sidebar-nav { flex: 1; padding: 1rem 0; }
.nav-item { display: flex; align-items: center; gap: .75rem; padding: .6rem 1.25rem; font-size: .875rem; cursor: pointer; border-radius: 0; transition: background .15s; color: rgba(255,255,255,.8); text-decoration: none; }
.nav-item:hover, .nav-item.ativo { background: rgba(255,255,255,.1); color: #fff; }
.nav-item .icon { font-size: 1.1rem; flex-shrink: 0; }
.sidebar-user { padding: 1rem 1.25rem; border-top: 1px solid rgba(255,255,255,.1); font-size: .8rem; opacity: .7; }

/* ── Topbar ─────────────────────────────── */
.topbar { background: #fff; border-bottom: 1px solid var(--cream); padding: .875rem 2rem; display: flex; align-items: center; justify-content: space-between; }
.topbar h2 { font-size: 1.15rem; font-weight: 600; }
.topbar-actions { display: flex; gap: .5rem; }

/* ── Cards gerais ─────────────────────────── */
.card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); }
.card-header { padding: 1rem 1.25rem; border-bottom: 1px solid var(--cream); display: flex; align-items: center; justify-content: space-between; }
.card-body { padding: 1.25rem; }

/* ── Botoes ─────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: .4rem; padding: .5rem 1rem; border-radius: 8px; border: none; cursor: pointer; font-size: .875rem; font-weight: 500; transition: opacity .15s; }
.btn:hover { opacity: .85; }
.btn-primary { background: var(--pine); color: #fff; }
.btn-gold    { background: var(--gold); color: #fff; }
.btn-ghost   { background: transparent; border: 1px solid var(--cream); color: var(--text); }
.btn-sm      { padding: .35rem .75rem; font-size: .8rem; }
.btn-icon    { width: 2rem; height: 2rem; padding: 0; border-radius: 6px; justify-content: center; }

/* ── Grid de tarefas ─────────────────────── */
.tarefas-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }

.tarefa-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; border-left: 4px solid var(--pine); }
.tarefa-card.urgente    { border-left-color: #dc2626; }
.tarefa-card.importante { border-left-color: #ea580c; }
.tarefa-card.rotina     { border-left-color: var(--pine); }
.tarefa-card.pontual    { border-left-color: var(--gold); }
.tarefa-card.concluida  { opacity: .55; }

.tarefa-inner { padding: 1rem; }
.tarefa-titulo { font-weight: 600; font-size: .95rem; margin-bottom: .35rem; }
.tarefa-meta   { display: flex; flex-wrap: wrap; gap: .4rem; font-size: .75rem; color: var(--muted); margin-bottom: .6rem; }
.tarefa-actions { display: flex; gap: .5rem; }

.badge { display: inline-block; padding: .15rem .5rem; border-radius: 20px; font-size: .7rem; font-weight: 600; }
.badge-urgente    { background: #fee2e2; color: #991b1b; }
.badge-importante { background: #ffedd5; color: #9a3412; }
.badge-rotina     { background: #d1fae5; color: #065f46; }
.badge-pontual    { background: #e0f2fe; color: #075985; }
.badge-empresa    { background: var(--cream); color: var(--pine); }

/* ── Badges status ─────────────────────── */
.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.status-dot.pendente  { background: #f59e0b; }
.status-dot.concluida { background: #10b981; }

/* ── Filtros ─────────────────────────────── */
.filtros { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: .75rem; }
.filtro-btn { padding: .35rem .9rem; border-radius: 20px; font-size: .8rem; border: 1px solid var(--cream); background: #fff; cursor: pointer; transition: all .15s; }
.filtro-btn.ativo { background: var(--pine); color: #fff; border-color: var(--pine); }
.filtros-wrap { margin-bottom: 1.25rem; }
.secao-sep { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #6b7280; margin: 1.25rem 0 .6rem; padding-bottom: .35rem; border-bottom: 1px solid var(--cream); }
.secao-sep:first-child { margin-top: 0; }

/* ── Modal ─────────────────────────────── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; z-index: 200; padding: 1rem; }
.modal { background: #fff; border-radius: var(--radius); width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,.2); }
.modal-header { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--cream); display: flex; align-items: center; justify-content: space-between; }
.modal-header h3 { font-size: 1.05rem; font-weight: 600; }
.modal-body { padding: 1.5rem; }
.modal-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--cream); display: flex; justify-content: flex-end; gap: .5rem; }

/* ── Formularios ─────────────────────────── */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: .8rem; font-weight: 600; margin-bottom: .35rem; color: var(--muted); }
.form-control { width: 100%; padding: .55rem .75rem; border: 1px solid var(--cream); border-radius: 8px; font-size: .9rem; font-family: inherit; background: #fff; transition: border .15s; }
.form-control:focus { outline: none; border-color: var(--pine); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }

/* ── Tela de login ─────────────────────────── */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--pine); }
.login-card { background: #fff; border-radius: 16px; padding: 2.5rem; width: 100%; max-width: 360px; }
.login-logo { font-size: 1.4rem; font-weight: 700; color: var(--pine); margin-bottom: .25rem; }
.login-sub  { font-size: .85rem; color: var(--muted); margin-bottom: 2rem; }
.login-error { background: #fee2e2; color: #991b1b; border-radius: 8px; padding: .6rem 1rem; font-size: .85rem; margin-bottom: 1rem; }

/* ── Tabela de projetos / colaboradores ───── */
.data-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.data-table th { text-align: left; padding: .6rem 1rem; font-size: .75rem; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--cream); }
.data-table td { padding: .7rem 1rem; border-bottom: 1px solid #f5f0e8; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #fafaf8; }

/* ── Stats ─────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat-card  { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.25rem; }
.stat-num   { font-size: 2rem; font-weight: 700; color: var(--pine); }
.stat-lbl   { font-size: .75rem; color: var(--muted); margin-top: .25rem; }

/* ── Vazio ─────────────────────────────── */
.empty { text-align: center; padding: 3rem 1rem; color: var(--muted); }
.empty-icon { font-size: 2.5rem; margin-bottom: .75rem; }

/* ── Oculto ─────────────────────────────── */
.hidden { display: none !important; }

/* ── Responsivo ─────────────────────────── */
@media (max-width: 768px) {
  .sidebar { width: 0; overflow: hidden; position: fixed; z-index: 100; }
  .sidebar.aberta { width: 240px; }
  .content { padding: 1rem; }
  .topbar  { padding: .75rem 1rem; }
  .form-row { grid-template-columns: 1fr; }
}

/* ── Cor projeto ─────────────────────────── */
.cor-projeto { width: 12px; height: 12px; border-radius: 3px; display: inline-block; flex-shrink: 0; }
