@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

/* ============================================================
   Variáveis
   ============================================================ */
:root {
  --navy:        #0D1B4B;
  --navy-light:  #1a2d6b;
  --red:         #E8004D;
  --red-light:   #fff0f3;
  --red-dark:    #c0003a;
  --bg:          #F4F5F8;
  --white:       #ffffff;
  --border:      #e8e8ec;
  --text:        #1a1a2e;
  --text-muted:  #888898;
  --sidebar-w:   220px;
  --radius:      12px;
  --radius-sm:   8px;
}

/* ============================================================
   Reset
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body   { font-family: 'Inter', sans-serif; background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.5; }
a      { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: inherit; }
ul, ol { list-style: none; }

/* ============================================================
   Sidebar
   ============================================================ */
.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--navy);
  display: flex;
  flex-direction: column;
  z-index: 100;
}

.sidebar__logo {
  padding: 24px 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar__marca {
  color: #fff;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.3px;
  width: 100%;
}

.sidebar__marca img {
  width: 100%;
  height: auto;
  object-fit: contain;
}
.sidebar__marca span { color: var(--red); }
.sidebar__sub {
  color: rgba(255,255,255,0.35);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 2px;
  text-align: center;
}

.sidebar__section-label {
  font-size: 10.5px;
  color: rgba(255,255,255,0.3);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 16px 20px 6px;
}

.nav { padding: 12px 0; flex: 1; overflow-y: auto; }

.nav__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  color: rgba(255,255,255,0.55);
  font-size: 13.5px;
  transition: all 0.15s;
  border-right: 3px solid transparent;
}
.nav__item:hover {
  color: #fff;
  background: rgba(255,255,255,0.06);
}
.nav__item.active {
  color: #fff;
  background: rgba(232,0,77,0.15);
  border-right-color: var(--red);
}
.nav__item i { font-size: 17px; width: 20px; flex-shrink: 0; }

.sidebar__user {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar__avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--red);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; color: #fff;
  flex-shrink: 0;
}
.sidebar__user-name  { font-size: 13px; color: rgba(255,255,255,0.85); font-weight: 500; }
.sidebar__user-role  { font-size: 11px; color: rgba(255,255,255,0.35); }
.sidebar__logout {
  display: block;
  font-size: 11.5px;
  color: rgba(255,255,255,0.35);
  padding: 8px 20px 16px;
  transition: color 0.15s;
}
.sidebar__logout:hover { color: rgba(255,255,255,0.7); }

/* ============================================================
   Layout principal
   ============================================================ */
.main {
  margin-left: var(--sidebar-w);
  padding: 28px 32px;
  min-height: 100vh;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
}
.page-title { font-size: 20px; font-weight: 600; color: var(--navy); }
.page-date  { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

/* ============================================================
   Cards de estatística
   ============================================================ */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  border: 0.5px solid var(--border);
  position: relative;
  overflow: hidden;
}
.stat-card::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 4px; height: 100%;
}
.stat-card--red::after  { background: var(--red); }
.stat-card--navy::after { background: var(--navy); }

.stat-card__icon {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  margin-bottom: 14px;
}
.stat-card__icon--red  { background: var(--red-light);  color: var(--red); }
.stat-card__icon--navy { background: #eef0f8; color: var(--navy); }

.stat-card__num   { font-size: 28px; font-weight: 600; color: var(--navy); line-height: 1; }
.stat-card__label { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* ============================================================
   Grid de seções
   ============================================================ */
.section-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

/* ============================================================
   Card genérico
   ============================================================ */
.card {
  background: var(--white);
  border-radius: var(--radius);
  border: 0.5px solid var(--border);
  padding: 20px;
}

.card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.card__title { font-size: 14px; font-weight: 600; color: var(--navy); }
.card__link  { font-size: 12px; color: var(--red); }
.card__link:hover { text-decoration: underline; }

/* ============================================================
   Projetos
   ============================================================ */
.proj-item {
  padding: 12px 0;
  border-bottom: 0.5px solid #f0f0f4;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.proj-item:last-child { border-bottom: none; padding-bottom: 0; }

.proj-item__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.proj-item__title  { font-size: 13.5px; font-weight: 500; color: var(--navy); }
.proj-item__client { font-size: 11.5px; color: var(--text-muted); margin-top: 1px; }

.progress-row  { display: flex; align-items: center; gap: 8px; }
.progress-bar  { flex: 1; height: 5px; background: #f0f0f4; border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 3px; background: var(--red); transition: width 0.4s; }
.progress-pct  { font-size: 11px; color: var(--text-muted); min-width: 28px; text-align: right; }

/* ============================================================
   Tarefas
   ============================================================ */
.tarefa-item {
  padding: 10px 0;
  border-bottom: 0.5px solid #f0f0f4;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.tarefa-item:last-child { border-bottom: none; padding-bottom: 0; }

.tarefa-item__dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 5px;
}
.dot--urgente { background: var(--red); }
.dot--proximo { background: #f5a623; }
.dot--normal  { background: #ccc; }

.tarefa-item__info   { flex: 1; }
.tarefa-item__title  { font-size: 13px; font-weight: 500; color: var(--navy); }
.tarefa-item__meta   { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }
.tarefa-item__date   { font-size: 11.5px; font-weight: 500; color: var(--red); flex-shrink: 0; }

/* ============================================================
   Vagas
   ============================================================ */
.vagas-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 32px;
}

.vaga-item {
  padding: 10px 0;
  border-bottom: 0.5px solid #f0f0f4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.vaga-item:last-child,
.vaga-item:nth-last-child(2):nth-child(odd) { border-bottom: none; }

.vaga-item__title  { font-size: 13px; font-weight: 500; color: var(--navy); }
.vaga-item__client { font-size: 11.5px; color: var(--text-muted); margin-top: 1px; }

.etapa-wrap  { text-align: right; flex-shrink: 0; }
.etapa-label { font-size: 10.5px; color: var(--text-muted); margin-bottom: 4px; }
.etapa-dots  { display: flex; gap: 3px; }
.etapa-dot   { width: 20px; height: 4px; border-radius: 2px; }
.etapa-dot--done   { background: var(--navy); }
.etapa-dot--active { background: var(--red); }
.etapa-dot--todo   { background: #e8e8ec; }

/* ============================================================
   Badges
   ============================================================ */
.badge {
  font-size: 10.5px;
  padding: 3px 8px;
  border-radius: 20px;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
}
.badge--urgente { background: var(--red-light);  color: var(--red-dark); }
.badge--normal  { background: #eef0f8;            color: var(--navy); }
.badge--ok      { background: #e6f9f0;            color: #0a7c45; }

/* ============================================================
   Responsivo
   ============================================================ */
@media (max-width: 900px) {
  .stats        { grid-template-columns: repeat(2, 1fr); }
  .section-grid { grid-template-columns: 1fr; }
  .vagas-grid   { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  :root { --sidebar-w: 0px; }
  .sidebar { display: none; }
  .main    { padding: 20px 16px; }
  .stats   { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   Login
   ============================================================ */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}

.login-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 0.5px solid var(--border);
  padding: 40px;
  width: 100%;
  max-width: 380px;
}

.login-logo {
  text-align: center;
  margin-bottom: 32px;
  width: 100%;
}

.login-logo img {
  width: 100%;
  height: auto;
  object-fit: contain;
  margin-bottom: 8px;
}
.login-logo__marca {
  font-size: 26px;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: -0.5px;
}
.login-logo__pmo {
  font-size: 26px;
  font-weight: 600;
  color: var(--red);
}
.login-logo__sub {
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 2px;
}

.campo { margin-bottom: 16px; }
.campo__label {
  display: block;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--navy);
  margin-bottom: 6px;
}
.campo__input {
  width: 100%;
  padding: 10px 12px;
  border: 0.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: var(--white);
  transition: border-color 0.15s;
  outline: none;
}
.campo__input:focus { border-color: var(--navy); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  border: none;
  transition: all 0.15s;
}
.btn--primario {
  background: var(--navy);
  color: #fff;
}
.btn--primario:hover { background: var(--navy-light); }
.btn--bloco { width: 100%; margin-top: 8px; }

.alert {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 16px;
}
.alert--erro {
  background: var(--red-light);
  color: var(--red-dark);
  border: 0.5px solid #fcc;
}

/* ============================================================
   Tabela
   ============================================================ */
.tabela {
  width: 100%;
  border-collapse: collapse;
}
.tabela thead th {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0 12px 12px;
  border-bottom: 0.5px solid var(--border);
  text-align: left;
}
.tabela tbody td {
  padding: 14px 12px;
  border-bottom: 0.5px solid #f0f0f4;
  font-size: 13.5px;
}

.tabela tbody tr:last-child td { border-bottom: none; }
.tabela tbody tr:hover td { background: #fafafa; }
.tabela__nome { font-weight: 500; color: var(--navy); }
.tabela__sub  { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.text-center  { text-align: center; }
.text-right   { text-align: right; }

.fc-scrollgrid-sync-table tr { height: 120px;}

/* ============================================================
   Formulários
   ============================================================ */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 20px;
}
.campo--erro .campo__input { border-color: var(--red); }
.campo__erro  { font-size: 12px; color: var(--red); margin-top: 4px; display: block; }
.campo__textarea { resize: vertical; min-height: 80px; }
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 0.5px solid var(--border);
}

/* ============================================================
   Botões adicionais
   ============================================================ */
.btn--secundario {
  background: var(--bg);
  color: var(--navy);
  border: 0.5px solid var(--border);
}
.btn--secundario:hover { background: var(--border); }
.btn--perigo {
  background: var(--red-light);
  color: var(--red-dark);
  border: 0.5px solid #fcc;
}
.btn--perigo:hover { background: #ffdde6; }
.btn--sm { padding: 6px 12px; font-size: 12.5px; }

/* ============================================================
   Topbar com botão voltar
   ============================================================ */
.topbar__back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 4px;
  transition: color 0.15s;
}
.topbar__back:hover { color: var(--navy); }

/* ============================================================
   Abas
   ============================================================ */
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  border-bottom: 0.5px solid var(--border);
  padding-bottom: 0;
}
.tab {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  transition: all 0.15s;
}
.tab:hover  { color: var(--navy); }
.tab.active { color: var(--navy); border-bottom-color: var(--red); }

.tab-content { display: none; }
.tab-content.active { display: block; }

.empty-tab {
  font-size: 13px;
  color: var(--text-muted);
  padding: 16px 0;
}

/* ============================================================
   Empty state
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
}
.empty-state i    { font-size: 40px; margin-bottom: 12px; display: block; }
.empty-state p    { font-size: 14px; margin-bottom: 20px; }

/* ============================================================
   Badge cinza
   ============================================================ */
.badge--gray { background: #f2f2f5; color: #666; }

/* ============================================================
   Select
   ============================================================ */
.campo__select {
  appearance: none;
  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='%23888' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

/* ============================================================
   Badges extras
   ============================================================ */
.badge--green    { background: #e6f9f0; color: #0a7c45; }
.badge--yellow   { background: #fff8e6; color: #92600a; }
.badge--red-soft { background: var(--red-light); color: var(--red-dark); }

/* ============================================================
   Chat
   ============================================================ */
.chat {
  max-height: 400px;
  overflow-y: auto;
  padding: 8px 0;
  margin-bottom: 16px;
  border-bottom: 0.5px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat__msg { max-width: 75%; }
.chat__msg--minha { align-self: flex-end; text-align: right; }

.chat__autor {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 3px;
}
.chat__msg--minha .chat__autor { color: var(--navy); }

.chat__balao {
  display: inline-block;
  background: #f4f5f8;
  border-radius: 12px 12px 12px 2px;
  padding: 8px 12px;
  font-size: 13.5px;
  color: var(--text);
  line-height: 1.5;
}
.chat__msg--minha .chat__balao {
  background: var(--navy);
  color: #fff;
  border-radius: 12px 12px 2px 12px;
}

.chat__hora {
  font-size: 10.5px;
  color: var(--text-muted);
  margin-top: 3px;
}

.chat__anexos { margin-top: 6px; display: flex; flex-direction: column; gap: 3px; }
.chat__anexo {
  font-size: 12px;
  color: var(--navy);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: underline;
}

.chat__form { display: flex; flex-direction: column; gap: 8px; }
.chat__input { resize: none; }
.chat__form-actions { display: flex; justify-content: flex-end; gap: 8px; }
.chat__upload-label { cursor: pointer; }

/* Tarefa concluída na tabela */
.tabela__nome--concluida {
  text-decoration: line-through;
  color: var(--text-muted);
}
