* {
  margin: 0;
  padding-top: 0;
  box-sizing: border-box;
}

:root {
  --color-background: #0a0a0f;
  --color-surface: #1a1a24;
  --color-surface-elevated: #252535;
  --color-primary: #8b5cf6;
  --color-primary-hover: #7c3aed;
  --color-accent: #06b6d4;
  --color-text: black;
  --color-text-muted: #94a3b8;
  --color-border: #2d2d3d;
  --color-lightning-blue: #00d4ff;
  --color-neon-purple: #b026ff;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: white;
  color: var(--color-text);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Added critical modal styles to hide modals by default */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: #1e293b;
  border-radius: 12px;
  padding: 2rem;
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #334155;
}

.modal-header h2 {
  color: #e2e8f0;
  font-size: 1.5rem;
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 2rem;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s;
}

.modal-close:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.modal-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #334155;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: #e2e8f0;
  font-weight: 500;
  font-size: 0.875rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 6px;
  color: #e2e8f0;
  font-size: 0.9375rem;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: #3b82f6;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9375rem;
}

.btn-primary {
  background: #3b82f6;
  color: white;
}

.btn-primary:hover {
  background: #2563eb;
}

.btn-secondary {
  background: #334155;
  color: #e2e8f0;
}

.btn-secondary:hover {
  background: #475569;
}
/* </CHANGE> */

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo a {
  text-decoration: none;
  color: inherit;
}

.tab-icon {
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .tab-label {
    display: none;
  }
}

.tab-label {
  font-weight: 500;
}

.modal-large {
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
}

.setup-progress {
  display: flex;
  justify-content: space-between;
  margin-bottom: 2rem;
  padding: 0 1rem;
  position: relative;
}

.setup-progress::before {
  content: "";
  position: absolute;
  top: 20px;
  left: 10%;
  right: 10%;
  height: 2px;
  background: #334155;
  z-index: 0;
}

.setup-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  z-index: 1;
}

.step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #1e293b;
  border: 2px solid #334155;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: #64748b;
  transition: all 0.3s ease;
}

.setup-step.active .step-number {
  background: #3b82f6;
  border-color: #3b82f6;
  color: white;
}

.setup-step.completed .step-number {
  background: #10b981;
  border-color: #10b981;
  color: white;
}

.step-label {
  font-size: 0.75rem;
  color: #64748b;
  text-align: center;
  max-width: 100px;
}

.setup-step.active .step-label {
  color: #e2e8f0;
  font-weight: 500;
}

.setup-step-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

.setup-step-content.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.config-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
  max-height: 300px;
  overflow-y: auto;
  padding: 0.5rem;
  background: #0f172a;
  border-radius: 8px;
}

.config-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: #1e293b;
  border-radius: 6px;
  border: 1px solid #334155;
}

.config-item-color {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  flex-shrink: 0;
}

.config-item span {
  flex: 1;
  color: #e2e8f0;
}

.config-item-badge {
  padding: 0.25rem 0.5rem;
  background: #334155;
  color: #e2e8f0;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
}

.config-item-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.config-item-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #334155;
  transition: 0.3s;
  border-radius: 24px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

.config-item-toggle input:checked + .toggle-slider {
  background-color: #3b82f6;
}

.config-item-toggle input:checked + .toggle-slider:before {
  transform: translateX(20px);
}

.config-item-remove {
  background: none;
  border: none;
  color: #ef4444;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background 0.2s ease;
}

.config-item-remove:hover {
  background: rgba(239, 68, 68, 0.1);
}

.add-item-form {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.add-item-form input[type="text"],
.add-item-form select {
  flex: 1;
  padding: 0.5rem;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 6px;
  color: #e2e8f0;
  font-size: 0.875rem;
}

.add-item-form input[type="color"] {
  width: 50px;
  height: 38px;
  padding: 2px;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 6px;
  cursor: pointer;
}

.add-item-form input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.column-config-item {
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
}

.column-config-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.column-name {
  font-weight: 600;
  color: #e2e8f0;
}

.column-statuses {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.5rem;
  background: #0f172a;
  border-radius: 4px;
}

.status-checkbox {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  cursor: pointer;
}

.status-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.status-checkbox-label {
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  color: white;
  font-weight: 500;
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

.report-table thead {
  background: #1e293b;
  border-bottom: 2px solid #334155;
}

.report-table th {
  padding: 0.75rem;
  text-align: left;
  font-size: 0.875rem;
  font-weight: 600;
  color: #cbd5e1;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.report-table tbody tr {
  border-bottom: 1px solid #334155;
  transition: background 0.2s;
}

.report-table tbody tr:hover {
  background: #1e293b;
}

.report-table td {
  padding: 0.75rem;
  font-size: 0.875rem;
  color: #e2e8f0;
}

.report-table tfoot {
  background: #1e293b;
  border-top: 2px solid #334155;
  font-weight: 600;
}

.report-table tfoot td {
  padding: 0.75rem;
}

.status-badge {
  padding: 0.25rem 0.625rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-block;
  text-transform: capitalize;
}

.status-badge.active {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
}

.status-badge.planning {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}

.projects-main {
  padding: 2rem;
  box-sizing: border-box;
}

.projects-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
}

.projects-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: black;
  margin-bottom: 0.5rem;
}

.projects-header p {
  color: var(--color-text-muted);
  font-size: 1rem;
}

.projects-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card-small {
  display: flex;
  align-items: center;
  gap: 1rem;
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 1rem;
  padding: 1.25rem;
  transition: all 0.3s ease;
}

.stat-card-small:hover {
  border-color: var(--color-primary);
  transform: translateY(-2px);
}

.stat-card-small .stat-icon {
  font-size: 2rem;
}

.stat-content-small h3 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: var(--color-text);
}

.stat-content-small p {
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

.projects-filters {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.project-filter {
  padding: 0.625rem 1.25rem;
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 2rem;
  color: var(--color-text-muted);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.875rem;
}

.project-filter:hover {
  border-color: #b026ff;
  color: #b026ff;
}

.project-filter.active {
  background:  linear-gradient(135deg, var(--color-lightning-blue), var(--color-neon-purple));
  border-color: var(--color-primary);
  color: white;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.project-card {
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 1rem;
  padding: 1.5rem;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
}

.project-card:hover {
  border-color: #00d4ff;
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.2);
}

.project-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.project-icon {
  width: 3rem;
  height: 3rem;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.project-card-actions {
  display: flex;
  gap: 0.5rem;
}

.project-action-btn {
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 0.375rem;
  border-radius: 0.375rem;
  transition: all 0.2s;
  font-size: 1rem;
}

.project-action-btn:hover {
  background: var(--color-surface-elevated);
  color: var(--color-text);
}

.project-key {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-accent);
  background-color: rgba(6, 182, 212, 0.1);
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  margin-bottom: 0.5rem;
  display: inline-block;
}

.project-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.project-card p {
  color: var(--color-text-muted);
  font-size: 0.875rem;
  line-height: 1.5;
  margin-bottom: 1rem;
  min-height: 2.625rem;
}

.project-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.project-meta-item {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.project-status {
  padding: 0.25rem 0.625rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: capitalize;
}

.project-status.active {
  background-color: rgba(34, 197, 94, 0.1);
  color: #22c55e;
}

.project-status.planning {
  background-color: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}

.project-status.on-hold {
  background-color: rgba(251, 191, 36, 0.1);
  color: #fbbf24;
}

.project-status.completed {
  background-color: rgba(139, 92, 246, 0.1);
  color: #8b5cf6;
}

.project-status.archived {
  background-color: rgba(100, 116, 139, 0.1);
  color: #64748b;
}

.project-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
}

.project-team {
  display: flex;
  align-items: center;
}

.project-avatars {
  display: flex;
  margin-left: -0.5rem;
}

.project-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  border: 2px solid var(--color-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: white;
  margin-left: -0.5rem;
}

.project-avatar:first-child {
  margin-left: 0;
}

.project-progress {
  text-align: right;
}

.project-progress-text {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-bottom: 0.25rem;
}

.project-progress-bar {
  width: 100px;
  height: 6px;
  background: var(--color-surface-elevated);
  border-radius: 3px;
  overflow: hidden;
}

.project-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  transition: width 0.3s ease;
}

.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--color-text-muted);
}

.empty-state-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.empty-state p {
  margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
  .projects-main {
    padding: 1rem;
  }

  .projects-header {
    flex-direction: column;
    gap: 1rem;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .projects-stats {
    grid-template-columns: 1fr;
  }
}
