/* ===== Cora Cowork Desktop — Custom Styles ===== */

:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --dark: #1e1b4b;
  --accent: #06b6d4;
  --accent-dark: #0891b2;
}

html {
  scroll-behavior: smooth;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
.dark ::-webkit-scrollbar-thumb { background: #475569; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ===== Animations ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse-soft {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.05); }
}
.animate-fade-in-up { animation: fadeInUp 0.6s ease-out forwards; }
.animate-fade-in    { animation: fadeIn 0.5s ease-out forwards; }
.animate-slide-down { animation: slideDown 0.3s ease-out forwards; }

/* ===== Scroll reveal ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* ===== Navbar ===== */
.nav-scrolled {
  background: rgba(255,255,255,0.95) !important;
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.dark .nav-scrolled {
  background: rgba(15,23,42,0.95) !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* ===== Hero ===== */
.hero-gradient {
  background: linear-gradient(135deg, #eef2ff 0%, #f0fdfa 50%, #fdf4ff 100%);
}
.dark .hero-gradient {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
}
.hero-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.15;
  pointer-events: none;
}
.dark .hero-glow { opacity: 0.08; }

/* ===== Cards ===== */
.feature-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -12px rgba(99,102,241,0.2);
}
.dark .feature-card:hover {
  box-shadow: 0 20px 40px -12px rgba(99,102,241,0.15);
}

/* ===== Pricing ===== */
.pricing-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.pricing-card:hover {
  transform: translateY(-6px);
}
.pricing-popular {
  border: 2px solid var(--primary);
  position: relative;
}
.pricing-popular::before {
  content: 'Most Popular';
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: #fff;
  padding: 4px 20px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}

/* ===== Pricing Toggle ===== */
.toggle-track {
  width: 56px;
  height: 28px;
  border-radius: 999px;
  background: #cbd5e1;
  cursor: pointer;
  transition: background 0.3s;
  position: relative;
}
.dark .toggle-track { background: #475569; }
.toggle-track.active { background: var(--primary); }
.toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.3s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.toggle-track.active .toggle-thumb { transform: translateX(28px); }
.savings-badge {
  background: #dcfce7;
  color: #166534;
  font-size: 0.75rem;
  padding: 2px 10px;
  border-radius: 999px;
  font-weight: 600;
}
.dark .savings-badge {
  background: #064e3b;
  color: #6ee7b7;
}

/* ===== FAQ Accordion ===== */
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
}
.faq-item summary::after {
  content: '+';
  float: right;
  font-size: 1.5rem;
  font-weight: 300;
  transition: transform 0.3s;
  color: var(--primary);
}
.faq-item[open] summary::after {
  content: '−';
  transform: rotate(0deg);
}
.faq-content {
  animation: slideDown 0.3s ease-out;
}

/* ===== Loading Spinner ===== */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(99,102,241,0.2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.btn-loading .spinner { margin-right: 8px; }

/* ===== Toast ===== */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  animation: slideUp 0.3s ease-out;
  max-width: 400px;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.toast-success { background: #059669; color: #fff; }
.toast-error   { background: #dc2626; color: #fff; }
.toast-info    { background: var(--primary); color: #fff; }

/* ===== Download buttons ===== */
.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s;
}
.download-btn:hover {
  transform: translateY(-2px);
}

/* ===== Form styles ===== */
.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}
.dark .form-input {
  background: #1e293b;
  border-color: #334155;
  color: #f1f5f9;
}
.dark .form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.2);
}

/* ===== Mobile menu ===== */
.mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}
.mobile-menu.open {
  max-height: 400px;
}

/* ===== Admin tables ===== */
.data-table {
  width: 100%;
  border-collapse: collapse;
}
.data-table th {
  text-align: left;
  padding: 12px 16px;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  border-bottom: 2px solid #e2e8f0;
}
.dark .data-table th {
  color: #94a3b8;
  border-bottom-color: #334155;
}
.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.9rem;
}
.dark .data-table td {
  border-bottom-color: #1e293b;
}
.data-table tr:hover td {
  background: rgba(99,102,241,0.04);
}

/* ===== Badge ===== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-green  { background: #dcfce7; color: #166534; }
.badge-yellow { background: #fef9c3; color: #854d0e; }
.badge-red    { background: #fee2e2; color: #991b1b; }
.badge-blue   { background: #dbeafe; color: #1e40af; }
.dark .badge-green  { background: #064e3b; color: #6ee7b7; }
.dark .badge-yellow { background: #422006; color: #fde047; }
.dark .badge-red    { background: #450a0a; color: #fca5a5; }
.dark .badge-blue   { background: #1e3a5f; color: #93c5fd; }

/* ===== Stats card ===== */
.stat-card {
  padding: 24px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #e2e8f0;
  transition: transform 0.2s, box-shadow 0.2s;
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}
.dark .stat-card {
  background: #1e293b;
  border-color: #334155;
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
  .hero-glow { width: 300px; height: 300px; }
  .download-btn { width: 100%; justify-content: center; }
}
