/* Basecamp Replacement - Custom Styles */

/* Base Tailwind-like utilities */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    height: 100%;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.5;
    color: #1f2937;
    min-height: 100%;
}

/* Layout */
.min-h-screen { min-height: 100vh; }
.max-w-7xl { max-width: 80rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-md { max-width: 28rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mx-4 { margin-left: 1rem; margin-right: 1rem; }

/* Spacing */
.p-2 { padding: 0.5rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.px-1 { padding-left: 0.25rem; padding-right: 0.25rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.pt-1 { padding-top: 0.25rem; }
.pt-4 { padding-top: 1rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-auto { margin-top: auto; }
.ml-1 { margin-left: 0.25rem; }
.ml-2 { margin-left: 0.5rem; }
.ml-3 { margin-left: 0.75rem; }
.ml-4 { margin-left: 1rem; }
.ml-8 { margin-left: 2rem; }

/* Flexbox */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.flex-1 { flex: 1 1 0%; }
.flex-shrink-0 { flex-shrink: 0; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: start; }
.items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.space-x-4 > * + * { margin-left: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }

/* 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-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.gap-5 { gap: 1.25rem; }

@media (min-width: 640px) {
    .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 768px) {
    .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lg\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

/* Typography */
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.line-through { text-decoration: line-through; }

/* Colors */
.text-white { color: #ffffff; }
.text-gray-400 { color: #9ca3af; }
.text-gray-500 { color: #6b7280; }
.text-gray-700 { color: #374151; }
.text-gray-800 { color: #1f2937; }
.text-gray-900 { color: #111827; }
.text-red-500 { color: #ef4444; }
.text-red-700 { color: #b91c1c; }
.text-red-800 { color: #991b1b; }
.text-green-600 { color: #16a34a; }
.text-green-700 { color: #15803d; }
.text-green-800 { color: #166534; }
.text-indigo-600 { color: #4f46e5; }
.text-indigo-700 { color: #4338ca; }
.text-yellow-600 { color: #ca8a04; }
.text-purple-600 { color: #9333ea; }

.bg-white { background-color: #ffffff; }
.bg-gray-50 { background-color: #f9fafb; }
.bg-gray-100 { background-color: #f3f4f6; }
.bg-red-50 { background-color: #fef2f2; }
.bg-red-100 { background-color: #fee2e2; }
.bg-green-50 { background-color: #f0fdf4; }
.bg-green-100 { background-color: #dcfce7; }
.bg-indigo-50 { background-color: #eef2ff; }
.bg-indigo-100 { background-color: #e0e7ff; }
.bg-indigo-600 { background-color: #4f46e5; }
.bg-yellow-100 { background-color: #fef9c3; }
.bg-purple-100 { background-color: #f3e8ff; }

/* Borders */
.border { border-width: 1px; }
.border-b { border-bottom-width: 1px; }
.border-b-2 { border-bottom-width: 2px; }
.border-t { border-top-width: 1px; }
.border-gray-200 { border-color: #e5e7eb; }
.border-gray-300 { border-color: #d1d5db; }
.border-red-200 { border-color: #fecaca; }
.border-green-200 { border-color: #bbf7d0; }
.border-transparent { border-color: transparent; }
.border-indigo-500 { border-color: #6366f1; }
.rounded { border-radius: 0.25rem; }
.rounded-md { border-radius: 0.375rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-full { border-radius: 9999px; }

/* Shadows */
.shadow { box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1); }
.shadow-sm { box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); }
.shadow-md { box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1); }

/* Width/Height */
.w-4 { width: 1rem; }
.w-5 { width: 1.25rem; }
.w-6 { width: 1.5rem; }
.w-8 { width: 2rem; }
.w-12 { width: 3rem; }
.w-48 { width: 12rem; }
.w-full { width: 100%; }
.h-4 { height: 1rem; }
.h-5 { height: 1.25rem; }
.h-6 { height: 1.5rem; }
.h-8 { height: 2rem; }
.h-12 { height: 3rem; }
.h-16 { height: 4rem; }

/* Display */
.block { display: block; }
.hidden { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border-width: 0; }

/* Position */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.top-0 { top: 0; }
.top-full { top: 100%; }
.left-0 { left: 0; }
.right-0 { right: 0; }
.bottom-0 { bottom: 0; }

/* Z-index */
.z-50 { z-index: 50; }

/* Interactions */
.hover\:bg-gray-50:hover { background-color: #f9fafb; }
.hover\:bg-gray-100:hover { background-color: #f3f4f6; }
.hover\:bg-gray-200:hover { background-color: #e5e7eb; }
.hover\:bg-indigo-700:hover { background-color: #4338ca; }
.hover\:text-gray-600:hover { color: #4b5563; }
.hover\:text-gray-700:hover { color: #374151; }
.hover\:text-indigo-700:hover { color: #4338ca; }
.hover\:border-gray-300:hover { border-color: #d1d5db; }

.focus\:outline-none:focus { outline: 2px solid transparent; outline-offset: 2px; }
.focus\:ring-2:focus { box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.5); }
.focus\:ring-indigo-500:focus { --ring-color: #6366f1; }
.focus\:border-indigo-500:focus { border-color: #6366f1; }
.focus\:ring-offset-2:focus { box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(99, 102, 241, 0.5); }

/* Forms */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="number"],
textarea,
select {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #374151;
    background-color: #fff;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    color: #4f46e5;
    border: 1px solid #d1d5db;
    border-radius: 0.25rem;
    cursor: pointer;
}

input[type="checkbox"]:checked {
    background-color: #4f46e5;
    border-color: #4f46e5;
}

/* Buttons */
button,
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.5;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
}

/* Divide utilities */
.divide-y > * + * {
    border-top-width: 1px;
    border-color: #e5e7eb;
}

.divide-gray-200 > * + * {
    border-color: #e5e7eb;
}

/* Responsive utilities */
@media (min-width: 640px) {
    .sm\:ml-8 { margin-left: 2rem; }
    .sm\:flex { display: flex; }
    .sm\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
}

@media (min-width: 1024px) {
    .lg\:px-8 { padding-left: 2rem; padding-right: 2rem; }
    .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ============================================
   Dashboard-specific styles (Laravel matching)
   ============================================ */

/* Dashboard two-column grid layout: 70% left, 30% right */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 70% 30%;
        gap: 2rem;
    }
}

/* Spacing utilities */
.space-y-1 > * + * { margin-top: 0.25rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-x-8 > * + * { margin-left: 2rem; }

.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-0\.5 { padding-top: 0.125rem; padding-bottom: 0.125rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-0\.5 { margin-top: 0.125rem; }
.mb-3 { margin-bottom: 0.75rem; }

/* Overflow */
.overflow-hidden { overflow: hidden; }
.overflow-y-auto { overflow-y: auto; }
.min-w-0 { min-width: 0; }
.whitespace-nowrap { white-space: nowrap; }

/* Width/Height additions */
.w-24 { width: 6rem; }
.h-24 { height: 6rem; }
.max-h-96 { max-height: 24rem; }

/* Object fit */
.object-cover { object-fit: cover; }

/* Additional colors for badges */
.bg-orange-100 { background-color: #ffedd5; }
.text-orange-800 { color: #9a3412; }

/* Text utilities */
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }

/* Hover/transition utilities */
.transition-colors { transition-property: color, background-color, border-color; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.hover\:bg-indigo-200:hover { background-color: #c7d2fe; }
.hover\:text-indigo-600:hover { color: #4f46e5; }
.hover\:text-green-600:hover { color: #16a34a; }
.hover\:bg-green-700:hover { background-color: #15803d; }

/* Cursor */
.cursor-pointer { cursor: pointer; }

/* -mb-px for tabs */
.-mb-px { margin-bottom: -1px; }

/* Business Overview Cards */
.p-5 { padding: 1.25rem; }
.px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.w-0 { width: 0; }
.ml-5 { margin-left: 1.25rem; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.transition-shadow { transition-property: box-shadow; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.duration-200 { transition-duration: 200ms; }
.hover\:shadow-md:hover { box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1); }
.hover\:text-indigo-500:hover { color: #6366f1; }
.text-green-500 { color: #22c55e; }
.text-yellow-500 { color: #eab308; }
.text-indigo-500 { color: #6366f1; }

/* ============================================
   Add Todo Modal - Additional Utilities
   ============================================ */

/* Border widths */
.border-2 { border-width: 2px; }

/* Border colors */
.border-gray-100 { border-color: #f3f4f6; }

/* Border radius */
.rounded-xl { border-radius: 0.75rem; }

/* Shadows */
.shadow-xl { box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1); }
.shadow-2xl { box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); }

/* Spacing */
.mb-5 { margin-bottom: 1.25rem; }
.gap-1 { gap: 0.25rem; }
.pt-4 { padding-top: 1rem; }

/* Typography */
.text-base { font-size: 1rem; line-height: 1.5rem; }
.placeholder-gray-400::placeholder { color: #9ca3af; }

/* Width/Height */
.h-0 { height: 0; }
.h-3 { height: 0.75rem; }
.w-3 { width: 0.75rem; }
.max-h-48 { max-height: 12rem; }
.max-w-lg { max-width: 32rem; }

/* Opacity */
.opacity-0 { opacity: 0; }

/* Z-index */
.z-10 { z-index: 10; }

/* Hover states */
.hover\:bg-indigo-50:hover { background-color: #eef2ff; }
.hover\:text-gray-900:hover { color: #111827; }
.hover\:border-gray-400:hover { border-color: #9ca3af; }

/* Flexbox additions */
.flex-col { flex-direction: column; }

/* Text wrapping */
.text-left { text-align: left; }

/* ============================================
   Add Todo Modal - Chip Dropdown Styles
   ============================================ */

/* Chip dropdown container - ensure it's hidden by default */
#project-dropdown,
#assign-dropdown {
    display: none;
    position: absolute;
    left: 0;
    top: 100%;
    margin-top: 0.25rem;
    width: 12rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    z-index: 20;
    max-height: 12rem;
    overflow-y: auto;
}

/* Show dropdown when not hidden */
#project-dropdown:not(.hidden),
#assign-dropdown:not(.hidden) {
    display: block;
}

/* Dropdown item buttons - override global button styles */
#project-dropdown button,
#assign-dropdown button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    color: #374151;
    background: transparent;
    border: none;
    border-radius: 0;
    cursor: pointer;
}

#project-dropdown button:hover,
#assign-dropdown button:hover {
    background-color: #eef2ff;
    color: #4338ca;
}

/* Chip buttons - compact styling */
#project-chip,
#assign-chip,
#date-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background-color: #f3f4f6;
    color: #374151;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

#project-chip:hover,
#assign-chip:hover,
#date-chip:hover {
    background-color: #e5e7eb;
}

/* Chip selected state */
#project-chip.selected,
#assign-chip.selected,
#date-chip.selected {
    background-color: #e0e7ff;
    color: #4338ca;
    border-color: #c7d2fe;
}

/* More options button */
#more-options-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 0.75rem;
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 500;
    background: transparent;
    border: none;
    cursor: pointer;
}

#more-options-btn:hover {
    color: #374151;
}

/* ============================================
   GA4 Analytics Styles - Mobile First
   ============================================ */

/* Analytics Section */
.analytics-section {
    margin-bottom: 2rem;
}

/* Metrics Grids - Mobile First (single column on mobile) */
.metrics-grid-4,
.metrics-grid-3 {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
}

@media (min-width: 640px) {
    .metrics-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    .metrics-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .metrics-grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .metrics-grid-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Charts Grid - Mobile First */
.charts-grid-2 {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
}

@media (min-width: 1024px) {
    .charts-grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Metric Card */
.metric-card {
    background: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.metric-value {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1f2937;
}

.metric-label {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.metric-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
}

/* Icon backgrounds */
.icon-bg-indigo { background-color: #e0e7ff; color: #4f46e5; }
.icon-bg-green { background-color: #dcfce7; color: #16a34a; }
.icon-bg-blue { background-color: #dbeafe; color: #2563eb; }
.icon-bg-pink { background-color: #fce7f3; color: #db2777; }
.icon-bg-purple { background-color: #f3e8ff; color: #9333ea; }
.icon-bg-teal { background-color: #ccfbf1; color: #14b8a6; }
.icon-bg-yellow { background-color: #fef3c7; color: #d97706; }
.icon-bg-orange { background-color: #ffedd5; color: #ea580c; }
.icon-bg-red { background-color: #fee2e2; color: #dc2626; }

/* Chart Card */
.chart-card {
    background: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.chart-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.chart-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
}

.chart-icon {
    width: 1.25rem;
    height: 1.25rem;
    color: #6366f1;
}

/* Data Card */
.data-card {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.data-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.data-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
}

/* Badges */
.badge-indigo {
    display: inline-flex;
    padding: 0.125rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    background-color: #e0e7ff;
    color: #4338ca;
    border-radius: 9999px;
}

/* Trend indicators */
.trend-up { color: #16a34a; font-size: 0.875rem; }
.trend-down { color: #dc2626; font-size: 0.875rem; }
.trend-neutral { color: #6b7280; font-size: 0.875rem; }

/* ========================================
   Todo Modal - Project Picker Enhancements
   ======================================== */

/* Custom Scrollbar for Project Dropdown */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Selected chip styling */
#project-chip.selected {
    background-color: #eef2ff;
    color: #4f46e5;
    border: 1px solid #c7d2fe;
}

/* Project option selected state */
.project-option.selected {
    background-color: #eef2ff;
    color: #4f46e5;
}
