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

:root {
  --primary: #f59e0b;
  --primary-dark: #d97706;
  --primary-glow: rgba(245,158,11,0.15);
  --bg: #0a0f1e;
  --bg-secondary: #0f172a;
  --card-bg: rgba(30,41,59,0.6);
  --sidebar-bg: rgba(15,23,42,0.95);
  --text: #f8fafc;
  --text-dim: #94a3b8;
  --text-muted: #64748b;
  --accent: #38bdf8;
  --accent-glow: rgba(56,189,248,0.15);
  --success: #10b981;
  --success-bg: rgba(16,185,129,0.12);
  --warning: #f97316;
  --warning-bg: rgba(249,115,22,0.12);
  --danger: #ef4444;
  --danger-bg: rgba(239,68,68,0.12);
  --glass: rgba(255,255,255,0.04);
  --glass-hover: rgba(255,255,255,0.08);
  --border: rgba(255,255,255,0.08);
  --border-hover: rgba(255,255,255,0.15);
  --sidebar-w: 260px;
  --radius: 1rem;
  --radius-sm: 0.625rem;
  --radius-xs: 0.375rem;
  --shadow: 0 8px 32px rgba(0,0,0,0.3);
  --transition: 0.25s cubic-bezier(.4,0,.2,1);
}

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

body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  background-image:
    radial-gradient(ellipse at 10% 0%, rgba(245,158,11,0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 90% 100%, rgba(56,189,248,0.05) 0%, transparent 50%);
}

/* ===== LAYOUT ===== */
.app-layout { display:flex; min-height:100vh; }

.sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  backdrop-filter: blur(20px);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: transform var(--transition);
}

.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===== SIDEBAR ===== */
.sidebar-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sidebar-header img { height: 36px; filter: invert(1) brightness(2); }

.sidebar-header .brand {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.02em;
}

.sidebar-header .brand-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.sidebar-nav { flex:1; padding: 1rem 0.75rem; display:flex; flex-direction:column; gap:2px; }

.nav-section-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  padding: 1rem 0.75rem 0.5rem;
  font-weight: 600;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-dim);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--transition);
  position: relative;
  text-decoration: none;
}

.nav-item:hover { background: var(--glass-hover); color: var(--text); }
.nav-item.active { background: var(--primary-glow); color: var(--primary); font-weight: 600; }
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 20%; bottom: 20%;
  width: 3px;
  background: var(--primary);
  border-radius: 0 3px 3px 0;
}

.nav-item svg { width:18px; height:18px; flex-shrink:0; }

.nav-badge {
  margin-left: auto;
  background: var(--danger);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}

.sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--warning));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  color: white;
  flex-shrink: 0;
}

.avatar-sm { width:28px; height:28px; font-size:0.65rem; }
.avatar-xs { width:22px; height:22px; font-size:0.55rem; }

.sidebar-footer .user-name { font-size:0.85rem; font-weight:600; }
.sidebar-footer .user-role { font-size:0.7rem; color:var(--text-muted); }

/* ===== TOP BAR ===== */
.topbar {
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(10,15,30,0.8);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-title { font-size:1.35rem; font-weight:700; }
.topbar-title span { color: var(--primary); }

.topbar-actions { display:flex; gap:0.75rem; align-items:center; }

.btn {
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--glass);
  color: var(--text);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn:hover { background: var(--glass-hover); border-color: var(--border-hover); }

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-color: var(--primary-dark);
  color: #0f172a;
}
.btn-primary:hover { filter: brightness(1.1); box-shadow: 0 4px 20px var(--primary-glow); }

.btn svg { width:16px; height:16px; }

/* ===== VIEWS ===== */
.view { display:none; flex:1; padding:1.5rem 2rem 2rem; animation: viewIn 0.35s ease; }
.view.active { display:flex; flex-direction:column; }

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

/* ===== DASHBOARD ===== */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.kpi-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  backdrop-filter: blur(12px);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.kpi-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--kpi-color, var(--primary));
}

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

.kpi-label { font-size:0.75rem; color:var(--text-muted); text-transform:uppercase; letter-spacing:0.08em; font-weight:600; }
.kpi-value { font-size:2rem; font-weight:800; margin:0.25rem 0; }
.kpi-sub { font-size:0.75rem; color:var(--text-dim); }

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  flex: 1;
}

.dash-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  backdrop-filter: blur(12px);
}

.dash-card h3 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dash-card h3 svg { color: var(--primary); width:16px; height:16px; }

/* ===== ACTIVITY FEED ===== */
.activity-list { display:flex; flex-direction:column; gap:0.75rem; }

.activity-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  background: var(--glass);
  border: 1px solid transparent;
  transition: all var(--transition);
}

.activity-item:hover { border-color: var(--border); }

.activity-text { flex:1; font-size:0.825rem; line-height:1.5; }
.activity-text strong { color: var(--primary); }
.activity-time { font-size:0.7rem; color:var(--text-muted); white-space:nowrap; }

/* ===== KANBAN ===== */
.kanban-filters {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  align-items: center;
}

.filter-chip {
  padding: 0.4rem 0.9rem;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--glass);
  color: var(--text-dim);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}

.filter-chip:hover, .filter-chip.active {
  background: var(--primary-glow);
  border-color: var(--primary);
  color: var(--primary);
}

.kanban-board {
  display: flex;
  gap: 1rem;
  flex: 1;
  overflow-x: auto;
  padding-bottom: 1rem;
}

.kanban-column {
  min-width: 270px;
  max-width: 300px;
  flex: 1;
  display: flex;
  flex-direction: column;
  background: rgba(15,23,42,0.4);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.kanban-column.drag-over {
  border-color: var(--primary);
  background: var(--primary-glow);
}

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

.column-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.column-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.column-count {
  background: var(--glass);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 600;
}

.column-cards {
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex: 1;
  min-height: 120px;
  overflow-y: auto;
}

/* ===== PROJECT CARDS ===== */
.project-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
  cursor: grab;
  transition: all var(--transition);
  position: relative;
}

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

.project-card.dragging { opacity:0.4; cursor:grabbing; }

.project-card:hover .card-actions-hover { opacity: 1 !important; }

.btn-action {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text);
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-action:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.btn-action-danger:hover {
  background: var(--danger) !important;
  border-color: var(--danger) !important;
}

.project-card .card-priority {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.priority-high { background: var(--danger); }
.priority-medium { background: var(--warning); }
.priority-low { background: var(--success); }

.health-badge {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-top: 0.5rem;
}
.health-green { background: rgba(16, 185, 129, 0.15); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.3); }
.health-yellow { background: rgba(245, 158, 11, 0.15); color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.3); }
.health-red { background: rgba(239, 68, 68, 0.15); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.3); }

.card-title { font-size:0.825rem; font-weight:600; margin-bottom:0.35rem; margin-top:0.25rem; }

.card-client { font-size:0.725rem; color:var(--text-muted); margin-bottom:0.6rem; }

.card-tags { display:flex; gap:0.35rem; flex-wrap:wrap; margin-bottom:0.6rem; }

.tag {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 600;
}

.tag-kwp { background: var(--accent-glow); color: var(--accent); }
.tag-type { background: var(--primary-glow); color: var(--primary); }

.project-card:hover .card-delete { opacity: 1; }

.card-delete {
  position: absolute;
  top: 6px; right: 6px;
  background: var(--danger-bg);
  border: 1px solid transparent;
  border-radius: var(--radius-xs);
  padding: 2px 5px;
  font-size: 0.7rem;
  cursor: pointer;
  opacity: 0;
  transition: all var(--transition);
  z-index: 2;
}

.card-delete:hover { background: var(--danger); border-color: var(--danger); }

.btn-danger {
  background: var(--danger-bg);
  border-color: var(--danger);
  color: var(--danger);
}
.btn-danger:hover { background: var(--danger); color: white; }

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

.card-footer .avatar-xs {
  border: 2px solid var(--bg-secondary);
}

.card-progress {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.progress-bar {
  width: 50px; height: 4px;
  background: var(--glass);
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 2px;
  transition: width 0.5s ease;
}

/* ===== TEAM VIEW ===== */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.team-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  backdrop-filter: blur(12px);
  transition: all var(--transition);
}

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

.team-card { position: relative; }

.team-card-actions {
  position: absolute;
  top: 0.75rem; right: 0.75rem;
  display: flex;
  gap: 0.35rem;
  opacity: 0;
  transition: opacity var(--transition);
}

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

.team-action-btn {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 4px 7px;
  font-size: 0.7rem;
  cursor: pointer;
  transition: all var(--transition);
}

.team-action-btn:hover { background: var(--glass-hover); border-color: var(--border-hover); }
.team-action-delete:hover { background: var(--danger-bg); border-color: var(--danger); }

.team-card .avatar {
  width: 56px; height: 56px;
  font-size: 1.2rem;
  margin: 0 auto 0.75rem;
}

.team-card .name { font-weight: 700; font-size: 1rem; margin-bottom: 0.2rem; }
.team-card .role { font-size: 0.8rem; color: var(--primary); margin-bottom: 1rem; }

.team-stats { display:flex; justify-content:center; gap:1.5rem; }
.team-stat { text-align:center; }
.team-stat-val { font-size:1.25rem; font-weight:700; }
.team-stat-label { font-size:0.65rem; color:var(--text-muted); text-transform:uppercase; letter-spacing:0.05em; }

/* ===== CHAT ===== */
.chat-layout { display:flex; flex:1; gap:0; overflow:hidden; border-radius: var(--radius); border: 1px solid var(--border); }

.chat-channels {
  width: 220px;
  background: rgba(15,23,42,0.5);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.chat-channels-header {
  padding: 1rem;
  font-weight: 700;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
}

.channel-list { flex:1; padding:0.5rem; overflow-y:auto; }

.channel-item {
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-xs);
  cursor: pointer;
  font-size: 0.8rem;
  color: var(--text-dim);
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.channel-item:hover { background: var(--glass-hover); color: var(--text); }
.channel-item.active { background: var(--primary-glow); color: var(--primary); font-weight: 600; }

.chat-main { flex:1; display:flex; flex-direction:column; }

.chat-header {
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.chat-messages {
  flex: 1;
  padding: 1.25rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.message {
  display: flex;
  gap: 0.75rem;
  max-width: 85%;
  animation: msgIn 0.3s ease;
}

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

.message-body { flex:1; }
.message-header { display:flex; align-items:baseline; gap:0.5rem; margin-bottom:0.25rem; }
.message-author { font-weight:600; font-size:0.825rem; }
.message-time { font-size:0.65rem; color:var(--text-muted); }
.message-text { font-size:0.85rem; line-height:1.55; color:var(--text-dim); }

.chat-input-area {
  padding: 0.85rem 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 0.75rem;
}

.chat-input {
  flex: 1;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.6rem 1rem;
  color: var(--text);
  font-family: inherit;
  font-size: 0.85rem;
  outline: none;
  transition: border-color var(--transition);
}

.chat-input:focus { border-color: var(--primary); }

.chat-send {
  background: var(--primary);
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.6rem 1rem;
  color: var(--bg);
  cursor: pointer;
  font-weight: 700;
  font-family: inherit;
  transition: all var(--transition);
}

.chat-send:hover { filter:brightness(1.1); }

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  animation: overlayIn 0.25s ease;
}

.modal-overlay.active { display:flex; }

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

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 90%;
  max-width: 560px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 24px 80px rgba(0,0,0,0.5);
  animation: modalIn 0.3s ease;
}

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

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

.modal-header h2 { font-size:1.1rem; font-weight:700; }

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.25rem;
  padding: 0.25rem;
  transition: color var(--transition);
}

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

.modal-body { padding:1.5rem; }

.modal-body .form-group { margin-bottom:1rem; }

.modal-body label {
  display: block;
  font-size: 0.775rem;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 0.35rem;
}

.modal-body input,
.modal-body select,
.modal-body textarea {
  width: 100%;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.85rem;
  color: var(--text);
  font-family: inherit;
  font-size: 0.85rem;
  outline: none;
  transition: border-color var(--transition);
}

.modal-body input:focus,
.modal-body select:focus,
.modal-body textarea:focus { border-color: var(--primary); }

.modal-body textarea { resize:vertical; min-height:70px; }

.modal-body select option { background: var(--bg-secondary); }

.form-row { display:grid; grid-template-columns:1fr 1fr; gap:0.75rem; }

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* ===== DETAIL PANEL ===== */
.detail-panel {
  display: none;
  flex-direction: column;
  gap: 1.25rem;
}

.detail-panel.active { display: flex; }

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

.detail-back {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: color var(--transition);
}

.detail-back:hover { color: var(--primary); }

.detail-info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.detail-info-item {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
}

.detail-info-item .label { font-size:0.7rem; color:var(--text-muted); text-transform:uppercase; letter-spacing:0.06em; margin-bottom:0.2rem; }
.detail-info-item .value { font-size:1rem; font-weight:600; }

.checklist { display:flex; flex-direction:column; gap:0.4rem; }

.checklist-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-xs);
  font-size: 0.825rem;
  cursor: pointer;
  transition: background var(--transition);
}

.checklist-item:hover { background: var(--glass); }

.checklist-item input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}

.checklist-item.done { color: var(--text-muted); text-decoration: line-through; }

.checklist-item {
  position: relative;
  justify-content: flex-start;
}

.checklist-item span { flex: 1; cursor: pointer; }

.checklist-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  opacity: 0;
  transition: all var(--transition);
}

.checklist-item:hover .checklist-remove { opacity: 1; }
.checklist-remove:hover { color: var(--danger); background: var(--danger-bg); }

.checklist-add {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

/* ===== GANTT CHART ===== */
.gantt-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.gantt-legend { display:flex; gap:1rem; flex-wrap:wrap; }

.gantt-legend-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.725rem;
  color: var(--text-dim);
}

.gantt-legend-dot { width:10px; height:10px; border-radius:3px; flex-shrink:0; }

.gantt-zoom { display:flex; gap:0.4rem; }

.gantt-container {
  flex: 1;
  overflow-x: auto;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(15,23,42,0.4);
}

.gantt-chart { min-width: 100%; }

.gantt-header-row {
  display: flex;
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}

.gantt-corner {
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  min-height: 36px;
}

.gantt-timeline {
  position: relative;
  height: 36px;
  flex-shrink: 0;
}

.gantt-month {
  position: absolute;
  top: 0;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-dim);
  border-right: 1px solid var(--border);
}

.gantt-grid-line {
  position: absolute;
  top: 0;
  width: 1px;
  height: 100vh;
  background: var(--border);
  pointer-events: none;
  z-index: 1;
}

.gantt-today {
  position: absolute;
  top: 0;
  width: 2px;
  height: 100vh;
  background: var(--danger);
  z-index: 5;
  pointer-events: none;
}

.gantt-today-label {
  position: absolute;
  top: 2px;
  left: 4px;
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--danger);
  white-space: nowrap;
  background: var(--bg-secondary);
  padding: 1px 5px;
  border-radius: 3px;
}

.gantt-body { display: flex; flex-direction: column; }

.gantt-row {
  display: flex;
  border-bottom: 1px solid var(--border);
  min-height: 48px;
}

.gantt-row-alt { background: rgba(255,255,255,0.015); }

.gantt-row-label {
  width: 200px;
  min-width: 200px;
  padding: 0.5rem 0.75rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-right: 1px solid var(--border);
  position: sticky;
  left: 0;
  background: var(--bg-secondary);
  z-index: 3;
}

.gantt-row-name { font-size:0.775rem; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

.gantt-row-meta {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.625rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.gantt-row-bars {
  position: relative;
  flex-shrink: 0;
  height: 48px;
}

.gantt-bar {
  position: absolute;
  top: 14px;
  height: 20px;
  border-radius: 4px;
  opacity: 0.85;
  transition: opacity var(--transition), transform var(--transition);
  cursor: pointer;
}

.gantt-bar:hover { opacity: 1; transform: scaleY(1.3); z-index: 4; }

/* ===== CHART CANVAS ===== */
.chart-container { position:relative; width:100%; height:200px; }
.chart-container canvas { width:100%!important; height:100%!important; }

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

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .detail-info-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .kanban-board { flex-direction: column; }
  .kanban-column { min-width: 100%; max-width: 100%; }
  .chat-channels { display: none; }
  .topbar { padding: 1rem; }
  .view { padding: 1rem; }
}
/* ===== DELTI AI PANEL ===== */
.delti-panel {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(56, 189, 248, 0.1));
  border: 1px solid var(--primary-glow);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
}

.delti-panel::before {
  content: '🤖';
  position: absolute;
  right: -10px;
  bottom: -10px;
  font-size: 4rem;
  opacity: 0.1;
}

.delti-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.delti-avatar {
  width: 40px;
  height: 40px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: 0 0 15px var(--primary-glow);
}

.delti-content h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.delti-content p {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-dim);
}

.delti-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.ai-report-modal {
  max-width: 650px;
}

.report-preview {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  line-height: 1.6;
  white-space: pre-wrap;
  color: var(--text);
  margin-top: 1rem;
}

.copy-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: var(--bg);
  padding: 0.75rem 1.5rem;
  border-radius: 30px;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
  z-index: 1000;
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
}

@keyframes toastIn { from { transform: translate(-50%, 20px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
@keyframes toastOut { from { transform: translate(-50%, 0); opacity: 1; } to { transform: translate(-50%, 20px); opacity: 0; } }
