/* 
   Tamayuz Modern Design System 
   Focus: Glassmorphism, Modern Typography, and Premium Layouts
*/

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700&family=Inter:wght@300;400;600&display=swap');

/* 🛠️ Local Font Assets */
@font-face {
    font-family: 'Material Icons';
    font-style: normal;
    font-weight: 400;
    src: url('../fonts/MaterialIcons-Regular.eot');
    /* For IE6-8 */
    src: local('Material Icons'),
        local('MaterialIcons-Regular'),
        url('../fonts/MaterialIcons-Regular.woff2') format('woff2'),
        url('../fonts/MaterialIcons-Regular.woff') format('woff'),
        url('../fonts/MaterialIcons-Regular.ttf') format('truetype');
}

.material-icons {
    font-family: 'Material Icons';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    display: inline-block;
    line-height: 1;
    text-transform: none;
    letter-spacing: normal;
    word-wrap: normal;
    white-space: nowrap;
    direction: ltr;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: 'liga';
}

/* 🌐 RTL Support for Arabic */
[dir="rtl"] {
    text-align: right !important;
}

[dir="rtl"] body {
    direction: rtl !important;
    text-align: right !important;
}

[dir="rtl"] .page-title-header,
[dir="rtl"] .compact-page-header {
    text-align: center;
    /* Keep headers centered */
}

[dir="rtl"] .action-bar-premium {
    direction: rtl;
}

[dir="rtl"] .module-card {
    text-align: center;
    /* Keep module cards centered */
}

[dir="rtl"] .module-card-title {
    text-align: center;
}

[dir="rtl"] .sidebar-menu-content {
    text-align: right;
}

[dir="rtl"] .hero-title,
[dir="rtl"] .hero-subtitle {
    text-align: center;
    /* Keep hero text centered */
}


:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --secondary-color: #a855f7;
    --accent-glow: rgba(99, 102, 241, 0.4);
    --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    --card-bg: rgba(30, 41, 59, 0.6);
    --glass-bg: rgba(15, 23, 42, 0.85);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --header-height: 64px;
    --border-radius: 16px;
    --shadow-premium: 0 10px 40px rgba(0, 0, 0, 0.4);

    /* Theme Variables */
    --dashboard-bg: #070a12;
    --card-inner-bg: rgba(255, 255, 255, 0.05);
}

[data-theme="light"] {
    --primary-color: #0078d4;
    --secondary-color: #60cdff;
    --dashboard-bg: #f3f3f3;
    --text-main: #000000;
    /* Pure black for main text */
    --text-muted: #333333;
    /* Dark gray for secondary text */
    --card-bg: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(0, 0, 0, 0.0578);
    --card-inner-bg: #fbfbfb;
    --shadow-premium: 0 10px 30px rgba(0, 0, 0, 0.08);
    /* Softer shadow */
}

body {
    font-family: 'Cairo', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    background: var(--dashboard-bg) !important;
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    transition: background 0.3s ease, color 0.3s ease;
}

/* 🌌 Premium CSS-Only Deep Background */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    background: radial-gradient(900px 500px at 15% 20%, rgba(99, 102, 241, 0.15), transparent 60%),
        radial-gradient(700px 420px at 85% 30%, rgba(16, 185, 129, 0.12), transparent 55%),
        var(--dashboard-bg);
    pointer-events: none;
    transition: background 0.5s ease;
}

[data-theme="light"] body::before {
    background: radial-gradient(900px 500px at 15% 20%, rgba(99, 102, 241, 0.05), transparent 60%),
        radial-gradient(700px 420px at 85% 30%, rgba(16, 185, 129, 0.05), transparent 55%),
        var(--dashboard-bg);
}

/* Light Mode Text Color Overrides */
[data-theme="light"] .hero-title,
[data-theme="light"] .hero-subtitle,
[data-theme="light"] .module-card-title,
[data-theme="light"] .action-label,
[data-theme="light"] h1,
[data-theme="light"] h2,
[data-theme="light"] h3,
[data-theme="light"] p {
    color: #000000 !important;
}

[data-theme="light"] .action-hub-item .action-label {
    color: #333333 !important;
}

[data-theme="light"] .action-hub-item:hover .action-label {
    color: #000000 !important;
}

/* Specific override for hero in light mode */
[data-theme="light"] .hero-content {
    background: rgba(240, 245, 255, 0.95) !important;
    border: 1px solid rgba(99, 102, 241, 0.15) !important;
    box-shadow:
        0 20px 60px rgba(99, 102, 241, 0.12),
        inset 0 0 40px rgba(255, 255, 255, 0.8) !important;
}

[data-theme="light"] .hero-section .hero-title {
    color: #000000 !important;
    font-weight: 700 !important;
    text-shadow: 0 0 black !important;
}

[data-theme="light"] .hero-section .hero-subtitle {
    color: #1a1a1a !important;
    font-weight: 500 !important;
}

[data-theme="light"] .hero-icon {
    color: #0078d4 !important;
}

/* 🕸️ Modern Grid Overlay (Technical Depth) */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 48px 48px;
    opacity: 0.4;
    pointer-events: none;
    mask-image: radial-gradient(circle at center, black 0%, transparent 85%);
    -webkit-mask-image: radial-gradient(circle at center, black 0%, transparent 85%);
}

/* 🔮 Animated Blobs */
.bg-blob {
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 999px;
    filter: blur(80px);
    opacity: 0.15;
    z-index: -1;
    pointer-events: none;
    animation: float 15s ease-in-out infinite;
}

.blob-1 {
    background: #4f46e5;
    top: -200px;
    left: -150px;
}

.blob-2 {
    background: #10b981;
    bottom: -250px;
    right: -150px;
    animation-delay: -5s;
}

.blob-3 {
    background: #6366f1;
    top: 40%;
    left: 60%;
    width: 400px;
    height: 400px;
    animation-duration: 20s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    33% {
        transform: translate(30px, -30px) rotate(5deg);
    }

    66% {
        transform: translate(-20px, 20px) rotate(-5deg);
    }
}


/* 🎯 Compact Single-Row Page Header */
.compact-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px 20px;
    margin: 15px auto;
    max-width: 1400px;
    min-height: 70px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.compact-header-left {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex-shrink: 0;
}

.compact-breadcrumb {
    font-size: 12px;
    color: var(--text-muted);
}

.compact-breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}

.compact-breadcrumb a:hover {
    color: white;
}


.compact-header-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-main);
}


.compact-header-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}


.compact-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 70px;
    height: 65px;
    padding: 8px 12px;
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--text-muted);
    text-decoration: none !important;
    transition: all 0.3s ease;
    cursor: pointer;
}

.compact-nav-item:hover {
    background: rgba(99, 102, 241, 0.3);
    border-color: rgba(99, 102, 241, 0.5);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.compact-nav-item .material-icons {
    font-size: 24px;
}

.compact-nav-label {
    font-size: 11px;
    font-weight: 500;
    font-family: 'Cairo', sans-serif;
    text-align: center;
    white-space: nowrap;
}

.compact-nav-item:hover .compact-nav-label {
    color: white;
}

.compact-nav-separator {
    width: 1px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    margin: 0 5px;
}


/* Responsive */
@media (max-width: 768px) {
    .compact-page-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 12px 15px;
    }

    .compact-header-title {
        font-size: 16px;
    }

    .compact-header-nav {
        width: 100%;
        justify-content: flex-start;
    }

    .compact-nav-item {
        min-width: 60px;
        height: 55px;
    }

    .compact-nav-separator {
        display: none;
    }
}

/* RTL Support */
[dir="rtl"] .compact-page-header {
    direction: rtl;
}

[dir="rtl"] .compact-header-nav {
    flex-direction: row-reverse;
}

[data-theme="light"] .compact-page-header {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="green"] .compact-page-header {
    border-color: rgba(16, 185, 129, 0.3);
}

/* Grid/Table Minimum Height - Fill Screen */
#PageContent {
    min-height: calc(100vh - 150px);
    display: flex;
    flex-direction: column;
}

.DataViewContainer {
    flex: 1;
    min-height: calc(100vh - 200px);
    display: flex;
    flex-direction: column;
}

table.DataView {
    min-height: calc(100vh - 250px);
    height: auto;
}

/* Ensure table body fills available space */
table.DataView tbody {
    min-height: 400px;
}


/* Professional Global Header (Glassmorphism v3) */
.navbar,
header,
#header,
.PageMenuBar {
    min-height: 65px !important;
    background: rgba(15, 23, 42, 0.6) !important;
    backdrop-filter: blur(25px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(25px) saturate(180%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2) !important;
    position: sticky !important;
    align-items: center !important;
    z-index: 9999 !important;
    /* Extremely high to stay above everything */
}

@media (max-width: 768px) {
    .PageMenuBar {
        display: none !important;
    }
}

.PageMenuBar {
    display: none !important;
    /* Unified Sidebar for all devices */
}

/* High-Contrast Menu Links & MenuExtender Styling */
.navbar a,
.PageMenuBar a,
.menu-item a,
.MenuExtender a,
.Menu_Item,
.Menu_Item_Hover {
    color: #f8fafc !important;
    font-weight: 700 !important;
    /* Bolder for clarity */
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-size: 1rem !important;
    /* Increased from 0.9rem */
    padding: 0 18px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    text-decoration: none !important;
    white-space: nowrap;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Modern Cards & Panels (Unified 2D Depth) */
.card,
.panel,
.widget-box,
.cardhomeimage {
    background: rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 20px !important;
    box-shadow:
        0 15px 40px rgba(0, 0, 0, 0.4),
        inset 0 0 20px rgba(255, 255, 255, 0.05) !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    overflow: hidden;
}

/* Scroll Animations Support */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* --- Site Map Page Refinement --- */

/* Site Map Title */
h1#site-map-title,
.site-map-header,
.page-title {
    font-size: 2.2rem !important;
    text-transform: uppercase;
    letter-spacing: 0.1em !important;
    text-align: center;
    color: #fff !important;
    padding-bottom: 15px;
    margin-bottom: 30px !important;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

/* Module Grid/Tiles Container (Odoo-like) */
.site-map-grid,
.sitemap-grid,
.module-container,
.site-map-container {
    display: grid !important;
    gap: 30px !important;
    padding: 30px !important;
    width: 100% !important;
    max-width: 1600px !important;
    margin: 0 auto !important;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
    justify-content: center !important;
    /* Centering the grid items */
}

/* 🎨 Standardized Multi-View System */

.sitemap-grid {
    display: grid !important;
    gap: 30px !important;
    padding: 30px !important;
    width: 100% !important;
    max-width: 1600px !important;
    margin: 0 auto !important;
    justify-content: center !important;
}

/* Generic Card Base */
.module-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
}

/* 🏢 CLASSIC VIEW (Legacy Style) */
.sitemap-grid.view-classic {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
}

.sitemap-grid.view-classic .module-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(20px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.sitemap-grid.view-classic .module-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(99, 102, 241, 0.3);
    border-color: var(--primary-color);
}

.sitemap-grid.view-classic .module-card-icon {
    width: 80px;
    height: 80px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

/* 🔵 CIRCLE VIEW */
.sitemap-grid.view-circles {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
}

.sitemap-grid.view-circles .module-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.sitemap-grid.view-circles .module-card-icon {
    width: 170px;
    height: 170px;
    border-radius: 50%;
    background: var(--card-inner-bg);
    border: 2px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
}

.sitemap-grid.view-circles .module-card-icon::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.sitemap-grid.view-circles .module-card:hover .module-card-icon {
    transform: translateY(-10px) scale(1.05);
    border-color: var(--primary-color);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.2);
}

.sitemap-grid.view-circles .module-card:hover .module-card-icon::before {
    opacity: 0.15;
}

/* 🍱 BENTO VIEW (Square/Modern) */
.sitemap-grid.view-bento {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
}

.sitemap-grid.view-bento .module-card {
    flex-direction: row;
    padding: 20px;
    background: var(--card-bg);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 20px;
    width: 100%;
}

.sitemap-grid.view-bento .module-card-icon {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    background: var(--card-inner-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ⬢ HEXAGON VIEW */
.sitemap-grid.view-hexagons {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
}

.sitemap-grid.view-hexagons .module-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.sitemap-grid.view-hexagons .module-card-icon span {
    color: white;
    font-size: 3rem !important;
}

/* Generic Icon Styling (Replacing Img) */
.module-card-icon span {
    font-size: 4rem !important;
    color: var(--primary-color);
    transition: all 0.4s ease;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.sitemap-grid.view-circles .module-card-icon span {
    font-size: 4.5rem !important;
}

.module-card:hover .module-card-icon span {
    transform: scale(1.15) rotate(5deg);
    color: var(--secondary-color);
}

.sitemap-grid.view-hexagons .module-card:hover .module-card-icon span {
    color: white;
}

.module-card-title {
    font-family: 'Cairo', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    text-align: center;
    transition: color 0.3s ease;
}

[data-theme="light"] .sitemap-grid.view-classic .module-card,
[data-theme="light"] .sitemap-grid.view-bento .module-card {
    background: var(--card-bg);
    border-color: var(--glass-border);
}

/* Responsive Grid Adjustments */
@media (max-width: 1400px) {

    .site-map-grid,
    .sitemap-grid,
    .module-container {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)) !important;
    }
}

@media (max-width: 1200px) {

    .site-map-grid,
    .sitemap-grid,
    .module-container {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 992px) {

    .site-map-grid,
    .sitemap-grid,
    .module-container {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 600px) {

    .site-map-grid,
    .sitemap-grid,
    .module-container {
        grid-template-columns: 1fr !important;
        /* Single column on very small mobile */
        padding: 15px !important;
        gap: 15px !important;
    }
}

/* Refined Module Tiles (Glassmorphism v3 - "Revolution") */
.module-tile,
.site-map-item,
[id*="ModuleBlock"] {
    position: relative;
    height: 140px !important;
    padding: 20px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(255, 255, 255, 0.05) !important;
    /* Slightly lighter base */
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-radius: 20px !important;
    /* Standardized to 20px as per user preference earlier */
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.3),
        inset 0 0 15px rgba(255, 255, 255, 0.05) !important;
    /* Gentle inner depth */
    cursor: pointer;
    text-decoration: none !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    overflow: hidden !important;
}

/* Shine Effect Overlay */
.module-tile::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg,
            transparent,
            rgba(255, 255, 255, 0.1),
            transparent);
    transform: rotate(45deg) translateX(-100%);
    transition: transform 0.6s ease;
    z-index: 1;
}

.module-tile:hover::before {
    transform: rotate(45deg) translateX(100%);
}

.module-tile:hover {
    transform: translateY(-12px) scale(1.03) !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
}

/* Module Tile Text */
.module-tile-text,
.site-map-item span {
    font-family: 'Cairo', sans-serif !important;
    font-weight: 700 !important;
    font-size: 1.25rem !important;
    color: #ffffff !important;
    /* Force white for premium feel */
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
    margin-top: 15px;
    z-index: 2;
}

/* Icon Support for Tiles */
.module-icon {
    font-size: 2.5rem !important;
    /* Smaller icons for better fit */
    color: var(--secondary-color) !important;
    margin-bottom: 10px;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.2));
    transition: all 0.4s ease;
    z-index: 2;
}

.module-tile:hover .module-icon {
    transform: scale(1.2) rotate(5deg);
}

/* Dynamic Glows for Tiles */
/* Dynamic Glows & Category Themes (Inspired by ModuleDashboard) */
.tile-finance {
    border-top: 4px solid #0ea5e9 !important;
    box-shadow: 0 4px 20px rgba(14, 165, 233, 0.15) !important;
}

.tile-hr {
    border-top: 4px solid #ec4899 !important;
    box-shadow: 0 4px 20px rgba(236, 72, 153, 0.15) !important;
}

.tile-projects {
    border-top: 4px solid #10b981 !important;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.15) !important;
}

.tile-ledger {
    border-top: 4px solid #8b5cf6 !important;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.15) !important;
}

.tile-home {
    border-top: 4px solid #6366f1 !important;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.15) !important;
}

.tile-logout {
    border-top: 4px solid #ef4444 !important;
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.15) !important;
}

.module-tile:hover.tile-finance {
    box-shadow: 0 12px 30px rgba(14, 165, 233, 0.3) !important;
}

.module-tile:hover.tile-hr {
    box-shadow: 0 12px 30px rgba(236, 72, 153, 0.3) !important;
}

.module-tile:hover.tile-projects {
    box-shadow: 0 12px 30px rgba(16, 185, 129, 0.3) !important;
}

.module-tile:hover.tile-ledger {
    box-shadow: 0 12px 30px rgba(139, 92, 246, 0.3) !important;
}

.module-tile:hover.tile-home {
    box-shadow: 0 12px 30px rgba(99, 102, 241, 0.3) !important;
}

.module-tile:hover.tile-logout {
    box-shadow: 0 12px 30px rgba(239, 68, 68, 0.3) !important;
}

/* Notification Animations */
@keyframes soft-glow-indigo {

    0%,
    100% {
        box-shadow: 0 0 15px rgba(79, 70, 229, 0.3);
    }

    50% {
        box-shadow: 0 0 30px rgba(79, 70, 229, 0.6);
    }
}

#tamayuz-alert-bell {
    animation: soft-glow-indigo 4s infinite !important;
}

#tamayuz-alert-bell:hover {
    transform: scale(1.1);
    background: var(--primary-hover) !important;
}

#tamayuz-alert-banner {
    border-right: 5px solid #ef4444;
    /* Standard for RTL support */
}

[dir="rtl"] #tamayuz-alert-banner {
    left: auto !important;
    right: 20px !important;
    transform: translateX(150%);
    border-left: none !important;
    border-right: 5px solid #ef4444 !important;
}

[dir="rtl"] #tamayuz-alert-banner.active {
    transform: translateX(0) !important;
}

/* --- Professional Mobile Sidebar (Global System) --- */
.modern-sidebar-toggle {
    position: fixed;
    top: 35px;
    left: 35px;
    z-index: 10001;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: white;
    border-radius: 14px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modern-sidebar-toggle:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 12px 30px rgba(99, 102, 241, 0.6);
}

.modern-sidebar-toggle i {
    font-size: 28px;
}

.modern-sidebar {
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    height: 100vh;
    background: var(--glass-bg);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    z-index: 10002;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
}

.modern-sidebar.active {
    transform: translateX(300px);
}

.sidebar-header {
    padding: 30px 20px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-logo {
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: 1px;
}

.sidebar-close {
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.3s;
}

.sidebar-close:hover {
    color: #fff;
}

.sidebar-menu-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px 0;
}

.sidebar-menu-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu-content li a {
    display: flex;
    align-items: center;
    padding: 15px 25px;
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.2s;
    border-left: 4px solid transparent;
}

.sidebar-menu-content li a:hover {
    background: rgba(255, 255, 255, 0.05);
    border-left-color: var(--secondary-color);
    color: #fff;
}

.sidebar-menu-content li a i {
    margin-right: 15px;
    font-size: 24px;
    color: var(--secondary-color);
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

@media (max-width: 768px) {
    .modern-sidebar-toggle {
        display: flex !important;
    }

    .modern-sidebar {
        width: 85vw;
        left: -85vw;
    }

    .modern-sidebar.active {
        transform: translateX(85vw);
    }
}


/* --- Modern Compact Hero Section --- */
.hero-section {
    padding: 60px 20px 40px 20px;
    margin-bottom: 20px;
    text-align: center;
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: center;
}

.hero-content {
    max-width: 98%;
    width: 100%;
    margin: 0 auto;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 32px;
    padding: 50px 40px;
    box-shadow:
        0 40px 100px rgba(0, 0, 0, 0.6),
        inset 0 0 40px rgba(99, 102, 241, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

[data-theme="light"] .hero-content {
    background: rgba(189, 197, 212, 0.95) !important;
    border: 1px solid rgba(99, 102, 241, 0.15) !important;
    box-shadow:
        0 20px 60px rgba(99, 102, 241, 0.12),
        inset 0 0 40px rgba(255, 255, 255, 0.8) !important;
}

/* Green Theme (Nature) */
[data-theme="green"] {
    --primary-color: #10b981;
    --secondary-color: #34d399;
    --dashboard-bg: #064e3b;
    --text-main: #f0fdf4;
    --text-muted: #a7f3d0;
    --card-bg: rgba(6, 78, 59, 0.6);
    --glass-bg: rgba(6, 78, 59, 0.85);
    --glass-border: rgba(16, 185, 129, 0.2);
    --card-inner-bg: rgba(5, 46, 22, 0.5);
    --shadow-premium: 0 10px 40px rgba(0, 0, 0, 0.4);
}

[data-theme="green"] body::before {
    background: radial-gradient(900px 500px at 15% 20%, rgba(16, 185, 129, 0.15), transparent 60%),
        radial-gradient(700px 420px at 85% 30%, rgba(52, 211, 153, 0.12), transparent 55%),
        var(--dashboard-bg);
}

[data-theme="green"] .hero-content {
    background: rgba(6, 78, 59, 0.7) !important;
    border: 1px solid rgba(16, 185, 129, 0.3) !important;
    box-shadow:
        0 40px 100px rgba(0, 0, 0, 0.5),
        inset 0 0 40px rgba(16, 185, 129, 0.1) !important;
}


/* 🔧 PHASE 12: Menu, Hero & Tile Enhancements */

/* Fix Zigzag/DXR.gif image in PageMenuBar */
div.PageMenuBar {
    background-image: none !important;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

div.PageMenuBar table.Menu tr td.Item span.Outer {
    background-image: none !important;
    border-bottom: 2px solid transparent !important;
    transition: all 0.3s ease !important;
}

div.PageMenuBar table.Menu tr td.Item:hover span.Outer,
div.PageMenuBar table.Menu tr td.Selected span.Outer {
    border-bottom-color: var(--primary-color) !important;
}

/* Reduce Hero Height Even More */
.hero-section {
    padding: 20px 20px !important;
    margin-bottom: 20px !important;
}

/* Enhanced Module Tiles (Uniform Size + Glow) */
.cardhomeimage,
.clearfixhomeimage {
    width: 100% !important;
    min-height: 180px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(30, 41, 59, 0.7) !important;
    backdrop-filter: blur(15px) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 20px !important;
    padding: 25px !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3) !important;
}

.cardhomeimage:hover,
.clearfixhomeimage:hover {
    transform: translateY(-8px) !important;
    background: rgba(79, 70, 229, 0.15) !important;
    border-color: rgba(79, 70, 229, 0.4) !important;
    box-shadow:
        0 15px 40px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(79, 70, 229, 0.3) !important;
}

/* Module Icon Styling */
.imageWrappermehome {
    width: 80px !important;
    height: 80px !important;
    border-radius: 16px !important;
    background: rgba(79, 70, 229, 0.2) !important;
    padding: 15px !important;
    margin-bottom: 15px !important;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3) !important;
    transition: all 0.3s ease !important;
}

.cardhomeimage:hover .imageWrappermehome {
    transform: scale(1.1) !important;
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.5) !important;
}

/* Module Title Styling */
.module-card-title {
    font-family: 'Cairo', sans-serif !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    color: var(--text-main) !important;
    margin: 0 !important;
    text-align: center;
}

/* Sitemap Grid Enhancements */
.sitemap-grid {
    display: grid;
    gap: 25px !important;
    padding: 40px 20px !important;
    width: 100%;
    margin: 0 auto !important;
}

.sitemap-grid.view-bento {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
}

/* Bento Card Style Refinement */
.view-bento .module-card {
    background: rgba(30, 41, 59, 0.5) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 24px !important;
    padding: 40px 30px !important;
    height: 220px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2) !important;
}

[data-theme="light"] .view-bento .module-card {
    background: rgba(255, 255, 255, 0.85) !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05) !important;
}

.view-bento .module-card:hover {
    background: rgba(99, 102, 241, 0.15) !important;
    border-color: rgba(99, 102, 241, 0.4) !important;
    transform: translateY(-10px) scale(1.02) !important;
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(99, 102, 241, 0.2) !important;
}

[data-theme="light"] .view-bento .module-card:hover {
    background: #fff !important;
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.15) !important;
    border-color: rgba(99, 102, 241, 0.2) !important;
}

.view-bento .module-card-icon {
    width: 70px !important;
    height: 70px !important;
    background: rgba(99, 102, 241, 0.15) !important;
    border-radius: 18px !important;
    margin-bottom: 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #818cf8 !important;
    transition: all 0.3s ease !important;
}

[data-theme="light"] .view-bento .module-card-icon {
    background: rgba(99, 102, 241, 0.08) !important;
    color: #4f46e5 !important;
}

.view-bento .module-card:hover .module-card-icon {
    transform: scale(1.1);
    background: #6366f1 !important;
    color: white !important;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
}

[data-theme="light"] .module-card-title {
    color: #1e293b !important;
}

.view-bento .module-card-icon span {
    font-size: 36px !important;
}

/* Contenthome Background */
.contenthome {
    background: transparent !important;
}

/* 🚀 Hero Quick Actions Bar */
.hero-quick-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 25px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.quick-action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 85px;
    height: 75px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    text-decoration: none !important;
    color: var(--text-muted) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.quick-action-item:hover {
    background: rgba(79, 70, 229, 0.2);
    border-color: rgba(79, 70, 229, 0.5);
    color: var(--text-main) !important;
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3);
}

.quick-action-item .material-icons {
    font-size: 28px;
    margin-bottom: 6px;
    color: var(--primary-color);
    transition: all 0.3s;
}

.quick-action-item:hover .material-icons {
    transform: scale(1.15);
    color: #818cf8;
}

.quick-action-label {
    font-size: 11px;
    font-weight: 600;
    font-family: 'Cairo', sans-serif;
    text-align: center;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .hero-quick-actions {
        gap: 10px;
        padding: 15px;
    }

    .quick-action-item {
        width: 70px;
        height: 65px;
    }

    .quick-action-item .material-icons {
        font-size: 24px;
    }

    .quick-action-label {
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .quick-action-item {
        width: 60px;
        height: 55px;
    }

    .quick-action-label {
        display: none;
    }
}

.hero-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.hero-icon {
    font-size: 3.5rem !important;
    background: linear-gradient(135deg, #4f46e5, #10b981);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 10px rgba(79, 70, 229, 0.4));
}

.hero-title {
    font-size: 3rem !important;
    margin: 0;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.01em;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 30px;
}

.license-alert {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: rgba(79, 70, 229, 0.08);
    border: 1px solid rgba(79, 70, 229, 0.2);
    border-radius: 10px;
    color: var(--text-muted);
    font-size: 0.9rem;
    backdrop-filter: blur(5px);
    margin-top: 15px;
}

.alert-icon {
    font-size: 20px !important;
    animation: alert-pulse 2s infinite;
}

@keyframes alert-pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.2rem !important;
    }

    .hero-content {
        padding: 40px 20px;
    }
}