/* ============================================================
   Orchidly - Custom Styles
   ============================================================ */

/* Base Styles */
* { 
    font-family: 'Inter', sans-serif; 
}

body { 
    background: #f8fafc; 
    min-height: 100vh; 
    transition: background 0.3s, color 0.3s; 
}

/* ============================================================
   Dark Mode - Warmer Charcoal Theme
   ============================================================ */
body.dark { 
    background: #1a1a1a; 
    color: #f5f5f5; 
}

body.dark .card { 
    background: #262626; 
    border: 1px solid #333; 
}

body.dark .bg-white { 
    background: #262626 !important; 
}

body.dark .bg-slate-50, 
body.dark .bg-slate-100 { 
    background: #333333 !important; 
}

body.dark .text-slate-800, 
body.dark .text-slate-700 { 
    color: #f5f5f5 !important; 
}

body.dark .text-slate-600, 
body.dark .text-slate-500, 
body.dark .text-slate-400 { 
    color: #a3a3a3 !important; 
}

body.dark .border-slate-200, 
body.dark .border-slate-100, 
body.dark .border-b, 
body.dark .border-t, 
body.dark .border-r, 
body.dark .border-l, 
body.dark .border { 
    border-color: #404040 !important; 
}

body.dark input, 
body.dark textarea, 
body.dark select { 
    background: #333333 !important; 
    border-color: #525252 !important; 
    color: #f5f5f5 !important; 
}

body.dark .divide-y > * + * { 
    border-color: #404040 !important; 
}

body.dark .sidebar-item:hover { 
    background: rgba(236,72,153,0.15); 
}

body.dark .calendar-day:hover { 
    background: rgba(236,72,153,0.1); 
}

body.dark .hover\:bg-slate-50:hover, 
body.dark .hover\:bg-slate-100:hover { 
    background: #404040 !important; 
}

body.dark aside, 
body.dark header, 
body.dark nav { 
    background: #1f1f1f !important; 
}

body.dark .bg-pink-50, 
body.dark .bg-amber-50, 
body.dark .bg-blue-50, 
body.dark .bg-emerald-50, 
body.dark .bg-purple-50, 
body.dark .bg-cyan-50,
body.dark .bg-red-50,
body.dark .bg-indigo-50,
body.dark .bg-teal-50 { 
    background: #2d2d2d !important; 
}

body.dark .bg-pink-100, 
body.dark .bg-amber-100, 
body.dark .bg-blue-100, 
body.dark .bg-emerald-100, 
body.dark .bg-purple-100, 
body.dark .bg-cyan-100,
body.dark .bg-red-100,
body.dark .bg-indigo-100,
body.dark .bg-teal-100 { 
    background: #363636 !important; 
}

body.dark .ring-pink-500 { 
    --tw-ring-color: #ec4899; 
}

body.dark ::placeholder { 
    color: #666 !important; 
}

/* Dark Mode: Modals */
body.dark .fixed.inset-0.bg-black\/50 > div:not(.bg-black\/50) {
    background: #262626 !important;
}

/* Dark Mode: Dropdown Menus */
body.dark [class*="shadow-xl"],
body.dark [class*="shadow-lg"] {
    box-shadow: 0 10px 40px rgba(0,0,0,0.5) !important;
}

/* Dark Mode: Upload Zone */
body.dark .upload-zone {
    border-color: #525252;
    background: #262626;
}

body.dark .upload-zone:hover {
    border-color: #ec4899;
    background: rgba(236,72,153,0.1);
}

/* Dark Mode: Tool Cards */
body.dark .tool-card {
    background: #262626;
}

body.dark .tool-card:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.4);
}

/* Dark Mode: Kanban */
body.dark .kanban-column {
    background: #262626;
}

body.dark .kanban-item {
    background: #333333;
    border-color: #404040;
}

/* Dark Mode: Timeline */
body.dark .timeline-line {
    background: #404040;
}

/* Dark Mode: Wizard Steps */
body.dark .wizard-step.inactive {
    background: #404040;
    color: #737373;
}

/* Dark Mode: Calendar */
body.dark .calendar-day.today {
    background: rgba(236,72,153,0.2);
}

/* Dark Mode: Status Badges */
body.dark [class*="bg-emerald-100"] { background: rgba(34,197,94,0.2) !important; }
body.dark [class*="bg-amber-100"] { background: rgba(245,158,11,0.2) !important; }
body.dark [class*="bg-blue-100"] { background: rgba(59,130,246,0.2) !important; }
body.dark [class*="bg-purple-100"] { background: rgba(168,85,247,0.2) !important; }
body.dark [class*="bg-pink-100"] { background: rgba(236,72,153,0.2) !important; }
body.dark [class*="bg-red-100"] { background: rgba(239,68,68,0.2) !important; }

/* Dark Mode: Lilly Tooltip */
body.dark .lilly-tooltip {
    background: #333333;
    color: #f5f5f5;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

/* Dark Mode: Gradients bleiben */
body.dark .gradient-primary,
body.dark .btn-primary {
    background: linear-gradient(135deg, #ec4899 0%, #f59e0b 100%);
}

/* Dark Mode: Chart.js Canvas */
body.dark canvas {
    filter: brightness(0.95);
}

/* Dark Mode: Progress Bars */
body.dark [class*="bg-slate-100"] .gradient-primary,
body.dark [class*="bg-slate-200"] .gradient-primary {
    background: linear-gradient(135deg, #ec4899 0%, #f59e0b 100%);
}

/* Dark Mode: Focus States */
body.dark input:focus,
body.dark textarea:focus,
body.dark select:focus {
    border-color: #ec4899 !important;
    outline: none;
    box-shadow: 0 0 0 3px rgba(236,72,153,0.2);
}

/* Dark Mode: Hover States */
body.dark .hover\:bg-pink-50:hover {
    background: rgba(236,72,153,0.15) !important;
}

body.dark .hover\:border-pink-400:hover {
    border-color: #ec4899 !important;
}

/* Dark Mode: Help Section */
body.dark details {
    background: #333333 !important;
    border-color: #404040 !important;
}

body.dark details summary {
    color: #f5f5f5;
}

/* Dark Mode: Notifications */
body.dark .notification-card {
    background: #333333;
    border-color: #404040;
}

/* Dark Mode: Template Picker */
body.dark .template-item {
    background: #333333;
}

body.dark .template-item:hover {
    background: #404040;
}

/* Dark Mode: Gradient Backgrounds */
body.dark .bg-gradient-to-r.from-pink-50.to-amber-50,
body.dark .bg-gradient-to-r.from-emerald-50.to-teal-50,
body.dark .bg-gradient-to-r.from-purple-50.to-pink-50,
body.dark .bg-gradient-to-r.from-blue-50.to-cyan-50,
body.dark [class*="from-pink-50"],
body.dark [class*="from-amber-50"],
body.dark [class*="from-emerald-50"],
body.dark [class*="from-purple-50"] {
    background: linear-gradient(to right, #2d2d2d, #333333) !important;
}

/* Dark Mode: Range Sliders */
body.dark input[type="range"] {
    background: #404040 !important;
}

body.dark input[type="range"]::-webkit-slider-thumb {
    background: #ec4899;
}

/* Dark Mode: Checkboxes */
body.dark input[type="checkbox"] {
    background: #333333 !important;
    border-color: #525252 !important;
}

body.dark input[type="checkbox"]:checked {
    background: #ec4899 !important;
    border-color: #ec4899 !important;
}

/* ============================================================
   Gradient Utilities
   ============================================================ */
.gradient-primary { 
    background: linear-gradient(135deg, #ec4899 0%, #f59e0b 100%); 
}

.gradient-text { 
    background: linear-gradient(135deg, #ec4899, #f59e0b); 
    -webkit-background-clip: text; 
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================================
   Button Styles
   ============================================================ */
.btn-primary { 
    background: linear-gradient(135deg, #ec4899 0%, #f59e0b 100%); 
    color: white; 
    font-weight: 600; 
    border-radius: 0.5rem;
    transition: all 0.2s; 
}

.btn-primary:hover { 
    transform: translateY(-1px); 
    box-shadow: 0 10px 20px rgba(236,72,153,0.3); 
}

.btn-primary:disabled { 
    opacity: 0.5; 
    cursor: not-allowed; 
    transform: none; 
}

/* ============================================================
   Spinner / Loading Animations
   ============================================================ */
.spinner { 
    border: 3px solid #f3f3f3; 
    border-top: 3px solid #ec4899; 
    border-radius: 50%; 
    width: 20px; 
    height: 20px; 
    animation: spin 1s linear infinite; 
}

.spinner-sm { 
    border: 2px solid #f3f3f3; 
    border-top: 2px solid #ec4899; 
    border-radius: 50%; 
    width: 14px; 
    height: 14px; 
    animation: spin 1s linear infinite; 
    display: inline-block; 
}

@keyframes spin { 
    0% { transform: rotate(0deg); } 
    100% { transform: rotate(360deg); } 
}

/* ============================================================
   Animation Utilities
   ============================================================ */
.animate-fadeIn { 
    animation: fadeIn 0.3s ease-out; 
}

@keyframes fadeIn { 
    from { opacity: 0; } 
    to { opacity: 1; } 
}

/* ============================================================
   Sidebar Styles
   ============================================================ */
.sidebar-item { 
    transition: all 0.2s; 
}

.sidebar-item:hover { 
    background: rgba(236,72,153,0.1); 
}

.sidebar-item.active { 
    background: linear-gradient(135deg, rgba(236,72,153,0.15), rgba(245,158,11,0.15)); 
    color: #ec4899; 
    border-right: 3px solid #ec4899; 
}

/* ============================================================
   Card Styles
   ============================================================ */
.card { 
    background: white; 
    border-radius: 1rem; 
    box-shadow: 0 1px 3px rgba(0,0,0,0.1); 
}

/* ============================================================
   Calendar Styles
   ============================================================ */
.calendar-day:hover { 
    background: #fdf2f8; 
}

.calendar-day.today { 
    background: linear-gradient(135deg, rgba(236,72,153,0.1), rgba(245,158,11,0.1)); 
    font-weight: 600; 
}

.calendar-day.has-content::after { 
    content: ''; 
    position: absolute; 
    bottom: 4px; 
    left: 50%; 
    transform: translateX(-50%); 
    width: 6px; 
    height: 6px; 
    background: #ec4899; 
    border-radius: 50%; 
}

/* ============================================================
   Tool Card Styles
   ============================================================ */
.tool-card { 
    transition: all 0.2s; 
    cursor: pointer; 
}

.tool-card:hover { 
    transform: translateY(-2px); 
    box-shadow: 0 8px 25px rgba(0,0,0,0.1); 
}

/* ============================================================
   Kanban Styles
   ============================================================ */
.kanban-item { 
    cursor: grab; 
    transition: transform 0.15s; 
}

.kanban-item.dragging { 
    opacity: 0.5; 
    transform: scale(1.02) rotate(2deg); 
}

.kanban-column.drag-over { 
    background: rgba(236,72,153,0.1); 
    border-radius: 1rem; 
}

/* ============================================================
   Upload Zone
   ============================================================ */
.upload-zone { 
    border: 2px dashed #cbd5e1; 
    border-radius: 1rem; 
    transition: all 0.2s; 
}

.upload-zone:hover { 
    border-color: #ec4899; 
    background: rgba(236,72,153,0.05); 
}

/* ============================================================
   Lilly Floating Button
   ============================================================ */
.lilly-float { 
    position: fixed; 
    bottom: 100px; 
    right: 20px; 
    z-index: 45; 
}

@media (min-width: 1024px) { 
    .lilly-float { 
        bottom: 24px; 
        right: 24px; 
    } 
}

.lilly-btn { 
    width: 60px; 
    height: 60px; 
    border-radius: 50%; 
    background: linear-gradient(135deg, #ec4899, #f59e0b); 
    box-shadow: 0 4px 20px rgba(236,72,153,0.4); 
    cursor: pointer; 
    transition: all 0.3s; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    border: 3px solid white; 
    overflow: hidden; 
}

.lilly-btn:hover { 
    transform: scale(1.1); 
    box-shadow: 0 6px 30px rgba(236,72,153,0.5); 
}

.lilly-btn img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
}

.lilly-pulse { 
    animation: lillyPulse 2s infinite; 
}

@keyframes lillyPulse { 
    0%, 100% { box-shadow: 0 4px 20px rgba(236,72,153,0.4); } 
    50% { box-shadow: 0 4px 30px rgba(236,72,153,0.7); } 
}

.lilly-tooltip { 
    position: absolute; 
    right: 70px; 
    top: 50%; 
    transform: translateY(-50%); 
    background: white; 
    padding: 8px 16px; 
    border-radius: 12px; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.1); 
    white-space: nowrap; 
    font-size: 14px; 
    color: #334155; 
    opacity: 0; 
    transition: opacity 0.3s; 
    pointer-events: none; 
}

.lilly-float:hover .lilly-tooltip { 
    opacity: 1; 
}

/* ============================================================
   AI Project Timeline
   ============================================================ */
.timeline-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ec4899, #f59e0b);
    position: relative;
    z-index: 2;
}

.timeline-line {
    position: absolute;
    left: 5px;
    top: 12px;
    bottom: 0;
    width: 2px;
    background: #e2e8f0;
}

/* ============================================================
   Wizard Steps
   ============================================================ */
.wizard-step {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-weight: 600;
    transition: all 0.3s;
}

.wizard-step.active {
    background: linear-gradient(135deg, #ec4899, #f59e0b);
    color: white;
}

.wizard-step.completed {
    background: #22c55e;
    color: white;
}

.wizard-step.inactive {
    background: #e2e8f0;
    color: #94a3b8;
}

/* ============================================================
   Custom Scrollbar
   ============================================================ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

body.dark ::-webkit-scrollbar-track {
    background: #262626;
}

body.dark ::-webkit-scrollbar-thumb {
    background: #404040;
}

body.dark ::-webkit-scrollbar-thumb:hover {
    background: #525252;
}

/* ============================================================
   Misc Utilities
   ============================================================ */
.truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.truncate-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Emoji Fix für Cross-Platform */
.emoji {
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}
