﻿/* ============================================================
   Laksh360 - Global Styles
   Glassmorphism, gradients, premium SaaS aesthetic
   ============================================================ */

:root {
  --bg-gradient: radial-gradient(circle at 10% 10%, #ede9fe 0%, transparent 45%),
                 radial-gradient(circle at 90% 20%, #dbeafe 0%, transparent 40%),
                 radial-gradient(circle at 80% 90%, #fce7f3 0%, transparent 45%),
                 radial-gradient(circle at 10% 90%, #d1fae5 0%, transparent 40%),
                 #f8fafc;
}

html.dark {
  --bg-gradient: radial-gradient(circle at 10% 10%, rgba(124,58,237,0.18) 0%, transparent 45%),
                 radial-gradient(circle at 90% 20%, rgba(59,130,246,0.14) 0%, transparent 40%),
                 radial-gradient(circle at 80% 90%, rgba(236,72,153,0.10) 0%, transparent 45%),
                 #0f1117;
}

body {
  background: var(--bg-gradient);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

/* Glass card */
.glass {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.5);
}
html.dark .glass {
  background: rgba(30, 32, 44, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* Soft scrollbars */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, 0.4); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(148, 163, 184, 0.7); }

/* Custom Select2-style dropdown panel */
.l-dropdown {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 8px 32px rgba(99, 102, 241, 0.12), 0 2px 8px rgba(0,0,0,0.08);
}
html.dark .l-dropdown {
  background: rgba(20, 24, 40, 0.97);
  border-color: rgba(99, 102, 241, 0.15);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}
.l-dropdown-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; text-align: left;
  padding: 9px 14px; font-size: 0.875rem;
  transition: background 0.1s;
  cursor: pointer; border: none; background: none;
  color: #334155;
}
html.dark .l-dropdown-item { color: #e2e8f0; }
.l-dropdown-item:hover { background: rgba(99, 102, 241, 0.07); }
html.dark .l-dropdown-item:hover { background: rgba(99, 102, 241, 0.15); }
.l-dropdown-item.active { background: rgba(99, 102, 241, 0.1); font-weight: 600; color: #6366f1; }
html.dark .l-dropdown-item.active { background: rgba(99, 102, 241, 0.2); color: #a5b4fc; }

/* Trigger button base */
.l-select-trigger {
  display: flex; align-items: center; gap: 8px;
  width: 100%; text-align: left;
  border-radius: 0.75rem;
  border: 1px solid rgba(226,232,240,1);
  background: rgba(255,255,255,0.7);
  padding: 9px 36px 9px 14px;
  font-size: 0.875rem; cursor: pointer;
  position: relative; transition: all 0.15s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.l-select-trigger:focus, .l-select-trigger:focus-visible {
  outline: none;
  border-color: #818cf8;
  box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.2);
}
html.dark .l-select-trigger {
  border-color: rgba(71,85,105,1);
  background: rgba(30,41,59,0.6);
  color: #e2e8f0;
}
.l-select-trigger .l-chevron {
  position: absolute; right: 10px; top: 50%;
  transform: translateY(-50%);
  color: #94a3b8; transition: transform 0.2s;
  pointer-events: none;
}
.l-select-trigger[aria-expanded="true"] .l-chevron {
  transform: translateY(-50%) rotate(180deg);
}

/* Brand gradient backgrounds */
.bg-brand-gradient {
  background-image: linear-gradient(135deg, #8b5cf6 0%, #6366f1 50%, #3b82f6 100%);
}

/* Card hover lift */
.card-hover { transition: transform .2s ease, box-shadow .2s ease; }
.card-hover:hover { transform: translateY(-2px); box-shadow: 0 12px 32px -8px rgba(99,102,241,0.18); }

/* Alpine x-cloak: hide until Alpine initialises */
[x-cloak] { display: none !important; }

/* Fade / slide animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; }
}
.animate-fade-up { animation: fadeInUp .35s ease both; }

@keyframes pop {
  0% { transform: scale(.96); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.animate-pop { animation: pop .25s ease both; }

/* PIN dot */
.pin-dot {
  width: 14px; height: 14px; border-radius: 999px;
  border: 2px solid #cbd5e1;
  transition: all .15s ease;
}
.pin-dot.filled {
  background: linear-gradient(135deg, #8b5cf6, #6366f1);
  border-color: transparent;
  transform: scale(1.1);
}

/* Kanban column drag-over highlight */
.kanban-dropzone.drag-over {
  background-color: rgba(139, 92, 246, 0.08);
  border-color: #a78bfa !important;
}

/* Task card while dragging */
.task-card.dragging { opacity: 0.4; }

/* Sidebar active link */
.nav-link.active {
  background: linear-gradient(135deg, rgba(139,92,246,0.12), rgba(99,102,241,0.10));
  color: #6d28d9;
  font-weight: 600;
}
html.dark .nav-link.active {
  color: #c4b5fd;
}

/* Toggle switch */
.toggle-checkbox:checked {
  right: 0;
  border-color: #8b5cf6;
}
.toggle-checkbox:checked + .toggle-label {
  background-color: #8b5cf6;
}
.toggle-label { transition: background-color .2s ease; }
.toggle-checkbox { transition: all .2s ease; right: 24px; }

/* Custom checkbox accent */
input[type="checkbox"] { accent-color: #7c3aed; }
input[type="radio"] { accent-color: #7c3aed; }
