/* DailyFlow Planner - CSS matching Lovable app exactly */

/* CSS Variables - Light Theme */
:root {
  --background: 210 20% 98%;
  --foreground: 222 47% 11%;
  --card: 0 0% 100%;
  --card-foreground: 222 47% 11%;
  --primary: 199 89% 48%;
  --primary-foreground: 0 0% 100%;
  --secondary: 210 40% 96%;
  --secondary-foreground: 222 47% 11%;
  --muted: 210 40% 96%;
  --muted-foreground: 215 16% 47%;
  --accent: 199 89% 94%;
  --accent-foreground: 199 89% 30%;
  --destructive: 0 84% 60%;
  --destructive-foreground: 0 0% 100%;
  --success: 142 76% 36%;
  --success-foreground: 0 0% 100%;
  --warning: 38 92% 50%;
  --warning-foreground: 0 0% 100%;
  --border: 214 32% 91%;
  --input: 214 32% 91%;
  --ring: 199 89% 48%;
  --radius: 0.75rem;
  --sidebar-background: 0 0% 100%;
  --sidebar-foreground: 222 47% 11%;
  --sidebar-border: 214 32% 91%;
  --sidebar-accent: 199 89% 94%;
  --sidebar-accent-foreground: 199 89% 30%;
}

/* Dark Theme */
.dark {
  --background: 222 47% 6%;
  --foreground: 210 40% 98%;
  --card: 222 47% 9%;
  --card-foreground: 210 40% 98%;
  --primary: 199 89% 48%;
  --primary-foreground: 0 0% 100%;
  --secondary: 217 33% 17%;
  --secondary-foreground: 210 40% 98%;
  --muted: 217 33% 17%;
  --muted-foreground: 215 20% 65%;
  --accent: 199 89% 20%;
  --accent-foreground: 199 89% 80%;
  --destructive: 0 63% 31%;
  --destructive-foreground: 210 40% 98%;
  --success: 142 76% 26%;
  --success-foreground: 142 76% 90%;
  --warning: 38 92% 40%;
  --warning-foreground: 38 92% 90%;
  --border: 217 33% 17%;
  --input: 217 33% 17%;
  --sidebar-background: 222 47% 9%;
  --sidebar-foreground: 210 40% 98%;
  --sidebar-border: 217 33% 17%;
  --sidebar-accent: 199 89% 20%;
  --sidebar-accent-foreground: 199 89% 80%;
}

/* Base Styles */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { transition: background-color 0.3s, color 0.3s; }
body { 
  font-family: 'Inter', system-ui, sans-serif; 
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

/* Utility Classes */
.bg-background { background-color: hsl(var(--background)); }
.bg-card { background-color: hsl(var(--card)); }
.bg-muted { background-color: hsl(var(--muted)); }
.bg-primary { background-color: hsl(var(--primary)); }
.bg-primary\/10 { background-color: hsl(var(--primary) / 0.1); }
.bg-success\/5 { background-color: hsl(var(--success) / 0.05); }
.bg-success\/10 { background-color: hsl(var(--success) / 0.1); }
.bg-destructive\/10 { background-color: hsl(var(--destructive) / 0.1); }
.text-foreground { color: hsl(var(--foreground)); }
.text-muted-foreground { color: hsl(var(--muted-foreground)); }
.text-primary { color: hsl(var(--primary)); }
.text-success { color: hsl(var(--success)); }
.text-destructive { color: hsl(var(--destructive)); }
.border-border { border-color: hsl(var(--border)); }
.border-success\/20 { border-color: hsl(var(--success) / 0.2); }
.border-destructive\/20 { border-color: hsl(var(--destructive) / 0.2); }

/* Layout */
.h-screen { height: 100vh; }
.min-h-screen { min-height: 100vh; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-1 { flex: 1 1 0%; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-1\.5 { padding-top: 0.375rem; padding-bottom: 0.375rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-8 { margin-bottom: 2rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.ml-64 { margin-left: 16rem; }
.w-full { width: 100%; }
.w-64 { width: 16rem; }
.max-w-md { max-width: 28rem; }
.overflow-hidden { overflow: hidden; }
.overflow-y-auto { overflow-y: auto; }
.fixed { position: fixed; }
.absolute { position: absolute; }
.relative { position: relative; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.left-0 { left: 0; }
.top-0 { top: 0; }
.z-30 { z-index: 30; }
.z-40 { z-index: 40; }
.z-50 { z-index: 50; }

/* Typography */
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.line-through { text-decoration: line-through; }
.text-center { text-align: center; }

/* Borders & Shadows */
.border { border-width: 1px; border-style: solid; }
.border-b { border-bottom-width: 1px; }
.border-r { border-right-width: 1px; }
.border-t { border-top-width: 1px; }
.rounded-lg { border-radius: var(--radius); }
.rounded-xl { border-radius: calc(var(--radius) + 0.25rem); }
.rounded-full { border-radius: 9999px; }
.shadow-sm { box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1); }

/* Transitions */
.transition-all { transition: all 0.2s ease; }
.transition-colors { transition: color 0.2s, background-color 0.2s, border-color 0.2s; }
.duration-300 { transition-duration: 300ms; }

/* Components */
.sidebar { background-color: hsl(var(--sidebar-background)); }
.sidebar-item { 
  display: flex; align-items: center; gap: 0.75rem; padding: 0.625rem 0.75rem; 
  border-radius: 0.5rem; font-size: 0.875rem; font-weight: 500; 
  color: hsl(var(--muted-foreground)); transition: all 0.2s; text-decoration: none;
}
.sidebar-item:hover { color: hsl(var(--foreground)); background-color: hsl(var(--accent)); }
.sidebar-item-active { background-color: hsl(var(--accent)); color: hsl(var(--accent-foreground)); }

.input-base { 
  width: 100%; padding: 0.5rem 0.75rem; border: 1px solid hsl(var(--input)); 
  border-radius: 0.5rem; background-color: hsl(var(--background)); color: hsl(var(--foreground));
  font-size: 0.875rem; transition: all 0.2s; outline: none;
}
.input-base:focus { border-color: hsl(var(--primary)); box-shadow: 0 0 0 2px hsl(var(--ring) / 0.2); }

.btn-primary { 
  background: linear-gradient(135deg, hsl(var(--primary)), hsl(199 89% 38%));
  color: hsl(var(--primary-foreground)); font-weight: 500; cursor: pointer; border: none;
}
.btn-primary:hover { opacity: 0.9; }

.btn-outline { 
  background: transparent; border: 1px solid hsl(var(--border)); 
  color: hsl(var(--foreground)); cursor: pointer; transition: all 0.2s;
}
.btn-outline:hover { background-color: hsl(var(--muted)); }

.card-interactive { 
  background-color: hsl(var(--card)); border: 1px solid hsl(var(--border)); 
  border-radius: var(--radius); transition: all 0.2s;
}
.card-interactive:hover { box-shadow: 0 4px 12px -2px rgb(0 0 0 / 0.08); border-color: hsl(var(--primary) / 0.2); }

.checkbox-custom { 
  width: 1.25rem; height: 1.25rem; border-radius: 9999px; border: 2px solid hsl(var(--border));
  display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s;
  background: transparent;
}
.checkbox-custom:hover { border-color: hsl(var(--primary)); }
.checkbox-custom.checked { background-color: hsl(var(--success)); border-color: hsl(var(--success)); }

/* Backdrop */
.backdrop-blur-lg { backdrop-filter: blur(16px); }
.backdrop-blur-sm { backdrop-filter: blur(4px); }

/* Responsive */
@media (max-width: 1024px) {
  .sidebar { width: 0; }
  .sidebar-toggle { display: block !important; }
  #main-content { margin-left: 0 !important; }
}

/* Animations */
.animate-fade-in { animation: fadeIn 0.3s ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* Theme Icons */
.dark .theme-icon-sun { display: block; }
.dark .theme-icon-moon { display: none; }
.theme-icon-sun { display: none; }
.theme-icon-moon { display: block; }

/* Grid */
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (min-width: 640px) { .sm\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Divide */
.divide-y > * + * { border-top: 1px solid hsl(var(--border)); }
.divide-border > * + * { border-color: hsl(var(--border)); }

/* Hidden */
.hidden { display: none; }
.group:hover .group-hover\:opacity-100 { opacity: 1; }
.opacity-0 { opacity: 0; }
