/* Comprehensive Tailwind CSS replacement for BAYAD app - Complete Version */

/* Reset and Base Styles */
* { box-sizing: border-box; }

/* Layout & Display */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.hidden { display: none; }
.block { display: block; }
.inline-block { display: inline-block; }
.fixed { position: fixed; }
.relative { position: relative; }
.absolute { position: absolute; }
.grid { display: grid; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1rem; }

/* Flexbox utilities */
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.flex-1 { flex: 1 1 0%; }
.flex-none { flex: none; }

/* Grid utilities */
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }

/* Sizes & Spacing */
.w-full { width: 100%; }
.w-0 { width: 0; }
.w-5 { width: 1.25rem; }
.w-8 { width: 2rem; }
.w-12 { width: 3rem; }
.w-16 { width: 4rem; }
.w-20 { width: 5rem; }
.w-64 { width: 16rem; }
.w-\[100px\] { width: 100px; }
.w-\[250px\] { width: 250px; }

.h-full { height: 100%; }
.h-screen { min-height: 100vh; }
.h-8 { height: 2rem; }
.h-12 { height: 3rem; }
.h-\[100\%\] { height: 100%; }
.min-h-screen { min-height: 100vh; }

/* Positioning */
.top-0 { top: 0; }
.top-1\/2 { top: 50%; }
.top-2 { top: 0.5rem; }
.left-0 { left: 0; }
.left-\[250px\] { left: 250px; }

/* Transform */
.transform { transform: translateZ(0); }
.-translate-y-1 { transform: translateY(-0.25rem); }
.-translate-y-1\/2 { transform: translateY(-50%); }
.translate-x-\[-5px\] { transform: translateX(-5px); }
.scale-105 { transform: scale(1.05); }

/* Colors - Backgrounds */
.bg-gray-100 { background-color: #f3f4f6; }
.bg-gray-300 { background-color: #d1d5db; }
.bg-green-100 { background-color: #dcfce7; }
.bg-white { background-color: #ffffff; }
.bg-black { background-color: #000000; }
.bg-\[\#00573F\] { background-color: #00573F; }
.bg-\[\#004933\] { background-color: #004933; }
.bg-\[\#00422f\] { background-color: #00422f; }
.bg-gray-800 { background-color: #1f2937; }

/* Colors - Text */
.text-white { color: #ffffff; }
.text-black { color: #000000; }
.text-gray-500 { color: #6b7280; }
.text-gray-700 { color: #374151; }
.text-gray-800 { color: #1f2937; }
.text-green-700 { color: #15803d; }
.text-red-500 { color: #ef4444; }
.text-blue-600 { color: #2563eb; }

/* Typography */
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.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; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.leading-tight { line-height: 1.25; }

/* Padding & Margin */
.p-0 { padding: 0; }
.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.px-0 { padding-left: 0; padding-right: 0; }
.px-1 { padding-left: 0.25rem; padding-right: 0.25rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.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-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.pt-6 { padding-top: 1.5rem; }
.pl-6 { padding-left: 1.5rem; }

.m-0 { margin: 0; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.ml-0 { margin-left: 0; }
.mr-0 { margin-right: 0; }
.mx-auto { margin-left: auto; margin-right: auto; }
.my-0 { margin-top: 0; margin-bottom: 0; }

/* Space utilities */
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.space-x-4 > * + * { margin-left: 1rem; }

/* Borders & Radius */
.border { border-width: 1px; border-color: #d1d5db; border-style: solid; }
.border-0 { border-width: 0; }
.border-black { border-color: #000000; }
.border-gray-200 { border-color: #e5e7eb; }
.border-gray-300 { border-color: #d1d5db; }
.border-green-500 { border-color: #10b981; }
.border-l-4 { border-left-width: 4px; }
.border-t { border-top-width: 1px; border-top-color: #e5e7eb; }
.border-r-\[20px\] { border-right-width: 20px; }
.border-solid { border-style: solid; }
.rounded { border-radius: 0.25rem; }
.rounded-md { border-radius: 0.375rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-full { border-radius: 9999px; }

/* Form Controls */
input, select, textarea {
    appearance: none;
    background-color: inherit;
    border-color: inherit;
}

input:focus, select:focus, textarea:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
    border-color: #00573F;
}

/* Shadows */
.shadow { box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06); }
.shadow-md { box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); }

/* Z-index */
.z-10 { z-index: 10; }
.z-20 { z-index: 20; }
.z-30 { z-index: 30; }
.z-50 { z-index: 50; }

/* Transitions */
.transition { transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.transition-all { transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.transition-transform { transition-property: transform; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.duration-200 { transition-duration: 200ms; }
.duration-300 { transition-duration: 300ms; }
.ease-in-out { transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); }

/* Overflow */
.overflow-hidden { overflow: hidden; }
.overflow-y-auto { overflow-y: auto; }

/* Focus */
.focus\:outline-none:focus { outline: 2px solid transparent; outline-offset: 2px; }

/* Hover effects */
.hover\:bg-\[\#004933\]:hover { background-color: #004933; }
.hover\:bg-\[\#00422f\]:hover { background-color: #00422f; }
.hover\:bg-gray-800:hover { background-color: #1f2937; }
.hover\:pl-6:hover { padding-left: 1.5rem; }
.hover\:scale-105:hover { transform: scale(1.05); }
.hover\:underline:hover { text-decoration: underline; }

/* Cursor */
.cursor-pointer { cursor: pointer; }

/* Responsive design */
@media (min-width: 640px) {
    .sm\:flex-row { flex-direction: row; }
    .sm\:flex-none { flex: none; }
    .sm\:text-sm { font-size: 0.875rem; line-height: 1.25rem; }
}

@media (min-width: 768px) {
    .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .md\:flex-row { flex-direction: row; }
    .md\:w-1\/2 { width: 50%; }
}

@media (min-width: 1024px) {
    .lg\:hidden { display: none; }
    .lg\:block { display: block; }
    .lg\:flex { display: flex; }
    .lg\:flex-row { flex-direction: row; }
    .lg\:w-20 { width: 5rem; }
    .lg\:w-64 { width: 16rem; }
}

/* Alpine.js cloak */
[x-cloak] { display: none !important; }

/* Max widths */
.max-w-sm { max-width: 24rem; }
.max-w-md { max-width: 28rem; }
.max-w-lg { max-width: 32rem; }
.max-w-xl { max-width: 36rem; }

/* Important overrides for Bootstrap conflicts */
.container { 
    width: 100% !important; 
    max-width: 1200px !important; 
    margin: 0 auto !important; 
    padding-left: 1rem !important;
    padding-right: 1rem !important;
}

/* Ensure form inputs maintain Tailwind styling */
input[type="text"], 
input[type="email"], 
input[type="password"], 
input[type="tel"], 
select, 
textarea {
    border: 1px solid #d1d5db !important;
    border-radius: 0.25rem !important;
    padding: 0.5rem !important;
    width: 100% !important;
    background-color: #f3f4f6 !important;
}

input[type="text"]:focus, 
input[type="email"]:focus, 
input[type="password"]:focus, 
input[type="tel"]:focus, 
select:focus, 
textarea:focus {
    border-color: #00573F !important;
    outline: none !important;
}

/* Bootstrap overrides to ensure Tailwind grid works */
.grid {
    display: grid !important;
}

.grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.gap-6 {
    gap: 1.5rem !important;
}

/* Ensure proper spacing */
.space-y-6 > * + * {
    margin-top: 1.5rem !important;
}

/* Override Bootstrap container */
.container {
    width: 100% !important;
    max-width: none !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
}

/* Enhanced Button Styles */
.btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0.75rem 1.5rem !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    border-radius: 0.5rem !important;
    border: 2px solid transparent !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    cursor: pointer !important;
    text-decoration: none !important;
    min-width: 140px !important;
    text-align: center !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
    position: relative !important;
    overflow: hidden !important;
}

/* Enhanced button variant for special styling */
.btn-enhanced {
    padding: 1rem 2rem !important;
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    border-radius: 0.75rem !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
    background-image: linear-gradient(135deg, transparent 0%, rgba(255, 255, 255, 0.1) 100%) !important;
}

.btn:focus {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(0, 87, 63, 0.3) !important;
}

.btn-primary {
    background-color: #00573F !important;
    color: white !important;
    border-color: #00573F !important;
}

.btn-primary:hover {
    background-color: #00422f !important;
    border-color: #00422f !important;
    transform: translateY(-2px) scale(1.02) !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
}

.btn-enhanced.btn-primary:hover {
    background: linear-gradient(135deg, #00422f 0%, #003d29 100%) !important;
    box-shadow: 0 25px 50px -12px rgba(0, 87, 63, 0.25) !important;
}

.btn-primary:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

.btn-secondary {
    background-color: #6b7280 !important;
    color: white !important;
    border-color: #6b7280 !important;
}

.btn-secondary:hover {
    background-color: #4b5563 !important;
    border-color: #4b5563 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15) !important;
}

.btn-secondary:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

.btn-outline {
    background-color: transparent !important;
    color: #00573F !important;
    border-color: #00573F !important;
}

.btn-outline:hover {
    background-color: #00573F !important;
    color: white !important;
    transform: translateY(-2px) scale(1.02) !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
}

.btn-enhanced.btn-outline:hover {
    background: linear-gradient(135deg, #00573F 0%, #004933 100%) !important;
    box-shadow: 0 25px 50px -12px rgba(0, 87, 63, 0.25) !important;
}

.btn-danger {
    background-color: #dc2626 !important;
    color: white !important;
    border-color: #dc2626 !important;
}

.btn-danger:hover {
    background-color: #b91c1c !important;
    border-color: #b91c1c !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15) !important;
}

.btn-success {
    background-color: #10b981 !important;
    color: white !important;
    border-color: #10b981 !important;
}

.btn-success:hover {
    background-color: #059669 !important;
    border-color: #059669 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15) !important;
}

.btn-warning {
    background-color: #f59e0b !important;
    color: white !important;
    border-color: #f59e0b !important;
}

.btn-warning:hover {
    background-color: #d97706 !important;
    border-color: #d97706 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15) !important;
}

/* Button sizes */
.btn-sm {
    padding: 0.5rem 1rem !important;
    font-size: 0.75rem !important;
    min-width: 100px !important;
}

.btn-lg {
    padding: 1.25rem 2.5rem !important;
    font-size: 1rem !important;
    min-width: 200px !important;
    border-radius: 1rem !important;
}

.btn-enhanced.btn-lg {
    padding: 1.5rem 3rem !important;
    font-size: 1.1rem !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
}

/* Button groups */
.btn-group {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.75rem !important;
}

.btn-group .btn {
    flex: 1 !important;
}

/* Icon spacing in buttons */
.btn i {
    font-size: 0.875em !important;
}

/* FontAwesome icon utilities */
.fas, .far, .fab, .fal {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Pro" !important;
}

.mr-2 { margin-right: 0.5rem !important; }
.ml-2 { margin-left: 0.5rem !important; }
.ms-2 { margin-left: 0.5rem !important; }
.me-2 { margin-right: 0.5rem !important; }

/* Disabled button state */
.btn:disabled,
.btn.disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

.btn:disabled:hover,
.btn.disabled:hover {
    transform: none !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

/* Button loading state */
.btn-loading {
    color: transparent !important;
    pointer-events: none !important;
    position: relative !important;
}

.btn-loading::after {
    content: "" !important;
    position: absolute !important;
    width: 16px !important;
    height: 16px !important;
    top: 50% !important;
    left: 50% !important;
    margin-left: -8px !important;
    margin-top: -8px !important;
    border: 2px solid #ffffff !important;
    border-radius: 50% !important;
    border-top-color: transparent !important;
    animation: btn-spin 1s ease-in-out infinite !important;
}

@keyframes btn-spin {
    to {
        transform: rotate(360deg) !important;
    }
}

/* Button ripple effect */
.btn::before {
    content: '' !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: 0 !important;
    height: 0 !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.5) !important;
    transition: width 0.6s, height 0.6s, top 0.6s, left 0.6s !important;
    transform: translate(-50%, -50%) !important;
    z-index: 0 !important;
}

.btn:active::before {
    width: 300px !important;
    height: 300px !important;
}

.btn * {
    position: relative !important;
    z-index: 1 !important;
}

/* Enhanced focus states */
.btn:focus {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(0, 87, 63, 0.4) !important;
}

.btn-outline:focus {
    box-shadow: 0 0 0 3px rgba(0, 87, 63, 0.3) !important;
}

/* Simple Button Styles - Exactly like the images */
.simple-btn-green {
    background-color: #00573F !important;
    color: white !important;
    border: none !important;
    padding: 8px 24px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    cursor: pointer !important;
    border-radius: 4px !important;
    transition: background-color 0.2s ease !important;
}

.simple-btn-green:hover {
    background-color: #004933 !important;
}

.simple-btn-gray {
    background-color: #e5e7eb !important;
    color: #374151 !important;
    border: none !important;
    padding: 8px 24px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    cursor: pointer !important;
    border-radius: 4px !important;
    transition: background-color 0.2s ease !important;
}

.simple-btn-gray:hover {
    background-color: #d1d5db !important;
}

.simple-btn-outline {
    background-color: transparent !important;
    color: #374151 !important;
    border: 1px solid #d1d5db !important;
    padding: 8px 24px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    text-transform: uppercase !important;
    cursor: pointer !important;
    border-radius: 4px !important;
    transition: all 0.2s ease !important;
}

.simple-btn-outline:hover {
    border-color: #9ca3af !important;
    background-color: #f9fafb !important;
}

.simple-btn-outline-green {
    background-color: transparent !important;
    color: #00573F !important;
    border: 1px solid #00573F !important;
    padding: 8px 24px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    text-transform: uppercase !important;
    cursor: pointer !important;
    border-radius: 4px !important;
    transition: all 0.2s ease !important;
}

.simple-btn-outline-green:hover {
    background-color: #00573F !important;
    color: white !important;
}