/* ============================================================
   TaskMaster Pro - CSS Principal
   ============================================================ */

:root {
  --bg: #0f0f13;
  --bg-2: #16161d;
  --bg-3: #1e1e28;
  --bg-4: #252535;
  --border: rgba(255,255,255,0.07);
  --border-hover: rgba(255,255,255,0.15);

  --text: #e8e8f0;
  --text-2: #9090a8;
  --text-3: #60607a;

  --accent: #6366f1;
  --accent-hover: #7577f3;
  --accent-bg: rgba(99,102,241,0.12);

  --green: #10b981;
  --yellow: #f59e0b;
  --red: #ef4444;
  --pink: #ec4899;
  --cyan: #06b6d4;
  --purple: #8b5cf6;

  --priority-critical: #ef4444;
  --priority-high: #f97316;
  --priority-medium: #f59e0b;
  --priority-low: #10b981;
  --priority-none: #64748b;

  --sidebar-w: 240px;
  --topbar-h: 56px;
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 16px;

  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 48px rgba(0,0,0,0.6);

  --font: 'Space Grotesk', sans-serif;
  --mono: 'JetBrains Mono', monospace;
}

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

html { font-size: 14px; }

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

.hidden { display: none !important; }

/* ============================================================
   LOGIN
   ============================================================ */
.login-screen {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
}

.login-bg {
  position: absolute; inset: 0;
  background: var(--bg);
  overflow: hidden;
}

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

.login-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.3;
}
.blob1 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, var(--accent), transparent);
  top: -100px; left: -100px;
  animation: float 8s ease-in-out infinite;
}
.blob2 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, var(--purple), transparent);
  bottom: -50px; right: 10%;
  animation: float 10s ease-in-out infinite reverse;
}

@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-30px) scale(1.05); }
}

.login-card {
  position: relative;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  width: 400px;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.5s ease;
}

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

.login-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 32px;
}

.login-logo h1 { font-size: 20px; font-weight: 700; color: var(--text); }
.login-logo p { font-size: 12px; color: var(--text-3); margin-top: 2px; }

.login-hint {
  text-align: center;
  font-size: 11px;
  color: var(--text-3);
  margin-top: 16px;
}

/* ============================================================
   LOGO MARK
   ============================================================ */
.logo-mark {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800; color: white;
  letter-spacing: -0.5px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(99,102,241,0.4);
}
.logo-mark.sm { width: 32px; height: 32px; font-size: 11px; border-radius: 8px; }

/* ============================================================
   LAYOUT
   ============================================================ */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  height: 100vh;
  transition: grid-template-columns 0.25s ease;
}
.app.collapsed { --sidebar-w: 64px; }

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: width 0.25s ease;
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  height: var(--topbar-h);
}

.logo-text {
  font-weight: 700;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  transition: opacity 0.2s;
}

.sidebar-toggle {
  margin-left: auto;
  opacity: 0.4;
  transition: opacity 0.2s;
}
.sidebar-toggle:hover { opacity: 1; }

.sidebar-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px;
  padding: 8px 12px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: text;
}

.sidebar-search svg { color: var(--text-3); flex-shrink: 0; }
.sidebar-search input {
  background: none; border: none; outline: none;
  color: var(--text); font-family: var(--font);
  font-size: 13px; flex: 1; min-width: 0;
}
.sidebar-search input::placeholder { color: var(--text-3); }
.sidebar-search kbd {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-3);
  background: var(--bg-4);
  padding: 2px 5px;
  border-radius: 4px;
  white-space: nowrap;
}

.sidebar-nav { padding: 4px 8px; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: none;
  background: none;
  color: var(--text-2);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.15s;
  text-align: left;
}

.nav-item:hover { background: var(--bg-3); color: var(--text); }
.nav-item.active { background: var(--accent-bg); color: var(--accent); }
.nav-item .badge {
  margin-left: auto;
  background: var(--accent);
  color: white;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 10px;
}

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

.sidebar-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 8px 4px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-3);
}

.btn-icon-sm {
  width: 20px; height: 20px;
  border: none; background: none;
  color: var(--text-3);
  cursor: pointer;
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 300;
  transition: all 0.15s;
}
.btn-icon-sm:hover { background: var(--bg-3); color: var(--text); }

.project-nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 8px;
  border: none;
  background: none;
  color: var(--text-2);
  font-family: var(--font);
  font-size: 13px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.15s;
  text-align: left;
}
.project-nav-item:hover { background: var(--bg-3); color: var(--text); }
.project-nav-item.active { background: var(--accent-bg); color: var(--text); }
.project-nav-item .picon { font-size: 15px; }
.project-nav-item .pname {
  flex: 1; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
.project-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

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

.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-info span { display: block; }
.sidebar-user-info span:first-child { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user-role { font-size: 11px; color: var(--text-3); }

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.main-content {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg);
}

.topbar {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  flex-shrink: 0;
}

.topbar-left { display: flex; align-items: center; gap: 12px; }
.topbar-left h2 { font-size: 16px; font-weight: 700; }

.breadcrumb {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--text-3);
}
.breadcrumb span + span::before { content: '/'; margin-right: 6px; }

.topbar-right { display: flex; align-items: center; gap: 8px; }

.view-switcher {
  display: flex;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 2px;
}
.view-btn {
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 28px;
  border: none; background: none;
  color: var(--text-3);
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.15s;
}
.view-btn:hover { color: var(--text); }
.view-btn.active { background: var(--bg-4); color: var(--accent); }

.bell-btn { position: relative; }
.notif-dot {
  position: absolute;
  top: 4px; right: 4px;
  width: 7px; height: 7px;
  background: var(--red);
  border-radius: 50%;
  border: 1px solid var(--bg);
}

.view-container {
  flex: 1;
  overflow: auto;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-primary {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 14px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(99,102,241,0.4); }

.btn-ghost {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 14px;
  background: none;
  color: var(--text-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-ghost:hover { border-color: var(--border-hover); color: var(--text); }

.btn-icon {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  border: none; background: none;
  color: var(--text-2);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.15s;
}
.btn-icon:hover { background: var(--bg-3); color: var(--text); }

.btn-sm {
  padding: 5px 12px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-sm:hover { background: var(--accent-hover); }

.btn-full { width: 100%; justify-content: center; padding: 12px; font-size: 14px; }

.btn-danger-sm {
  padding: 6px 12px;
  background: rgba(239,68,68,0.1);
  color: var(--red);
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
  width: 100%;
}
.btn-danger-sm:hover { background: rgba(239,68,68,0.2); }

/* ============================================================
   FORMS
   ============================================================ */
.field-group { display: flex; flex-direction: column; gap: 5px; }
.field-group label { font-size: 12px; font-weight: 500; color: var(--text-2); }

input[type="text"], input[type="email"], input[type="password"],
input[type="date"], input[type="number"], select, textarea {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  padding: 8px 12px;
  outline: none;
  width: 100%;
  transition: border-color 0.15s;
  -webkit-appearance: none;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}

input[type="color"] {
  width: 44px; height: 38px;
  padding: 2px;
  cursor: pointer;
}

select option { background: var(--bg-3); color: var(--text); }

textarea { resize: vertical; }

.form-row { display: flex; gap: 12px; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.flex-1 { flex: 1; }

.icon-input { text-align: center; font-size: 18px; width: 60px; }
.color-input { width: 44px; padding: 2px; }
.icon-color-row { display: flex; gap: 10px; align-items: flex-end; }

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

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

.modal {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  animation: modalIn 0.2s ease;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal { max-width: 480px; }
.modal-lg { max-width: 640px; }
.modal-xl { max-width: 900px; }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 15px; font-weight: 700; }

.modal-body {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
}

/* Task Detail Split Modal */
.modal-split {
  display: flex;
  flex: 1;
  min-height: 0;
}

.modal-main {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.modal-sidebar {
  width: 240px;
  border-left: 1px solid var(--border);
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.task-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.task-detail-breadcrumb {
  font-size: 11px;
  color: var(--text-3);
}

.task-detail-title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  outline: none;
  border-radius: 4px;
  padding: 4px;
  margin: -4px;
}
.task-detail-title:focus { background: var(--bg-3); }

.task-detail-desc {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.7;
  outline: none;
  padding: 8px;
  border-radius: var(--radius-sm);
  min-height: 60px;
  border: 1px solid transparent;
  transition: border-color 0.15s;
}
.task-detail-desc:focus { border-color: var(--border); background: var(--bg-3); }
.task-detail-desc:empty::before { content: attr(data-placeholder); color: var(--text-3); }

.task-section h4 {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-3);
  margin-bottom: 10px;
  display: flex; align-items: center; gap: 8px;
}

.badge-sm {
  background: var(--bg-4);
  color: var(--text-3);
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 8px;
  font-weight: 600;
  font-family: var(--mono);
}

.detail-field { display: flex; flex-direction: column; gap: 4px; }
.detail-field label { font-size: 11px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; }
.detail-field select, .detail-field input { font-size: 12px; padding: 6px 10px; }
.detail-value { font-size: 12px; color: var(--text-2); }
.detail-actions { margin-top: 8px; }

/* ============================================================
   DASHBOARD VIEW
   ============================================================ */
.dashboard {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 1200px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.stat-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  transition: all 0.2s;
}
.stat-card:hover { border-color: var(--border-hover); transform: translateY(-2px); }

.stat-label { font-size: 11px; color: var(--text-3); font-weight: 500; margin-bottom: 6px; }
.stat-value { font-size: 28px; font-weight: 700; line-height: 1; }
.stat-card.red .stat-value { color: var(--red); }
.stat-card.green .stat-value { color: var(--green); }
.stat-card.yellow .stat-value { color: var(--yellow); }
.stat-card.accent .stat-value { color: var(--accent); }

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

.card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.card-header h3 { font-size: 13px; font-weight: 600; }

/* Task List */
.task-list { }
.task-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
}
.task-row:last-child { border-bottom: none; }
.task-row:hover { background: var(--bg-3); }

.priority-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.priority-critical { background: var(--priority-critical); }
.priority-high { background: var(--priority-high); }
.priority-medium { background: var(--priority-medium); }
.priority-low { background: var(--priority-low); }
.priority-none { background: var(--priority-none); }

.task-row-title { flex: 1; font-size: 13px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-row-meta { display: flex; align-items: center; gap: 8px; }
.task-row-project { font-size: 11px; color: var(--text-3); }

.status-pill {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
}
.status-todo { background: rgba(100,116,139,0.15); color: #94a3b8; }
.status-in_progress { background: rgba(99,102,241,0.15); color: var(--accent); }
.status-in_review { background: rgba(245,158,11,0.15); color: var(--yellow); }
.status-done { background: rgba(16,185,129,0.15); color: var(--green); }
.status-cancelled { background: rgba(239,68,68,0.1); color: var(--red); }

/* ============================================================
   KANBAN VIEW
   ============================================================ */
.kanban-board {
  display: flex;
  gap: 16px;
  padding: 20px 24px;
  overflow-x: auto;
  min-height: 100%;
  align-items: flex-start;
}

.kanban-col {
  width: 300px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.kanban-col-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.col-title { flex: 1; font-size: 13px; font-weight: 600; }
.col-count {
  font-size: 10px;
  font-weight: 600;
  background: var(--bg-4);
  padding: 2px 7px;
  border-radius: 8px;
  color: var(--text-3);
  font-family: var(--mono);
}
.col-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.kanban-tasks {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 80px;
}

.task-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  cursor: pointer;
  transition: all 0.15s;
  animation: cardIn 0.2s ease;
}

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

.task-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.task-card-title {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 10px;
}

.task-card-labels {
  display: flex; flex-wrap: wrap; gap: 4px;
  margin-bottom: 10px;
}

.label-chip {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 8px;
}

.task-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.task-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: var(--text-3);
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.meta-item.overdue { color: var(--red); }

.user-avatar-mini {
  width: 24px; height: 24px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.priority-badge {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 6px;
  border-radius: 4px;
}

.add-task-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 8px 12px;
  background: none;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--text-3);
  font-family: var(--font);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
}
.add-task-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-bg); }

.kanban-add-col {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: none;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--text-3);
  font-family: var(--font);
  font-size: 13px;
  cursor: pointer;
  width: 200px;
  flex-shrink: 0;
  transition: all 0.15s;
}
.kanban-add-col:hover { border-color: var(--accent); color: var(--accent); }

/* ============================================================
   LIST VIEW
   ============================================================ */
.list-view { padding: 0 24px 24px; }

.list-group { margin-bottom: 16px; }

.list-group-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
  user-select: none;
}

.list-group-header .chevron { font-size: 10px; transition: transform 0.2s; }
.list-group-header.collapsed .chevron { transform: rotate(-90deg); }

.list-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.list-table th {
  text-align: left;
  padding: 8px 14px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--bg-3);
  border-bottom: 1px solid var(--border);
}

.list-table td {
  padding: 10px 14px;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.list-table tr:last-child td { border-bottom: none; }
.list-table tr:hover td { background: var(--bg-3); cursor: pointer; }

/* ============================================================
   TABLE VIEW (Airtable-like)
   ============================================================ */
.table-view { padding: 0 24px 24px; overflow: auto; }

.grid-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 13px;
}

.grid-table th {
  background: var(--bg-3);
  border: 1px solid var(--border);
  padding: 8px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-3);
  white-space: nowrap;
}

.grid-table td {
  border: 1px solid var(--border);
  padding: 8px 14px;
  background: var(--bg-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

.grid-table tr:hover td { background: var(--bg-3); cursor: pointer; }

/* ============================================================
   CALENDAR VIEW
   ============================================================ */
.calendar-view { padding: 20px 24px; }

.cal-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}
.cal-header h3 { font-size: 16px; font-weight: 700; }
.cal-nav { display: flex; gap: 4px; }

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.cal-day-name {
  background: var(--bg-3);
  padding: 8px;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
}

.cal-day {
  background: var(--bg-2);
  min-height: 100px;
  padding: 6px;
}

.cal-day.other-month { opacity: 0.4; }
.cal-day.today { background: rgba(99,102,241,0.06); }

.cal-date {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-3);
  margin-bottom: 4px;
}
.cal-day.today .cal-date {
  background: var(--accent);
  color: white;
  width: 22px; height: 22px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

.cal-task-chip {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  transition: opacity 0.15s;
}
.cal-task-chip:hover { opacity: 0.8; }

/* ============================================================
   SUBTASKS
   ============================================================ */
.subtask-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}
.subtask-row:hover { background: var(--bg-3); }

.subtask-check {
  width: 16px; height: 16px;
  border: 2px solid var(--border-hover);
  border-radius: 4px;
  cursor: pointer;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.subtask-check.done { background: var(--green); border-color: var(--green); }

.subtask-title { flex: 1; font-size: 13px; }
.subtask-title.done { text-decoration: line-through; color: var(--text-3); }

.add-subtask {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.add-subtask input { flex: 1; }

/* ============================================================
   COMMENTS
   ============================================================ */
.comments-list { display: flex; flex-direction: column; gap: 12px; }

.comment-item {
  display: flex;
  gap: 10px;
}

.comment-body {
  flex: 1;
  background: var(--bg-3);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.comment-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.comment-author { font-size: 12px; font-weight: 600; }
.comment-time { font-size: 11px; color: var(--text-3); }
.comment-text { font-size: 13px; line-height: 1.6; color: var(--text-2); }

.comment-input-area {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 12px;
}
.comment-input-wrap { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.comment-input-wrap textarea { resize: none; }
.comment-input-wrap .btn-sm { align-self: flex-end; }

/* ============================================================
   LABELS SELECTOR
   ============================================================ */
.labels-selector { display: flex; flex-wrap: wrap; gap: 6px; }

.label-option {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: 20px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.15s;
}
.label-option.selected { border-color: transparent; }
.label-option:hover { border-color: var(--border-hover); }

/* ============================================================
   SEARCH & NOTIFICATIONS PANEL
   ============================================================ */
.search-panel, .notif-panel {
  position: fixed;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 300;
  animation: slideDown 0.15s ease;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.search-panel {
  top: 60px; left: 50%;
  transform: translateX(-50%);
  width: 480px;
  max-height: 360px;
  overflow-y: auto;
}

.notif-panel {
  top: 60px; right: 20px;
  width: 320px;
  max-height: 400px;
  overflow-y: auto;
}

.notif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.notif-header h4 { font-size: 13px; font-weight: 600; }

.notif-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.5;
}
.notif-item.unread { background: var(--accent-bg); color: var(--text); }

.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid var(--border);
}
.search-result-item:hover { background: var(--bg-3); }
.search-result-item:last-child { border-bottom: none; }

/* ============================================================
   TOAST
   ============================================================ */
#toast-container {
  position: fixed;
  bottom: 24px; right: 24px;
  display: flex; flex-direction: column; gap: 8px;
  z-index: 1000;
}

.toast {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 13px;
  box-shadow: var(--shadow);
  animation: toastIn 0.25s ease;
  min-width: 240px;
}

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

.toast.success { border-left: 3px solid var(--green); }
.toast.error { border-left: 3px solid var(--red); }
.toast.info { border-left: 3px solid var(--accent); }

/* ============================================================
   EMPTY STATES
   ============================================================ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px;
  color: var(--text-3);
  text-align: center;
  gap: 12px;
}
.empty-state .icon { font-size: 48px; }
.empty-state p { font-size: 13px; }

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

/* ============================================================
   DRAG & DROP
   ============================================================ */
.task-card.dragging {
  opacity: 0.5;
  transform: scale(0.98);
}

.kanban-tasks.drag-over {
  background: var(--accent-bg);
  border-radius: var(--radius);
  border: 2px dashed var(--accent);
}
