@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --navbar-height: 70px;
    --bg-main: #f8fafc;
    --bg-navbar: linear-gradient(90deg, #0f172a 0%, #1e293b 100%);
    --navbar-text: #94a3b8;
    --navbar-text-hover: #ffffff;
    --border-color: #cbd5e1;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --transition-speed: 0.3s;
    
    /* Elegant Gradients */
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --primary-gradient-hover: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    --success-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --danger-gradient: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
    --warning-gradient: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    
    /* Elegant Shadows */
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03), 0 10px 15px -3px rgba(0, 0, 0, 0.03);
    --card-shadow-hover: 0 15px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.03);
}

html, body {
    font-family: 'Cairo', sans-serif !important;
    background-color: var(--bg-main) !important;
    color: var(--text-dark);
    margin: 0;
    padding: 0;
}

h1, h2, h3, h4, h5, h6, span, p, a, button, label, input, select, textarea, td, th {
    font-family: 'Cairo', sans-serif !important;
}

a, .btn-link {
    color: #6366f1;
    text-decoration: none;
    transition: color var(--transition-speed);
}
a:hover {
    color: #8b5cf6;
}

.btn-primary {
    color: #fff;
    background: var(--primary-gradient);
    border: none;
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.2);
}
.btn-primary:hover {
    background: var(--primary-gradient-hover);
    box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.3);
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem rgba(99, 102, 241, 0.25);
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #10b981;
}

.invalid {
    outline: 1px solid #ef4444;
}

.validation-message {
    color: #ef4444;
    font-weight: 600;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjctxNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyYjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljg4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred."
}

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ====== PREMIUM GLASS DESIGN SYSTEM ====== */

/* Glass Card */
.glass-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--card-shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    margin-bottom: 2rem;
    animation: fadeIn 0.4s ease-out;
}

.glass-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--card-shadow-hover);
}

/* Modern Page Header */
.page-header {
    margin-bottom: 2.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    text-align: right;
}

.page-header h2, .page-header h3 {
    font-size: 2rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.page-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: 0;
}

/* Custom Table Layout */
.custom-table-container {
    background: rgba(255, 255, 255, 0.7);
    border-radius: 16px;
    padding: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: var(--card-shadow);
}

.custom-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 0.6rem;
    margin: 0;
}

.custom-table th {
    color: var(--text-dark);
    font-weight: 700;
    padding: 1rem;
    border-bottom: 2px solid #e2e8f0;
    text-align: right;
    font-size: 0.9rem;
}

.custom-table tr {
    background: #ffffff;
    transition: transform 0.2s ease, background 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.01);
}

.custom-table tr:hover {
    background: #f8fafc;
    transform: translateY(-1px);
}

.custom-table td {
    padding: 1.2rem 1rem;
    border-top: 1px solid #f1f5f9;
    border-bottom: 1px solid #f1f5f9;
    color: var(--text-dark);
    font-size: 0.92rem;
    vertical-align: middle;
}

.custom-table td:first-child {
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
    border-right: 1px solid #f1f5f9;
}

.custom-table td:last-child {
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
    border-left: 1px solid #f1f5f9;
}

/* Premium Buttons */
.btn-premium {
    background: var(--primary-gradient);
    color: #ffffff !important;
    border: none;
    border-radius: 10px;
    padding: 0.65rem 1.6rem;
    font-weight: 700;
    font-size: 0.92rem;
    transition: all 0.25s ease;
    box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-premium:hover {
    background: var(--primary-gradient-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 15px -3px rgba(99, 102, 241, 0.3);
}

.btn-premium-success {
    background: var(--success-gradient);
    color: #ffffff !important;
    border: none;
    border-radius: 10px;
    padding: 0.65rem 1.6rem;
    font-weight: 700;
    font-size: 0.92rem;
    transition: all 0.25s ease;
    box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-premium-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px -3px rgba(16, 185, 129, 0.3);
}

.btn-premium-danger {
    background: var(--danger-gradient);
    color: #ffffff !important;
    border: none;
    border-radius: 10px;
    padding: 0.65rem 1.6rem;
    font-weight: 700;
    font-size: 0.92rem;
    transition: all 0.25s ease;
    box-shadow: 0 4px 6px -1px rgba(244, 63, 94, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-premium-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px -3px rgba(244, 63, 94, 0.3);
}

.btn-premium-secondary {
    background: #ffffff;
    color: var(--text-dark) !important;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 0.65rem 1.6rem;
    font-weight: 700;
    font-size: 0.92rem;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-premium-secondary:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

/* Premium Inputs */
.premium-input {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: var(--text-dark);
    border-radius: 10px;
    padding: 0.75rem 1.2rem;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    width: 100%;
}

.premium-input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
    outline: none;
    background: #ffffff;
}

/* Status Badges */
.premium-badge {
    padding: 0.4rem 1.1rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.premium-badge-success {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.premium-badge-danger {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.premium-badge-warning {
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.premium-badge-info {
    background: rgba(59, 130, 246, 0.12);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.25);
}

/* KPI Cards */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.kpi-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    position: relative;
    overflow: hidden;
    transition: transform 0.25s, box-shadow 0.25s;
}

.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--card-shadow-hover);
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 5px;
    height: 100%;
    background: var(--kpi-color, #3b82f6);
}

.kpi-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.kpi-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-dark);
}

.kpi-value small {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
}

/* ====== GLOBAL MOBILE RESPONSIVENESS ====== */
@media (max-width: 768px) {
    table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }

    body {
        font-size: 14px;
    }

    .container, .container-fluid {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    .card-body, .glass-card {
        padding: 1.2rem !important;
    }

    .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    input.form-control, select.form-control, .pos-input, .premium-input {
        width: 100% !important;
        max-width: 100% !important;
    }

    .page-header h2, h3 {
        font-size: 1.5rem !important;
    }
    
    .page-header {
        padding-bottom: 0.5rem !important;
        margin-bottom: 1.5rem !important;
    }

    .btn-premium, .btn-premium-success, .btn-premium-danger, .btn-premium-secondary {
        width: 100%;
        margin-bottom: 10px;
    }

    .kpi-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
}

/* ========================================= */
/* DASHBOARD LAYOUT STYLES                   */
/* ========================================= */
.app-layout {
    display: flex;
    min-height: 100vh;
    background: #f8fafc;
}

.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin-right: 260px; /* Sidebar width in RTL */
    transition: margin-right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-wrapper.expanded {
    margin-right: 70px;
}

/* Header */
.top-header {
    height: 70px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-left, .header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.menu-toggle-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #64748b;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
    transition: background 0.2s;
}

.menu-toggle-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
}

/* Search Box */
.search-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 0.4rem 1rem;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.search-box:focus-within {
    background: #fff;
    border-color: #94a3b8;
    box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.1);
}

.search-box input {
    border: none;
    background: none;
    outline: none;
    font-size: 0.9rem;
    color: #334155;
    width: 200px;
}

.search-box i {
    color: #94a3b8;
}

/* Icon Buttons */
.icon-btn {
    background: none;
    border: none;
    color: #64748b;
    font-size: 1.25rem;
    position: relative;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background 0.2s;
}

.icon-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.badge-indicator {
    position: absolute;
    top: 6px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    border: 2px solid #fff;
}

/* User Profile */
.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-right: 0.5rem;
    border-right: 1px solid #e2e8f0;
    cursor: pointer;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.2);
}

.user-info .name {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1e293b;
}

.user-info .role {
    font-size: 0.75rem;
    color: #64748b;
}

/* Main Content */
.app-content {
    flex: 1;
    padding: 2rem;
    overflow-x: hidden;
}

.content-container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Footer */
.app-footer {
    padding: 1.5rem;
    text-align: center;
    font-size: 0.85rem;
    color: #94a3b8;
    background: #ffffff;
    border-top: 1px solid #f1f5f9;
}

@media (max-width: 768px) {
    .main-wrapper {
        margin-right: 0 !important;
    }
    
    .app-content {
        padding: 1rem;
        padding-bottom: 95px !important;
    }

    .app-footer {
        padding-bottom: 90px !important;
    }
}

/* ========================================= */
/* ELEGANT MOBILE BOTTOM NAVIGATION BAR       */
/* ========================================= */

.mobile-bottom-nav {
    position: fixed;
    bottom: 12px;
    left: 12px;
    right: 12px;
    z-index: 1050;
    pointer-events: none;
}

.mobile-bottom-nav .nav-container {
    pointer-events: auto;
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35), 0 2px 6px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    height: 66px;
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0 6px;
    max-width: 500px;
    margin: 0 auto;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Nav Tab Items */
.mobile-bottom-nav .nav-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    text-decoration: none;
    background: none;
    border: none;
    padding: 4px 6px;
    flex: 1;
    position: relative;
    cursor: pointer;
    transition: all 0.25s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.mobile-bottom-nav .tab-icon {
    font-size: 1.25rem;
    position: relative;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mobile-bottom-nav .icon-solid {
    display: none;
}
.mobile-bottom-nav .icon-outline {
    display: block;
}

.mobile-bottom-nav .tab-label {
    font-size: 0.72rem;
    font-weight: 600;
    margin-top: 2px;
    white-space: nowrap;
    transition: color 0.25s ease;
}

/* Active State */
.mobile-bottom-nav .nav-tab.active {
    color: #a78bfa;
}

.mobile-bottom-nav .nav-tab.active .tab-icon {
    transform: translateY(-2px) scale(1.15);
    color: #a78bfa;
    filter: drop-shadow(0 0 8px rgba(167, 139, 250, 0.6));
}

.mobile-bottom-nav .nav-tab.active .icon-solid {
    display: block;
}
.mobile-bottom-nav .nav-tab.active .icon-outline {
    display: none;
}

.mobile-bottom-nav .nav-tab.active .tab-label {
    color: #ffffff;
    font-weight: 700;
}

/* Active Indicator Pill */
.mobile-bottom-nav .nav-tab.active::after {
    content: '';
    position: absolute;
    top: 2px;
    width: 16px;
    height: 3px;
    background: linear-gradient(90deg, #6366f1, #a78bfa);
    border-radius: 99px;
    box-shadow: 0 0 8px #a78bfa;
}

/* Center Action Button (Plus / New Invoice) */
.mobile-bottom-nav .action-tab {
    position: relative;
    top: -14px;
    overflow: visible;
}

.mobile-bottom-nav .action-circle {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.45), 0 0 0 5px rgba(15, 23, 42, 0.92);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mobile-bottom-nav .action-tab:hover .action-circle,
.mobile-bottom-nav .action-tab:active .action-circle {
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 12px 25px rgba(139, 92, 246, 0.6), 0 0 0 5px rgba(15, 23, 42, 0.92);
}

.mobile-bottom-nav .action-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: #e2e8f0;
    margin-top: 2px;
}

.mobile-bottom-nav .action-tab.active::after {
    display: none;
}

/* Sidebar Overlay Backdrop for Mobile */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1080;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ==========================================================================
   LUXURY DESIGN SYSTEM FOR HOME, LOGIN, AND STORE PAGES
   ========================================================================== */

/* Page Ambient Background */
.luxury-page-bg {
    background: #f8fafc radial-gradient(circle at 20% 20%, rgba(99, 102, 241, 0.06) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.06) 0%, transparent 50%);
    min-height: 100vh;
}

/* Glassmorphism Components */
.glass-card {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.08), 0 0 15px rgba(99, 102, 241, 0.03);
    border-radius: 1.25rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    box-shadow: 0 25px 50px -12px rgba(99, 102, 241, 0.15);
}

.glass-dark {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

/* Modern Gradient Buttons */
.btn-gradient-primary {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: #ffffff !important;
    border: none;
    font-weight: 700;
    border-radius: 0.85rem;
    box-shadow: 0 8px 20px -4px rgba(79, 70, 229, 0.4);
    transition: all 0.3s ease;
}

.btn-gradient-primary:hover {
    background: linear-gradient(135deg, #4338ca 0%, #6d28d9 100%);
    transform: translateY(-2px);
    box-shadow: 0 12px 25px -4px rgba(79, 70, 229, 0.5);
}

.btn-gradient-primary:active {
    transform: translateY(0);
}

.btn-gradient-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff !important;
    border: none;
    font-weight: 700;
    border-radius: 0.85rem;
    box-shadow: 0 8px 20px -4px rgba(16, 185, 129, 0.4);
    transition: all 0.3s ease;
}

.btn-gradient-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px);
    box-shadow: 0 12px 25px -4px rgba(16, 185, 129, 0.5);
}

.btn-gradient-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff !important;
    border: none;
    font-weight: 700;
    border-radius: 0.85rem;
    box-shadow: 0 8px 20px -4px rgba(245, 158, 11, 0.4);
    transition: all 0.3s ease;
}

.btn-gradient-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px -4px rgba(245, 158, 11, 0.5);
}

/* Gradient Text Effect */
.gradient-text {
    background: linear-gradient(135deg, #4f46e5 0%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.gradient-text-gold {
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* Modern Input Controls */
.luxury-input {
    border: 1.5px solid #e2e8f0;
    border-radius: 0.85rem;
    padding: 0.8rem 1.1rem;
    font-size: 0.95rem;
    background-color: rgba(255, 255, 255, 0.9);
    transition: all 0.25s ease;
}

.luxury-input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
    background-color: #ffffff;
    outline: none;
}

.input-icon-wrapper {
    position: relative;
}

.input-icon-wrapper i {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 1.15rem;
    transition: color 0.25s ease;
}

[dir="rtl"] .input-icon-wrapper i {
    right: 1.1rem;
}
[dir="ltr"] .input-icon-wrapper i {
    left: 1.1rem;
}

[dir="rtl"] .input-icon-wrapper .form-control {
    padding-right: 3rem;
}
[dir="ltr"] .input-icon-wrapper .form-control {
    padding-left: 3rem;
}

.input-icon-wrapper .form-control:focus + i,
.input-icon-wrapper:focus-within i {
    color: #6366f1;
}

/* Floating Badges */
.badge-glass {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    padding: 0.4rem 0.9rem;
    border-radius: 50rem;
    font-weight: 600;
}

/* LOGIN PAGE STYLES */
.login-hero-bg {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 15% 15%, rgba(79, 70, 229, 0.12) 0%, transparent 45%),
                radial-gradient(circle at 85% 85%, rgba(139, 92, 246, 0.12) 0%, transparent 45%),
                #0f172a;
    padding: 2rem 1rem;
}

.login-card-container {
    width: 100%;
    max-width: 1050px;
    border-radius: 1.75rem;
    overflow: hidden;
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(20px);
}

.login-visual-side {
    position: relative;
    background-size: cover;
    background-position: center;
    overflow: hidden;
    min-height: 520px;
}

.login-visual-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.35) 0%, rgba(15, 23, 42, 0.92) 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2.5rem;
}

.login-feature-chip {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50rem;
    padding: 0.5rem 1.1rem;
    font-size: 0.85rem;
    color: #f8fafc;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.login-form-side {
    background: #ffffff;
    padding: 3rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* HOME STOREFRONT STYLES */
.front-navbar {
    background: rgba(255, 255, 255, 0.92) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    position: sticky;
    top: 0;
    z-index: 1030;
    transition: all 0.3s ease;
}

.hero-section-v2 {
    position: relative;
    border-radius: 2rem;
    overflow: hidden;
    min-height: 480px;
    box-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.2);
    margin-bottom: 3.5rem;
}

.hero-bg-img {
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
    object-fit: cover;
    filter: brightness(0.65) saturate(1.1);
    transform: scale(1.02);
    transition: transform 10s ease;
}

.hero-section-v2:hover .hero-bg-img {
    transform: scale(1.06);
}

.hero-overlay-v2 {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.85) 0%, rgba(15, 23, 42, 0.4) 60%, rgba(79, 70, 229, 0.5) 100%);
}

.hero-content-box {
    position: relative;
    z-index: 2;
    padding: 4rem 3rem;
    color: #ffffff;
    max-width: 750px;
}

.category-pill {
    padding: 0.6rem 1.4rem;
    border-radius: 50rem;
    background: #ffffff;
    color: #475569;
    border: 1.5px solid #e2e8f0;
    font-weight: 600;
    font-size: 0.92rem;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.category-pill:hover {
    border-color: #6366f1;
    color: #6366f1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}

.category-pill.active {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 8px 20px -4px rgba(79, 70, 229, 0.4);
}

/* LUXURY PRODUCT CARD */
.product-card-v2 {
    background: #ffffff;
    border-radius: 1.25rem;
    border: 1px solid rgba(226, 232, 240, 0.8);
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card-v2:hover {
    transform: translateY(-8px);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 20px 35px -10px rgba(79, 70, 229, 0.15);
}

.product-img-wrapper {
    position: relative;
    height: 230px;
    overflow: hidden;
    background-color: #f8fafc;
}

.product-img-v2 {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card-v2:hover .product-img-v2 {
    transform: scale(1.08);
}

.product-badge-new {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.35rem 0.8rem;
    border-radius: 50rem;
    box-shadow: 0 4px 10px rgba(225, 29, 72, 0.3);
    z-index: 2;
}

.product-badge-cat {
    position: absolute;
    bottom: 0.75rem;
    right: 0.75rem;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.3rem 0.75rem;
    border-radius: 0.5rem;
    z-index: 2;
}

.price-tag-v2 {
    font-size: 1.25rem;
    font-weight: 800;
    color: #4f46e5;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.price-currency {
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
}

/* Feature Cards */
.feature-box-v2 {
    background: #ffffff;
    border-radius: 1.25rem;
    padding: 1.5rem;
    border: 1px solid #f1f5f9;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.04);
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: all 0.3s ease;
}

.feature-box-v2:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 30px -5px rgba(99, 102, 241, 0.12);
    border-color: rgba(99, 102, 241, 0.2);
}

.feature-icon-circle {
    width: 54px;
    height: 54px;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

/* STORE EDIT DASHBOARD STYLES */
.store-preview-header {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-radius: 1.5rem;
    color: #ffffff;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 15px 30px -10px rgba(15, 23, 42, 0.25);
}

.store-preview-header::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.2) 0%, transparent 70%);
    pointer-events: none;
}

.upload-dropzone {
    border: 2px dashed #cbd5e1;
    border-radius: 1.25rem;
    padding: 2.5rem 1.5rem;
    text-align: center;
    background: #f8fafc;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-dropzone:hover {
    border-color: #6366f1;
    background: rgba(99, 102, 241, 0.03);
}

/* Animations */
@keyframes floatAnim {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.anim-float {
    animation: floatAnim 4s ease-in-out infinite;
}

/* Toast styling override */
.toast-custom {
    border-radius: 1rem;
    border: none;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}