/* ================================
   FlowBoard — Main Stylesheet
   Design System: Light/Dark/System
   Fonts: Syne + DM Sans
================================ */

/* =========== LIGHT THEME (padrão) =========== */
:root,
[data-theme="light"] {
  --bg-base: #f4f5f7;
  --bg-surface: #ffffff;
  --bg-elevated: #f0f1f3;
  --bg-card: #ffffff;
  --bg-hover: #e8e9ec;
  --bg-active: #e0e1e6;

  --border: rgba(0,0,0,0.08);
  --border-strong: rgba(0,0,0,0.14);

  --text-primary: #1a1a2e;
  --text-secondary: #5a5a7a;
  --text-muted: #9494aa;

  --accent: #6366f1;
  --recused: #f27474;
  --recused-light:#facfcf;
  --accent-light: #818cf8;
  --accent-glow: rgba(99, 102, 241, 0.2);
  --accent-subtle: rgba(99, 102, 241, 0.08);

  --success: #16a34a;
  --warning: #ca8a04;
  --danger: #dc2626;
  --orange: #ea580c;

  --font-display: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;

  --sidebar-width: 240px;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.10);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.14);
  --shadow-glow: 0 0 30px var(--accent-glow);
}

/* =========== DARK THEME =========== */
[data-theme="dark"] {
  --bg-base: #0a0a0f;
  --bg-surface: #111118;
  --bg-elevated: #16161f;
  --bg-card: #1c1c27;
  --bg-hover: #22222f;
  --bg-active: #28283a;

  --border: rgba(255,255,255,0.07);
  --border-strong: rgba(255,255,255,0.12);

  --text-primary: #f0f0f8;
  --text-secondary: #8888a8;
  --text-muted: #55556a;

  --accent: #6366f1;
  --recused: #f27474;
  --recused-light:#facfcf;
  --accent-light: #818cf8;
  --accent-glow: rgba(99, 102, 241, 0.2);
  --accent-subtle: rgba(99, 102, 241, 0.1);

  --success: #22c55e;
  --warning: #eab308;
  --danger: #ef4444;
  --orange: #f97316;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.5);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.6);
}

/* =========== SYSTEM THEME =========== */
@media (prefers-color-scheme: dark) {
  [data-theme="system"] {
    --bg-base: #0a0a0f;
    --bg-surface: #111118;
    --bg-elevated: #16161f;
    --bg-card: #1c1c27;
    --bg-hover: #22222f;
    --bg-active: #28283a;
    --border: rgba(255,255,255,0.07);
    --border-strong: rgba(255,255,255,0.12);
    --text-primary: #f0f0f8;
    --text-secondary: #8888a8;
    --text-muted: #55556a;
    --accent: #6366f1;
    --accent-light: #818cf8;
    --accent-glow: rgba(99, 102, 241, 0.2);
    --accent-subtle: rgba(99, 102, 241, 0.1);
    --success: #22c55e;
    --warning: #eab308;
    --danger: #ef4444;
    --orange: #f97316;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.5);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.6);
  }
}

/* =========== RESET & BASE =========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background 0.3s, color 0.3s;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-primary);
  background: transparent;
  outline: none;
  border: none;
}
input::placeholder, textarea::placeholder { color: var(--text-muted); }

/* =========== THEME SWITCHER =========== */
.theme-switcher {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 4px;
}

.theme-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  color: var(--text-muted);
  transition: all 0.2s;
  font-size: 14px;
}

.theme-btn:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.theme-btn.active {
  background: var(--bg-surface);
  color: var(--accent);
  box-shadow: var(--shadow-sm);
}

/* =========== APP LAYOUT =========== */
.app-wrapper {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* =========== SIDEBAR =========== */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100vh;
  flex-shrink: 0;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s, border-color 0.3s;
  position: relative;
  z-index: 100;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 16px;
  border-bottom: 1px solid var(--border);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.logo-icon {
  font-size: 22px;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 8px var(--accent-glow));
}

.sidebar-toggle {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all 0.2s;
}
.sidebar-toggle:hover { background: var(--bg-elevated); color: var(--text-primary); }

.sidebar-nav {
  padding: 12px 8px;
  border-bottom: 1px solid var(--border);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 500;
  transition: all 0.2s;
  position: relative;
}

.nav-item:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.nav-item.active {
  background: var(--accent-subtle);
  color: var(--accent);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: var(--accent);
  border-radius: 0 3px 3px 0;
}

.sidebar-boards {
  flex: 1;
  padding: 12px 8px;
  overflow-y: auto;
}

.sidebar-section-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  padding: 0 10px;
  margin-bottom: 8px;
}

.board-item-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13px;
  transition: all 0.2s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.board-item-nav:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.board-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.sidebar-footer {
  padding: 12px 10px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-direction: column;
}

.sidebar-footer-top {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-strong);
  flex-shrink: 0;
}

.user-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.user-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-plan {
  font-size: 11px;
  color: var(--accent-light);
}

.logout-btn {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all 0.2s;
  flex-shrink: 0;
}

.logout-btn:hover {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

/* =========== MAIN CONTENT =========== */
.main-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--bg-base);
  position: relative;
  transition: background 0.3s;
}

/* =========== DASHBOARD =========== */
.dashboard-page {
  padding: 32px 36px;
  max-width: 1200px;
  animation: fadeUp 0.4s ease;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 32px;
}

.page-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.page-subtitle {
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 4px;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 36px;
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  overflow: hidden;
  transition: all 0.2s;
  box-shadow: var(--shadow-sm);
}

.stat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top left, rgba(99,102,241,0.05) 0%, transparent 60%);
  pointer-events: none;
}

.stat-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon-boards { background: rgba(99,102,241,0.12); color: var(--accent); }
.stat-icon-cards { background: rgba(236,72,153,0.12); color: #ec4899; }
.stat-icon-plan { background: rgba(234,179,8,0.12); color: #ca8a04; }

.stat-value {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.stat-label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 3px;
}

.stat-limit {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg-elevated);
  padding: 3px 8px;
  border-radius: 20px;
}

.upgrade-link {
  margin-left: auto;
  font-size: 12px;
  color: var(--accent);
  font-weight: 500;
  transition: color 0.2s;
}
.upgrade-link:hover { color: var(--accent-light); }

/* Boards Section */
.boards-section { margin-bottom: 36px; }

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 16px;
}

.boards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

/* Board Cards */
.board-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
}

.board-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md), 0 0 0 1px var(--accent-glow);
}

.board-card-header {
  height: 90px;
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 12px 14px;
}

.board-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.35) 100%);
  opacity: 0;
  transition: opacity 0.2s;
}

.board-card:hover .board-card-overlay { opacity: 1; }

.board-card-actions {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.2s;
}

.board-card:hover .board-card-actions { opacity: 1; }

.board-action-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.9);
  transition: all 0.2s;
}

.board-action-btn:hover { background: rgba(0,0,0,0.6); color: #fff; }
.board-action-btn.starred { color: #fbbf24; }

.board-card-name {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
  position: relative;
  z-index: 1;
}

.board-card-body {
  padding: 12px 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.board-card-desc {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.5;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.board-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

.board-card-stats {
  display: flex;
  align-items: center;
  gap: 10px;
}

.board-stat {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  color: var(--text-muted);
}

.board-members-mini {
  display: flex;
}

.member-mini {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--bg-surface);
  margin-left: -4px;
  object-fit: cover;
}
.member-mini:first-child { margin-left: 0; }

/* Create Board Card */
.board-card-create {
  background: var(--bg-surface);
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 160px;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
}

.board-card-create:hover {
  border-color: var(--accent);
  background: var(--accent-subtle);
  color: var(--accent);
}

.create-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: all 0.2s;
}

.board-card-create:hover .create-icon {
  background: var(--accent-subtle);
  color: var(--accent);
}

/* =========== BUTTONS =========== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 500;
  font-family: var(--font-body);
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--accent);
  border-radius: var(--radius-sm);
  color: #fff;
  width: 100%;
  padding: 13px 13px;
  border: none;
}

.btn-primary:hover {
  background: var(--accent-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 30px var(--accent-glow);
}

.btn-ghost {
  background: var(--recused);
  border-radius: var(--radius-sm);
  color: #fff;
  width: 100%;
  padding: 13px 13px;
  border: none;
}

.btn-ghost:hover {
  background: var(--recused-light);
  color: #787474;
  transform: translateY(-1px);
  box-shadow: 0 4px 30px var(--accent-glow);
}

.btn-danger {
  background: rgba(239,68,68,0.1);
  color: var(--danger);
  border: 1px solid rgba(239,68,68,0.2);
}

.btn-danger:hover {
  background: rgba(239,68,68,0.2);
}

.btn-create {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  font-family: var(--font-body);
  box-shadow: 0 0 20px var(--accent-glow);
  transition: all 0.2s;
}

.btn-create:hover {
  background: var(--accent-light);
  transform: translateY(-1px);
}

.btn-primary-full {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background: var(--accent);
  color: #fff;
  padding: 13px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-body);
  transition: all 0.2s;
  box-shadow: 0 4px 20px var(--accent-glow);
  cursor: pointer;
  border: none;
}

/* =========== MODALS =========== */
/*.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;*/
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: 1000;

  /* FECHADO por padrão */
  display: none;

  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.is-open {
  display: flex;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 460px;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.modal-header h3 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 20px;
  transition: all 0.2s;
}

.modal-close:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.modal-form { padding: 20px 24px; }

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 20px;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* Board Preview */
.board-preview {
  border-radius: var(--radius-sm);
  height: 100px;
  display: flex;
  align-items: flex-end;
  padding: 12px 14px;
  margin-bottom: 20px;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

/* Color Picker */
.color-picker {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.color-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  transition: all 0.2s;
  border: 2px solid transparent;
}

.color-swatch:hover { transform: scale(1.15); }
.color-swatch.active {
  border-color: #fff;
  box-shadow: 0 0 0 2px currentColor;
  transform: scale(1.1);
}

/* =========== FORM INPUTS =========== */
.form-group { margin-bottom: 16px; }

.form-group label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  pointer-events: none;
}

.input-wrap input {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 12px 11px 38px;
  color: var(--text-primary);
  transition: border-color 0.2s;
}

.input-wrap input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}

.form-group input[type="text"],
.form-group textarea,
.form-group select {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: var(--text-primary);
  transition: border-color 0.2s;
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}

.form-group 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='%23666' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
}

.form-group-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.form-group-row input, .form-group-row select {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: var(--text-primary);
}

.forgot-link {
  color: var(--accent);
  font-size: 12px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  transition: color 0.2s;
}
.forgot-link:hover { color: var(--accent-light); }

/* Custom Checkbox */
.form-check { margin: 4px 0 16px; }

.check-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13.5px;
  color: var(--text-secondary);
}

.check-label input[type="checkbox"] { display: none; }

.checkmark {
  width: 16px;
  height: 16px;
  border: 2px solid var(--border-strong);
  border-radius: 4px;
  transition: all 0.2s;
  flex-shrink: 0;
}

.check-label input:checked + .checkmark {
  background: var(--accent);
  border-color: var(--accent);
}

/* =========== AUTH STYLES =========== */
.auth-body {
  background: var(--bg-base);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.auth-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.auth-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
  animation: drift 8s ease-in-out infinite alternate;
}

.auth-orb-1 {
  width: 400px; height: 400px;
  background: var(--accent);
  top: -100px; right: -100px;
  animation-delay: 0s;
}

.auth-orb-2 {
  width: 300px; height: 300px;
  background: #8b5cf6;
  bottom: -80px; left: -80px;
  animation-delay: -3s;
}

.auth-orb-3 {
  width: 200px; height: 200px;
  background: #ec4899;
  top: 50%; left: 50%;
  animation-delay: -6s;
}

@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(20px, -20px) scale(1.05); }
}

.auth-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(99,102,241,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99,102,241,0.04) 1px, transparent 1px);
  background-size: 50px 50px;
}

.auth-container {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 420px;
  padding: 20px;
}

.auth-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 32px;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
}

.auth-brand-text {
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 32px;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-lg);
}

.auth-card-header {
  margin-bottom: 28px;
  text-align: center;
}

.auth-card-header h1 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.auth-card-header p { color: var(--text-secondary); font-size: 14px; }

.auth-error {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--danger);
  font-size: 13px;
  margin-bottom: 20px;
}

.auth-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 13.5px;
  color: var(--text-secondary);
}

.auth-footer a { color: var(--accent); font-weight: 500; transition: color 0.2s; }
.auth-footer a:hover { color: var(--accent-light); }

/* =========== TOAST =========== */
.toast {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9999;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s ease, toastOut 0.3s ease 3s forwards;
  max-width: 320px;
}

.toast-success {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: var(--success);
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* =========== SCROLLBAR =========== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* =========== RESPONSIVE =========== */
@media (max-width: 768px) {
  .sidebar { position: fixed; left: -240px; transition: left 0.3s ease; }
  .sidebar.open { left: 0; box-shadow: var(--shadow-lg); }
  .dashboard-page { padding: 20px 16px; }
  .page-header { flex-direction: column; gap: 16px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .boards-grid { grid-template-columns: 1fr; }
}
