/* ============================================
   TaskFlow - LIGHT THEME CSS
   Inspired by hasan.sa
   Primary: #6B46C1 (Purple)
   Secondary: #3B82F6 (Blue)
   Background: White/Light Gray
   ============================================ */

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

:root {
  --primary: #6B46C1;
  --primary-dark: #553C9A;
  --primary-light: #8B5CF6;
  --primary-50: #F5F3FF;
  --primary-100: #EDE9FE;
  --primary-200: #DDD6FE;
  --secondary: #3B82F6;
  --secondary-light: #60A5FA;
  --secondary-50: #EFF6FF;
  --accent: #F59E0B;
  --accent-light: #FBBF24;
  --success: #10B981;
  --danger: #EF4444;
  --warning: #F59E0B;
  --info: #3B82F6;
  --bg-primary: #FFFFFF;
  --bg-secondary: #F8FAFC;
  --bg-tertiary: #F1F5F9;
  --bg-card: #FFFFFF;
  --bg-hover: #F1F5F9;
  --bg-sidebar: #FFFFFF;
  --bg-input: #FFFFFF;
  --bg-dark: #1E293B;
  --text-primary: #1E293B;
  --text-secondary: #64748B;
  --text-muted: #94A3B8;
  --text-inverse: #FFFFFF;
  --border: #E2E8F0;
  --border-light: #F1F5F9;
  --border-focus: #6B46C1;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -1px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.03);
  --shadow-glow: 0 0 20px rgba(107,70,193,0.12);
  --shadow-card: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --font-family: 'Tajawal', -apple-system, BlinkMacSystemFont, sans-serif;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 800;
  font-size: 1.5rem;
}

.logo-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: var(--shadow-glow);
  color: white;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

.nav-links a:hover { color: var(--primary); }

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; right: 0;
  width: 0; height: 2px;
  background: var(--primary);
  transition: var(--transition);
}

.nav-links a:hover::after { width: 100%; }

.nav-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.5rem;
  border-radius: var(--radius);
  font-family: var(--font-family);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(107,70,193,0.25);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: var(--bg-hover);
  color: var(--primary);
  border-color: var(--primary-200);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

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

.btn-large {
  padding: 0.875rem 2rem;
  font-size: 1.1rem;
}

/* ============================================
   HERO
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 100px 2rem 4rem;
  max-width: 1400px;
  margin: 0 auto;
  gap: 4rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%; right: -20%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(107,70,193,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content { flex: 1; max-width: 600px; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--primary-50);
  border: 1px solid var(--primary-200);
  border-radius: 100px;
  font-size: 0.875rem;
  color: var(--primary);
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.8;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.hero-stats { display: flex; gap: 2.5rem; }

.stat { display: flex; flex-direction: column; }

.stat-number {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--primary);
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ============================================
   DASHBOARD PREVIEW
   ============================================ */
.hero-visual {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.dashboard-preview {
  width: 600px;
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-lg), 0 0 60px rgba(107,70,193,0.04);
  transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
  transition: var(--transition);
}

.dashboard-preview:hover {
  transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}

.preview-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.preview-dots { display: flex; gap: 0.4rem; }

.preview-dots span {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--danger);
}

.preview-dots span:nth-child(2) { background: var(--accent); }
.preview-dots span:nth-child(3) { background: var(--success); }

.preview-body { display: flex; height: 350px; }

.preview-sidebar {
  width: 60px;
  background: var(--bg-tertiary);
  padding: 1rem 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  border-left: 1px solid var(--border);
}

.preview-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}

.preview-menu {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}

.preview-menu div {
  height: 28px;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
}

.preview-menu div.active { background: var(--primary); }

.preview-main {
  flex: 1;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

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

.card {
  background: var(--bg-tertiary);
  border-radius: var(--radius);
  padding: 0.75rem;
  border: 1px solid var(--border);
}

.card-header {
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.card-progress {
  height: 4px;
  background: var(--bg-secondary);
  border-radius: 2px;
  margin-bottom: 0.5rem;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.card-tags {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.tag {
  font-size: 0.6rem;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-weight: 600;
}

.tag-high { background: rgba(239,68,68,0.1); color: #DC2626; }
.tag-medium { background: rgba(245,158,11,0.1); color: #D97706; }
.tag-urgent { background: rgba(239,68,68,0.15); color: #DC2626; }
.tag-active { background: rgba(16,185,129,0.1); color: #059669; }
.tag-review { background: rgba(59,130,246,0.1); color: #2563EB; }
.tag-done { background: rgba(16,185,129,0.1); color: #059669; }

.preview-kanban {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  flex: 1;
}

.kanban-col {
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  padding: 0.5rem;
}

.col-header {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.col-card {
  height: 40px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  margin-bottom: 0.4rem;
  border: 1px solid var(--border);
}

.col-card.active {
  border-color: var(--primary);
  box-shadow: 0 0 8px rgba(107,70,193,0.1);
}

.col-card.done { opacity: 0.5; }

/* ============================================
   FEATURES
   ============================================ */
.features {
  padding: 6rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-badge {
  display: inline-flex;
  padding: 0.5rem 1rem;
  background: var(--primary-50);
  border: 1px solid var(--primary-200);
  border-radius: 100px;
  font-size: 0.875rem;
  color: var(--primary);
  margin-bottom: 1rem;
  font-weight: 600;
}

.section-header h2 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transform: scaleX(0);
  transition: var(--transition);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-200);
}

.feature-card:hover::before { transform: scaleX(1); }

.feature-icon {
  width: 56px; height: 56px;
  background: var(--primary-50);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-bottom: 1.25rem;
}

.feature-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.feature-card p {
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ============================================
   PRICING
   ============================================ */
.pricing {
  padding: 6rem 2rem;
  background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 50%, var(--bg-primary) 100%);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2.5rem 2rem;
  text-align: center;
  position: relative;
  transition: var(--transition);
  box-shadow: var(--shadow-card);
}

.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.pricing-card.popular {
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
  transform: scale(1.05);
}

.popular-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  padding: 0.4rem 1.2rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 700;
}

.pricing-header { margin-bottom: 2rem; }

.pricing-header h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.price {
  font-size: 3rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  color: var(--text-primary);
}

.currency { font-size: 1.25rem; font-weight: 600; }

.period {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 400;
}

.pricing-features {
  list-style: none;
  margin-bottom: 2rem;
  text-align: right;
}

.pricing-features li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pricing-features li:last-child { border-bottom: none; }

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 4rem 2rem 2rem;
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 4rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.footer-brand { max-width: 300px; }

.footer-brand .logo { margin-bottom: 1rem; }

.footer-brand p { color: var(--text-secondary); }

.footer-links {
  display: flex;
  gap: 4rem;
  flex-wrap: wrap;
}

.footer-links div {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
}

.footer-links a:hover { color: var(--primary); }

.footer-bottom {
  max-width: 1400px;
  margin: 0 auto;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* ============================================
   AUTH PAGES
   ============================================ */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--primary-50) 100%);
  position: relative;
}

.auth-page::before {
  content: '';
  position: absolute;
  top: 10%; right: 10%;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(107,70,193,0.04) 0%, transparent 70%);
  pointer-events: none;
}

.auth-container {
  width: 100%;
  max-width: 420px;
}

.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-header .logo { justify-content: center; margin-bottom: 1.5rem; }

.auth-header h1 {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.auth-header p { color: var(--text-secondary); }

.form-group { margin-bottom: 1.25rem; }

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-family: var(--font-family);
  font-size: 1rem;
  transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(107,70,193,0.08);
}

.form-group input::placeholder { color: var(--text-muted); }

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

.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
}

.remember-me {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  cursor: pointer;
}

.remember-me input {
  width: 18px; height: 18px;
  accent-color: var(--primary);
}

.forgot-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.forgot-link:hover { text-decoration: underline; }

.btn-full { width: 100%; }

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.auth-footer a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.auth-footer a:hover { text-decoration: underline; }

.error-message {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: #DC2626;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-size: 0.9rem;
  display: none;
}

.error-message.show { display: block; }

.success-message {
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  color: #059669;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-size: 0.9rem;
  display: none;
}

.success-message.show { display: block; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .hero {
    flex-direction: column;
    text-align: center;
    padding-top: 120px;
  }
  .hero-content { max-width: 100%; }
  .hero-stats { justify-content: center; }
  .hero-cta { justify-content: center; }
  .dashboard-preview { width: 100%; max-width: 500px; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-actions .btn-ghost { display: none; }
  .mobile-menu-btn { display: block; }
  .hero h1 { font-size: 2.5rem; }
  .features-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .pricing-card.popular { transform: none; }
  .footer-content { flex-direction: column; gap: 2rem; }
  .form-row { grid-template-columns: 1fr; }
}
