/* Real Estate CRM - Modern Theme with Rainbow Card Animation */
/* Copied from church2 - Dark theme, Purple accents, Rainbow cards */

:root {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --menu-primary: #8b5cf6;
    --card-bg: rgba(30, 41, 59, 0.8);
    --card-border: rgba(148, 163, 184, 0.1);
    --rainbow-gradient: linear-gradient(90deg,
        #ff0000 0%, #ff8000 14%, #ffff00 28%, #80ff00 42%,
        #00ff00 57%, #00ff80 71%, #00ffff 85%, #0080ff 100%
    );
}

body.dark, .dark {
    background: #0f172a !important;
    color: #f8fafc !important;
}

html, body { overflow-x: hidden; }

.app-logo, .app-favicon { object-fit: contain !important; max-width: 100%; max-height: 100%; }

/* Rainbow Card - Animated border, dark theme */
.rainbow-card, .stat-card {
    position: relative;
    background: #1e293b !important;
    color: #f8fafc !important;
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid rgba(148, 163, 184, 0.15);
    overflow: hidden;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.rainbow-card h2, .rainbow-card h3, .rainbow-card p, .rainbow-card span, .rainbow-card a,
.rainbow-card td, .rainbow-card th, .rainbow-card label,
.stat-card h2, .stat-card h3, .stat-card p, .stat-card span, .stat-card a,
.stat-card td, .stat-card th, .stat-card label { color: #f8fafc !important; }

.rainbow-card .text-gray-400, .rainbow-card .text-gray-500, .rainbow-card th,
.stat-card .text-gray-400, .stat-card .text-gray-500, .stat-card th { color: #94a3b8 !important; }

.rainbow-card a:hover, .stat-card a:hover { color: #c4b5fd !important; }

.rainbow-card .text-purple-400, .stat-card .text-purple-400 { color: #a78bfa !important; }
.rainbow-card .text-blue-400, .stat-card .text-blue-400 { color: #60a5fa !important; }
.rainbow-card .text-green-500, .stat-card .text-green-500 { color: #34d399 !important; }
.rainbow-card .text-amber-400, .stat-card .text-amber-400 { color: #fbbf24 !important; }
.rainbow-card .text-emerald-400, .stat-card .text-emerald-400 { color: #34d399 !important; }

.rainbow-card::before, .stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--rainbow-gradient);
    background-size: 200% 100%;
    animation: rainbow-flow 3s linear infinite;
}

@keyframes rainbow-flow {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.rainbow-card:hover, .stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
}

.rainbow-card:hover::before, .stat-card:hover::before {
    animation-duration: 1.5s;
    height: 5px;
}

.sidebar-gradient {
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%) !important;
    border-right: 1px solid rgba(148, 163, 184, 0.1);
}

.sidebar-gradient .menu-heading { color: #c084fc !important; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.75rem; }

body:not(.dark) .rainbow-card, body:not(.dark) .stat-card {
    background: #1e293b !important;
    color: #f8fafc !important;
    border: 1px solid rgba(148, 163, 184, 0.15);
}

.btn-primary {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white !important;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(139, 92, 246, 0.3);
    color: white !important;
}

.form-input {
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    color: #111827;
    padding: 0.75rem 1rem;
    width: 100%;
}

.dark .form-input { background: #374151; border-color: #4b5563; color: #f9fafb; }
.form-input:focus { outline: none; border-color: #8b5cf6; box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2); }
select.form-input { appearance: menulist; cursor: pointer; min-height: 2.5rem; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #1e293b; border-radius: 4px; }
::-webkit-scrollbar-thumb { background: #475569; border-radius: 4px; }

@media (max-width: 640px) { .rainbow-card, .stat-card { padding: 1rem; } }
.sidebar-menu-scroll { flex: 1 1 0; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }

/* Mobile menu - critical styles in front-header.php */

/* Mobile & tablet responsive */
@media (max-width: 768px) {
    .hero-slider .hero-prev, .hero-slider .hero-next { width: 40px; height: 40px; left: 8px; right: 8px; font-size: 0.875rem; }
}
@media (max-width: 640px) {
    .hero-slider .hero-prev, .hero-slider .hero-next { width: 36px; height: 36px; left: 4px; right: 4px; }
}
/* Tables: horizontal scroll on small screens */
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-responsive table { min-width: 600px; }
