* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { font-family: 'Inter', system-ui, -apple-system, sans-serif; background: #0a0a0f; color: #f5f5f5; min-height: 100vh; }

:root {
  --bg: #0a0a0f;
  --bg-2: #13131a;
  --bg-3: #1a1a25;
  --border: #2a2a38;
  --border-2: #3a3a48;
  --texto: #f5f5f5;
  --texto-2: #a0a0b0;
  --texto-3: #6a6a78;
  --primario: #6366f1;
  --primario-2: #4f46e5;
  --sucesso: #10b981;
  --erro: #ef4444;
  --aviso: #f59e0b;
}

/* Layout principal */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 240px; background: var(--bg-2); border-right: 1px solid var(--border);
  padding: 20px 0; position: fixed; top: 0; left: 0; bottom: 0;
  display: flex; flex-direction: column;
}
.sidebar .logo {
  padding: 0 20px 24px; border-bottom: 1px solid var(--border);
  font-weight: 800; font-size: 20px;
  display: flex; align-items: center; gap: 8px;
}
.sidebar .logo .ic { font-size: 24px; }
.sidebar nav { flex: 1; padding: 14px 12px; display: flex; flex-direction: column; gap: 4px; }
.sidebar nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; border-radius: 10px;
  color: var(--texto-2); text-decoration: none;
  font-size: 14px; font-weight: 500;
  transition: all .15s;
}
.sidebar nav a:hover { background: var(--bg-3); color: var(--texto); }
.sidebar nav a.ativo { background: var(--primario); color: #fff; }
.sidebar nav a .ic { font-size: 18px; }
.sidebar .rodape {
  padding: 14px 20px; border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
  font-size: 13px;
}
.sidebar .rodape .avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #ec4899);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700;
}
.sidebar .rodape .dados { flex: 1; overflow: hidden; }
.sidebar .rodape .nome { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar .rodape .email { font-size: 11px; color: var(--texto-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar .rodape button {
  background: transparent; border: 0; color: var(--texto-3);
  cursor: pointer; font-size: 16px;
}

main.conteudo {
  flex: 1; margin-left: 240px; padding: 30px 40px;
  max-width: 1400px;
}
main h1 {
  font-size: 26px; font-weight: 800; margin-bottom: 4px;
  display: flex; align-items: center; gap: 10px;
}
main .subtitulo { color: var(--texto-2); font-size: 14px; margin-bottom: 26px; }

@media (max-width: 768px) {
  .sidebar { width: 60px; }
  .sidebar .logo span:not(.ic), .sidebar nav a span:not(.ic), .sidebar .rodape .dados { display: none; }
  .sidebar nav a { justify-content: center; padding: 10px; }
  main.conteudo { margin-left: 60px; padding: 20px 16px; }
}

/* Cards */
.card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
}
.card h2 { font-size: 16px; margin-bottom: 14px; font-weight: 700; }
.card h3 { font-size: 14px; margin-bottom: 10px; font-weight: 600; color: var(--texto-2); }

/* Grid */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }

/* Botões */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: 10px;
  font-size: 14px; font-weight: 600;
  border: 0; cursor: pointer; text-decoration: none;
  transition: all .15s;
}
.btn-primario {
  background: var(--primario); color: #fff;
}
.btn-primario:hover { background: var(--primario-2); }
.btn-secundario {
  background: var(--bg-3); color: var(--texto); border: 1px solid var(--border);
}
.btn-secundario:hover { background: var(--border); }
.btn-erro { background: var(--erro); color: #fff; }
.btn-verde { background: var(--sucesso); color: #fff; }

/* Form */
.form-grupo { margin-bottom: 14px; }
.form-grupo label {
  display: block; font-size: 12px; font-weight: 600;
  color: var(--texto-2); margin-bottom: 6px;
  text-transform: uppercase; letter-spacing: 1px;
}
.form-grupo input, .form-grupo select, .form-grupo textarea {
  width: 100%; background: var(--bg); border: 1px solid var(--border);
  color: var(--texto); padding: 11px 14px;
  border-radius: 10px; font-size: 14px; font-family: inherit;
  outline: none; transition: border-color .15s;
}
.form-grupo input:focus, .form-grupo select:focus, .form-grupo textarea:focus {
  border-color: var(--primario);
}
.form-grupo textarea { resize: vertical; min-height: 80px; }

/* Rede ícones */
.rede-ic {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: #fff;
}
.rede-instagram { background: linear-gradient(135deg, #f58529, #dd2a7b, #8134af); }
.rede-tiktok { background: #000; }
.rede-youtube { background: #ff0000; }
.rede-facebook { background: #1877f2; }
.rede-x { background: #000; }
.rede-threads { background: #000; }
.rede-linkedin { background: #0a66c2; }

/* Status badges */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: 6px;
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px;
}
.badge-pendente { background: rgba(245,158,11,.15); color: #f59e0b; }
.badge-postado { background: rgba(16,185,129,.15); color: #10b981; }
.badge-erro { background: rgba(239,68,68,.15); color: #ef4444; }
.badge-processando { background: rgba(59,130,246,.15); color: #3b82f6; }

/* Auth pages */
.auth-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background:
    radial-gradient(ellipse at top left, rgba(99,102,241,.15), transparent 50%),
    radial-gradient(ellipse at bottom right, rgba(236,72,153,.1), transparent 50%),
    var(--bg);
}
.auth-box {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 16px; padding: 34px 28px;
  max-width: 400px; width: 100%;
  box-shadow: 0 10px 40px rgba(0,0,0,.4);
}
.auth-box .logo {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  margin-bottom: 24px;
}
.auth-box .logo .ic {
  width: 60px; height: 60px; border-radius: 14px;
  background: linear-gradient(135deg, #6366f1, #ec4899);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
}
.auth-box h1 { font-size: 20px; font-weight: 800; text-align: center; margin-bottom: 4px; }
.auth-box .sub { text-align: center; color: var(--texto-2); font-size: 13px; margin-bottom: 22px; }
.auth-box .link-alt { text-align: center; margin-top: 14px; font-size: 13px; color: var(--texto-2); }
.auth-box .link-alt a { color: var(--primario); text-decoration: none; font-weight: 600; }
