/* ==========================================================================
   GLOBAL TAILWIND & THEME COMPONENT STYLESHEET
   Property Multi-Tenant Real Estate Platform
   ========================================================================== */

/* --- CSS Variables / Design Tokens --- */
:root {
    --tenant-primary: #6001D2;
    --tenant-secondary: #0e263e;
    --tenant-primary-rgb: 96, 1, 210;
    --brand-50: #f5f3ff;
    --brand-100: #ede9fe;
    --brand-200: #ddd6fe;
    --brand-300: #c4b5fd;
    --brand-400: #a78bfa;
    --brand-500: #8b5cf6;
    --brand-600: #6001D2;
    --brand-700: #5200b3;
    --brand-800: #430094;
    --brand-900: #2e0066;
    --surface-light: #ffffff;
    --surface-muted: #f8fafc;
    --border-light: #e2e8f0;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --font-sans: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* --- Base Body & Typography --- */
html {
    scroll-behavior: smooth;
    font-family: var(--font-sans);
}

body {
    font-family: var(--font-sans);
    color: var(--text-main);
    background-color: #f8fafc;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Custom Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* --- FontAwesome icon integrity --- */
.fa, .fas, .far, .fal, .fad, .fab {
    font-family: "Font Awesome 5 Free" !important;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    line-height: 1;
}
.fas { font-weight: 900 !important; }
.far { font-weight: 400 !important; }
.fab { font-family: "Font Awesome 5 Brands" !important; font-weight: 400 !important; }

/* --- Glassmorphism & Panel Utilities --- */
.glass-panel {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.glass-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.04);
}

/* --- Live Status Pulse Indicators --- */
@keyframes status-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.6; }
}

.pulse-dot-active {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #10b981;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
    animation: status-pulse 2s infinite ease-in-out;
}

.pulse-dot-inactive {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #ef4444;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}

/* --- Database & Identifier Badges --- */
.badge-tenant-db {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 11.5px;
    padding: 3px 8px;
    border-radius: 6px;
    background-color: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
    font-weight: 500;
}

.badge-tenant-slug {
    display: inline-flex;
    align-items: center;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 12px;
    padding: 2px 7px;
    border-radius: 4px;
    background-color: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
    font-weight: 600;
}

/* --- Floating Agency Switcher (Tailwind Enhanced) --- */
.tenant-switcher-floating {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 8px 14px 8px 16px;
    border-radius: 9999px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.tenant-switcher-floating:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 30px -10px rgba(0, 0, 0, 0.15);
    border-color: var(--tenant-primary, #6001D2);
}

.tenant-switcher-icon {
    font-size: 14px;
    color: var(--tenant-primary, #6001D2);
}

.tenant-switcher-label {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tenant-switcher-select {
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
    background: transparent;
    border: none;
    outline: none;
    cursor: pointer;
    padding-right: 4px;
    font-family: inherit;
}

/* --- Bootstrap Modal + Tailwind Z-Index Alignment --- */
.modal-backdrop {
    z-index: 1040 !important;
    background-color: rgba(15, 23, 42, 0.6) !important;
    backdrop-filter: blur(4px) !important;
}

.modal {
    z-index: 1050 !important;
}

/* --- Global Button Hover Glow --- */
.btn-brand {
    background-color: var(--tenant-primary, #6001D2);
    color: #ffffff;
    transition: all 0.2s ease;
}
.btn-brand:hover {
    filter: brightness(1.1);
    color: #ffffff;
    box-shadow: 0 4px 14px 0 rgba(var(--tenant-primary-rgb, 96, 1, 210), 0.35);
}
