/* RESET SIMPLES */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* CORES E BASE */
:root {
  --primary: #3b82f6;
  --primary-dark: #2563eb;
  --bg-dark: #020617;
  --bg-dark-elevated: #020617;
  --bg-card: #020617;
  --bg-card-soft: #020617;
  --border-dark: #1f2937;
  --text-light: #e5e7eb;
  --muted: #9ca3af;
  --danger: #f97373;
}

/* BODY VARIAÇÕES */
body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Tela de login */
.bg-login {
  min-height: 100vh;
  background: radial-gradient(circle at top, #111827, #020617 60%, #000000 100%);
  color: var(--text-light);
}

/* Painel */
.bg-app-dark {
  min-height: 100vh;
  background: #020617;
  color: var(--text-light);
}

/* CENTRO */
.center-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

/* CARD GENÉRICO */
.card {
  background: radial-gradient(circle at top left, #111827, #020617 55%);
  border-radius: 16px;
  padding: 20px 22px;
  box-shadow: 0 18px 45px rgba(15,23,42,0.8);
  border: 1px solid rgba(148,163,184,0.35);
}

/* CARD LOGIN */
.card-login {
  width: 100%;
  max-width: 380px;
  backdrop-filter: blur(14px);
}

.card-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 4px;
}

.card-subtitle {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 20px;
}

/* FORM */
.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 12px;
}

.form-group label {
  font-size: 14px;
  margin-bottom: 4px;
  color: var(--muted);
}

.form-group input,
.form-group textarea,
.form-inline select {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border-dark);
  font-size: 14px;
  background: #020617;
  color: var(--text-light);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #6b7280;
}

.form-group input:focus,
.form-group textarea:focus,
.form-inline select:focus {
  outline: 2px solid rgba(59,130,246,0.65);
  border-color: var(--primary);
}

/* BOTÕES */
.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  border: none;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s, box-shadow 0.1s;
}

.btn-primary {
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: white;
  box-shadow: 0 10px 30px rgba(37,99,235,0.5);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  transform: translateY(-1px);
}

.btn-secondary {
  background: #111827;
  color: #e5e7eb;
  border: 1px solid #1f2937;
}

.btn-secondary:hover {
  background: #1f2937;
}

.btn-outline {
  background: transparent;
  color: #e5e7eb;
  border: 1px solid rgba(148,163,184,0.7);
}

.btn-outline:hover {
  background: rgba(15,23,42,0.9);
}

.error-text {
  margin-top: 10px;
  color: var(--danger);
  font-size: 13px;
}

.info-text {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.muted {
  color: var(--muted);
  font-size: 13px;
}

/* TOPO DO PAINEL */
.topbar {
  height: 56px;
  background: linear-gradient(90deg, #020617, #0b1120, #020617);
  color: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  border-bottom: 1px solid #1f2937;
}

.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo {
  font-weight: 800;
  letter-spacing: 0.12em;
  font-size: 14px;
  text-transform: uppercase;
  color: #e5e7eb;
}

.topbar-divider {
  width: 1px;
  height: 22px;
  background: #1f2937;
}

.topbar-user {
  font-size: 14px;
  color: #e5e7eb;
}

.topbar-tag {
  font-size: 11px;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(37,99,235,0.2);
  color: #bfdbfe;
  text-transform: uppercase;
}

/* LAYOUT PRINCIPAL DO PAINEL */
.layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: calc(100vh - 56px);
}

/* SIDEBAR */
.sidebar {
  background: radial-gradient(circle at top, #020617, #020617 60%);
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-right: 1px solid #020617;
}

.sidebar-link {
  border: none;
  background: transparent;
  color: #9ca3af;
  padding: 8px 12px;
  text-align: left;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.15s, color 0.15s, transform 0.08s;
}

.sidebar-link::before {
  content: "•";
  font-size: 16px;
  color: #4b5563;
}

.sidebar-link:hover {
  background: #020617;
  color: #e5e7eb;
  transform: translateX(1px);
}

.sidebar-link.active {
  background: linear-gradient(135deg, #1f2937, #020617);
  color: #f9fafb;
  box-shadow: inset 0 0 0 1px rgba(55,65,81,0.8);
}

.sidebar-link.active::before {
  color: #3b82f6;
}

/* MAIN */
.main {
  padding: 18px;
}

/* SEÇÕES */
.section {
  display: none;
}

.section.visible {
  display: block;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.section h2 {
  margin-bottom: 8px;
}

/* CARDS GRID */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 8px;
}

/* CARD VARIAÇÃO PARA PAINEL */
.cards-grid .card {
  background: radial-gradient(circle at top left, #020617, #020617 70%);
  border-radius: 14px;
}

/* FORM INLINE */
.form-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

/* FORM CARD EM SEÇÕES */
.section .form {
  margin-top: 8px;
  max-width: 520px;
}

/* LISTA DE TAREFAS */
.list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tarefa-card {
  background: #020617;
  border-radius: 12px;
  padding: 12px 14px;
  border: 1px solid #1f2937;
  box-shadow: 0 12px 30px rgba(15,23,42,0.7);
  position: relative;
  overflow: hidden;
}

.tarefa-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top left, rgba(59,130,246,0.12), transparent 55%);
  pointer-events: none;
}

.tarefa-title {
  font-weight: 600;
  margin-bottom: 4px;
}

.tarefa-meta {
  font-size: 12px;
  color: var(--muted);
}

/* RESPONSIVO */
@media (max-width: 768px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    flex-direction: row;
    overflow-x: auto;
    border-right: none;
    border-bottom: 1px solid #020617;
  }

  .sidebar-link {
    white-space: nowrap;
  }

  .main {
    padding: 14px;
  }
}
