/**
 * SassySystems - Shared Application Styles
 * Bootstrap 5.3.3 compatible
 */

:root {
    --sassy-primary: #6366f1;
    --sassy-secondary: #8b5cf6;
    --sassy-success: #10b981;
    --sassy-warning: #f59e0b;
    --sassy-danger: #ef4444;
    --sassy-info: #3b82f6;
    --sassy-dark: #1f2937;
    --sassy-light: #f8fafc;
    --sassy-gray: #6b7280;
}

/* Base Styles */
* {
    box-sizing: border-box;
}

*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, .display-1, .display-2, .display-3, .display-4 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

h1, .display-3 {
    font-size: 3.5rem;
}

.section-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--sassy-dark);
}

.section-subtitle {
    font-size: 1.25rem;
    color: var(--sassy-gray);
    margin-bottom: 60px;
}

/* Navbar */
.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--sassy-primary) !important;
}

.navbar {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.navbar-light .navbar-nav .nav-link {
    color: var(--sassy-dark);
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar-light .navbar-nav .nav-link:hover {
    color: var(--sassy-primary);
}

.navbar-light .navbar-nav .nav-link.active {
    color: var(--sassy-primary);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--sassy-primary) 0%, var(--sassy-secondary) 100%);
    color: white;
    padding: 120px 0 80px 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle at 20% 80%, rgba(255,255,255,0.1) 0%, transparent 50%),
                      radial-gradient(circle at 80% 20%, rgba(255,255,255,0.1) 0%, transparent 50%),
                      radial-gradient(circle at 40% 40%, rgba(255,255,255,0.05) 0%, transparent 50%);
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 2;
}

/* Buttons */
.btn {
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 12px 24px;
}

.btn-primary-custom {
    background: linear-gradient(135deg, var(--sassy-primary), var(--sassy-secondary));
    border: none;
    padding: 15px 30px;
    font-weight: 600;
    border-radius: 10px;
    color: white;
    transition: all 0.3s ease;
}

.btn-primary-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
    color: white;
}

.btn-outline-custom {
    border: 2px solid white;
    color: white;
    padding: 13px 30px;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.3s ease;
    background: transparent;
}

.btn-outline-custom:hover {
    background: white;
    color: var(--sassy-primary);
    transform: translateY(-2px);
}

/* Cards */
.card, .feature-card, .solution-card {
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.feature-card {
    border: none;
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.solution-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    height: 100%;
}

.solution-card:hover {
    transform: translateY(-5px);
}

/* Icons */
.feature-icon {
    background: linear-gradient(135deg, var(--sassy-primary), var(--sassy-secondary));
    width: 80px;
    height: 80px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px auto;
    color: white;
}

.solution-icon {
    background: var(--sassy-light);
    width: 100px;
    height: 100px;
    border-radius: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
    color: var(--sassy-primary);
}

.why-choose-icon {
    background: linear-gradient(135deg, var(--sassy-success), #059669);
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px auto;
    color: white;
}

/* Layout */
.section-padding {
    padding: 100px 0;
}

.container {
    max-width: 1200px;
}

/* Footer */
footer {
    background: var(--sassy-dark);
    color: white;
    padding: 60px 0 30px 0;
}

.footer-title {
    color: var(--sassy-primary);
    font-weight: 600;
    margin-bottom: 20px;
}

.footer-link {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.3s ease;
    display: block;
    margin-bottom: 10px;
}

.footer-link:hover {
    color: var(--sassy-primary);
    text-decoration: underline;
}

/* Utility Classes */
.bg-light {
    background-color: var(--sassy-light) !important;
}

.text-white-50 {
    color: rgba(255, 255, 255, 0.7) !important;
}

.why-choose-item {
    text-align: center;
    padding: 30px 20px;
}

/* Admin Layout */
.admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 260px;
    background: var(--sassy-dark);
    color: white;
    padding: 20px 0;
    overflow-y: auto;
    z-index: 1000;
    transition: all 0.3s ease;
}

.admin-sidebar .logo {
    padding: 0 20px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 20px;
}

.admin-sidebar .nav-link {
    color: #9ca3af;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
    text-decoration: none;
    border-left: 3px solid transparent;
}

.admin-sidebar .nav-link:hover {
    background: rgba(255,255,255,0.05);
    color: white;
    border-left-color: var(--sassy-primary);
}

.admin-sidebar .nav-link.active {
    background: rgba(99, 102, 241, 0.1);
    color: var(--sassy-primary);
    border-left-color: var(--sassy-primary);
}

.admin-content {
    margin-left: 260px;
    min-height: 100vh;
    background: var(--sassy-light);
}

.admin-topbar {
    background: white;
    padding: 15px 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-main {
    padding: 30px;
}

/* Tenant Layout */
.tenant-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 240px;
    background: linear-gradient(180deg, var(--sassy-primary) 0%, var(--sassy-secondary) 100%);
    color: white;
    padding: 20px 0;
    overflow-y: auto;
    z-index: 1000;
}

.tenant-sidebar .nav-link {
    color: rgba(255,255,255,0.8);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.tenant-sidebar .nav-link:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.tenant-sidebar .nav-link.active {
    background: rgba(255,255,255,0.2);
    color: white;
}

.tenant-content {
    margin-left: 240px;
    min-height: 100vh;
    background: var(--sassy-light);
}

/* Client Layout */
.client-header {
    background: white;
    border-bottom: 3px solid var(--sassy-primary);
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.client-nav {
    display: flex;
    gap: 30px;
    align-items: center;
    justify-content: center;
}

.client-nav .nav-link {
    color: var(--sassy-dark);
    font-weight: 500;
    padding: 10px 15px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.client-nav .nav-link:hover {
    color: var(--sassy-primary);
}

.client-nav .nav-link.active {
    color: var(--sassy-primary);
    border-bottom: 2px solid var(--sassy-primary);
}

/* Dashboard Cards */
.stat-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.stat-card .stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 15px;
}

.stat-card.primary .stat-icon {
    background: rgba(99, 102, 241, 0.1);
    color: var(--sassy-primary);
}

.stat-card.success .stat-icon {
    background: rgba(16, 185, 129, 0.1);
    color: var(--sassy-success);
}

.stat-card.warning .stat-icon {
    background: rgba(245, 158, 11, 0.1);
    color: var(--sassy-warning);
}

.stat-card.info .stat-icon {
    background: rgba(59, 130, 246, 0.1);
    color: var(--sassy-info);
}

/* Forms */
.form-control:focus {
    border-color: var(--sassy-primary);
    box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.15);
}

.form-label {
    font-weight: 600;
    color: var(--sassy-dark);
    margin-bottom: 8px;
}

/* Tables */
.table {
    background: white;
    border-radius: 10px;
    overflow: hidden;
}

.table thead {
    background: var(--sassy-light);
    border-bottom: 2px solid var(--sassy-primary);
}

/* Badges */
.badge {
    padding: 6px 12px;
    font-weight: 600;
    border-radius: 6px;
}

/* Sidebar Overlay for Mobile */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.show {
    display: block;
    opacity: 1;
}

body.sidebar-open {
    overflow: hidden;
}

/* Responsive */
@media (max-width: 991.98px) {
    .hero-section {
        padding: 100px 0 60px 0;
    }

    .section-title {
        font-size: 2.5rem !important;
    }

    h1, .display-3 {
        font-size: 2.8rem !important;
    }

    .admin-sidebar, .tenant-sidebar {
        transform: translateX(-100%);
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    }

    .admin-sidebar.show, .tenant-sidebar.show {
        transform: translateX(0);
    }

    .admin-content, .tenant-content {
        margin-left: 0;
    }
}

@media (max-width: 767.98px) {
    .hero-section {
        padding: 80px 0 40px 0;
    }
    
    .section-title {
        font-size: 2rem !important;
    }
    
    h1, .display-3 {
        font-size: 2.2rem !important;
    }
    
    .lead {
        font-size: 1.1rem !important;
    }
    
    .section-padding {
        padding: 60px 0;
    }
}

/* Print Styles */
@media print {
    .navbar, .admin-sidebar, .tenant-sidebar, .admin-topbar, footer {
        display: none;
    }

    .admin-content, .tenant-content {
        margin-left: 0;
    }
}

/* ========================================
   ENHANCED UTILITIES & ANIMATIONS
   ======================================== */

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Enhanced Focus States for Accessibility */
:focus-visible {
    outline: 2px solid var(--sassy-primary);
    outline-offset: 2px;
}

/* Glass Morphism Effect */
.glass-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Improved Shadows */
.shadow-soft {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.shadow-hover {
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.shadow-hover:hover {
    box-shadow: 0 12px 40px rgba(99, 102, 241, 0.15);
    transform: translateY(-4px);
}

.shadow-primary {
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.25);
}

/* ========================================
   ANIMATIONS
   ======================================== */

/* Fade In Up Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

/* Fade In Animation */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* Slide In Left */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-left {
    animation: slideInLeft 0.5s ease forwards;
}

/* Gradient Shift Animation */
@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.animated-gradient {
    background-size: 200% 200%;
    animation: gradientShift 5s ease infinite;
}

/* Pulse Animation */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* Float Animation */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.float {
    animation: float 3s ease-in-out infinite;
}

/* Spin Animation */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.spin {
    animation: spin 1s linear infinite;
}

/* Skeleton Loading */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

/* Staggered Animation Delays */
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* ========================================
   ENHANCED COMPONENTS
   ======================================== */

/* Enhanced Buttons */
.btn-gradient {
    background: linear-gradient(135deg, var(--sassy-primary), var(--sassy-secondary));
    border: none;
    color: white;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--sassy-secondary), var(--sassy-primary));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.btn-gradient:hover::before {
    opacity: 1;
}

.btn-gradient:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.35);
}

/* Loading Button State */
.btn-loading {
    position: relative;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Enhanced Cards */
.card-hover {
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
    border-color: rgba(99, 102, 241, 0.2);
}

/* Pricing Card Featured */
.pricing-featured {
    position: relative;
    transform: scale(1.05);
    z-index: 2;
    border: 2px solid var(--sassy-primary);
}

.pricing-featured::before {
    content: 'Most Popular';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--sassy-primary), var(--sassy-secondary));
    color: white;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Enhanced Form Controls */
.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: var(--sassy-primary);
}

.form-control-lg {
    border-radius: 10px;
    padding: 14px 18px;
}

.input-icon {
    position: relative;
}

.input-icon .form-control {
    padding-left: 45px;
}

.input-icon i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--sassy-gray);
    transition: color 0.3s ease;
}

.input-icon:focus-within i {
    color: var(--sassy-primary);
}

/* Enhanced Tables */
.table-hover tbody tr {
    transition: background-color 0.2s ease;
}

.table-hover tbody tr:hover {
    background-color: rgba(99, 102, 241, 0.05);
}

.table thead th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
    color: var(--sassy-gray);
    border-bottom-width: 2px;
}

/* Status Badges */
.badge-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-active {
    background: rgba(16, 185, 129, 0.1);
    color: var(--sassy-success);
}

.badge-pending {
    background: rgba(245, 158, 11, 0.1);
    color: var(--sassy-warning);
}

.badge-inactive {
    background: rgba(107, 114, 128, 0.1);
    color: var(--sassy-gray);
}

/* ========================================
   SIDEBAR ENHANCEMENTS
   ======================================== */

.admin-sidebar .nav-link {
    position: relative;
    overflow: hidden;
}

.admin-sidebar .nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: var(--sassy-primary);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.admin-sidebar .nav-link:hover::before,
.admin-sidebar .nav-link.active::before {
    transform: scaleY(1);
}

.admin-sidebar .nav-link.active {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.15), transparent);
}

/* ========================================
   DASHBOARD STAT CARDS
   ======================================== */

.stat-card {
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: currentColor;
    opacity: 0.05;
    border-radius: 50%;
    transform: translate(30%, -30%);
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--sassy-dark);
    line-height: 1.2;
}

.stat-card .stat-label {
    font-size: 14px;
    color: var(--sassy-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card .stat-change {
    font-size: 13px;
    font-weight: 600;
}

.stat-card .stat-change.positive {
    color: var(--sassy-success);
}

.stat-card .stat-change.negative {
    color: var(--sassy-danger);
}

/* ========================================
   MISC UTILITIES
   ======================================== */

/* Text Gradient */
.text-gradient {
    background: linear-gradient(135deg, var(--sassy-primary), var(--sassy-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 20px 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e5e7eb;
}

.divider span {
    padding: 0 15px;
    color: var(--sassy-gray);
    font-size: 14px;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--sassy-light);
}

::-webkit-scrollbar-thumb {
    background: #c1c5cc;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a5ac;
}

/* Selection Color */
::selection {
    background: rgba(99, 102, 241, 0.2);
    color: var(--sassy-dark);
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ========================================
   ENHANCED ADMIN DASHBOARD STYLES
   ======================================== */

/* Stat Card Animations */
.stat-card-animated {
    position: relative;
    overflow: hidden;
}

.stat-card-animated::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: left 0.5s ease;
}

.stat-card-animated:hover::after {
    left: 100%;
}

/* Pulse on Hover for Icons */
.pulse-on-hover {
    transition: transform 0.3s ease;
}

.stat-card:hover .pulse-on-hover {
    animation: pulse 0.6s ease-in-out;
}

/* Subtle Pulse Animation */
@keyframes pulseSoft {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.pulse-subtle {
    animation: pulseSoft 2s ease-in-out infinite;
}

/* Health Indicator Styling */
.health-indicator {
    transition: all 0.3s ease;
}

.health-indicator:hover {
    transform: translateX(5px);
}

/* Transition Utility */
.transition-all {
    transition: all 0.3s ease;
}

/* Plan Indicator Dot */
.plan-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

/* Progress Bar Animation */
.progress-animated .progress-bar {
    transition: width 1s ease-in-out;
}

@keyframes progressGlow {
    0%, 100% { box-shadow: 0 0 5px currentColor; }
    50% { box-shadow: 0 0 15px currentColor; }
}

.progress-bar-animated {
    animation: progressGlow 2s ease-in-out infinite;
}

/* Table Enhancements */
.table-enhanced {
    border-collapse: separate;
    border-spacing: 0;
}

.table-enhanced thead th {
    background: linear-gradient(180deg, var(--sassy-light) 0%, #f1f5f9 100%);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
    color: var(--sassy-gray);
    padding: 14px 16px;
    border-bottom: 2px solid rgba(99, 102, 241, 0.2);
}

.table-enhanced tbody tr {
    transition: all 0.2s ease;
}

.table-enhanced tbody tr:hover {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.05), transparent);
}

.table-row-animated {
    animation: fadeInUp 0.4s ease forwards;
    opacity: 0;
}

/* Tenant Avatar */
.tenant-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--sassy-primary), var(--sassy-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tenant-avatar .avatar-initial {
    color: white;
    font-weight: 600;
    font-size: 14px;
}

/* Code Badge */
.code-badge {
    background: var(--sassy-light);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    color: var(--sassy-primary);
    border: 1px solid rgba(99, 102, 241, 0.2);
}

/* Activity Timeline */
.activity-timeline {
    position: relative;
}

.activity-item {
    position: relative;
    padding-left: 24px;
    padding-bottom: 16px;
    border-left: 2px solid rgba(99, 102, 241, 0.2);
    margin-left: 8px;
}

.activity-item:last-child {
    border-left-color: transparent;
    padding-bottom: 0;
}

.activity-indicator {
    position: absolute;
    left: -6px;
    top: 4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--sassy-primary), var(--sassy-secondary));
    border: 2px solid white;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.activity-content {
    background: rgba(248, 250, 252, 0.5);
    padding: 12px;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.activity-item:hover .activity-content {
    background: rgba(99, 102, 241, 0.05);
    transform: translateX(4px);
}

.activity-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--sassy-primary), var(--sassy-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
}

.activity-time {
    font-size: 11px;
}

/* Button Hover Gradient */
.btn-hover-gradient {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-hover-gradient:hover {
    background: linear-gradient(135deg, var(--sassy-primary), var(--sassy-secondary));
    border-color: transparent;
    color: white;
}

/* ========================================
   ENHANCED SIDEBAR NAVIGATION
   ======================================== */

.sidebar-nav {
    padding: 0 8px;
}

.nav-link-enhanced {
    position: relative;
    display: flex;
    align-items: center;
    padding: 12px 16px;
    margin: 2px 0;
    border-radius: 10px;
    color: #9ca3af;
    text-decoration: none;
    transition: all 0.3s ease;
    overflow: hidden;
}

.nav-link-enhanced::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(135deg, var(--sassy-primary), var(--sassy-secondary));
    opacity: 0;
    transition: all 0.3s ease;
    border-radius: 10px;
    z-index: 0;
}

.nav-link-enhanced:hover::before {
    width: 100%;
    opacity: 0.1;
}

.nav-link-enhanced:hover {
    color: white;
    padding-left: 20px;
}

.nav-link-enhanced.active {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.2), rgba(99, 102, 241, 0.05));
    color: white;
}

.nav-link-enhanced.active::before {
    width: 4px;
    opacity: 1;
    border-radius: 0 4px 4px 0;
}

/* Nav Icon Wrapper */
.nav-icon-wrapper {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    margin-right: 12px;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.nav-link-enhanced:hover .nav-icon-wrapper {
    background: rgba(99, 102, 241, 0.2);
    transform: scale(1.1);
}

.nav-link-enhanced.active .nav-icon-wrapper {
    background: linear-gradient(135deg, var(--sassy-primary), var(--sassy-secondary));
    color: white;
}

.nav-text {
    position: relative;
    z-index: 1;
    font-weight: 500;
}

/* Nav Active Indicator */
.nav-active-indicator {
    position: absolute;
    right: 12px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--sassy-primary);
    box-shadow: 0 0 10px var(--sassy-primary);
    animation: pulse 2s ease-in-out infinite;
}

/* Nav Section Header */
.nav-section-header {
    padding: 16px 16px 8px;
    margin-top: 8px;
}

.nav-section-header small {
    color: rgba(255, 255, 255, 0.4);
    font-size: 10px;
    font-weight: 600;
}

.letter-spacing-1 {
    letter-spacing: 1px;
}

/* Nav Divider */
.nav-divider {
    border-color: rgba(255, 255, 255, 0.08);
    margin: 16px 12px;
}

/* ========================================
   ADDITIONAL DASHBOARD UTILITIES
   ======================================== */

/* Chart Placeholder */
.chart-placeholder-icon {
    display: inline-block;
}

/* Empty State */
.empty-state-icon {
    display: inline-block;
}

/* Text Secondary Color Fix */
.text-secondary {
    color: var(--sassy-secondary) !important;
}

/* ========================================
   ENHANCED ADMIN LAYOUT
   ======================================== */

/* Enhanced Sidebar */
.admin-sidebar-enhanced {
    background: linear-gradient(180deg, var(--sassy-dark) 0%, #111827 100%);
}

.sidebar-logo {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 16px;
}

.logo-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon-wrapper {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--sassy-primary), var(--sassy-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.logo-text h4 {
    font-size: 1.1rem;
    line-height: 1.3;
}

/* Enhanced Topbar */
.admin-topbar-enhanced {
    background: white;
    padding: 16px 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.02);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.sidebar-toggle-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.sidebar-toggle-btn:hover {
    background: var(--sassy-light);
}

.page-title-wrapper {
    display: flex;
    flex-direction: column;
}

.page-title {
    font-weight: 600;
    color: var(--sassy-dark);
    font-size: 1.25rem;
}

.breadcrumb-sm {
    font-size: 12px;
}

.breadcrumb-sm .breadcrumb-item + .breadcrumb-item::before {
    content: "/";
    color: #d1d5db;
}

/* User Menu Enhancements */
.user-avatar-gradient {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--sassy-primary), var(--sassy-secondary));
    color: white;
    transition: all 0.3s ease;
}

.user-avatar-lg {
    width: 60px;
    height: 60px;
}

.user-menu-btn {
    padding: 8px 12px;
    border-radius: 12px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.user-menu-btn:hover {
    background: var(--sassy-light);
}

.user-menu-btn:hover .user-avatar-gradient {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.user-dropdown-header {
    text-align: center;
    padding: 16px;
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.05), transparent);
}

/* Dropdown Enhancements */
.dropdown-menu-animated {
    animation: fadeInUp 0.2s ease;
    border-radius: 12px;
    padding: 8px;
    min-width: 220px;
}

.dropdown-item-enhanced {
    border-radius: 8px;
    padding: 10px 16px;
    transition: all 0.2s ease;
}

.dropdown-item-enhanced:hover {
    background: var(--sassy-light);
    padding-left: 20px;
}

.dropdown-item-enhanced:hover i {
    transform: scale(1.1);
}

.dropdown-item-enhanced i {
    transition: transform 0.2s ease;
}

/* Notification Badge Animation */
@keyframes notificationPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.2); }
}

.dropdown .badge.rounded-pill {
    animation: notificationPulse 2s ease-in-out infinite;
}
