:root {
  --bg: #0a0f1f;
  --bg-secondary: #10182d;
  --card: rgba(16, 24, 45, 0.9);
  --card-border: rgba(0, 212, 255, 0.15);
  --primary: #00d4ff;
  --primary-dark: #0099cc;
  --secondary: #6c63ff;
  --text: #ffffff;
  --text-soft: #b8c5d6;
  --danger: #ff4d6d;
  --success: #00e676;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --radius: 18px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  background:
    radial-gradient(circle at top right, rgba(0, 212, 255, 0.08), transparent 25%),
    radial-gradient(circle at bottom left, rgba(108, 99, 255, 0.08), transparent 25%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.app-container {
  display: flex;
  min-height: 100vh;
}

/* SIDEBAR */
.sidebar {
  width: 280px;
  background: rgba(5, 10, 25, 0.95);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  padding: 24px 18px;
  position: sticky;
  top: 0;
  height: 100vh;
  backdrop-filter: blur(14px);
}

.logo-area {
  margin-bottom: 30px;
}

.logo-area h2 {
  font-size: 28px;
  color: var(--primary);
}

.logo-area h2 span {
  color: var(--secondary);
}

.logo-area p {
  color: var(--text-soft);
  font-size: 14px;
  margin-top: 4px;
}

.menu {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.menu-btn {
  background: transparent;
  color: var(--text);
  border: 1px solid transparent;
  padding: 14px 16px;
  border-radius: 14px;
  text-align: left;
  cursor: pointer;
  transition: 0.3s ease;
  font-size: 15px;
}

.menu-btn:hover,
.menu-btn.active {
  background: rgba(0, 212, 255, 0.08);
  border-color: rgba(0, 212, 255, 0.18);
  color: var(--primary);
}

/* MAIN */
.main-content {
  flex: 1;
  padding: 28px;
  overflow-x: hidden;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.topbar h1 {
  font-size: 32px;
  margin-bottom: 4px;
}

.subtitle {
  color: var(--text-soft);
  font-size: 14px;
}

.topbar-actions {
  display: flex;
  gap: 10px;
}

button {
  border: none;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  padding: 12px 18px;
  border-radius: 12px;
  cursor: pointer;
  transition: 0.3s ease;
  font-weight: bold;
}

button:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

.danger-btn {
  background: linear-gradient(135deg, #ff4d6d, #d90429);
}

.tab-content {
  display: none;
}

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

/* CARDS */
.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  margin-bottom: 20px;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}

.stat-card h3 {
  font-size: 15px;
  color: var(--text-soft);
  margin-bottom: 10px;
}

.stat-card p {
  font-size: 28px;
  color: var(--primary);
  font-weight: bold;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
}

.progress-wrapper {
  margin-top: 16px;
}

.progress-bar {
  width: 100%;
  height: 18px;
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 10px;
}

.progress-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transition: width 0.4s ease;
}

.summary-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.summary-list li {
  color: var(--text-soft);
}

/* INPUTS */
.input-row,
.filter-row,
.pomodoro-controls-top,
.pomodoro-buttons,
.pomodoro-info {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}

input,
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  color: #fff;
  outline: none;
}

.input-row input,
.input-row select {
  flex: 1;
}

textarea {
  min-height: 240px;
  resize: vertical;
  margin-top: 16px;
}

/* LISTAS */
.list {
  list-style: none;
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.list li {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.05);
  padding: 14px;
  border-radius: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.list li.completed {
  opacity: 0.7;
  text-decoration: line-through;
}

.item-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.badge {
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(0, 212, 255, 0.12);
  color: var(--primary);
}

.item-actions {
  display: flex;
  gap: 8px;
}

.small-btn {
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 12px;
}

.delete-btn {
  background: linear-gradient(135deg, #ff4d6d, #d90429);
}

/* POMODORO */
.pomodoro-timer {
  margin-top: 20px;
  font-size: 64px;
  font-weight: bold;
  text-align: center;
  color: var(--primary);
}

.section-subtitle {
  color: var(--text-soft);
  margin-top: 6px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 18px;
}

.mini-stat {
  background: rgba(255,255,255,0.04);
  padding: 18px;
  border-radius: 16px;
  text-align: center;
}

.mini-stat h4 {
  color: var(--text-soft);
  font-size: 14px;
  margin-bottom: 10px;
}

.mini-stat p {
  font-size: 28px;
  color: var(--primary);
  font-weight: bold;
}

/* RESPONSIVO */
@media (max-width: 1200px) {
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .app-container {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,0.05);
  }

  .menu {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .menu-btn {
    flex: 1 1 calc(50% - 10px);
    text-align: center;
  }

  .main-content {
    padding: 18px;
  }
}

@media (max-width: 600px) {
  .cards-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .menu-btn {
    flex: 1 1 100%;
  }

  .topbar h1 {
    font-size: 24px;
  }

  .pomodoro-timer {
    font-size: 44px;
  }

  .input-row {
    flex-direction: column;
  }

  button {
    width: 100%;
  }
}