/* ===================================
   MAGNETIC GLASS THEME SYSTEM
   Restored Original Theme
   =================================== */

/* ===== THEME VARIABLES (BRIGHT METALLIC) ===== */
:root {
    /* Default Theme - Aurora (Metalic Bloom) */
    --theme-primary: #8e2de2;
    --theme-secondary: #4a00e0;
    --theme-accent: #00d2ff;
    --theme-light: rgba(142, 45, 226, 0.15);
    --theme-glow: rgba(0, 210, 255, 0.4);

    /* Metalic Glass Effect */
    --glass-bg: rgba(255, 255, 255, 0.22);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 15px 35px 0 rgba(0, 0, 0, 0.15),
        inset 0 0 2px rgba(255, 255, 255, 0.4);
    --glass-blur: 25px;

    /* Metallic Highlights */
    --metallic-gradient: linear-gradient(135deg,
            rgba(255, 255, 255, 0.5) 0%,
            rgba(255, 255, 255, 0) 50%,
            rgba(255, 255, 255, 0.2) 100%);

    /* Layout */
    --bottom-nav-height: 75px;
}

/* Theme: Sunset (Golden Metal) */
[data-theme="sunset"] {
    --theme-primary: #ff4e50;
    --theme-secondary: #f9d423;
    --theme-accent: #fff;
    --theme-light: rgba(255, 78, 80, 0.15);
    --theme-glow: rgba(249, 212, 35, 0.5);
}

/* Theme: Ocean (Electric Blue) */
[data-theme="ocean"] {
    --theme-primary: #00c6ff;
    --theme-secondary: #0072ff;
    --theme-accent: #b2fefa;
    --theme-light: rgba(0, 198, 255, 0.15);
    --theme-glow: rgba(0, 114, 255, 0.5);
}

/* Theme: Forest (Neon Mint) */
[data-theme="forest"] {
    --theme-primary: #00f260;
    --theme-secondary: #0575e6;
    --theme-accent: #ebff00;
    --theme-light: rgba(0, 242, 96, 0.15);
    --theme-glow: rgba(0, 242, 96, 0.5);
}

/* Theme: Lavender (Cyber Purple) */
[data-theme="lavender"] {
    --theme-primary: #bf5af2;
    --theme-secondary: #5e5ce6;
    --theme-accent: #ff2d55;
    --theme-light: rgba(191, 90, 242, 0.15);
    --theme-glow: rgba(191, 90, 242, 0.5);
}

/* Theme: Royal (Bright Gold/Violet) */
[data-theme="royal"] {
    --theme-primary: #f093fb;
    --theme-secondary: #f5576c;
    --theme-accent: #fff;
    --theme-light: rgba(240, 147, 251, 0.15);
    --theme-glow: rgba(245, 87, 108, 0.5);
}

/* Theme: Glass (Ultra Clear Frosted Glass over Vibrant Background) */
[data-theme="glass"] {
    --theme-primary: #ffb6c1;
    /* Soft pink */
    --theme-secondary: #add8e6;
    /* Soft blue */
    --theme-accent: #ffffff;
    --theme-light: rgba(255, 255, 255, 0.4);
    --theme-glow: rgba(255, 255, 255, 0.5);

    --glass-bg: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
    --glass-blur: 24px;
}

/* Theme: Crystal (Pink-Blue Glass Panels — Image 1) */
[data-theme="crystal"] {
    --theme-primary: #f9a8d4;
    --theme-secondary: #93c5fd;
    --theme-accent: #ffffff;
    --theme-light: rgba(249, 168, 212, 0.2);
    --theme-glow: rgba(147, 197, 253, 0.5);

    --glass-bg: rgba(255, 255, 255, 0.25);
    --glass-border: rgba(255, 255, 255, 0.7);
    --glass-shadow: 0 8px 32px 0 rgba(249, 168, 212, 0.15);
    --glass-blur: 28px;
}

/* Glass background override for Crystal */
body[data-theme="crystal"] {
    background: linear-gradient(135deg, #fce7f3 0%, #dbeafe 50%, #fce7f3 100%) !important;
}

body[data-theme="crystal"]::before {
    background: #f9a8d4 !important;
}

body[data-theme="crystal"]::after {
    background: #93c5fd !important;
}

/* Theme: Candy (Rainbow Jelly — Image 2) */
[data-theme="candy"] {
    --theme-primary: #c084fc;
    --theme-secondary: #fbbf24;
    --theme-accent: #34d399;
    --theme-light: rgba(192, 132, 252, 0.2);
    --theme-glow: rgba(192, 132, 252, 0.6);

    --glass-bg: rgba(255, 255, 255, 0.2);
    --glass-border: rgba(255, 255, 255, 0.6);
    --glass-shadow: 0 8px 32px 0 rgba(192, 132, 252, 0.2);
    --glass-blur: 20px;
}

/* Candy background */
body[data-theme="candy"] {
    background: linear-gradient(135deg, #fdf4ff 0%, #fefce8 25%, #f0fdf4 50%, #eff6ff 75%, #fdf4ff 100%) !important;
}

body[data-theme="candy"]::before {
    background: #c084fc !important;
    opacity: 0.12 !important;
}

body[data-theme="candy"]::after {
    background: #fbbf24 !important;
    opacity: 0.10 !important;
}

/* Theme: Fluffy (Warm Plush — Image 3) */
[data-theme="fluffy"] {
    --theme-primary: #f472b6;
    --theme-secondary: #fde68a;
    --theme-accent: #5eead4;
    --theme-light: rgba(244, 114, 182, 0.2);
    --theme-glow: rgba(244, 114, 182, 0.55);

    --glass-bg: rgba(255, 255, 255, 0.2);
    --glass-border: rgba(255, 255, 255, 0.65);
    --glass-shadow: 0 8px 32px 0 rgba(244, 114, 182, 0.18);
    --glass-blur: 22px;
}

/* Fluffy background */
body[data-theme="fluffy"] {
    background: linear-gradient(135deg, #fdf2f8 0%, #fefce8 40%, #f0fdfa 100%) !important;
}

body[data-theme="fluffy"]::before {
    background: #f472b6 !important;
    opacity: 0.10 !important;
}

body[data-theme="fluffy"]::after {
    background: #fde68a !important;
    opacity: 0.10 !important;
}

/* ===== GLOBAL & LAYOUT ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #fbfbfe;
    /* Very very light tint */
    position: relative;
    overflow-x: hidden;
    color: #0f172a;
    font-family: 'Tajawal', sans-serif;
    line-height: 1.6;
    margin: 0;
    min-height: 100vh;
}

body::before {
    content: '';
    position: fixed;
    top: -20vh;
    left: -20vw;
    width: 80vw;
    height: 80vw;
    background: var(--theme-primary);
    filter: blur(120px);
    /* Mush blur */
    opacity: 0.08;
    /* Very very light */
    border-radius: 50%;
    z-index: -1;
    pointer-events: none;
    animation: floatOrb 20s ease-in-out infinite alternate;
}

body::after {
    content: '';
    position: fixed;
    bottom: -20vh;
    right: -20vw;
    width: 70vw;
    height: 70vw;
    background: var(--theme-secondary);
    filter: blur(120px);
    opacity: 0.08;
    border-radius: 50%;
    z-index: -1;
    pointer-events: none;
    animation: floatOrb 25s ease-in-out infinite alternate-reverse;
}

@keyframes floatOrb {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(30px, 30px);
    }
}

/* Glass Theme Overrides for App background */
body[data-theme="glass"] {
    background: url('../images/themes/glass_bg.png') no-repeat center center fixed !important;
    background-size: cover !important;
}

body[data-theme="glass"]::before,
body[data-theme="glass"]::after {
    display: none !important;
}

/* Enhancing existing cards for Glass Theme */
[data-theme="glass"] .glass-card,
[data-theme="glass"] .service-card,
[data-theme="glass"] .search-container-glass,
[data-theme="glass"] .app-header-premium,
[data-theme="glass"] .chips-container .category-chip {
    background: rgba(255, 255, 255, 0.25) !important;
    backdrop-filter: blur(28px) !important;
    -webkit-backdrop-filter: blur(28px) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.7) !important;
    border-left: 1px solid rgba(255, 255, 255, 0.7) !important;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1), inset 0 2px 10px rgba(255, 255, 255, 0.4) !important;
}




.khadamat-app {
    display: flex;
    flex-direction: row;
    min-height: 100vh;
    width: 100%;
    background: transparent;
    position: relative;
    z-index: 1;
    /* overflow-x: hidden can break position: sticky. Use clip or nothing. */
    overflow-x: clip; 
}

.app-content {
    flex: 1;
    padding-bottom: 100px;
}

/* Conflicting marker removed in favor of MainLayout.razor styles */

.content-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* ===== APP HEADER (GLASS) ===== */
.app-header {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-bottom: 2px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    object-fit: cover;
    border: 2px solid white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.welcome-text {
    display: flex;
    flex-direction: column;
}

.welcome-text .greet {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.9);
    /* Lighter for dark backgrounds */
}

.welcome-text .name {
    font-size: 0.9rem;
    font-weight: 700;
    color: white;
    /* White text for contrast */
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-icon-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.3s ease;
    cursor: pointer;
    backdrop-filter: blur(5px);
}

.header-icon-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    color: white;
}

.header-icon-btn i {
    font-size: 1.1rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.brand-name {
    font-size: 1.6rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--theme-primary) 0%, var(--theme-secondary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ===== BOTTOM NAV (GLASS) ===== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: var(--bottom-nav-height);
    background: var(--glass-bg) !important;
    backdrop-filter: blur(var(--glass-blur)) !important;
    -webkit-backdrop-filter: blur(var(--glass-blur)) !important;
    border-top: 2px solid var(--glass-border) !important;
    box-shadow: 0 -15px 40px var(--theme-glow), 0 -2px 10px rgba(0, 0, 0, 0.05) !important;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 2000;
    transition: box-shadow 0.4s ease;
}

@media (min-width: 768px) {
    .bottom-nav {
        display: none;
        /* Hide bottom nav on desktop, assume sidebar or top nav */
    }

    .app-header {
        padding: 20px 10%;
    }

    .content-wrapper {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 20px;
    }
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none !important;
    color: rgba(15, 23, 42, 0.6) !important;
    opacity: 0.9;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    flex: 1;
    padding: 8px 0;
}

.nav-item:hover {
    color: var(--theme-primary) !important;
    background: var(--theme-light);
    border-radius: 16px;
}

.nav-item.active {
    color: var(--theme-primary) !important;
    font-weight: 700;
    opacity: 1 !important;
    transform: translateY(-5px);
    text-shadow: 0 0 1px currentColor;
}

.nav-item i {
    font-size: 1.4rem;
    margin-bottom: 4px;
}

.nav-item span {
    font-size: 0.7rem;
    font-weight: 700;
}

/* ===== GLASS CARDS & UTILS ===== */
/* ===== GLASS CARDS & UTILS ===== */
.glass-card,
.service-card,
.hero-slider,
.chip-container,
.action-card {
    /* 3D Glass Effect - Top Layer */
    background: linear-gradient(145deg,
            rgba(255, 255, 255, 0.9) 0%,
            rgba(255, 255, 255, 0.4) 40%,
            var(--theme-light) 100%) !important;
    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px) !important;

    /* 3D Borders */
    border: 1px solid rgba(255, 255, 255, 0.6) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.9) !important;
    border-left: 1px solid rgba(255, 255, 255, 0.8) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3) !important;

    box-shadow:
        0 15px 35px rgba(0, 0, 0, 0.05),
        inset 0 2px 10px rgba(255, 255, 255, 0.8),
        inset 0 -2px 10px rgba(0, 0, 0, 0.02) !important;

    border-radius: 24px;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    max-width: 100%; /* Prevent card from overflowing screen width */
}

/* Responsive Overrides */
@media (max-width: 768px) {
    .glass-card {
        padding: 15px !important;
        border-radius: 16px !important;
        margin-bottom: 15px !important;
    }

    .table-responsive {
        margin: 0 -5px; /* Slight negative margin to allow table to breathe */
        overflow-x: auto !important;
        display: block;
        width: 100%;
        -webkit-overflow-scrolling: touch;
    }

    .table {
        min-width: 600px; /* Minimum width for tables to trigger scroll */
    }
    
    .content-wrapper {
        padding: 10px !important;
    }
}

.glass-card:hover,
.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1), inset 0 2px 10px rgba(255, 255, 255, 0.9) !important;
}

.glass-card::before,
.service-card::before,
.hero-slider::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: var(--metallic-gradient);
    transform: rotate(30deg);
    pointer-events: none;
    opacity: 0.6;
    z-index: 0;
}

/* Hero Section */
.hero-slider {
    position: relative;
    overflow: hidden;
    color: white;
}

/* Service Card Specifics */
.service-card {
    background: rgba(255, 255, 255, 0.3) !important;
    /* Brighter and more translucent */
    margin-bottom: 20px;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
}

.service-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2),
        inset 0 0 20px rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.4) !important;
}

/* Chips */
.chips-container {
    display: flex;
    overflow-x: auto;
    gap: 12px;
    padding: 5px 0 15px 0;
    scrollbar-width: none;
}

.chips-container::-webkit-scrollbar {
    display: none;
}

.categories-swiper {
    padding: 10px 0 20px 0;
    overflow: hidden !important;
}

.categories-swiper .swiper-wrapper {
    transition-timing-function: linear !important;
}

.category-chip {
    flex: 0 0 auto;
    background: rgba(255, 255, 255, 0.9);
    padding: 10px 20px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-chip:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
    background: white;
}

/* Sidebar Responsive Handling */
@media (min-width: 992px) {
    .app-content {
        padding-bottom: 30px;
        /* Reduced since BottomNav is hidden */
    }
}

/* Service Details Premium Styles */
.glass-morphism {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
}

.main-image-wrapper {
    position: sticky;
    top: 100px;
}

.price-tag-floating {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: var(--theme-primary);
    color: white;
    padding: 10px 20px;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px);
    z-index: 5;
}

.mini-thumb {
    width: 70px;
    height: 70px;
    flex-shrink: 0;
    cursor: pointer;
    transition: all 0.2s;
}

.mini-thumb:hover {
    transform: scale(1.1);
    border-color: white !important;
}

.rating-badge-large {
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 20px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: inline-flex;
    align-items: center;
}

.provider-info-glass {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 15px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.2s;
}

.provider-info-glass:hover {
    background: rgba(255, 255, 255, 0.2);
}

.avatar-sm {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 2px solid white;
}

.service-stats-pill {
    background: rgba(0, 0, 0, 0.05);
    padding: 15px 25px;
    border-radius: 20px;
    font-size: 0.9rem;
    color: white;
}

.btn-primary-premium,
.btn-primary,
.btn {
    /* 3D Glass Button */
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.95) 0%,
            rgb(240, 245, 255) 50%,
            var(--theme-light) 100%) !important;
    color: var(--theme-primary) !important;
    border: 1px solid rgba(255, 255, 255, 0.8) !important;
    border-top: 1px solid #fff !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.4) !important;

    border-radius: 20px;
    padding: 12px 28px;
    /* Adjusted padding */
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);

    box-shadow:
        0 10px 20px rgba(0, 0, 0, 0.05),
        inset 0 2px 5px rgba(255, 255, 255, 1),
        inset 0 -2px 5px rgba(0, 0, 0, 0.02) !important;

    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.btn-primary-premium::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 20%;
    height: 200%;
    background: rgba(255, 255, 255, 0.8);
    transform: rotate(30deg);
    transition: all 0.6s ease;
}

.btn-primary-premium:hover::after {
    left: 140%;
}

.btn-primary-premium:hover {
    transform: scale(1.03) translateY(-3px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15),
        inset 0 0 0 1px rgba(255, 255, 255, 0.8);
    color: var(--theme-secondary);
}

.btn-glass-secondary {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    font-weight: 600;
}

.btn-glass-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-2px);
    color: white;
}

/* Theme Switcher Enlargement */
.dropdown-header {
    color: #64748b;
    font-weight: 800;
    font-size: 0.8rem;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.theme-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.theme-btn {
    width: 65px;
    height: 65px;
    border-radius: 18px;
    border: 3px solid transparent;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.theme-btn:hover {
    transform: scale(1.15) rotate(5deg);
}

.theme-btn.active {
    border-color: var(--theme-primary);
    transform: scale(1.1);
}

.theme-btn.active::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}

.theme-default-preview {
    background: linear-gradient(135deg, #8e2de2, #4a00e0, #00d2ff);
}

.theme-ocean-preview {
    background: linear-gradient(135deg, #00c6ff, #0072ff, #b2fefa);
}

.theme-forest-preview {
    background: linear-gradient(135deg, #00f260, #0575e6, #ebff00);
}

.theme-sunset-preview {
    background: linear-gradient(135deg, #ff4e50, #f9d423, #fff);
}

.theme-lavender-preview {
    background: linear-gradient(135deg, #bf5af2, #5e5ce6, #ff2d55);
}

.theme-royal-preview {
    background: linear-gradient(135deg, #f093fb, #f5576c, #fff);
}

.glass-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 20px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    min-width: 220px;
    margin-top: 10px;
}

/* ===== THEME BUTTONS IN TOP BAR ===== */
.theme-buttons-topbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 15px;
}

/* ===== THEME SELECTOR CIRCULAR MENU ===== */
.theme-selector-wrapper {
    position: relative;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 15px;
    z-index: 1100;
}

.theme-main-btn {
    width: 48px !important;
    height: 48px !important;
    border-radius: 50% !important;
    background: var(--theme-primary) !important;
    border: 3px solid white !important;
    color: white !important;
    font-size: 1.35rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    z-index: 100 !important;
    padding: 0 !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px var(--theme-glow), 0 0 0 2px var(--theme-primary) !important;
    outline: none !important;
}

.theme-main-btn:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 6px 20px var(--theme-glow), 0 0 0 4px var(--theme-primary);
}

.theme-options-arc {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-opt-bubble {
    position: absolute !important;
    width: 38px !important;
    height: 38px !important;
    border-radius: 50% !important;
    border: 2px solid white !important;
    cursor: pointer !important;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    opacity: 0;
    transform: translate(0, 0) scale(0);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: white !important;
    font-size: 0.95rem;
    pointer-events: none;
    outline: none !important;
}

.theme-options-arc.show .theme-opt-bubble {
    opacity: 1;
    pointer-events: auto;
    --distance: 85px;
    /* Arrange in a semi-circle pointing downwards (from 180 to 0) */
    --angle: calc(180deg - (var(--i) * (180deg / (var(--total) - 1))));
    transform: rotate(var(--angle)) translate(var(--distance)) rotate(calc(-1 * var(--angle))) scale(1);
}

.theme-opt-bubble:hover {
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.3);
    z-index: 101;
    transform: rotate(var(--angle)) translate(var(--distance)) rotate(calc(-1 * var(--angle))) scale(1.3) !important;
}

.theme-opt-bubble.active {
    box-shadow: 0 0 0 3px white, 0 8px 24px var(--theme-glow);
    transform: rotate(var(--angle)) translate(var(--distance)) rotate(calc(-1 * var(--angle))) scale(1.1) !important;
}

.theme-opt-bubble.active::after {
    content: '✓';
    font-weight: 900;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.theme-opt-bubble[data-theme-name="default"] {
    background: linear-gradient(135deg, #6366f1, #a855f7);
}

.theme-opt-bubble[data-theme-name="sunset"] {
    background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.theme-opt-bubble[data-theme-name="ocean"] {
    background: linear-gradient(135deg, #06b6d4, #3b82f6);
}

.theme-opt-bubble[data-theme-name="forest"] {
    background: linear-gradient(135deg, #00f260, #0575e6);
}

.theme-opt-bubble[data-theme-name="lavender"] {
    background: linear-gradient(135deg, #bf5af2, #5e5ce6);
}

.theme-opt-bubble[data-theme-name="royal"] {
    background: linear-gradient(135deg, #f093fb, #f5576c);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .theme-selector-wrapper {
        margin: 0 8px;
    }

    .theme-opt-bubble {
        --distance: 70px !important;
        width: 34px;
        height: 34px;
    }
}

/* Category items styling moved to component-specific styles */

/* Magnetic Effect Utilities */
.magnetic {
    transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Glass Theme Overrides for Premium feel */
.glass-effect-premium {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

/* ===== PREMIUM HEADER STYLES ===== */
.app-header-premium {
    height: 72px;
    padding: 0 40px;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
}

.header-start {
    flex: 1;
    display: flex;
    align-items: center;
}

.search-container-glass {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 18px;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-container-glass:focus-within {
    background: white;
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.15);
    transform: translateY(-2px);
    border-color: var(--theme-primary);
}

.search-icon {
    color: #94a3b8;
    font-size: 1.1rem;
}

.search-input {
    background: transparent;
    border: none;
    outline: none;
    flex: 1;
    font-size: 0.95rem;
    font-weight: 500;
    color: #1e293b;
    font-family: 'Tajawal', sans-serif;
}

.search-shortcut {
    background: rgba(0, 0, 0, 0.05);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 700;
}

.header-center {
    flex: 1;
    justify-content: center;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.5);
    padding: 8px 16px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    position: relative;
}

.status-dot::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: inherit;
    opacity: 0.4;
    animation: pulseStatus 2s infinite;
}

.status-dot.provider {
    background: #10b981;
}

.status-dot.client {
    background: var(--theme-primary);
}

@keyframes pulseStatus {
    0% {
        transform: scale(1);
        opacity: 0.4;
    }

    100% {
        transform: scale(3);
        opacity: 0;
    }
}

.status-text {
    font-size: 0.85rem;
    font-weight: 700;
    color: #475569;
}

.header-end {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 20px;
}

.theme-minimal-toggle {
    width: 42px;
    height: 42px;
    background: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #475569;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.2s;
    position: relative;
}

.theme-minimal-toggle:hover {
    background: var(--theme-primary);
    color: white;
    transform: rotate(15deg);
}

.theme-popover {
    position: absolute;
    top: calc(100% + 15px);
    left: 0;
    background: white;
    padding: 15px;
    border-radius: 18px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1100;
    min-width: 150px;
}

.theme-popover.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.theme-grid-minimal {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.theme-dot {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
}

.theme-dot.active {
    border-color: #000;
    transform: scale(1.1);
}

.theme-dot.default {
    background: linear-gradient(135deg, #6366f1, #a855f7);
}

.theme-dot.sunset {
    background: linear-gradient(135deg, #ff4e50, #f9d423);
}

.theme-dot.ocean {
    background: linear-gradient(135deg, #00c6ff, #0072ff);
}

.theme-dot.forest {
    background: linear-gradient(135deg, #00f260, #0575e6);
}

.theme-dot.lavender {
    background: linear-gradient(135deg, #bf5af2, #5e5ce6);
}

.theme-dot.royal {
    background: linear-gradient(135deg, #f093fb, #f5576c);
}

.icon-action-btn {
    width: 42px;
    height: 42px;
    background: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #475569;
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    transition: all 0.2s;
}

.icon-action-btn:hover {
    background: rgba(0, 0, 0, 0.02);
    transform: translateY(-2px);
}

.pulse-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: white;
    font-size: 0.65rem;
    font-weight: 800;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    animation: badgePulse 2s infinite;
}

@keyframes badgePulse {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

.user-dropdown-wrapper {
    position: relative;
}

.user-trigger {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 16px;
    transition: all 0.2s;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.user-trigger:hover {
    background: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.avatar-wrapper {
    position: relative;
}

.header-avatar-img {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    object-fit: cover;
    border: 2px solid white;
}

.online-indicator {
    position: absolute;
    bottom: -2px;
    left: -2px;
    width: 12px;
    height: 12px;
    background: #10b981;
    border: 2px solid white;
    border-radius: 50%;
}

.user-meta {
    flex-direction: column;
    text-align: right;
}

.user-name-txt {
    font-size: 0.9rem;
    font-weight: 800;
    color: #1e293b;
    line-height: 1.2;
}

.user-role-txt {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 600;
}

.chevron-icon {
    font-size: 0.8rem;
    color: #94a3b8;
    transition: transform 0.3s;
}

.chevron-icon.rotate {
    transform: rotate(180deg);
}

.user-glass-menu {
    position: absolute !important;
    top: calc(100% + 15px);
    inset-inline-end: 0;
    /* Respects RTL document direction */
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    width: 260px;
    border-radius: 24px;
    padding: 15px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.5);
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    z-index: 1200;
    display: block !important;
}

.user-glass-menu.show {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0);
}

.menu-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px;
}

.menu-avatar {
    width: 50px;
    height: 50px;
    border-radius: 15px;
    object-fit: cover;
}

.menu-name {
    font-weight: 800;
    color: #1e293b;
    font-size: 1.1rem;
}

.menu-email {
    font-size: 0.8rem;
    color: #64748b;
}

.menu-divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.05);
    margin: 12px 0;
}

.menu-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    border-radius: 14px;
    color: #475569;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s;
    cursor: pointer;
}

.menu-link:hover {
    background: var(--theme-light);
    color: var(--theme-primary);
    transform: translateX(-5px);
}

.menu-link i {
    font-size: 1.1rem;
    width: 20px;
    color: #94a3b8;
}

.menu-link:hover i {
    color: var(--theme-primary);
}

.logout-link:hover {
    background: rgba(239, 68, 68, 0.05);
    color: #ef4444;
}

.logout-link:hover i {
    color: #ef4444;
}

.admin-link {
    background: rgba(249, 115, 22, 0.05);
    color: #f97316;
}

.admin-link i {
    color: #f97316;
}

.auth-actions-minimal {
    display: flex;
    align-items: center;
    gap: 15px;
}

.login-link-minimal {
    font-weight: 700;
    color: #475569;
    text-decoration: none;
    font-size: 0.95rem;
}

.register-btn-premium {
    background: var(--primary-gradient);
    color: white !important;
    padding: 10px 24px;
    border-radius: 14px;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.2);
    transition: all 0.3s;
}

.register-btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(99, 102, 241, 0.3);
}

@@media (max-width: 991px) {
    .app-header-premium {
        height: 72px !important;
        padding: 0 10px !important;
        display: flex !important;
        background: rgba(255, 255, 255, 0.95) !important;
        border-bottom: 2px solid rgba(0, 0, 0, 0.05) !important;
    }

    .header-inner-container {
        padding: 0 !important;
        width: 100% !important;
    }

    .header-search-section {
        display: none !important;
    }

    .header-actions-section {
        width: 100% !important;
        justify-content: space-around !important;
        display: flex !important;
        gap: 2px !important;
        margin: 0 !important;
    }

    .icon-action-btn {
        width: 44px !important;
        height: 44px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        visibility: visible !important;
        opacity: 1 !important;
        color: #475569 !important;
    }

    .icon-action-btn i {
        font-size: 1.35rem !important;
    }

    .user-trigger {
        padding: 0 !important;
        margin: 0 !important;
    }

    .user-trigger img {
        width: 40px !important;
        height: 40px !important;
        border: 2px solid white !important;
    }
}

@@media (max-width: 768px) {
    .app-header-premium {
        padding: 0 10px;
        height: 72px;
        gap: 8px;
    }

    .header-inner-container {
        padding: 0 10px !important;
        gap: 10px !important;
    }

    .header-search-section {
        max-width: 45px !important;
        transition: max-width 0.3s ease;
    }

    .header-search-section:focus-within {
        max-width: 200px !important;
    }

    .search-input {
        display: none;
    }

    .header-search-section:focus-within .search-input {
        display: block;
    }

    .search-shortcut {
        display: none;
    }

    .header-center {
        display: none;
    }

    .header-actions-section {
        gap: 8px !important;
    }

    .icon-action-btn {
        width: 36px !important;
        height: 36px !important;
    }

    .user-trigger {
        padding: 2px !important;
    }

    .user-trigger img {
        width: 36px !important;
        height: 36px !important;
    }
}