/* ══════════════════════════════════════════════════════
   Etivox Tarefas — Design System (Dark Premium)
   ══════════════════════════════════════════════════════ */

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

/* ── CSS Variables ──────────────────────────────────── */
:root {
  /* Background */
  --bg-primary: #0a0a1a;
  --bg-secondary: #111128;
  --bg-card: #16163a;
  --bg-card-hover: #1c1c4a;
  --bg-input: #1a1a3e;
  --bg-sidebar: rgba(17, 17, 40, 0.85);
  --bg-modal-overlay: rgba(0, 0, 0, 0.7);

  /* Accent */
  --accent-primary: #6C5CE7;
  --accent-secondary: #A29BFE;
  --accent-gradient: linear-gradient(135deg, #6C5CE7, #74B9FF);
  --accent-glow: rgba(108, 92, 231, 0.3);

  /* Text */
  --text-primary: #f0f0f8;
  --text-secondary: #a0a0c0;
  --text-muted: #6b6b8d;

  /* Status Colors */
  --color-success: #00D68F;
  --color-warning: #FFD93D;
  --color-danger: #FF6B6B;
  --color-info: #74B9FF;

  /* Priority */
  --priority-low: #00D68F;
  --priority-medium: #FFD93D;
  --priority-high: #FF9F43;
  --priority-urgent: #FF6B6B;

  /* Kanban columns */
  --col-inbox: #A29BFE;
  --col-todo: #74B9FF;
  --col-progress: #FFD93D;
  --col-done: #00D68F;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;

  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 100px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 30px var(--accent-glow);

  /* Font */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-xs: 0.75rem;
  --font-sm: 0.8125rem;
  --font-base: 0.875rem;
  --font-md: 1rem;
  --font-lg: 1.25rem;
  --font-xl: 1.5rem;
  --font-2xl: 2rem;

  /* Transitions */
  --transition-fast: 150ms ease-out;
  --transition-normal: 250ms ease-out;
  --transition-slow: 400ms ease-out;

  /* Sidebar */
  --sidebar-width: 260px;
  --sidebar-collapsed: 70px;
  --header-height: 60px;
}

/* ── Light Theme ───────────────────────────────────── */
[data-theme="light"] {
  /* Background */
  --bg-primary: #f5f5fa;
  --bg-secondary: #eeeef5;
  --bg-card: #ffffff;
  --bg-card-hover: #f0f0f8;
  --bg-input: #f0f0f5;
  --bg-sidebar: rgba(255, 255, 255, 0.92);
  --bg-modal-overlay: rgba(0, 0, 0, 0.4);

  /* Accent (stays vibrant) */
  --accent-primary: #5B4CD6;
  --accent-secondary: #6C5CE7;
  --accent-glow: rgba(108, 92, 231, 0.15);

  /* Text */
  --text-primary: #1a1a2e;
  --text-secondary: #555577;
  --text-muted: #8888aa;

  /* Status Colors (slightly darker for contrast) */
  --color-success: #00B87A;
  --color-warning: #E6C300;
  --color-danger: #E55555;
  --color-info: #4A9FE5;

  /* Shadows (lighter) */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.1);
  --shadow-glow: 0 0 20px rgba(108, 92, 231, 0.1);
}

[data-theme="light"] .input,
[data-theme="light"] .textarea,
[data-theme="light"] .select {
  border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .card {
  border-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .sidebar {
  border-right: 1px solid rgba(0, 0, 0, 0.08);
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
  background: #ccc;
}

[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
  background: #aaa;
}

/* ── Reset ──────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow: hidden;
  height: 100vh;
}

a { color: var(--accent-secondary); text-decoration: none; }
a:hover { color: var(--accent-primary); }

/* ── Scrollbar ──────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--text-muted);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover { background: var(--text-secondary); }

/* ── Utilities ──────────────────────────────────────── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.text-muted { color: var(--text-secondary); }
.text-sm { font-size: var(--font-sm); }
.font-bold { font-weight: 700; }
.w-full { width: 100%; }
.hidden { display: none !important; }

/* ── Buttons ────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-family);
  font-size: var(--font-base);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent-gradient);
  color: white;
  box-shadow: var(--shadow-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 40px var(--accent-glow);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid rgba(255,255,255,0.1);
}
.btn-secondary:hover { background: var(--bg-card-hover); }

.btn-danger {
  background: rgba(255, 107, 107, 0.15);
  color: var(--color-danger);
  border: 1px solid rgba(255, 107, 107, 0.3);
}
.btn-danger:hover { background: rgba(255, 107, 107, 0.25); }

.btn-sm { padding: 6px 12px; font-size: var(--font-sm); }
.btn-icon {
  width: 36px; height: 36px; padding: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition-fast);
}
.btn-icon:hover { background: var(--bg-card); color: var(--text-primary); }

/* ── Inputs ─────────────────────────────────────────── */
.input, .textarea, .select {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-family);
  font-size: var(--font-base);
  transition: border-color var(--transition-fast);
}
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.15);
}
.input::placeholder { color: var(--text-muted); }
.textarea { resize: vertical; min-height: 80px; }
.label {
  display: block;
  font-size: var(--font-sm);
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: var(--space-xs);
}

/* ── Cards ──────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  transition: all var(--transition-normal);
}
.card:hover {
  border-color: rgba(108, 92, 231, 0.3);
  box-shadow: var(--shadow-glow);
}

/* ── Badge / Tag ────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: var(--font-xs);
  font-weight: 600;
  letter-spacing: 0.3px;
}
.badge-accent {
  background: rgba(108, 92, 231, 0.2);
  color: var(--accent-secondary);
}
.badge-success {
  background: rgba(0, 214, 143, 0.15);
  color: var(--color-success);
}
.badge-warning {
  background: rgba(255, 217, 61, 0.15);
  color: var(--color-warning);
}
.badge-danger {
  background: rgba(255, 107, 107, 0.15);
  color: var(--color-danger);
}

/* ── Priority Dot ───────────────────────────────────── */
.priority-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.priority-dot.low { background: var(--priority-low); }
.priority-dot.medium { background: var(--priority-medium); }
.priority-dot.high { background: var(--priority-high); }
.priority-dot.urgent {
  background: var(--priority-urgent);
  animation: pulse-dot 1.5s infinite;
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,107,107,0.5); }
  50% { box-shadow: 0 0 0 6px rgba(255,107,107,0); }
}

/* ── Toast ──────────────────────────────────────────── */
.toast-container {
  position: fixed;
  top: var(--space-lg);
  right: var(--space-lg);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}
.toast {
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: var(--font-sm);
  font-weight: 500;
  animation: toast-in 0.3s ease-out;
  min-width: 280px;
  box-shadow: var(--shadow-md);
}
.toast-success { background: rgba(0,214,143,0.15); color: var(--color-success); border: 1px solid rgba(0,214,143,0.3); }
.toast-error { background: rgba(255,107,107,0.15); color: var(--color-danger); border: 1px solid rgba(255,107,107,0.3); }
.toast-info { background: rgba(116,185,255,0.15); color: var(--color-info); border: 1px solid rgba(116,185,255,0.3); }

@keyframes toast-in {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}
