/* assets/css/style.css */

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --success: #10b981;
    --success-dark: #059669;
    --warning: #f59e0b;
    --warning-dark: #d97706;
    --danger: #ef4444;
    --danger-dark: #dc2626;
    --info: #3b82f6;
    --dark: #0f172a;
    --darker: #0a0f1e;
    --light: #f8fafc;
    --gray: #94a3b8;
    --gray-light: #e2e8f0;
    --gray-dark: #334155;
    --card-bg: rgba(255, 255, 255, 0.02);
    --card-border: rgba(255, 255, 255, 0.05);
    --header-height: 70px;
    --header-height-mobile: 60px;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: 'Cairo', sans-serif;
    background: var(--dark);
    color: var(--light);
    min-height: 100vh;
    overflow-x: hidden;
    width: 100%;
    position: relative;
    line-height: 1.6;
}

/* Main Header */
.main-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--darker);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--card-border);
    height: var(--header-height);
    width: 100%;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

/* Header Left */
.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--light);
    font-size: 1.5rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.mobile-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.05);
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 45px;
    width: auto;
    max-width: 150px;
    object-fit: contain;
}

/* Header Center - Search */
.header-center {
    flex: 1;
    max-width: 500px;
    margin: 0 15px;
}

.search-form {
    position: relative;
    width: 100%;
}

.search-form input {
    width: 100%;
    height: 45px;
    padding: 0 45px 0 15px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    color: var(--light);
    font-size: 0.95rem;
    font-family: 'Cairo', sans-serif;
    transition: all 0.3s;
}

.search-form input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.1);
}

.search-form input::placeholder {
    color: var(--gray-dark);
}

.search-form button {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gray);
    font-size: 1rem;
    cursor: pointer;
    transition: color 0.3s;
    padding: 8px;
}

.search-form button:hover {
    color: var(--primary);
}

/* Header Right */
.header-right {
    flex-shrink: 0;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Buttons & Icons */
.btn-icon {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    color: var(--light);
    cursor: pointer;
    position: relative;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    text-decoration: none;
}

.btn-icon:hover {
    background: rgba(37, 99, 235, 0.1);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

.btn-icon .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger);
    color: white;
    padding: 2px 6px;
    border-radius: 20px;
    font-size: 0.7rem;
    min-width: 18px;
    text-align: center;
    font-weight: 600;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.btn-icon img {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    object-fit: cover;
}

.user-btn {
    padding: 0;
    overflow: hidden;
}

.current-currency {
    margin-right: 5px;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border-radius: 12px;
    border: none;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'Cairo', sans-serif;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: white;
    height: 45px;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    height: 45px;
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: var(--danger-dark);
    transform: translateY(-2px);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: var(--success-dark);
    transform: translateY(-2px);
}

.btn-block {
    width: 100%;
}

.btn-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s;
}

.btn-link:hover {
    gap: 8px;
    color: var(--primary-light);
}

/* Dropdown */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 10px;
    background: var(--darker);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    min-width: 250px;
    max-width: 350px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
    z-index: 1001;
    overflow: hidden;
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    color: var(--light);
    text-decoration: none;
    transition: all 0.3s;
    font-size: 0.95rem;
    border-bottom: 1px solid var(--card-border);
}

.dropdown-menu a:last-child {
    border-bottom: none;
}

.dropdown-menu a:hover {
    background: rgba(37, 99, 235, 0.1);
}

.dropdown-menu a i {
    width: 20px;
    color: var(--gray);
    font-size: 1rem;
}

.dropdown-menu .text-danger {
    color: var(--danger);
}

.dropdown-menu .text-danger i {
    color: var(--danger);
}

.dropdown-divider {
    height: 1px;
    background: var(--card-border);
    margin: 5px 0;
}

.dropdown-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dropdown-header h4 {
    font-size: 1rem;
    color: var(--light);
    margin: 0;
}

.dropdown-header a {
    padding: 0;
    font-size: 0.85rem;
    color: var(--primary);
    border: none;
}

.dropdown-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--card-border);
    text-align: center;
}

.dropdown-footer a {
    padding: 0;
    justify-content: center;
    color: var(--primary);
    border: none;
}

.notifications-dropdown {
    width: 350px;
    left: auto;
    right: 0;
}

.notifications-list {
    max-height: 350px;
    overflow-y: auto;
}

.notification-item {
    padding: 15px 20px;
    border-bottom: 1px solid var(--card-border);
    display: flex;
    gap: 12px;
    text-decoration: none;
    transition: all 0.3s;
}

.notification-item:hover {
    background: rgba(37, 99, 235, 0.05);
}

.notification-item.unread {
    background: rgba(37, 99, 235, 0.05);
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(37, 99, 235, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    flex-shrink: 0;
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-weight: 600;
    color: var(--light);
    margin-bottom: 5px;
    font-size: 0.95rem;
}

.notification-message {
    font-size: 0.85rem;
    color: var(--gray);
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notification-time {
    font-size: 0.7rem;
    color: var(--gray-dark);
}

.user-info-header {
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--card-border);
}

.user-info-header img {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    object-fit: cover;
}

.user-info-header .user-name {
    font-weight: 600;
    color: var(--light);
    margin-bottom: 3px;
}

.user-info-header .user-email {
    font-size: 0.8rem;
    color: var(--gray);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 350px;
    height: 100vh;
    background: var(--darker);
    z-index: 1002;
    transition: right 0.3s ease;
    overflow-y: auto;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.5);
}

.mobile-menu.show {
    right: 0;
}

.mobile-menu-header {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--card-border);
    position: sticky;
    top: 0;
    background: var(--darker);
    z-index: 1;
}

.mobile-menu-header img {
    height: 40px;
    width: auto;
}

.mobile-menu-header .close-btn {
    background: none;
    border: none;
    color: var(--light);
    font-size: 1.5rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu-header .close-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

.mobile-menu-body {
    padding: 20px;
}

.mobile-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: rgba(37, 99, 235, 0.1);
    border-radius: 16px;
    margin-bottom: 20px;
}

.mobile-user-info img {
    width: 55px;
    height: 55px;
    border-radius: 14px;
    object-fit: cover;
}

.mobile-user-info .user-name {
    font-weight: 600;
    color: var(--light);
    font-size: 1.1rem;
    margin-bottom: 3px;
}

.mobile-user-info .user-email {
    font-size: 0.85rem;
    color: var(--gray);
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.mobile-nav a {
    padding: 15px;
    color: var(--light);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 15px;
    border-radius: 12px;
    transition: all 0.3s;
    font-size: 1rem;
}

.mobile-nav a:hover {
    background: rgba(37, 99, 235, 0.1);
}

.mobile-nav a i {
    width: 24px;
    color: var(--gray);
    font-size: 1.2rem;
}

.mobile-nav hr {
    margin: 15px 0;
    border: none;
    border-top: 1px solid var(--card-border);
}

.mobile-nav .text-danger {
    color: var(--danger);
}

.mobile-nav .text-danger i {
    color: var(--danger);
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1001;
    display: none;
    backdrop-filter: blur(3px);
}

.overlay.show {
    display: block;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* Dashboard Container */
.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Page Header */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.header-content h1 {
    color: var(--light);
    font-size: 2rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-content h1 i {
    color: var(--primary);
    background: rgba(37, 99, 235, 0.1);
    padding: 10px;
    border-radius: 14px;
}

.header-content p {
    color: var(--gray);
    font-size: 1rem;
}

.header-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* Search Box */
.search-box {
    position: relative;
    min-width: 280px;
}

.search-box i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
    font-size: 1rem;
}

.search-box input {
    width: 100%;
    padding: 12px 45px 12px 15px;
    background: var(--darker);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    color: var(--light);
    font-size: 0.95rem;
    font-family: 'Cairo', sans-serif;
    transition: all 0.3s;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.05);
}

.search-box input::placeholder {
    color: var(--gray-dark);
}

/* Welcome Section */
.welcome-section {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 30px;
    padding: 30px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(37, 99, 235, 0.2);
}

.welcome-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1));
    transform: rotate(45deg);
    animation: shine 8s infinite;
}

@keyframes shine {
    0% { transform: rotate(45deg) translateX(-100%); }
    100% { transform: rotate(45deg) translateX(100%); }
}

.welcome-content {
    position: relative;
    z-index: 1;
}

.welcome-content h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.welcome-content p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
}

/* Subscription Badge */
.subscription-badge {
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 20px;
    min-width: 250px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.plan-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: white;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.plan-remaining {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 8px;
}

.plan-expiry {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Agent Badge */
.agent-badge {
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 15px 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.agent-badge img {
    width: 50px;
    height: 50px;
    border-radius: 15px;
    object-fit: cover;
    border: 2px solid white;
}

.agent-badge .label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 3px;
}

.agent-badge .name {
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    display: flex;
    align-items: center;
    gap: 5px;
}

.agent-badge .name .verified {
    color: #fbbf24;
    font-size: 0.9rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stats-grid.small {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.stat-card {
    background: var(--darker);
    border-radius: 24px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    border: 1px solid var(--card-border);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.02));
    pointer-events: none;
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 20px 30px -10px rgba(37, 99, 235, 0.2);
}

.stat-icon {
    width: 70px;
    height: 70px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.stat-icon::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.stat-content {
    flex: 1;
}

.stat-label {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-value {
    color: var(--light);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 5px;
    line-height: 1.2;
}

.stat-details {
    display: flex;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--gray);
}

.stat-details i {
    color: var(--primary);
}

.stat-change {
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 3px;
}

.stat-change.positive {
    color: var(--success);
}

.stat-change.negative {
    color: var(--danger);
}

.stat-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s;
}

.stat-link:hover {
    gap: 8px;
    color: var(--primary-light);
}

/* Badges */
.badge {
    padding: 5px 12px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
    white-space: nowrap;
}

.badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.badge-info {
    background: rgba(59, 130, 246, 0.15);
    color: var(--info);
}

/* Status Badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 30px;
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.05);
}

.status-badge.online i {
    color: var(--success);
}

.status-badge.offline i {
    color: var(--gray);
}

/* User Cell */
.user-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 35px;
    height: 35px;
    border-radius: 10px;
    object-fit: cover;
}

.user-avatar.small {
    width: 25px;
    height: 25px;
}

.user-name {
    color: var(--light);
    font-weight: 500;
    margin-bottom: 2px;
}

.user-email {
    color: var(--gray);
    font-size: 0.8rem;
}

/* Table Styles */
.table-responsive {
    overflow-x: auto;
    margin: 0;
    padding: 0;
}

.table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.table th {
    text-align: right;
    padding: 12px 10px;
    color: var(--gray);
    font-weight: 500;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--card-border);
}

.table td {
    padding: 12px 10px;
    color: var(--light);
    border-bottom: 1px solid var(--card-border);
}

.table tbody tr {
    transition: all 0.3s;
}

.table tbody tr:hover {
    background: rgba(37, 99, 235, 0.05);
}

/* Charts Grid */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.chart-card {
    background: var(--darker);
    border-radius: 24px;
    border: 1px solid var(--card-border);
    overflow: hidden;
    transition: all 0.3s;
}

.chart-card:hover {
    border-color: var(--primary);
    box-shadow: 0 20px 30px -10px rgba(37, 99, 235, 0.1);
}

.chart-header {
    padding: 20px;
    border-bottom: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.chart-header h3 {
    color: var(--light);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chart-header h3 i {
    color: var(--primary);
}

.chart-filter {
    padding: 8px 15px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    color: var(--light);
    font-size: 0.9rem;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
}

.chart-body {
    padding: 20px;
    height: 300px;
    position: relative;
}

/* Recent Grid */
.recent-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.recent-card {
    background: var(--darker);
    border-radius: 24px;
    border: 1px solid var(--card-border);
    overflow: hidden;
    transition: all 0.3s;
}

.recent-card:hover {
    border-color: var(--primary);
}

.card-header {
    padding: 20px;
    border-bottom: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.card-header h3 {
    color: var(--light);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-header h3 i {
    color: var(--primary);
}

.card-body {
    padding: 20px;
}

/* Customers List */
.customers-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.customer-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 16px;
    transition: all 0.3s;
    border: 1px solid transparent;
}

.customer-item:hover {
    background: rgba(37, 99, 235, 0.05);
    border-color: var(--primary);
    transform: translateX(-5px);
}

.customer-item img {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    object-fit: cover;
}

.customer-info {
    flex: 1;
}

.customer-name {
    color: var(--light);
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 1rem;
}

.customer-meta {
    display: flex;
    gap: 15px;
    color: var(--gray);
    font-size: 0.8rem;
}

.customer-meta i {
    color: var(--primary);
    margin-left: 3px;
}

/* Orders List */
.orders-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.order-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 16px;
    transition: all 0.3s;
    border: 1px solid transparent;
}

.order-item:hover {
    background: rgba(37, 99, 235, 0.05);
    border-color: var(--primary);
    transform: translateX(-5px);
}

.order-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    background: rgba(37, 99, 235, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.5rem;
    flex-shrink: 0;
}

.order-info {
    flex: 1;
}

.order-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.order-number {
    font-weight: 600;
    color: var(--light);
}

.order-date {
    font-size: 0.8rem;
    color: var(--gray);
}

.order-details {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.product-name {
    color: var(--light);
    font-weight: 500;
}

.order-amount {
    font-weight: 600;
    color: var(--primary);
}

.order-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Order Card */
.order-card {
    background: var(--darker);
    border-radius: 20px;
    border: 1px solid var(--card-border);
    overflow: hidden;
    margin-bottom: 20px;
}

.order-header {
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--card-border);
}

.order-number .label {
    color: var(--gray);
    margin-left: 5px;
}

.order-number .value {
    color: var(--primary);
    font-weight: 600;
}

.order-body {
    padding: 20px;
}

.product-info {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.product-image {
    width: 80px;
    height: 80px;
    border-radius: 14px;
    object-fit: cover;
}

.product-image-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 14px;
    background: rgba(37, 99, 235, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 2rem;
}

.product-details {
    flex: 1;
}

.product-name {
    color: var(--light);
    margin-bottom: 8px;
}

.product-meta {
    display: flex;
    gap: 15px;
    color: var(--gray);
    font-size: 0.9rem;
}

.order-details {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 14px;
    padding: 15px;
    margin-bottom: 15px;
}

.detail-row {
    display: flex;
    padding: 8px 0;
}

.detail-label {
    width: 100px;
    color: var(--gray);
}

.detail-value {
    flex: 1;
    color: var(--light);
}

.order-total {
    text-align: left;
    padding-top: 15px;
    border-top: 1px solid var(--card-border);
}

.total-label {
    color: var(--gray);
    margin-left: 10px;
}

.total-amount {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
}

.order-footer {
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 10px;
    border-top: 1px solid var(--card-border);
}

/* Agent Card */
.agent-card {
    background: var(--darker);
    border-radius: 24px;
    border: 1px solid var(--card-border);
    overflow: hidden;
    margin-top: 30px;
}

.agent-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.agent-header h3 {
    color: var(--light);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.agent-header h3 i {
    color: var(--primary);
}

.agent-body {
    padding: 20px;
    display: flex;
    gap: 20px;
}

.agent-body img {
    width: 100px;
    height: 100px;
    border-radius: 20px;
    object-fit: cover;
    border: 3px solid var(--primary);
}

.agent-details {
    flex: 1;
}

.agent-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--light);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.agent-name .verified {
    color: var(--primary);
    font-size: 1.2rem;
}

.agent-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.agent-stats .stat {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--gray);
    font-size: 0.95rem;
}

.agent-stats .stat .value {
    color: var(--light);
    font-weight: 600;
    margin-right: 5px;
}

.agent-contact {
    display: flex;
    gap: 10px;
}

/* Quick Actions */
.quick-actions {
    margin-top: 30px;
}

.quick-actions h3 {
    color: var(--light);
    margin-bottom: 20px;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.quick-actions h3 i {
    color: var(--primary);
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 15px;
}

.action-card {
    background: var(--darker);
    border-radius: 20px;
    padding: 25px 20px;
    text-align: center;
    text-decoration: none;
    border: 1px solid var(--card-border);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.action-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(37, 99, 235, 0.03), transparent);
    transform: rotate(45deg);
    transition: all 0.6s;
}

.action-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 20px 30px -10px rgba(37, 99, 235, 0.2);
}

.action-card:hover::before {
    transform: rotate(45deg) translateX(50%);
}

.action-card i {
    font-size: 2.2rem;
    color: var(--primary);
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

.action-card span {
    display: block;
    color: var(--light);
    font-weight: 600;
    font-size: 1rem;
    position: relative;
    z-index: 1;
}

.action-card .badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--danger);
    color: white;
    padding: 3px 8px;
    border-radius: 30px;
    font-size: 0.7rem;
    z-index: 2;
}

/* Filters Card */
.filters-card {
    background: var(--darker);
    border-radius: 24px;
    padding: 25px;
    margin-bottom: 30px;
    border: 1px solid var(--card-border);
}

.filters-form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 15px;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-group label {
    display: block;
    color: var(--gray);
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.filter-group select,
.filter-group input {
    width: 100%;
    padding: 12px 15px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    color: var(--light);
    font-size: 0.95rem;
    font-family: 'Cairo', sans-serif;
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: var(--primary);
}

.filter-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 5px;
}

.action-buttons .btn-icon {
    width: 35px;
    height: 35px;
    font-size: 1rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
}

.page-link {
    padding: 10px 15px;
    border-radius: 12px;
    background: var(--darker);
    color: var(--light);
    text-decoration: none;
    border: 1px solid var(--card-border);
    transition: all 0.3s;
    min-width: 45px;
    text-align: center;
}

.page-link:hover,
.page-link.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state i {
    color: var(--gray);
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    color: var(--light);
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.empty-state p {
    color: var(--gray);
    margin-bottom: 25px;
}

/* Loading Spinner */
.loading-spinner-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Toast Messages */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    left: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    max-width: 400px;
    margin: 0 auto;
}

.toast {
    padding: 15px 20px;
    border-radius: 16px;
    color: white;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    pointer-events: auto;
    font-size: 0.95rem;
    backdrop-filter: blur(10px);
}

.toast.success {
    background: rgba(16, 185, 129, 0.95);
}

.toast.error {
    background: rgba(239, 68, 68, 0.95);
}

.toast.warning {
    background: rgba(245, 158, 11, 0.95);
}

.toast.info {
    background: rgba(37, 99, 235, 0.95);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--darker);
    border-radius: 24px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--card-border);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    background: var(--darker);
    z-index: 1;
}

.modal-header h3 {
    color: var(--light);
}

.close-btn {
    background: none;
    border: none;
    color: var(--gray);
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.3s;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--danger);
}

.modal-body {
    padding: 20px;
}

/* Contact Info */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.contact-info i {
    width: 16px;
    color: var(--primary);
}

/* Location Info */
.location-info small {
    color: var(--gray);
    font-size: 0.7rem;
}

/* Date Info */
.date-info small {
    color: var(--gray);
    font-size: 0.7rem;
}

/* Responsive */
@media (max-width: 992px) {
    .header-center {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .charts-grid {
        grid-template-columns: 1fr;
    }
    
    .recent-grid {
        grid-template-columns: 1fr;
    }
    
    .welcome-section {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .subscription-badge,
    .agent-badge {
        width: 100%;
    }
    
    .header-actions {
        gap: 5px;
    }
}

@media (max-width: 768px) {
    .main-header {
        height: var(--header-height-mobile);
    }
    
    .logo img {
        height: 35px;
    }
    
    .btn-icon {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
    
    .btn {
        height: 40px;
        padding: 8px 15px;
        font-size: 0.9rem;
    }
    
    .main-content {
        padding: 15px;
    }
    
    .dashboard-container {
        padding: 15px;
    }
    
    .welcome-content h1 {
        font-size: 1.8rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .stat-value {
        font-size: 1.8rem;
    }
    
    .actions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .chart-body {
        height: 250px;
    }
    
    .filters-form {
        flex-direction: column;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .filter-actions button,
    .filter-actions a {
        width: 100%;
    }
    
    .order-item {
        flex-wrap: wrap;
    }
    
    .order-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .agent-body {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .agent-stats {
        justify-content: center;
    }
    
    .agent-contact {
        justify-content: center;
    }
    
    .order-footer {
        flex-wrap: wrap;
    }
    
    .notifications-dropdown {
        width: 300px;
    }
}

@media (max-width: 480px) {
    .btn-text {
        display: none;
    }
    
    .current-currency {
        display: none;
    }
    
    .btn-icon {
        width: 38px;
        height: 38px;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .search-box {
        min-width: 100%;
    }
    
    .actions-grid {
        grid-template-columns: 1fr;
    }
    
    .action-card {
        padding: 20px;
    }
    
    .table td,
    .table th {
        padding: 10px 8px;
        font-size: 0.85rem;
    }
    
    .customer-meta {
        flex-wrap: wrap;
    }
    
    .product-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .product-meta {
        justify-content: center;
    }
    
    .agent-stats {
        flex-direction: column;
        gap: 10px;
    }
    
    .detail-row {
        flex-direction: column;
    }
    
    .detail-label {
        width: auto;
        margin-bottom: 5px;
    }
    
    .notifications-dropdown {
        width: calc(100vw - 40px);
        right: 10px;
    }
    
    .toast-container {
        right: 10px;
        left: 10px;
    }
}

/* RTL Support */
[dir="rtl"] .customer-item:hover {
    transform: translateX(5px);
}

[dir="rtl"] .order-item:hover {
    transform: translateX(5px);
}

[dir="rtl"] .btn-link i,
[dir="rtl"] .stat-link i {
    transform: rotate(180deg);
}

[dir="rtl"] .pagination .page-link i {
    transform: rotate(180deg);
}

[dir="rtl"] .order-total {
    text-align: right;
}

[dir="rtl"] .detail-label {
    margin-left: 10px;
    margin-right: 0;
}

/* Touch Optimizations */
@media (hover: none) and (pointer: coarse) {
    .btn:hover,
    .btn-icon:hover,
    .action-card:hover,
    .stat-card:hover,
    .customer-item:hover,
    .order-item:hover {
        transform: none;
    }
    
    .btn:active,
    .btn-icon:active {
        transform: scale(0.95);
    }
}

/* Safe Area for Notched Phones */
@supports (padding: max(0px)) {
    .main-header {
        padding-top: env(safe-area-inset-top);
    }
    
    .mobile-menu {
        padding-top: env(safe-area-inset-top);
    }
    
    .modal-content {
        padding-bottom: max(20px, env(safe-area-inset-bottom));
    }
    
    .toast-container {
        top: max(20px, env(safe-area-inset-top));
    }
}