@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --green-50: #f0fdf4;
    --green-100: #dcfce7;
    --green-400: #4ade80;
    --green-500: #22c55e;
    --green-600: #16a34a;
    --primary: #00C853;
    --primary-light: #00E676;
    --primary-dark: #009624;
    --primary-glow: rgba(0, 200, 83, 0.35);
    --primary-glass: rgba(0, 200, 83, 0.08);
    --primary-glass-hover: rgba(0, 200, 83, 0.15);
    --bg-base: #060d06;
    --bg-dark: #080f08;
    --bg-card: rgba(10, 20, 10, 0.85);
    --bg-card2: rgba(15, 28, 15, 0.9);
    --bg-input: rgba(0, 200, 83, 0.06);
    --border: rgba(0, 200, 83, 0.2);
    --border-hover: rgba(0, 200, 83, 0.5);
    --text-primary: #f0fff4;
    --text-secondary: rgba(240, 255, 244, 0.65);
    --text-muted: rgba(240, 255, 244, 0.35);
    --danger: #ff4757;
    --warning: #ffa502;
    --info: #1e90ff;
    --gold: #ffd700;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 9999px;
    --shadow-glow: 0 0 30px rgba(0, 200, 83, 0.25);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-btn: 0 4px 20px rgba(0, 200, 83, 0.4);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Cairo', sans-serif;
    background: var(--bg-base);
    color: var(--text-primary);
    direction: rtl;
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 20% 10%, rgba(0, 200, 83, 0.12) 0%, transparent 60%),
        radial-gradient(ellipse 60% 40% at 80% 80%, rgba(0, 150, 60, 0.08) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-dark);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* ─── TYPOGRAPHY ─── */
h1 {
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 800;
}

h2 {
    font-size: clamp(1.4rem, 3vw, 2.2rem);
    font-weight: 700;
}

h3 {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    font-weight: 600;
}

h4 {
    font-size: 1.1rem;
    font-weight: 600;
}

p {
    color: var(--text-secondary);
}

a {
    text-decoration: none;
    color: inherit;
}

/* ─── LAYOUT ─── */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.page-wrapper {
    position: relative;
    z-index: 1;
}

/* ─── GLASS CARD ─── */
.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-card);
    transition: var(--transition);
}

.glass-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-glow), var(--shadow-card);
}

.glass-card-2 {
    background: var(--bg-card2);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    backdrop-filter: blur(16px);
}

/* ─── BUTTONS ─── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-full);
    font-family: 'Cairo', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #000;
    box-shadow: var(--shadow-btn);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 200, 83, 0.55);
    filter: brightness(1.1);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary-glass);
    box-shadow: var(--shadow-glow);
}

.btn-ghost {
    background: var(--primary-glass);
    color: var(--primary);
}

.btn-ghost:hover {
    background: var(--primary-glass-hover);
}

.btn-danger {
    background: linear-gradient(135deg, #ff4757, #ff6b81);
    color: #fff;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 71, 87, 0.4);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 16px 36px;
    font-size: 1.05rem;
}

.btn-icon {
    width: 42px;
    height: 42px;
    padding: 0;
    border-radius: var(--radius-md);
}

.btn-full {
    width: 100%;
}

/* ─── INPUTS ─── */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.input-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.input-field {
    background: var(--bg-input);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    padding: 13px 16px;
    font-family: 'Cairo', sans-serif;
    font-size: 0.95rem;
    color: var(--text-primary);
    transition: var(--transition);
    outline: none;
    width: 100%;
    direction: rtl;
}

.input-field::placeholder {
    color: var(--text-muted);
}

.input-field:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 200, 83, 0.15);
    background: rgba(0, 200, 83, 0.1);
}

.input-field:hover {
    border-color: rgba(0, 200, 83, 0.4);
}

select.input-field {
    cursor: pointer;
}

select.input-field option {
    background: #0d1a0d;
    color: var(--text-primary);
}

textarea.input-field {
    resize: vertical;
    min-height: 100px;
}

/* ─── BADGE ─── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
}

.badge-green {
    background: rgba(0, 200, 83, 0.15);
    color: var(--primary);
    border: 1px solid rgba(0, 200, 83, 0.3);
}

.badge-red {
    background: rgba(255, 71, 87, 0.15);
    color: var(--danger);
    border: 1px solid rgba(255, 71, 87, 0.3);
}

.badge-yellow {
    background: rgba(255, 165, 2, 0.15);
    color: var(--warning);
    border: 1px solid rgba(255, 165, 2, 0.3);
}

.badge-blue {
    background: rgba(30, 144, 255, 0.15);
    color: var(--info);
    border: 1px solid rgba(30, 144, 255, 0.3);
}

/* ─── NAVBAR ─── */
.navbar {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1000;
    padding: 0 24px;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(6, 13, 6, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

.navbar.scrolled {
    background: rgba(6, 13, 6, 0.97);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--primary);
    text-shadow: 0 0 20px var(--primary-glow);
    transition: var(--transition);
}

.nav-logo:active {
    transform: scale(0.95);
}

.nav-logo .logo-icon {
    font-size: 1.6rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link {
    padding: 10px 18px;
    border-radius: var(--radius-full);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-secondary);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    letter-spacing: 0.3px;
}

.nav-link:hover {
    color: var(--primary);
    background: var(--primary-glass);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 200, 83, 0.1);
}

.nav-link.active {
    color: var(--primary);
    background: var(--primary-glass);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-glow);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 20px;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: translateX(-50%) scaleX(1);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-balance {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--primary-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-weight: 700;
    color: var(--primary);
    font-size: 0.95rem;
}

.nav-balance .balance-amount {
    font-size: 1rem;
}

.nav-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: #000;
    cursor: pointer;
    border: 2px solid var(--border);
    transition: var(--transition-fast);
}

.nav-avatar:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 6px;
}

.hamburger span {
    width: 24px;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
    transition: var(--transition-fast);
}

/* ─── SIDEBAR (Dashboard) ─── */
.app-layout {
    display: flex;
    min-height: 100vh;
    padding-top: 68px;
}

.sidebar {
    width: 260px;
    min-height: calc(100vh - 68px);
    background: rgba(8, 15, 8, 0.95);
    border-left: 1px solid var(--border);
    padding: 24px 16px;
    position: fixed;
    top: 68px;
    right: 0;
    bottom: 0;
    overflow-y: auto;
    transition: var(--transition);
    z-index: 100;
}

.sidebar-section {
    margin-bottom: 28px;
}

.sidebar-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 0 12px;
    margin-bottom: 8px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: var(--radius-md);
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: var(--transition-fast);
    margin-bottom: 2px;
}

.sidebar-link:hover {
    color: var(--primary);
    background: var(--primary-glass);
}

.sidebar-link.active {
    color: var(--primary);
    background: var(--primary-glass);
    border: 1px solid var(--border);
}

.sidebar-link .icon {
    font-size: 1.1rem;
    width: 22px;
    text-align: center;
}

.main-content {
    flex: 1;
    margin-right: 260px;
    padding: 32px 28px;
}

/* ─── PAGE HEADER ─── */
.page-header {
    margin-bottom: 32px;
}

.page-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 6px;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.page-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 32px;
}

/* ─── STAT CARDS ─── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.stat-card {
    padding: 22px;
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--primary-glass);
    transform: translate(20px, -20px);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
    border-color: var(--border-hover);
}

.stat-icon {
    font-size: 1.8rem;
    margin-bottom: 12px;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.stat-change {
    font-size: 0.8rem;
    margin-top: 8px;
}

.stat-change.up {
    color: var(--primary);
}

.stat-change.down {
    color: var(--danger);
}

@media (max-width: 768px) {
    .navbar {
        padding: 0 12px;
        height: 60px;
    }

    .nav-balance {
        padding: 6px 10px;
        gap: 4px;
        font-size: 0.75rem;
    }

    .nav-balance .balance-amount {
        font-size: 0.8rem;
    }

    .nav-avatar {
        width: 30px;
        height: 30px;
        font-size: 0.75rem;
    }

    .nav-logo {
        font-size: 1rem;
        gap: 4px;
    }
}

/* ─── SERVICE GRID ─── */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
}

.service-card {
    padding: 24px 16px;
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    border: 1px solid var(--border);
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.service-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
    background: var(--primary-glass);
}

.service-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    background: var(--primary-glass);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.service-card:hover .service-icon {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
}

.service-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
}

.service-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* ─── PRODUCT CARDS ─── */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

.product-card {
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

.product-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    background: linear-gradient(135deg, rgba(0, 200, 83, 0.1), rgba(0, 150, 60, 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.product-body {
    padding: 16px;
}

.product-name {
    font-weight: 700;
    margin-bottom: 6px;
}

.product-price {
    color: var(--primary);
    font-weight: 800;
    font-size: 1.1rem;
}

.product-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
}

.product-seller {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.product-rating {
    font-size: 0.8rem;
    color: var(--gold);
}

/* ─── TABLE ─── */
.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: rgba(0, 200, 83, 0.08);
}

th {
    padding: 14px 16px;
    text-align: right;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

td {
    padding: 14px 16px;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(0, 200, 83, 0.08);
    color: var(--text-secondary);
    vertical-align: middle;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: rgba(0, 200, 83, 0.04);
}

/* ─── MODAL ─── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-card2);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 32px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(30px) scale(0.95);
    transition: var(--transition);
    box-shadow: var(--shadow-glow), var(--shadow-card);
}

.modal-overlay.open .modal {
    transform: translateY(0) scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.modal-title {
    font-size: 1.2rem;
    font-weight: 800;
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: var(--transition-fast);
}

.modal-close:hover {
    background: rgba(255, 71, 87, 0.15);
    color: var(--danger);
    border-color: var(--danger);
}

/* ─── TABS ─── */
.tabs {
    display: flex;
    gap: 4px;
    background: rgba(0, 200, 83, 0.05);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    padding: 4px;
    margin-bottom: 24px;
}

.tab-btn {
    flex: 1;
    padding: 9px 16px;
    border-radius: var(--radius-full);
    font-family: 'Cairo', sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-muted);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: var(--transition-fast);
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #000;
    box-shadow: var(--shadow-btn);
}

.tab-btn:hover:not(.active) {
    color: var(--primary);
    background: var(--primary-glass);
}

/* ─── ALERT / NOTIFICATION ─── */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: rgba(0, 200, 83, 0.12);
    border: 1px solid rgba(0, 200, 83, 0.3);
    color: var(--primary);
}

.alert-danger {
    background: rgba(255, 71, 87, 0.12);
    border: 1px solid rgba(255, 71, 87, 0.3);
    color: var(--danger);
}

.alert-warning {
    background: rgba(255, 165, 2, 0.12);
    border: 1px solid rgba(255, 165, 2, 0.3);
    color: var(--warning);
}

.alert-info {
    background: rgba(30, 144, 255, 0.12);
    border: 1px solid rgba(30, 144, 255, 0.3);
    color: var(--info);
}

/* ─── TOAST NOTIFICATIONS ─── */
#toast-container {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    padding: 14px 20px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 280px;
    backdrop-filter: blur(20px);
    animation: slideInLeft 0.3s ease, fadeOut 0.3s ease 2.7s forwards;
    box-shadow: var(--shadow-card);
}

.toast-success {
    background: rgba(0, 200, 83, 0.15);
    border: 1px solid rgba(0, 200, 83, 0.4);
    color: var(--primary);
}

.toast-error {
    background: rgba(255, 71, 87, 0.15);
    border: 1px solid rgba(255, 71, 87, 0.4);
    color: var(--danger);
}

.toast-info {
    background: rgba(30, 144, 255, 0.15);
    border: 1px solid rgba(30, 144, 255, 0.4);
    color: var(--info);
}

/* ─── STEP TRACKER ─── */
.steps {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 32px;
}

.step {
    display: flex;
    align-items: center;
    flex: 1;
}

.step-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    background: var(--bg-dark);
    transition: var(--transition);
    flex-shrink: 0;
}

.step.active .step-circle {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-glass);
    box-shadow: 0 0 15px var(--primary-glow);
}

.step.done .step-circle {
    border-color: var(--primary);
    background: var(--primary);
    color: #000;
}

.step-line {
    flex: 1;
    height: 2px;
    background: var(--border);
    margin: 0 8px;
}

.step.done .step-line {
    background: var(--primary);
}

.step-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 6px;
    text-align: center;
}

/* ─── HERO ─── */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 100px 20px 60px;
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 100% 70% at 50% 0%, rgba(0, 200, 83, 0.18) 0%, transparent 70%),
        radial-gradient(ellipse 60% 40% at 80% 100%, rgba(0, 150, 60, 0.1) 0%, transparent 60%);
}

.hero-grid {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(0, 200, 83, 0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(0, 200, 83, 0.04) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: var(--primary-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 28px;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 20px;
}

.hero-title .highlight {
    color: var(--primary);
    text-shadow: 0 0 40px var(--primary-glow);
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    gap: 40px;
    justify-content: center;
    margin-top: 60px;
    flex-wrap: wrap;
}

.hero-stat-value {
    font-size: 2rem;
    font-weight: 900;
    color: var(--primary);
}

/* ─── ENHANCED HERO ─── */
.hero-badge {
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
    0% {
        box-shadow: 0 0 10px rgba(0, 200, 83, 0.2);
    }

    50% {
        box-shadow: 0 0 25px rgba(0, 200, 83, 0.5);
    }

    100% {
        box-shadow: 0 0 10px rgba(0, 200, 83, 0.2);
    }
}

.service-card {
    transition: var(--transition);
    overflow: hidden;
    position: relative;
}

.service-card:active {
    transform: translateY(2px) scale(0.98);
}

.service-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transition: 0.5s;
}

.service-card:hover::after {
    left: 100%;
}

/* ─── SECTION ─── */
.section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-tag {
    display: inline-block;
    padding: 6px 16px;
    background: var(--primary-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 14px;
}

.section-title {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 800;
    margin-bottom: 12px;
}

.section-subtitle {
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto;
}

/* ─── DIVIDER ─── */
.divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
    margin: 32px 0;
}

/* ─── BALANCE WIDGET ─── */
.balance-widget {
    background: linear-gradient(135deg, rgba(0, 200, 83, 0.12), rgba(0, 150, 60, 0.08));
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 28px 32px;
    position: relative;
    overflow: hidden;
}

.balance-widget::before {
    content: '';
    position: absolute;
    top: -40px;
    left: -40px;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 200, 83, 0.15), transparent);
}

.balance-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 8px;
}

.balance-amount-big {
    font-size: 3rem;
    font-weight: 900;
    color: var(--primary);
    line-height: 1;
    text-shadow: 0 0 30px var(--primary-glow);
}

.balance-currency {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-right: 8px;
}

.balance-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
}

/* ─── TRANSFER STATUS ─── */
.transfer-status {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-radius: var(--radius-md);
    background: var(--primary-glass);
    border: 1px solid var(--border);
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-dot.pending {
    background: var(--warning);
    box-shadow: 0 0 10px var(--warning);
}

.status-dot.active {
    background: var(--primary);
    box-shadow: 0 0 10px var(--primary);
    animation: pulse 1.5s infinite;
}

.status-dot.done {
    background: var(--primary);
}

/* ─── FILTER BAR ─── */
.filter-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 24px;
    align-items: center;
}

.filter-chip {
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    background: var(--primary-glass);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.filter-chip:hover,
.filter-chip.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #000;
    border-color: var(--primary);
}

.search-bar {
    flex: 1;
    min-width: 200px;
    position: relative;
}

.search-bar input {
    padding-right: 42px;
}

.search-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1rem;
}

/* ─── UPLOAD AREA ─── */
.upload-area {
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg-input);
}

.upload-area:hover,
.upload-area.dragover {
    border-color: var(--primary);
    background: var(--primary-glass);
}

.upload-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.upload-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.upload-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 6px;
}

/* ─── FOOTER ─── */
footer {
    background: rgba(6, 13, 6, 0.95);
    border-top: 1px solid var(--border);
    padding: 48px 0 24px;
    margin-top: 80px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand .logo {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--primary);
    margin-bottom: 12px;
}

.footer-brand p {
    font-size: 0.88rem;
    color: var(--text-muted);
}

.footer-col h4 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.footer-col a {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    transition: var(--transition-fast);
}

.footer-col a:hover {
    color: var(--primary);
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    font-size: 0.82rem;
    color: var(--text-muted);
    flex-wrap: wrap;
    gap: 12px;
}

/* ─── ANIMATIONS ─── */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
        transform: translateX(-10px);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.6;
        transform: scale(1.3);
    }
}

@keyframes glow {

    0%,
    100% {
        box-shadow: 0 0 20px var(--primary-glow);
    }

    50% {
        box-shadow: 0 0 40px rgba(0, 200, 83, 0.5);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes countUp {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease forwards;
}

.animate-slide-up {
    animation: slideUp 0.5s ease forwards;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-glow {
    animation: glow 2s ease-in-out infinite;
}

.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.3s;
}

.delay-4 {
    animation-delay: 0.4s;
}

.delay-5 {
    animation-delay: 0.5s;
}

/* ─── LOADING SKELETON ─── */
.skeleton {
    background: linear-gradient(90deg, rgba(0, 200, 83, 0.05) 25%, rgba(0, 200, 83, 0.1) 50%, rgba(0, 200, 83, 0.05) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-md);
}

/* ─── RESPONSIVE ─── */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-right: 0;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 10px 15px;
    }

    .nav-logo {
        font-size: 1.2rem;
    }

    .nav-logo img {
        height: 32px !important;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: rgba(6, 13, 6, 0.98);
        flex-direction: column;
        padding: 20px;
        gap: 15px;
        border-bottom: 1px solid var(--border);
        backdrop-filter: blur(20px);
        z-index: 1000;
    }

    .navbar.active .nav-links {
        display: flex;
    }

    .nav-actions .btn {
        display: none;
        /* Hide large buttons on mobile */
    }

    .nav-actions .hamburger {
        display: flex;
    }

    .hero {
        padding: 100px 0 60px;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }

    .hero-stats {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        margin-top: 40px;
    }

    .hero-stat-value {
        font-size: 1.5rem;
    }

    .balance-widget div:first-child {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .balance-actions {
        flex-direction: column;
        width: 100%;
    }

    .balance-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .modal {
        padding: 20px;
        width: 95%;
    }

    .balance-amount-big {
        font-size: 2rem;
    }

    .main-content {
        padding: 15px 12px 100px;
        /* Add padding for bottom nav */
    }

    /* ─── PREMIUM BOTTOM NAVIGATION ─── */
    .bottom-nav {
        display: flex;
        position: fixed;
        bottom: 20px;
        left: 20px;
        right: 20px;
        height: 65px;
        background: rgba(10, 25, 10, 0.75);
        backdrop-filter: blur(25px) saturate(180%);
        -webkit-backdrop-filter: blur(25px) saturate(180%);
        border: 1px solid rgba(0, 200, 83, 0.25);
        border-radius: 30px;
        z-index: 1000;
        justify-content: space-around;
        align-items: center;
        padding: 0 10px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 0 15px rgba(0, 200, 83, 0.05);
        animation: slideUpNav 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    }

    @keyframes slideUpNav {
        from {
            transform: translateY(100px);
            opacity: 0;
        }

        to {
            transform: translateY(0);
            opacity: 1;
        }
    }

    .bottom-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        color: var(--text-secondary);
        text-decoration: none;
        font-size: 0.7rem;
        font-weight: 700;
        gap: 4px;
        transition: all 0.3s ease;
        flex: 1;
        height: 100%;
        position: relative;
    }

    .bottom-nav-item .icon {
        font-size: 1.4rem;
        transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }

    .bottom-nav-item.active {
        color: var(--primary);
    }

    .bottom-nav-item.active .icon {
        transform: translateY(-8px);
        text-shadow: 0 0 15px var(--primary-glow);
    }

    .bottom-nav-item.active::after {
        content: '';
        position: absolute;
        bottom: 8px;
        width: 5px;
        height: 5px;
        background: var(--primary);
        border-radius: 50%;
        box-shadow: 0 0 10px var(--primary);
    }

    /* Enhance Touch Targets */
    .btn,
    .sidebar-link,
    .service-card,
    .filter-chip {
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .btn:active {
        transform: scale(0.96);
    }

    /* Improved Sidebar glass for mobile */
    .sidebar.open,
    .admin-sidebar.open {
        background: rgba(4, 12, 4, 0.95);
        backdrop-filter: blur(30px);
        border-right: 1px solid rgba(0, 200, 83, 0.1);
        box-shadow: -20px 0 50px rgba(0, 0, 0, 0.8);
    }
}

@media (max-width: 480px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .tabs {
        flex-wrap: wrap;
    }
}

/* ─── FILTER BAR ─── */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.filter-chip {
    padding: 7px 16px;
    border-radius: var(--radius-full);
    background: var(--bg-card);
    border: 1px solid var(--border);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
    white-space: nowrap;
}

.filter-chip:hover,
.filter-chip.active {
    background: var(--primary);
    color: #000;
    border-color: var(--primary);
}

/* ─── SEARCH BAR ─── */
.search-bar {
    position: relative;
    flex: 1;
    min-width: 200px;
}

.search-bar .input-field {
    padding-right: 40px;
}

.search-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    pointer-events: none;
}

/* ─── AMOUNT PRESETS ─── */
.amount-presets {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.preset-btn {
    padding: 6px 14px;
    border-radius: var(--radius-full);
    background: var(--primary-glass);
    border: 1px solid var(--border);
    color: var(--primary);
    font-family: 'Cairo', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-fast);
}

.preset-btn:hover {
    background: var(--primary);
    color: #000;
    border-color: var(--primary);
}

/* ─── BUTTON VARIANTS ─── */
.btn-danger {
    background: linear-gradient(135deg, var(--danger), #ff1a2e);
    color: #fff;
    border: none;
    box-shadow: 0 4px 15px rgba(255, 71, 87, 0.3);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 71, 87, 0.45);
}

.btn-full {
    width: 100%;
}

/* ─── GLASS CARD ─── */
.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

/* ─── GOLD COLOR ─── */
:root {
    --gold: #ffd700;
}

/* ─── ADMIN RESPONSIVE ─── */
@media (max-width: 1024px) {
    .admin-sidebar {
        transform: translateX(100%);
        transition: transform 0.3s ease;
    }

    .admin-sidebar.open {
        transform: translateX(0);
    }

    .admin-main {
        margin-right: 0;
    }
}

@media (max-width: 768px) {
    .admin-main {
        padding: 20px 16px;
    }

    .filter-bar {
        gap: 6px;
    }
}

/* ─── CHAT WIDGET REFINEMENTS 💬 ─── */
.chat-widget-btn {
    left: 14px !important;
    /* تحريكه لليسار أكثر */
}

.chat-window {
    left: 14px !important;
    width: 320px !important;
}

@media (max-width: 600px) {
    .chat-window {
        left: 10px !important;
        right: 10px !important;
        width: auto !important;
        bottom: 85px !important;
    }

    .chat-input-area .btn-primary {
        padding: 0 20px !important;
        /* تكبير زر الإرسال */
        font-size: 1.2rem !important;
    }
}

/* ─── MOBILE BOTTOM NAV 📱 ─── */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: rgba(10, 25, 10, 0.75);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    display: none;
    /* يظهر فقط في الموبايل */
    align-items: center;
    justify-content: space-around;
    padding: 0 10px;
    border-top: 1px solid var(--border);
    z-index: 1000;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.4);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 700;
    transition: var(--transition);
    flex: 1;
    padding: 8px 0;
    text-decoration: none;
}

.nav-item .nav-icon {
    font-size: 1.4rem;
    transition: var(--transition);
}

.nav-item.active {
    color: var(--primary);
}

.nav-item.active .nav-icon {
    transform: translateY(-5px);
    filter: drop-shadow(0 0 8px var(--primary-glow));
}

@media (max-width: 1024px) {
    .mobile-bottom-nav {
        display: flex;
    }

    .sidebar {
        /* إرجاع السايدبار ليعمل مع الهامبرجر */
        display: block !important;
        transform: translateX(100%);
        transition: var(--transition);
        z-index: 2000;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-right: 0 !important;
        padding-bottom: 90px !important;
        /* مساحة للشريط السفلي */
    }

    .navbar .hamburger {
        display: flex !important;
        /* إرجاع الهامبرجر */
    }

    /* تأكيد ظهور الجرس فوق في الموبايل */
    .nav-actions a[href="notifications.html"] {
        display: flex !important;
    }
}

/* ─── ADMIN NAV REFINEMENTS 🛡️ ─── */
.nav-avatar.admin-style {
    border-radius: var(--radius-md) !important;
    /* شكل مربع بزوايا دائرية وليس دائرة كاملة */
}

/* عكس اتجاه الناف بار في الإدمن لوضع الأيقونة يميناً */
.navbar.admin-nav {
    flex-direction: row-reverse !important;
}

.navbar.admin-nav .nav-actions {
    flex-direction: row-reverse !important;
    /* ترتيب العناصر داخل الأكشنز أيضاً */
}