/* GoTenant Landlord Suite - Next-Gen Liquid Glass Skin UI & Animations */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800;900&family=Space+Grotesk:wght@500;700&display=swap');

:root {
    --primary-color: #6366F1;
    --accent-glow: #818CF8;
    --bg-dark: #060913;
    --glass-bg: rgba(17, 25, 45, 0.56);
    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-specular: rgba(255, 255, 255, 0.18);
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-dark);
    color: #F8FAFC;
    overflow-x: hidden;
}

/* Zero-Lag Ambient Gradient Layer (No GPU blur filter) */
.glass-ambient-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
    background:
        radial-gradient(at 10% 10%, rgba(79, 70, 229, 0.22) 0px, transparent 48%),
        radial-gradient(at 90% 15%, rgba(16, 185, 129, 0.16) 0px, transparent 45%),
        radial-gradient(at 80% 85%, rgba(236, 72, 153, 0.14) 0px, transparent 48%),
        radial-gradient(at 15% 85%, rgba(6, 182, 212, 0.14) 0px, transparent 45%);
}
.glass-orb {
    position: absolute;
    border-radius: 9999px;
    opacity: 0.28;
    pointer-events: none;
}
.glass-orb-1 {
    width: 460px; height: 460px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.45), transparent 68%);
    top: -120px; left: -70px;
}
.glass-orb-2 {
    width: 420px; height: 420px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.4), transparent 68%);
    bottom: -100px; right: 4%;
}
.glass-orb-3 {
    width: 340px; height: 340px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.35), transparent 68%);
    top: 38%; left: 45%;
}

.font-mono-numbers {
    font-family: 'Space Grotesk', monospace;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.4);
}
::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.45);
    border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(129, 140, 248, 0.8);
}

/* Zero-Lag Liquid Glassmorphism Containers */
.glass-panel {
    background: linear-gradient(145deg, rgba(20, 29, 54, 0.88) 0%, rgba(10, 15, 29, 0.94) 100%);
    border: 1px solid rgba(255, 255, 255, 0.11);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.14),
        0 14px 32px -14px rgba(0, 0, 0, 0.65);
    transition: border-color 0.2s ease;
    contain: layout style;
}
.glass-panel:hover {
    border-color: rgba(255, 255, 255, 0.18);
}

.glass-dropdown {
    background: rgba(12, 19, 36, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(129, 140, 248, 0.35);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        0 20px 42px rgba(0, 0, 0, 0.75);
}

/* Modal Pop-In Entrance Animation */
@keyframes glassModalPop {
    0% { opacity: 0; transform: translate3d(0, 10px, 0) scale(0.96); }
    100% { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}
.glass-modal-card {
    background: linear-gradient(155deg, rgba(18, 26, 49, 0.94) 0%, rgba(9, 14, 27, 0.98) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.22),
        0 26px 52px -12px rgba(0, 0, 0, 0.8);
    animation: glassModalPop 0.18s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* 6 Centered Glass KPI Cards (Zero Scroll Repaint, GPU Hover Lift) */
.kpi-card {
    transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.2s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    contain: layout paint;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        0 10px 22px -8px rgba(0, 0, 0, 0.55);
}
.kpi-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.65), transparent);
    opacity: 0.65;
}
.kpi-card::after {
    content: '';
    position: absolute;
    top: -120%; left: -60%;
    width: 45%; height: 320%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.14), transparent);
    transform: rotate(25deg);
    transition: left 0.65s ease;
    pointer-events: none;
}
.kpi-card:hover::after {
    left: 135%;
}
.kpi-card:hover {
    transform: translateY(-5px) scale(1.025);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.35),
        0 18px 34px -8px rgba(0, 0, 0, 0.65),
        0 0 26px rgba(99, 102, 241, 0.28);
}
.kpi-card:active {
    transform: translateY(-1px) scale(0.985);
}

/* Glass Gradient Variants for the 6 Cards */
.kpi-rent {
    background: linear-gradient(155deg, rgba(99, 102, 241, 0.26) 0%, rgba(17, 25, 45, 0.68) 78%);
    border: 1px solid rgba(129, 140, 248, 0.38);
}
.kpi-collected {
    background: linear-gradient(155deg, rgba(16, 185, 129, 0.26) 0%, rgba(17, 25, 45, 0.68) 78%);
    border: 1px solid rgba(52, 211, 153, 0.38);
}
.kpi-dues {
    background: linear-gradient(155deg, rgba(245, 158, 11, 0.26) 0%, rgba(17, 25, 45, 0.68) 78%);
    border: 1px solid rgba(251, 191, 36, 0.38);
}
.kpi-total-rooms {
    background: linear-gradient(155deg, rgba(14, 165, 233, 0.26) 0%, rgba(17, 25, 45, 0.68) 78%);
    border: 1px solid rgba(56, 189, 248, 0.38);
}
.kpi-booked-rooms {
    background: linear-gradient(155deg, rgba(34, 197, 94, 0.26) 0%, rgba(17, 25, 45, 0.68) 78%);
    border: 1px solid rgba(74, 222, 128, 0.38);
}
.kpi-vacant-rooms {
    background: linear-gradient(155deg, rgba(244, 63, 94, 0.26) 0%, rgba(17, 25, 45, 0.68) 78%);
    border: 1px solid rgba(251, 113, 133, 0.38);
}

/* Quick Action Glass Tiles */
.action-tile {
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transition: all 0.28s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.action-tile:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.25),
        0 14px 26px -6px rgba(0, 0, 0, 0.6);
}
.action-tile:active {
    transform: scale(0.96);
}

/* Smooth Entrance Stagger */
@keyframes fadeSlideUp {
    0% { opacity: 0; transform: translateY(12px); }
    100% { opacity: 1; transform: translateY(0); }
}
.animate-fade-up {
    animation: fadeSlideUp 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Subtle Shimmer Animation */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
.animate-shimmer {
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0) 100%);
    background-size: 200% 100%;
    animation: shimmer 3s infinite;
}

/* Active navigation state */
.nav-active {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.38) 0%, rgba(99, 102, 241, 0.08) 100%);
    backdrop-filter: blur(10px);
    color: #FFFFFF !important;
    border-left: 3px solid #818CF8;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.12);
    font-weight: 700;
}

/* ========================================================= */
/* ☀️ LIGHT MODE FROSTED GLASS THEME ENGINE                  */
/* ========================================================= */
html.light-mode,
body.light-mode {
    background-color: #EEF2FF !important;
    background-image:
        radial-gradient(at 10% 10%, rgba(99, 102, 241, 0.14) 0px, transparent 50%),
        radial-gradient(at 90% 15%, rgba(16, 185, 129, 0.12) 0px, transparent 50%),
        radial-gradient(at 75% 85%, rgba(236, 72, 153, 0.1) 0px, transparent 50%) !important;
    color: #0F172A !important;
}

body.light-mode .glass-orb {
    opacity: 0.2;
}

body.light-mode aside#sidebar {
    background-color: rgba(255, 255, 255, 0.78) !important;
    backdrop-filter: blur(22px) !important;
    border-color: rgba(203, 213, 225, 0.7) !important;
}

body.light-mode header {
    background-color: rgba(255, 255, 255, 0.78) !important;
    backdrop-filter: blur(22px) !important;
    border-color: rgba(203, 213, 225, 0.7) !important;
}

body.light-mode .glass-panel {
    background: rgba(255, 255, 255, 0.72) !important;
    backdrop-filter: blur(20px) saturate(160%) !important;
    border: 1px solid rgba(255, 255, 255, 0.85) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        0 8px 28px -4px rgba(15, 23, 42, 0.08) !important;
}

body.light-mode .glass-modal-card {
    background: rgba(255, 255, 255, 0.92) !important;
    backdrop-filter: blur(24px) !important;
    border: 1px solid rgba(203, 213, 225, 0.85) !important;
    color: #0F172A !important;
}

body.light-mode .glass-dropdown {
    background: rgba(255, 255, 255, 0.94) !important;
    border-color: #CBD5E1 !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.14) !important;
}

body.light-mode .text-white {
    color: #0F172A !important;
}
body.light-mode .text-slate-100 {
    color: #1E293B !important;
}
body.light-mode .text-slate-200 {
    color: #334155 !important;
}
body.light-mode .text-slate-300 {
    color: #475569 !important;
}
body.light-mode .text-slate-400 {
    color: #64748B !important;
}

body.light-mode .bg-slate-900,
body.light-mode .bg-slate-950,
body.light-mode .bg-slate-900\/90,
body.light-mode .bg-slate-900\/80,
body.light-mode .bg-slate-900\/60,
body.light-mode .bg-slate-950\/80,
body.light-mode .bg-slate-950\/90,
body.light-mode .bg-slate-950\/60,
body.light-mode .bg-slate-950\/70 {
    background-color: rgba(241, 245, 249, 0.8) !important;
    border-color: #E2E8F0 !important;
}

body.light-mode .border-slate-800,
body.light-mode .border-slate-800\/80,
body.light-mode .border-slate-800\/90,
body.light-mode .border-slate-800\/60,
body.light-mode .border-slate-700 {
    border-color: #CBD5E1 !important;
}

body.light-mode input,
body.light-mode select,
body.light-mode textarea {
    background-color: #FFFFFF !important;
    border-color: #CBD5E1 !important;
    color: #0F172A !important;
}

/* 6 Centered Glass KPI Cards in Light Mode */
body.light-mode .kpi-rent {
    background: linear-gradient(145deg, rgba(238, 242, 255, 0.85) 0%, rgba(224, 231, 255, 0.9) 100%) !important;
    border: 1px solid #C7D2FE !important;
}
body.light-mode .kpi-rent span.text-white {
    color: #3730A3 !important;
}
body.light-mode .kpi-collected {
    background: linear-gradient(145deg, rgba(236, 253, 245, 0.85) 0%, rgba(209, 250, 229, 0.9) 100%) !important;
    border: 1px solid #A7F3D0 !important;
}
body.light-mode .kpi-collected span.text-emerald-400 {
    color: #047857 !important;
}
body.light-mode .kpi-dues {
    background: linear-gradient(145deg, rgba(255, 251, 235, 0.85) 0%, rgba(254, 243, 199, 0.9) 100%) !important;
    border: 1px solid #FDE68A !important;
}
body.light-mode .kpi-dues span.text-amber-400 {
    color: #B45309 !important;
}
body.light-mode .kpi-total-rooms {
    background: linear-gradient(145deg, rgba(240, 249, 255, 0.85) 0%, rgba(224, 242, 254, 0.9) 100%) !important;
    border: 1px solid #BAE6FD !important;
}
body.light-mode .kpi-total-rooms span.text-white {
    color: #0369A1 !important;
}
body.light-mode .kpi-booked-rooms {
    background: linear-gradient(145deg, rgba(240, 253, 244, 0.85) 0%, rgba(220, 252, 231, 0.9) 100%) !important;
    border: 1px solid #BBF7D0 !important;
}
body.light-mode .kpi-booked-rooms span.text-green-400 {
    color: #15803D !important;
}
body.light-mode .kpi-vacant-rooms {
    background: linear-gradient(145deg, rgba(255, 241, 242, 0.85) 0%, rgba(255, 228, 230, 0.9) 100%) !important;
    border: 1px solid #FECDD3 !important;
}
body.light-mode .kpi-vacant-rooms span.text-rose-400 {
    color: #BE123C !important;
}

body.light-mode .action-tile {
    background-color: rgba(255, 255, 255, 0.82) !important;
    border-color: #E2E8F0 !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04) !important;
}
body.light-mode .action-tile:hover {
    background-color: #FFFFFF !important;
    border-color: #A5B4FC !important;
}

body.light-mode tbody tr:hover {
    background-color: rgba(241, 245, 249, 0.8) !important;
}

body.light-mode .nav-active {
    background: linear-gradient(90deg, rgba(79, 70, 229, 0.14) 0%, rgba(79, 70, 229, 0.04) 100%) !important;
    color: #4338CA !important;
    border-left: 3px solid #4F46E5 !important;
}

body.light-mode .bg-slate-950\/80 {
    background-color: rgba(15, 23, 42, 0.45) !important;
}
