:root {
    /* Modern Gradient Palette - refined */
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --secondary-gradient: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
    --success-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --accent-gradient: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);

    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: #a5b4fc;

    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;

    --card-bg: rgba(30, 41, 59, 0.7);
    --card-border: rgba(255, 255, 255, 0.08);
    --glass-bg: rgba(15, 23, 42, 0.75);

    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #3b82f6;

    /* Shadows & Effects */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-glow: 0 0 15px rgba(99, 102, 241, 0.3);
    --shadow-glow-hover: 0 0 25px rgba(99, 102, 241, 0.5);

    /* Effects */
    --blur-sm: blur(4px);
    --blur-md: blur(12px);
    --blur-lg: blur(24px);

    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;

    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --transition-base: all 0.2s ease-in-out;
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Theme Base */
body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    background-image:
        radial-gradient(at 20% 30%, rgba(102, 126, 234, 0.1) 0%, transparent 50%),
        radial-gradient(at 80% 70%, rgba(118, 75, 162, 0.1) 0%, transparent 50%);
    background-attachment: fixed;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    width: 100%;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100%;
}

/* Selection */
::selection {
    background: rgba(102, 126, 234, 0.3);
    color: var(--text-primary);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes glow {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(102, 126, 234, 0.4);
    }

    50% {
        box-shadow: 0 0 30px rgba(102, 126, 234, 0.6);
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }

    100% {
        background-position: 1000px 0;
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.8;
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* Layout */
.app-wrapper {
    display: flex;
    min-height: 100vh;
    animation: fadeIn 0.6s ease-out;
}

.main-content {
    flex: 1;
    margin-left: 260px;
    display: flex;
    flex-direction: column;
    transition: var(--transition-base);
}

.content-area {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    animation: fadeIn 0.8s ease-out 0.2s both;
}

/* Glassmorphism Sidebar */
.sidebar {
    width: 260px;
    background: var(--glass-bg);
    backdrop-filter: var(--blur-md);
    -webkit-backdrop-filter: var(--blur-md);
    border-right: 1px solid var(--card-border);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 50;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.5s ease-out;
}

.sidebar-brand {
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid var(--card-border);
    background: transparent;
    -webkit-background-clip: border-box;
    -webkit-text-fill-color: initial;
    background-clip: border-box;
}

.sidebar-brand img {
    max-height: 80px;
    width: auto;
    filter: drop-shadow(0 0 8px rgba(102, 126, 234, 0.3));
    transition: transform 0.3s ease;
}

.sidebar-brand:hover img {
    transform: scale(1.05);
    filter: drop-shadow(0 0 12px rgba(102, 126, 234, 0.5));
}

.sidebar-nav {
    padding: 1rem 0;
    flex: 1;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) transparent;
}

.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 0.875rem 1.5rem;
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition-base);
    border-left: 3px solid transparent;
    position: relative;
    overflow: hidden;
}

.nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: var(--primary-gradient);
    transition: var(--transition-base);
    z-index: -1;
}

.nav-item:hover::before {
    width: 100%;
}

.nav-item:hover {
    color: var(--text-primary);
    transform: translateX(4px);
}

.nav-item.active {
    background: rgba(102, 126, 234, 0.15);
    color: var(--primary-light);
    border-left-color: var(--primary-color);
    box-shadow: inset 0 0 20px rgba(102, 126, 234, 0.1);
}

.nav-item i {
    width: 24px;
    margin-right: 0.875rem;
    font-size: 1.1rem;
    text-align: center;
    transition: var(--transition-base);
}

.nav-item:hover i {
    transform: scale(1.1);
}

.nav-section-title {
    padding: 1rem 1.5rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.3);
    text-transform: uppercase;
    margin-top: 0.5rem;
}

/* Modern Cards */
.card {
    background: var(--card-bg);
    backdrop-filter: var(--blur-sm);
    -webkit-backdrop-filter: var(--blur-sm);
    border-radius: var(--radius-lg);
    border: 1px solid var(--card-border);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: var(--transition-smooth);
    position: relative;
    overflow: visible;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transition: var(--transition-base);
}

.card:hover::before {
    transform: scaleX(1);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    border-color: rgba(102, 126, 234, 0.3);
}

/* Modern Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    background: var(--primary-gradient);
    color: white;
    cursor: pointer;
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.btn:active {
    transform: translateY(0);
}

.btn-light {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: var(--blur-sm);
    border: 1px solid var(--card-border);
}

/* Quick Actions with Animation */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.quick-action-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: var(--card-bg);
    backdrop-filter: var(--blur-sm);
    color: var(--text-primary);
    border-radius: var(--radius-lg);
    font-weight: 600;
    transition: var(--transition-smooth);
    border: 1px solid var(--card-border);
    position: relative;
    overflow: hidden;
}

.quick-action-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--primary-gradient);
    opacity: 0;
    transition: var(--transition-base);
}

.quick-action-btn:hover::before {
    opacity: 0.1;
}

.quick-action-btn:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    border-color: var(--primary-color);
}

.quick-action-btn i {
    font-size: 1.5rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 1;
}

/* Modern Widgets */
.widget-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.widget {
    background: var(--card-bg);
    backdrop-filter: var(--blur-sm);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--card-border);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.widget::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: var(--primary-gradient);
    opacity: 0.05;
    border-radius: 50%;
    transform: translate(30%, -30%);
}

.widget:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(102, 126, 234, 0.3);
}

.widget h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.widget .value {
    font-size: 2rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Form Elements */
.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: var(--transition-base);
}

.form-control option {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1), var(--shadow-glow);
    background: rgba(255, 255, 255, 0.08);
}

.form-control::placeholder {
    color: var(--text-muted);
}

/* Tables */
.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table thead th {
    background: rgba(102, 126, 234, 0.1);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--primary-color);
}

.table tbody tr {
    transition: var(--transition-base);
    border-bottom: 1px solid var(--card-border);
}

.table tbody tr:hover {
    background: rgba(102, 126, 234, 0.05);
    /* transform: scale(1.01); Removed to fix z-index stacking context in tables */
}

.table tbody td {
    padding: 1rem;
    color: var(--text-secondary);
}

/* Topbar */
.topbar {
    height: 70px;
    background: var(--glass-bg);
    backdrop-filter: var(--blur-md);
    border-bottom: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 40;
    box-shadow: var(--shadow-md);
}

.topbar-title {
    font-size: 1.25rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: rgba(102, 126, 234, 0.1);
    border-radius: var(--radius-md);
    border: 1px solid rgba(102, 126, 234, 0.2);
    transition: var(--transition-base);
}

.user-info:hover {
    background: rgba(102, 126, 234, 0.15);
    box-shadow: 0 0 15px rgba(102, 126, 234, 0.2);
}

.user-info strong {
    color: var(--primary-light);
    font-weight: 600;
}

.user-info .text-muted {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Utility Classes */
.text-success {
    color: var(--success-color);
}

.text-danger {
    color: var(--danger-color);
}

.text-muted {
    color: var(--text-muted);
}

.mb-6 {
    margin-bottom: 1.5rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .topbar {
        padding-left: 70px;
    }

    .content-area {
        padding: 1rem;
    }

    .widget-grid,
    .quick-actions {
        grid-template-columns: 1fr;
    }

    /* Homepage Responsive */
    .hero-section .container {
        grid-template-columns: 1fr !important;
        text-align: center;
        gap: 3rem !important;
    }

    .hero-content {
        text-align: center !important;
    }

    .hero-content .btn {
        width: 100%;
        margin-bottom: 1rem;
    }

    .hero-content>div:nth-child(4) {
        /* The button container */
        flex-direction: column;
    }

    .feature-row {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
        text-align: center;
    }

    .feature-row.reverse-mobile {
        display: flex !important;
        flex-direction: column-reverse;
    }

    .step-line {
        display: none;
    }
}

/* Mobile Menu */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 60;
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 12px;
    border-radius: var(--radius-md);
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: var(--transition-base);
}

.mobile-menu-toggle:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
}

/* Authentication Container - Centered Layout */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem;
    width: 100%;
}

/* Landing Page & Public Pages Styles */
.landing-nav {
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background: rgba(15, 23, 42, 0.6);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.landing-logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
}

.landing-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.landing-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-base);
}

.landing-link:hover {
    color: var(--primary-light);
}

.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8rem 2rem 4rem;
    position: relative;
}

.hero-content {
    z-index: 10;
    max-width: 900px;
}


/* Testimonials Section */
.testimonials-section {
    padding: 8rem 2rem;
    position: relative;
    overflow: hidden;
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.testimonial-card {
    background: var(--card-bg);
    backdrop-filter: var(--blur-sm);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 2.5rem;
    transition: var(--transition-smooth);
    position: relative;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: 1rem;
    right: 2rem;
    font-size: 5rem;
    color: var(--primary-color);
    opacity: 0.1;
    font-family: serif;
}

.testimonial-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    border-color: rgba(102, 126, 234, 0.3);
}

.testimonial-text {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.7;
    position: relative;
    z-index: 1;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 1.5rem;
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.2rem;
    box-shadow: var(--shadow-md);
}

.author-info h4 {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.author-info p {
    color: var(--primary-light);
    font-size: 0.85rem;
    margin: 0;
}

.star-rating {
    color: #fbbf24;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}


.hero-title {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    color: var(--text-primary);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-glow);
    border-color: var(--primary-color);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.feature-card h3 {
    color: var(--text-primary);
}

.cta-section {
    padding: 8rem 2rem;
    text-align: center;
    background: linear-gradient(180deg, transparent 0%, rgba(102, 126, 234, 0.05) 100%);
}

.cta-section h2 {
    color: var(--text-primary);
}

/* Abstract blobs */
.blob {
    position: absolute;
    background: linear-gradient(45deg, #667eea, #764ba2);
    filter: blur(80px);
    opacity: 0.2;
    z-index: 1;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    animation: float 10s infinite;
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 600px;
    height: 600px;
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    animation: float 15s infinite reverse;
}

/* Dropdown Components */
.dropdown-container,
.action-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    cursor: pointer;
}

/* User Menu Specific Toggle */
.user-menu-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: rgba(102, 126, 234, 0.1);
    border-radius: var(--radius-md);
    border: 1px solid rgba(102, 126, 234, 0.2);
    transition: var(--transition-base);
    cursor: pointer;
}

.user-menu-toggle:hover,
.user-menu-toggle.active {
    background: rgba(102, 126, 234, 0.15);
    box-shadow: 0 0 15px rgba(102, 126, 234, 0.2);
}

.user-menu-toggle strong {
    color: var(--primary-light);
    font-weight: 600;
}

.user-menu-toggle .text-muted {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Generic Dropdown Menu */
.dropdown-menu {
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 0.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    min-width: 220px;
    z-index: 1000;
    display: none;
    flex-direction: column;
    padding: 0.5rem 0;
    animation: fadeIn 0.2s ease-out;
}

.dropdown-menu.show {
    display: block;
    z-index: 9999;
}

.dropdown-item {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0.75rem 1.25rem;
    color: var(--text-secondary);
    text-decoration: none;
    background: transparent;
    border: none;
    font-size: 0.9rem;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s;
    box-sizing: border-box;
    white-space: nowrap;
}

/* Ensure forms inside dropdown don't break layout */
.dropdown-menu form {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
}

.dropdown-item:hover {
    background: rgba(102, 126, 234, 0.15);
    color: white;
    padding-left: 1.5rem;
}

.dropdown-item i {
    width: 24px;
    margin-right: 0.5rem;
    text-align: center;
    font-size: 1rem;
}

.dropdown-divider {
    height: 1px;
    background: var(--card-border);
    margin: 0.5rem 0;
    width: 100%;
}

/* Specific button styles for actions dropdown (ported from index.php) */
.action-dropdown .dropdown-toggle {
    background: var(--bg-tertiary);
    border: 1px solid var(--card-border);
    color: var(--text-primary);
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.action-dropdown .dropdown-toggle:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-1px);
}

/* Badge Styles */
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    line-height: 1;
}

.badge-danger {
    background: rgba(245, 101, 101, 0.2);
    color: var(--danger-color);
    border: 1px solid var(--danger-color);
}

.badge-info {
    background: rgba(66, 153, 225, 0.2);
    color: #63b3ed;
    border: 1px solid #63b3ed;
}

/* Utility Classes used in Admin Views */
.flex {
    display: flex;
}

.justify-between {
    justify-content: space-between;
}

.items-center {
    align-items: center;
}

.justify-end {
    justify-content: flex-end;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 0.75rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mr-2 {
    margin-right: 0.5rem;
}

.ml-2 {
    margin-left: 0.5rem;
}

.text-sm {
    font-size: 0.875rem;
}

.text-xs {
    font-size: 0.75rem;
}

.font-bold {
    font-weight: 700;
}

.font-medium {
    font-weight: 500;
}

.text-gray-500 {
    color: var(--text-muted);
}

.text-gray-400 {
    color: #9ca3af;
}

.text-gray-100 {
    color: #f3f4f6;
}

.text-white {
    color: #ffffff;
}

.overflow-hidden {
    overflow: hidden;
}

.p-0 {
    padding: 0;
}

.p-6 {
    padding: 1.5rem;
}

.px-8 {
    padding-left: 2rem;
    padding-right: 2rem;
}

.py-6 {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

.w-12 {
    width: 3rem;
}

.h-12 {
    height: 3rem;
}

.rounded-full {
    border-radius: 9999px;
}

/* Ensure Dropdowns are always on top */
.dropdown-menu.show {
    display: block !important;
    z-index: 99999 !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Fix for table cell truncation */
.table td {
    overflow: visible !important;
}

.table-responsive {
    overflow: visible !important;
}

/* --- Modern UI & Dashboard Redesign Utilities --- */

:root {
    --glass-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.04) 100%);
    --glass-border: rgba(255, 255, 255, 0.18);
    --glass-blur: blur(16px);
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-success: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    --gradient-warning: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-info: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1.5px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.1),
            transparent);
    transition: left 0.5s;
}

.glass-card:hover::before {
    left: 100%;
}

.glass-card:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.06) 100%);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 16px 48px 0 rgba(0, 0, 0, 0.5),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.15);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

.delay-300 {
    animation-delay: 0.3s;
}

.delay-400 {
    animation-delay: 0.4s;
}

/* Status Badges Refinement */
.badge-soft {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-soft-open {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

.badge-soft-pending {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
}

.badge-soft-resolved {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}

.badge-soft-closed {
    background: rgba(107, 114, 128, 0.15);
    color: #9ca3af;
}

/* Timeline Styles */
.timeline-container {
    position: relative;
    padding-left: 30px;
}

.timeline-container::before {
    content: '';
    position: absolute;
    left: 11px;
    top: 5px;
    bottom: 5px;
    width: 2px;
    background: var(--glass-border);
}

.timeline-item {
    position: relative;
    padding-bottom: 20px;
}

.timeline-item::after {
    content: '';
    position: absolute;
    left: -24px;
    top: 5px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 2px solid var(--bg-dark);
}

/* === Dashboard Tabs === */
.dashboard-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px 12px 0 0;
    padding: 0 8px;
}

.dashboard-tab {
    padding: 16px 32px;
    font-size: 1rem;
    font-weight: 600;
    color: #9ca3af;
    background: transparent;
    border: none;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    border-radius: 12px 12px 0 0;
}

.dashboard-tab:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.dashboard-tab.active {
    color: #fff;
    background: linear-gradient(135deg, rgba(129, 140, 248, 0.2) 0%, rgba(99, 102, 241, 0.1) 100%);
}

.dashboard-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #818cf8 0%, #6366f1 50%, #818cf8 100%);
    background-size: 200% 100%;
    animation: shimmer 2s linear infinite;
    box-shadow: 0 0 10px rgba(129, 140, 248, 0.5);
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s ease-out;
}

.tab-content.active {
    display: block;
}

/* === Notification Badge === */
.notification-badge {
    position: relative;
}

.notification-badge::after {
    content: attr(data-count);
    position: absolute;
    top: -6px;
    right: -6px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    animation: pulse 2s infinite;
}

.notification-badge[data-count="0"]::after {
    display: none;
}

/* === Stat Card Large === */
.stat-card-large {
    padding: 32px;
    background: linear-gradient(135deg, rgba(129, 140, 248, 0.15) 0%, rgba(99, 102, 241, 0.08) 100%);
    border-left: 4px solid transparent;
    border-image: linear-gradient(180deg, #818cf8, #6366f1) 1;
    position: relative;
    overflow: hidden;
}

.stat-card-large::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(129, 140, 248, 0.1) 0%, transparent 70%);
    animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {

    0%,
    100% {
        opacity: 0.5;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}

.stat-value {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff 0%, #818cf8 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    letter-spacing: -1px;
    text-shadow: 0 0 30px rgba(129, 140, 248, 0.5);
}

/* === Data Table === */
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 12px;
    overflow: hidden;
}

.data-table thead {
    background: linear-gradient(135deg, rgba(129, 140, 248, 0.1) 0%, rgba(99, 102, 241, 0.05) 100%);
}

.data-table th {
    padding: 16px 20px;
    text-align: left;
    font-size: 0.8rem;
    font-weight: 700;
    color: #818cf8;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid rgba(129, 140, 248, 0.3);
}

.data-table td {
    padding: 18px 20px;
    color: #f3f4f6;
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.2s ease;
}

.data-table tbody tr {
    transition: all 0.3s ease;
    position: relative;
}

.data-table tbody tr:hover {
    background: linear-gradient(90deg, rgba(129, 140, 248, 0.08) 0%, transparent 100%);
    transform: scale(1.01);
}

.data-table tbody tr:hover td {
    color: #fff;
}

/* === Widget Panel === */
.widget-panel {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.widget-title {
    font-size: 1rem;
    font-weight: 600;
    color: #f3f4f6;
}

/* === Counter Animation === */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.counter {
    display: inline-block;
    animation: countUp 0.6s ease-out;
}

/* === Status Indicators === */
.status-online {
    color: #10b981;
}

.status-online::before {
    content: '●';
    margin-right: 6px;
    animation: pulse 2s infinite;
}

.status-warning {
    color: #f59e0b;
}

.status-offline {
    color: #ef4444;
}

/* === Enhanced Pulse === */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* === Metric Cards === */
.metric-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.metric-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.metric-content h4 {
    font-size: 0.75rem;
    color: #9ca3af;
    margin: 0 0 4px 0;
}

.metric-content p {
    font-size: 1.25rem;
    font-weight: 700;
    color: #f3f4f6;
    margin: 0;
}

/* === Premium Icon Backgrounds === */
.icon-gradient-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.icon-gradient-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    box-shadow: 0 4px 15px rgba(17, 153, 142, 0.4);
}

.icon-gradient-warning {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    box-shadow: 0 4px 15px rgba(240, 147, 251, 0.4);
}

.icon-gradient-info {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.4);
}

/* === Enhanced Badge Styles === */
.badge-glow {
    animation: badge-pulse 2s ease-in-out infinite;
}

@keyframes badge-pulse {

    0%,
    100% {
        box-shadow: 0 0 10px currentColor;
    }

    50% {
        box-shadow: 0 0 20px currentColor;
    }
}

/* === Content Background Pattern === */
.content-area {
    background-image:
        radial-gradient(circle at 20% 50%, rgba(129, 140, 248, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(99, 102, 241, 0.03) 0%, transparent 50%);
}

/* === Scrollbar Styling === */
.timeline-container::-webkit-scrollbar,
.tab-content::-webkit-scrollbar {
    width: 6px;
}

.timeline-container::-webkit-scrollbar-track,
.tab-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.timeline-container::-webkit-scrollbar-thumb,
.tab-content::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #818cf8 0%, #6366f1 100%);
    border-radius: 10px;
}

.timeline-container::-webkit-scrollbar-thumb:hover,
.tab-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #6366f1 0%, #818cf8 100%);
}

/* === Premium Button Styles === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    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;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    /* Brighter Indigo/Violet Gradient for better contrast */
    background: linear-gradient(135deg, #818cf8 0%, #7c3aed 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.6);
}

.btn-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(17, 153, 142, 0.4);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(17, 153, 142, 0.6);
}

.btn-warning {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(240, 147, 251, 0.4);
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(240, 147, 251, 0.6);
}

.btn-info {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.4);
}

.btn-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 172, 254, 0.6);
}

.btn-secondary {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.08) 100%);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.btn-danger {
    background: linear-gradient(135deg, #ff0844 0%, #ffb199 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 8, 68, 0.4);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 8, 68, 0.6);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1rem;
}

/* Action Button Group */
.action-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 0.813rem;
    font-weight: 600;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.action-btn i {
    font-size: 0.875rem;
}

/* === Responsive Grid System & Utilities === */

/* Grid Container */
.grid {
    display: grid;
    width: 100%;
}

/* Flex Container */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.items-start {
    align-items: flex-start;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.gap-3 {
    gap: 12px;
}

.gap-4 {
    gap: 16px;
}

.gap-6 {
    gap: 24px;
}

/* Grid Columns - Mobile First (1 column) */
.grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

.grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* Spanning */
.col-span-1 {
    grid-column: span 1 / span 1;
}

.col-span-2 {
    grid-column: span 2 / span 2;
}

.col-span-3 {
    grid-column: span 3 / span 3;
}

.col-span-full {
    grid-column: 1 / -1;
}

/* Tablet (md: 768px) */
@media (min-width: 768px) {
    .md\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .md\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .md\:grid-cols-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .md\:col-span-2 {
        grid-column: span 2 / span 2;
    }
}

/* Desktop (lg: 1024px) */
@media (min-width: 1024px) {
    .lg\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .lg\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .lg\:grid-cols-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .lg\:col-span-2 {
        grid-column: span 2 / span 2;
    }

    .lg\:col-span-3 {
        grid-column: span 3 / span 3;
    }
}

/* Margin/Padding Utilities */
.mb-1 {
    margin-bottom: 4px;
}

.mb-2 {
    margin-bottom: 8px;
}

.mb-4 {
    margin-bottom: 16px;
}

.mb-6 {
    margin-bottom: 24px;
}

.mt-1 {
    margin-top: 4px;
}

.mt-2 {
    margin-top: 8px;
}

.mt-3 {
    margin-top: 12px;
}

.mt-4 {
    margin-top: 16px;
}

.ml-2 {
    margin-left: 8px;
}

.ml-3 {
    margin-left: 12px;
}

.mr-2 {
    margin-right: 8px;
}

.mr-3 {
    margin-right: 12px;
}

.p-2 {
    padding: 8px;
}

.p-3 {
    padding: 12px;
}

.p-4 {
    padding: 16px;
}

.p-6 {
    padding: 24px;
}

/* Sizing */
.w-full {
    width: 100%;
}

.h-full {
    height: 100%;
}

/* Text Utilities */
.text-xs {
    font-size: 0.75rem;
}

.text-sm {
    font-size: 0.875rem;
}

.text-2xl {
    font-size: 1.5rem;
    line-height: 2rem;
}

.text-3xl {
    font-size: 1.875rem;
    line-height: 2.25rem;
}

.font-bold {
    font-weight: 700;
}

.font-medium {
    font-weight: 500;
}

.block {
    display: block;
}

.uppercase {
    text-transform: uppercase;
}

.inline-block {
    display: inline-block;
}

/* Colors (Helper classes to match theme) */
.text-gray-400 {
    color: #9ca3af;
}

.text-gray-500 {
    color: #6b7280;
}

.text-indigo-400 {
    color: #818cf8;
}

.text-purple-400 {
    color: #c084fc;
}

.text-amber-400 {
    color: #fbbf24;
}

.text-emerald-400 {
    color: #34d399;
}

.text-red-400 {
    color: #f87171;
}

.text-white {
    color: #fff;
}

.bg-indigo-500\/10 {
    background-color: rgba(99, 102, 241, 0.1);
}

.bg-purple-500\/10 {
    background-color: rgba(168, 85, 247, 0.1);
}

.bg-amber-500\/10 {
    background-color: rgba(245, 158, 11, 0.1);
}

.bg-emerald-500\/10 {
    background-color: rgba(16, 185, 129, 0.1);
}

.bg-red-500\/10 {
    background-color: rgba(239, 68, 68, 0.1);
}

.bg-gray-500\/10 {
    background-color: rgba(107, 114, 128, 0.1);
}

.bg-white\/5 {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Overflow */
.overflow-y-auto {
    overflow-y: auto;
}

/* === CSS Tooltips === */
[data-tooltip] {
    position: relative;
    cursor: pointer;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%) translateY(5px);
    background: rgba(15, 23, 42, 0.95);
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

[data-tooltip]:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Tooltip Arrow */
[data-tooltip]::before {
    content: '';
    position: absolute;
    bottom: 105%;
    left: 50%;
    transform: translateX(-50%) translateY(5px);
    border: 5px solid transparent;
    border-top-color: rgba(15, 23, 42, 0.95);
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s ease;
}

[data-tooltip]:hover::before {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Topbar Search */
.topbar-search {
    position: relative;
    width: 250px;
}

.topbar-search input {
    width: 100%;
    padding: 0.6rem 1rem 0.6rem 2.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    border-radius: 50px;
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: var(--transition-base);
}

.topbar-search input:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
    outline: none;
}

.topbar-search .search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.9rem;
    pointer-events: none;
}

/* Custom Dropdown Menus */
.dropdown-container {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    min-width: 200px;
    background: #1e293b !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
    z-index: 99999;
    padding: 0.5rem;
    margin-top: 5px;
    backdrop-filter: blur(10px);
}

.dropdown-menu.show {
    display: block !important;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #e2e8f0 !important;
    text-decoration: none;
    white-space: nowrap;
    border-radius: 8px;
    transition: all 0.2s;
    font-size: 0.875rem;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white !important;
}

.dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0.5rem 0;
}

.user-menu-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    transition: all 0.2s;
}

.user-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* AI Insights Widget */
.insight-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.insight-card {
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
    border: 1px solid transparent;
}

.insight-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.insight-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.25rem;
    box-shadow: var(--shadow-sm);
}

.insight-content h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
}

.insight-content p {
    margin: 0;
    font-size: 0.925rem;
    color: #4b5563;
    line-height: 1.5;
}

/* Insight Variants */
.insight-warning {
    background: #fffbeb;
    border-color: #fcd34d;
}

.insight-warning .insight-icon {
    color: #f59e0b;
}

.insight-danger {
    background: #fef2f2;
    border-color: #fca5a5;
}

.insight-danger .insight-icon {
    color: #ef4444;
}

.insight-success {
    background: #ecfdf5;
    border-color: #6ee7b7;
}

.insight-success .insight-icon {
    color: #10b981;
}

.insight-info {
    background: #eff6ff;
    border-color: #93c5fd;
}

.insight-info .insight-icon {
    color: #3b82f6;
}

.text-right {
    text-align: right;
}

.bg-success-light {
    background: rgba(16, 185, 129, 0.1);
}

.bg-danger-light {
    background: rgba(239, 68, 68, 0.05);
}

.font-bold {
    font-weight: 700;
}

@media print {

    .sidebar,
    .topbar,
    .mobile-menu-toggle,
    .quick-actions,
    .btn,
    footer,
    .alert,
    .insight-grid {
        display: none !important;
    }

    .main-content {
        margin-left: 0 !important;
        padding: 0 !important;
    }

    .content-area {
        padding: 0 !important;
        max-width: 100% !important;
    }

    .card {
        border: none !important;
        box-shadow: none !important;
        background: white !important;
        color: black !important;
    }

    body {
        background: white !important;
        color: black !important;
    }

    table {
        width: 100% !important;
        border-collapse: collapse !important;
    }

    th,
    td {
        color: black !important;
        border: 1px solid #ddd !important;
    }
}

/* Topbar Search */
.topbar-search {
    position: relative;
    width: 250px;
}

.topbar-search input {
    width: 100%;
    padding: 0.6rem 1rem 0.6rem 2.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    border-radius: 50px;
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: var(--transition-base);
}

.topbar-search input:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
    outline: none;
}

.topbar-search .search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.9rem;
    pointer-events: none;
}

/* Modern Alert & Flash Messages */
.alert {
    position: relative;
    padding: 1rem 1.25rem;
    padding-left: 3.5rem;
    margin-bottom: 1.5rem;
    border-radius: var(--radius-md);
    background: rgba(25, 25, 53, 0.6);
    backdrop-filter: var(--blur-sm);
    -webkit-backdrop-filter: var(--blur-sm);
    border: 1px solid var(--card-border);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: var(--shadow-md);
    animation: fadeIn 0.4s ease-out;
    display: flex;
    align-items: center;
    min-height: 60px;
}

.alert::before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: 1.25rem;
    font-size: 1.4rem;
}

.alert-success {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.4);
    color: #ecfdf5;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.1);
}

.alert-success::before {
    content: "\f058";
    /* fa-check-circle */
    color: #10b981;
}

.alert-info {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.4);
    color: #eff6ff;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.1);
}

.alert-info::before {
    content: "\f05a";
    /* fa-info-circle */
    color: #3b82f6;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.4);
    color: #fffbeb;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.1);
}

.alert-warning::before {
    content: "\f071";
    /* fa-exclamation-triangle */
    color: #f59e0b;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.4);
    color: #fef2f2;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.1);
}

.alert-danger::before {
    content: "\f06a";
    /* fa-exclamation-circle */
    color: #ef4444;
}

/* Specific centering for login page alerts */
.auth-container .alert {
    width: 100%;
    margin-top: 0;
    margin-bottom: 1.5rem;
}

/* ===========================================================================
   PREMIUM UI OVERHAUL (PHASE 6)
   =========================================================================== */

/* --- Premium Animations --- */
@keyframes float-3d {

    0%,
    100% {
        transform: translateY(0) rotateX(10deg) rotateY(-10deg) scale(1);
    }

    50% {
        transform: translateY(-20px) rotateX(12deg) rotateY(-8deg) scale(1.02);
    }
}

@keyframes shine {
    0% {
        left: -100%;
        opacity: 0;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        left: 100%;
        opacity: 0;
    }
}

@keyframes slow-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes title-reveal {
    from {
        clip-path: polygon(0 0, 0 0, 0 100%, 0 100%);
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Glassmorphism 2.0 --- */
.glass-panel-premium {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-xl);
    transition: var(--transition-base);
}

.glass-panel-premium:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), inset 0 0 0 1px rgba(255, 255, 255, 0.1);
    transform: translateY(-5px);
}

/* --- Premium Buttons --- */
.btn-premium {
    position: relative;
    overflow: hidden;
    background: var(--primary-gradient);
    border: none;
    color: white;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.btn-premium::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.4), transparent);
    transform: skewX(-25deg);
    transition: none;
    z-index: -1;
}

.btn-premium:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.6);
}

.btn-premium:hover::after {
    animation: shine 1.5s infinite;
}

/* --- Hero 3D Elements --- */
.hero-3d-wrapper {
    perspective: 1500px;
    transform-style: preserve-3d;
}

.hero-dashboard-preview {
    width: 100%;
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 50px 100px -20px rgba(0, 0, 0, 0.6);
    animation: float-3d 6s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.hero-dashboard-preview::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 40%);
    pointer-events: none;
    z-index: 2;
}

/* --- Mesh Gradients --- */
.mesh-gradient-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    background: radial-gradient(at 0% 0%, rgba(102, 126, 234, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(118, 75, 162, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(245, 87, 108, 0.1) 0px, transparent 50%),
        radial-gradient(at 0% 100%, rgba(79, 172, 254, 0.1) 0px, transparent 50%);
    filter: blur(60px);
}

/* --- Feature Cards Animated --- */
.feature-card-reveal {
    opacity: 1;
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.6s ease;
}

/* --- Marquee Text --- */
.marquee-container {
    overflow: hidden;
    white-space: nowrap;
    position: relative;
}

.marquee-content {
    display: inline-block;
    animation: marquee 30s linear infinite;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* ============================================
   MOBILE RESPONSIVE STYLES
   ============================================ */