* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.admin-customers-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #0ea5e9 0%, #10b981 100%);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.filter-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 220px;
}

.filter-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.filter-label i {
    color: #2563eb;
    font-size: 14px;
}

.filter-select {
    font-size: 14px;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    background-color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-select:hover {
    border-color: #2563eb;
}

.filter-select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Main Container */
.customers-main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px;
}

/* Header Styles */
.customers-header {
    margin-bottom: 20px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 16px;
}

.header-title-section {
    flex: 1;
    min-width: 300px;
}

.page-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
    color: #0a0e27;
    font-size: 30px;
    font-weight: 900;
    letter-spacing: -0.8px;
    line-height: 1.2;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.title-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 22px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.customers-count {
    background: #e2e8f0;
    color: #64748b;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.page-subtitle {
    color: #64748b;
    font-size: 16px;
    margin-top: 4px;
}

/* Button Styles */
.btn {
    padding: 12px 24px;
    border-radius: 10px;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-create {
    background: linear-gradient(135deg, #52a876, #10b981);
    color: white;
    padding: 14px 28px;
    font-size: 15px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

.btn-create:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(14, 165, 233, 0.4);
}

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

.header-actions {
    display: flex;
    align-items: center;
}

/* Stats Grid */
.stats-grid {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    overflow-x: auto;
    padding: 4px 4px 12px 4px;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
    -webkit-overflow-scrolling: touch;
}

.stats-grid::-webkit-scrollbar {
    height: 6px;
}

.stats-grid::-webkit-scrollbar-track {
    background: transparent;
}

.stats-grid::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 20px;
}

.stat-card {
    flex: 1;
    min-width: 240px;
    background: white;
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #f1f5f9;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.stat-icon.admin {
    background: #e0f2fe;
    color: #0ea5e9;
}

.stat-icon.seller {
    background: #dcfce7;
    color: #22c55e;
}

.stat-icon.customer {
    background: #f1f5f9;
    color: #64748b;
}

.stat-icon.total {
    background: #f5f3ff;
    color: #8b5cf6;
}

.stat-icon.active {
    background: #ecfdf5;
    color: #10b981;
}

.stat-icon.info {
    background: #e0f2fe;
    color: #0ea5e9;
}

.stat-icon.success {
    background: #dcfce7;
    color: #22c55e;
}

.stat-icon.warning {
    background: #fff7ed;
    color: #f59e0b;
}

.stat-icon.error {
    background: #fef2f2;
    color: #ef4444;
}

.stat-icon.discount {
    background: #fefce8;
    color: #eab308;
}

.stat-icon.available {
    background: #f0fdf4;
    color: #16a34a;
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 4px;
}

.stat-label {
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
}

/* Content Card */
.content-card {
    background: white;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

/* Toolbar */
.table-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.search-container {
    flex: 1;
    min-width: 300px;
}

.search-input-wrapper {
    position: relative;
    max-width: 400px;
}

.search-input {
    width: 100%;
    padding: 14px 48px 14px 16px;
    border: 2px solid #d1d5db;
    border-radius: 12px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #f9fafb;
    font-weight: 600;
    color: #0a0e27;
    letter-spacing: 0.2px;
}

.search-input:focus {
    outline: none;
    border-color: #0ea5e9;
    background: white;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

.search-clear-btn {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.search-clear-btn:hover {
    color: #ef4444;
    background: #fef2f2;
}

.btn-refresh {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    background: white;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-refresh:hover {
    border-color: #0ea5e9;
    color: #0ea5e9;
    transform: rotate(45deg);
}

/* Loading State */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
}

.loading-spinner {
    margin-bottom: 20px;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e2e8f0;
    border-top-color: #0ea5e9;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-text {
    color: #64748b;
    font-size: 16px;
    font-weight: 500;
}

/* Empty State */
.empty-state {
    text-align: center;
    align-items: center;
    justify-content: center;
}

.empty-icon {
    font-size: 64px;
    color: #cbd5e1;
    margin-bottom: 24px;
}

.empty-title {
    color: #1e293b;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 12px;
}

.empty-description {
    color: #64748b;
    font-size: 16px;
    margin-bottom: 24px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.btn-clear-search,
.btn-create-customer {
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-clear-search {
    background: #f1f5f9;
    color: #475569;
    border: none;
}

.btn-clear-search:hover {
    background: #e2e8f0;
}

.btn-create-customer {
    background: linear-gradient(135deg, #0ea5e9, #10b981);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

.btn-create-customer:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(14, 165, 233, 0.4);
}

.sort-header-btn {
    background: none;
    border: none;
    font-size: 16px;
    /* تكبير حجم الخط */
    font-weight: 700;
    /* زيادة سماكة الخط */
    color: #111827;
    /* لون أغمق لظهور أوضح */
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    /* مسافة أفضل بين النص والأيقونة */
    padding: 4px 6px;
    /* مساحة خفيفة لراحة العين */
}

.sort-header-btn:hover {
    color: #2563eb;
    /* لون واضح عند المرور */
}

.sort-header-btn:focus {
    outline: none;
    text-decoration: underline;
}

/* Customers Table */
.table-container {
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    background: white;
}

.customers-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1000px;
}

.customers-table thead {
    background: #f3f4f6;
    border-bottom: 2px solid #d1d5db;
}

.customers-table th {
    padding: 12px 10px;
    text-align: right;
    font-size: 12px;
    font-weight: 900;
    color: #0a0e27;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: #e5e7eb;
    border-bottom: 3px solid #9ca3af;
}

.customers-table tbody tr {
    border-bottom: 1px solid #e5e7eb;
    transition: background-color 0.2s ease;
    height: 40px;
}

.customers-table tbody tr:hover {
    background: #f9fafb;
}

.customers-table td {
    vertical-align: middle;
    padding: 5px 3px;
    font-size: 13px;
    font-weight: 600;
    color: #1f2937;
    letter-spacing: 0.2px;
}

/* Customer Info Cells */
.customer-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.customer-avatar {
    width: 30px;
    height: 30px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    color: white;
    flex-shrink: 0;
}

.avatar-admin {
    background: linear-gradient(135deg, #0ea5e9, #3b82f6);
}

.avatar-seller {
    background: linear-gradient(135deg, #10b981, #22c55e);
}

.avatar-customer {
    background: linear-gradient(135deg, #8b5cf6, #a855f7);
}

.avatar-default {
    background: linear-gradient(135deg, #94a3b8, #64748b);
}

.customer-details {
    flex: 1;
}

.customer-name {
    color: #0a0e27;
    font-weight: 900;
    font-size: 14px;
    margin-bottom: 2px;
    line-height: 1.3;
    letter-spacing: -0.3px;
}

.customer-id {
    color: #4b5563;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.3px;
}

/* Email, Phone & Area Cells */
.email-cell,
.phone-cell,
.area-cell {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #1f2937;
    font-size: 13px;
    line-height: 1.4;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.email-cell i,
.phone-cell i,
.area-cell i {
    color: #94a3b8;
    font-size: 12px;
    flex-shrink: 0;
}

/* Classification Tags */
.classification-tag {
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    width: fit-content;
    letter-spacing: 0.3px;
}

.role-tag-admin {
    background: #cffafe;
    color: #0c4a6e;
}

.role-tag-seller {
    background: #bbf7d0;
    color: #05530c;
}

.role-tag-customer {
    background: #e9d5ff;
    color: #4c0519;
}

.role-tag-default {
    background: #d1d5db;
    color: #1f2937;
}

/* Action Buttons */
.actions-col {
    text-align: center;
    /* توسيط أفقي داخل الـ td */
}

.action-buttons {
    display: inline-flex;
    /* في نفس السطر */
    align-items: center;
    gap: 6px;
    /* مسافة بين الأزرار */
}

.btn-action {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 13px;
    font-weight: 800;
}

.btn-edit {
    background: #dbeafe;
    color: #0369a1;
}

.btn-edit:hover {
    background: #0284c7;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(2, 132, 199, 0.3);
}

.btn-display {
    background: #dcfce7;
    color: #15803d;
}

.btn-display:hover {
    background: #15803d;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(21, 128, 61, 0.3);
}

.btn-delete {
    background: #fee2e2;
    color: #dc2626;
}

.btn-delete:hover {
    background: #dc2626;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(220, 38, 38, 0.3);
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.modal-container {
    background: white;
    border-radius: 20px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    animation: slideUp 0.3s ease;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.delete-modal {
    max-width: 450px;
}

.display-modal {
    max-width: 700px;
    animation: slideUp 0.3s ease-out;
}

.modal-header {
    padding: 24px 32px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.display-modal-header {
    background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
    border-bottom: none;
    padding: 28px 32px;
}

.display-title-section {
    display: flex;
    align-items: center;
    gap: 16px;
}

.display-title-section i {
    font-size: 28px;
    color: white;
}

.modal-title {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 12px;
}

.display-modal-header .modal-title {
    color: white;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: 0.5px;
    margin: 0;
}

.modal-title.text-danger {
    color: #ef4444;
}

.modal-close {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: none;
    background: #f1f5f9;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.modal-content {
    padding: 32px;
    overflow-y: auto;
    max-height: calc(90vh - 80px);
}

.display-modal-content {
    padding: 32px;
    background: #f9fafb;
    overflow-y: auto;
    max-height: calc(90vh - 160px);
}

/* Form Styles */
.form-section {
    margin-bottom: 32px;
}

.form-section-title {
    font-size: 16px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f1f5f9;
}

.form-group {
    margin-bottom: 24px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #475569;
}

.required {
    color: #ef4444;
    margin-right: 4px;
}

.input-group {
    position: relative;
}

.input-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 14px;
}

.form-input {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    font-size: 13px;
    transition: all 0.3s ease;
    background: #ffffff;
    font-weight: 500;
    color: #1f2937;
    letter-spacing: 0.2px;
    font-family: inherit;
    direction: rtl;
    text-align: right;
}

.form-input:hover {
    border-color: #0ea5e9;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.12);
    background-color: #f0f9ff;
}

.form-input:focus {
    outline: none;
    border-color: #0ea5e9;
    background: white;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

.error-message {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ef4444;
    font-size: 13px;
    margin-top: 8px;
    font-weight: 500;
}

/* Users Selection Styles */
.users-selection {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    max-height: 300px;
    overflow-y: auto;
}

.user-checkbox-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: white;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
    cursor: pointer;
}

.user-checkbox-item:hover {
    border-color: #0ea5e9;
    background: #f0f9ff;
}

.user-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #0ea5e9;
}

.user-label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    flex: 1;
}

.user-name {
    font-weight: 600;
    color: #1e293b;
    font-size: 14px;
}

.user-email {
    color: #64748b;
    font-size: 12px;
}

.no-users-message {
    text-align: center;
    color: #94a3b8;
    font-size: 14px;
    padding: 20px;
}

.no-users {
    color: #94a3b8;
    font-style: italic;
}

/* Delete Warning */
.delete-warning {
    text-align: center;
}

.warning-icon {
    font-size: 64px;
    color: #ef4444;
    margin-bottom: 24px;
}

.warning-title {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 12px;
}

.warning-text {
    color: #64748b;
    font-size: 16px;
    margin-bottom: 32px;
    line-height: 1.6;
}

.customer-info-preview {
    background: #f8fafc;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 32px;
    text-align: right;
}

.preview-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.preview-item:last-child {
    margin-bottom: 0;
}

.preview-label {
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
}

.preview-value {
    color: #1e293b;
    font-size: 14px;
    font-weight: 600;
}

/* Display Modal Styles */
.display-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 50px;
    color: white;
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 32px;
    text-transform: capitalize;
    letter-spacing: 0.3px;
}

.display-section {
    background: white;
    border-radius: 16px;
    padding: 28px;
    margin-bottom: 24px;
    border: 2px solid #e5e7eb;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.display-section:hover {
    border-color: #0ea5e9;
    box-shadow: 0 8px 16px rgba(14, 165, 233, 0.1);
}

.display-section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 900;
    color: #0a0e27;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 3px solid #0ea5e9;
    text-transform: capitalize;
    letter-spacing: 0.4px;
}

.display-section-title i {
    font-size: 22px;
    color: #0ea5e9;
}

.display-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.display-info-item {
    text-align: right;
}

.display-info-item label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.display-info-item p {
    font-size: 16px;
    font-weight: 700;
    color: #0a0e27;
    margin: 0;
    padding: 12px;
    background: #f0f9ff;
    border-right: 4px solid #0ea5e9;
    border-radius: 8px;
    letter-spacing: 0.2px;
}

.display-location {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-end;
}

.location-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 20px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 14px;
    color: #0a0e27;
    border: 2px solid #e5e7eb;
    transition: all 0.3s ease;
    letter-spacing: 0.2px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.location-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #0ea5e9;
}

.display-notes {
    background: #fffbeb;
    border-right: 4px solid #f59e0b;
    border-radius: 8px;
    padding: 20px;
    color: #0a0e27;
    font-size: 15px;
    line-height: 1.8;
    font-weight: 600;
    text-align: right;
    letter-spacing: 0.1px;
    white-space: pre-wrap;
    word-break: break-word;
}

.display-modal-footer {
    padding: 20px 32px;
    background: white;
    border-top: 2px solid #e5e7eb;
    border-radius: 0 0 20px 20px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.modal-footer {
    padding: 20px 32px;
    background: white;
    border-top: 2px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Modal Actions */
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    margin-top: 32px;
}

.btn-cancel {
    background: #f1f5f9;
    color: #475569;
    border: none;
}

.btn-cancel:hover:not(:disabled) {
    background: #e2e8f0;
}

.btn-submit {
    background: linear-gradient(135deg, #0ea5e9, #10b981);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

.btn-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(14, 165, 233, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.4);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Spinner */
.spinner-small {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Unauthorized */
.unauthorized-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    padding: 20px;
}

.unauthorized-content {
    text-align: center;
    max-width: 400px;
}

.unauthorized-content i {
    font-size: 64px;
    color: #ef4444;
    margin-bottom: 24px;
}

.unauthorized-content h2 {
    font-size: 24px;
    color: #1e293b;
    margin-bottom: 12px;
}

.unauthorized-content p {
    color: #64748b;
    font-size: 16px;
}

.pagination-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
    direction: rtl;
}

.btn-pagination {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background-color: #f1f3f5;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-pagination:hover:not(:disabled) {
    background-color: #0d6efd;
    color: white;
    transform: scale(1.05);
}

.btn-pagination:disabled {
    background-color: #e0e0e0;
    color: #aaa;
    cursor: not-allowed;
}

.pagination-info {
    font-size: 14px;
    color: #555;
    background: #f8f9fa;
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 500;
}

/* Animations */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .customers-main-container {
        padding: 16px;
    }

    .page-title {
        font-size: 24px;
    }

    .title-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .content-card {
        padding: 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .modal-actions {
        flex-direction: column;
    }

    .modal-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .header-content {
        flex-direction: column;
        align-items: stretch;
    }

    .header-actions {
        justify-content: stretch;
    }

    .btn-create {
        width: 100%;
        justify-content: center;
    }

    .modal-container {
        margin: 0;
        border-radius: 0;
        max-height: 100vh;
    }
}

/* Enhanced Filters Styles */
.filters-section {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* Dropdown Filters Styles */
.filters-dropdown-container {
    position: relative;
    display: inline-block;
}

/* Backdrop Overlay for Filters */
.filters-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    z-index: 999;
    animation: fadeInBackdrop 0.3s ease;
}

@keyframes fadeInBackdrop {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.filters-toggle-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 18px;
    background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.25);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.filters-toggle-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
}

.filters-toggle-btn:hover {
    background: linear-gradient(135deg, #0284c7 0%, #0891b2 100%);
    box-shadow: 0 8px 20px rgba(14, 165, 233, 0.35);
    transform: translateY(-3px);
}

.filters-toggle-btn.active {
    background: linear-gradient(135deg, #0284c7 0%, #0891b2 100%);
    box-shadow: 0 8px 20px rgba(14, 165, 233, 0.35);
}

.filters-toggle-btn i {
    font-size: 15px;
}

.active-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0.2) 100%);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    font-size: 11px;
    font-weight: 800;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.chevron-icon {
    font-size: 12px;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.filters-toggle-btn.active .chevron-icon {
    transform: rotate(180deg);
}

.filters-dropdown-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 320px;
    max-width: 500px;
    width: 90%;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2), 0 10px 30px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    overflow: hidden;
    animation: popInScale 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-height: 80vh;
    overflow-y: auto;
}

@keyframes popInScale {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.85);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.filters-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 2px solid #e2e8f0;
}

.filters-title {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: 0.3px;
}

.btn-clear-inline {
    padding: 8px 14px;
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #dc2626;
    border: 2px solid #fca5a5;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-clear-inline:hover {
    background: linear-gradient(135deg, #fecaca 0%, #fbbf24 100%);
    border-color: #dc2626;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
    transform: translateY(-2px);
}

.filters-body {
    padding: 20px;
    direction: rtl;
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.filters-body .filter-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    animation: slideInUp 0.3s ease;
}

.filters-body .filter-item:last-child {
    margin-bottom: 0;
}

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

.filter-label {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-select,
.filter-input {
    padding: 12px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    background: #ffffff;
    color: #1e293b;
    transition: all 0.3s ease;
    font-family: inherit;
}

.filter-select:focus,
.filter-input:focus {
    outline: none;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.1);
    background: #f8fafc;
}

.filters-footer {
    padding: 16px 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-top: 2px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.btn-close-dropdown {
    padding: 10px 20px;
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    color: #1e293b;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-close-dropdown:hover {
    background: linear-gradient(135deg, #cbd5e1 0%, #94a3b8 100%);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Responsive Dropdown */
@media (max-width: 1024px) {
    .filters-dropdown-content {
        min-width: 350px;
        max-width: 500px;
    }
}

@media (max-width: 768px) {
    .filters-toggle-btn {
        padding: 8px 12px;
        font-size: 12px;
    }

    .filters-dropdown-content {
        min-width: 280px;
        max-width: 90%;
    }

    .filters-body {
        padding: 10px 14px;
    }
}

@media (max-width: 480px) {
    .filters-toggle-btn {
        padding: 8px 10px;
        font-size: 11px;
        gap: 6px;
    }

    .filters-dropdown-content {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        right: auto;
        bottom: auto;
        min-width: 95vw;
        width: 95vw;
        border-radius: 12px;
        max-height: 80vh;
    }

    .active-badge {
        min-width: 20px;
        height: 20px;
        font-size: 10px;
    }
}

/* =========================
   Modal Body
========================= */
.modal-filters-body {
    padding: 16px 20px;
    overflow: hidden;
    direction: rtl;
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 10px;
    align-content: start;
}

/* تصغير حجم المدخلات داخل الفلتر */
.modal-filters-body .form-input {
    padding: 8px 12px;
    font-size: 12px;
    border-radius: 8px;
}


/* كل عنصر فلتر */
.modal-filters-body .filter-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

/* جعل تصفية التواريخ تمتد على سطرين */
.modal-filters-body .filter-item:nth-child(4),
.modal-filters-body .filter-item:nth-child(5) {
    grid-column: auto;
}

/* =========================
   Modal Overlay
========================= */
.modal-overlay-filters {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

/* =========================
   Modal Container
========================= */
.modal-filters-container {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 500px;
    height: auto;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

/* =========================
   Animations
========================= */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================
   Modal Header
========================= */
.modal-filters-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid #e5e7eb;
    border-radius: 16px 16px 0 0;
    background: linear-gradient(135deg, #f8fafc 0%, #f3f4f6 100%);
}

.filters-modal-title {
    font-size: 16px;
    font-weight: 700;
    color: #0a0e27;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.filters-modal-title i {
    font-size: 18px;
    color: #0ea5e9;
}

.modal-filters-close-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: #ffffff;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 18px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.modal-filters-close-btn:hover {
    background: #e2e8f0;
    color: #1e293b;
    transform: rotate(90deg);
}

/* =========================
   Filter Labels & Inputs
========================= */
.filter-label {
    font-size: 12px;
    font-weight: 700;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.3px;
}

.filter-label i {
    font-size: 14px;
    color: #0ea5e9;
    width: 18px;
    text-align: center;
    flex-shrink: 0;
}

.filter-select,
.filter-input {
    width: 100%;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1.5px solid #cbd5e1;
    background-color: #ffffff;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #1f2937;
    direction: rtl;
    text-align: right;
    font-family: inherit;
}

.filter-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%230ea5e9' d='M10.293 3.293L6 7.586 1.707 3.293A1 1 0 00.293 4.707l5 5a1 1 0 001.414 0l5-5a1 1 0 10-1.414-1.414z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 12px center;
    padding-left: 32px;
}

.filter-select:hover,
.filter-input:hover {
    border-color: #0ea5e9;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.12);
    background-color: #f0f9ff;
}

.filter-select:focus,
.filter-input:focus {
    outline: none;
    border-color: #0ea5e9;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

.filter-input[type="date"] {
    padding-left: 12px;
}

.filter-input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    color: #0ea5e9;
    border-radius: 4px;
    padding: 4px;
    margin-right: 8px;
}

/* =========================
   Modal Footer
========================= */
.modal-filters-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-top: 1px solid #e5e7eb;
    border-radius: 0 0 16px 16px;
    background: linear-gradient(135deg, #fafbfc 0%, #f3f4f6 100%);
    flex-wrap: wrap;
}

/* زر مسح الفلاتر */
.btn-clear-all-filters {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #dc2626;
    border: 1.5px solid #fca5a5;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-clear-all-filters:hover {
    background: linear-gradient(135deg, #fecaca 0%, #f87171 100%);
    border-color: #dc2626;
    box-shadow: 0 6px 16px rgba(220, 38, 38, 0.2);
    transform: translateY(-1px);
}

.btn-clear-all-filters:active {
    transform: translateY(0);
}

.btn-clear-all-filters i {
    font-size: 14px;
}

/* زر إغلاق/تم */
.btn-close-filters-modal {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 20px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.btn-close-filters-modal:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.35);
}

.btn-close-filters-modal:active {
    transform: translateY(0);
}

.btn-close-filters-modal i {
    font-size: 14px;
}

.filter-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}

.filter-select,
.filter-input {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 8px 10px;
    font-size: 12px;
    border-radius: 10px;
}


/* Responsive Modal Filters */
@media (max-width: 768px) {
    .modal-filters-container {
        width: 90%;
        max-width: 100%;
        height: auto;
    }

    .modal-filters-header {
        padding: 16px 20px;
    }

    .filters-modal-title {
        font-size: 16px;
    }

    .modal-filters-body {
        padding: 12px 16px;
        grid-template-columns: 1fr;
        gap: 10px 8px;
    }

    .modal-filters-body .filter-item {
        margin-bottom: 6px;
    }

    .modal-filters-footer {
        padding: 10px 16px;
        flex-direction: column-reverse;
        gap: 8px;
    }

    .btn-clear-all-filters,
    .btn-close-filters-modal {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .modal-overlay-filters {
        align-items: flex-end;
    }

    .modal-filters-container {
        width: 100%;
        max-width: 100%;
        border-radius: 16px 16px 0 0;
        height: auto;
        max-height: 85vh;
        overflow-y: auto;
    }

    .modal-filters-header {
        padding: 10px 14px;
    }

    .filters-modal-title {
        font-size: 15px;
    }

    .modal-filters-body {
        padding: 8px 12px;
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .modal-filters-body .filter-label {
        font-size: 11px;
    }

    .modal-filters-body .form-input {
        padding: 6px 10px;
        font-size: 11px;
    }

    .modal-filters-body .filter-item {
        margin-bottom: 4px;
    }

    .modal-filters-footer {
        padding: 10px 16px;
        flex-direction: column-reverse;
        gap: 10px;
    }

    .btn-clear-all-filters,
    .btn-close-filters-modal {
        width: 100%;
        justify-content: center;
        padding: 9px 12px;
        font-size: 12px;
    }
}

/* Old Enhanced Filters Styles */

.filters-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e2e8f0;
}

.filters-icon {
    font-size: 18px;
    color: #0ea5e9;
}

.filters-title {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
}

.active-filters-badge {
    margin-right: auto;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    direction: rtl;
}

.filter-item {
    display: inline-flex;
    flex-direction: column;
    gap: 8px;
}

.filter-item.filter-action {
    justify-content: flex-end;
}

.filter-label {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: none;
}

.filter-label i {
    font-size: 14px;
    color: #0ea5e9;
}

.filter-select,
.filter-input {
    padding: 10px 14px;
    border-radius: 8px;
    border: 1.5px solid #cbd5e1;
    background-color: #ffffff;
    font-size: 13px;
    font-family: inherit;
    transition: all 0.3s ease;
    color: #334155;
    direction: rtl;
    text-align: right;
}

.filter-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%230ea5e9' d='M10.293 3.293L6 7.586 1.707 3.293A1 1 0 00.293 4.707l5 5a1 1 0 001.414 0l5-5a1 1 0 10-1.414-1.414z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 10px center;
    padding-left: 28px;
}

.filter-select:hover,
.filter-input:hover {
    border-color: #0ea5e9;
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.08);
}

.filter-select:focus,
.filter-input:focus {
    outline: none;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
    background-color: #f0f9ff;
}

.filter-input[type="date"] {
    padding-left: 12px;
}

.filter-input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    color: #0ea5e9;
}

.btn-clear-filters {
    width: 100%;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1.5px solid #fca5a5;
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #dc2626;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-clear-filters:hover {
    background: linear-gradient(135deg, #fecaca 0%, #fca5a5 100%);
    border-color: #dc2626;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.15);
}

.btn-clear-filters:active {
    transform: scale(0.98);
}

.btn-clear-filters i {
    font-size: 14px;
}

/* Responsive Filters */
@media (max-width: 1024px) {
    .filters-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 12px;
    }

    .filter-label {
        font-size: 12px;
    }

    .filter-select,
    .filter-input {
        font-size: 12px;
        padding: 8px 12px;
    }
}

@media (max-width: 768px) {
    .filters-section {
        padding: 16px;
    }

    .filters-header {
        margin-bottom: 12px;
        padding-bottom: 10px;
    }

    .filters-title {
        font-size: 14px;
    }

    .filters-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .filter-item.filter-action {
        grid-column: 1 / -1;
    }
}

@media (max-width: 480px) {
    .filters-section {
        padding: 12px;
    }

    .filters-header {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 12px;
        padding-bottom: 10px;
    }

    .active-filters-badge {
        margin-right: 0;
        margin-top: 8px;
    }

    .filters-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .filter-label {
        font-size: 11px;
    }

    .filter-select,
    .filter-input {
        font-size: 11px;
        padding: 8px 10px;
    }

    .btn-clear-filters {
        font-size: 12px;
        padding: 8px 12px;
    }
}

/* ===============================
   Advanced Filters Section
================================ */

.filters-section {
    background: #ffffff;
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    direction: rtl;
}

/* ===== Header ===== */
.filters-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
}

.filters-icon {
    color: #0d6efd;
    font-size: 18px;
}

.filters-title {
    font-size: 18px;
    font-weight: 700;
    color: #333;
}

.active-filters-badge {
    margin-right: auto;
    background: #0d6efd;
    color: #fff;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600;
}

/* ===== Grid ===== */
.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

/* ===== Filter Item ===== */
.filter-item {
    display: inline-flex;
    flex-direction: column;
    gap: 6px;
}

/* ===== Labels ===== */
.filter-label {
    font-size: 14px;
    font-weight: 600;
    color: #555;
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-label i {
    color: #0d6efd;
    font-size: 14px;
}

/* ===== Inputs & Select ===== */
.filter-select,
.filter-input {
    height: 40px;
    padding: 0 12px;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #fafafa;
}

.filter-select:focus,
.filter-input:focus {
    outline: none;
    border-color: #0d6efd;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
    background: #fff;
}

/* ===== Clear Filters Button ===== */
.filter-action {
    display: flex;
    align-items: flex-end;
}

.btn-clear-filters {
    width: 100%;
    height: 40px;
    background: #f8d7da;
    color: #842029;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-clear-filters i {
    font-size: 14px;
}

.btn-clear-filters:hover {
    background: #dc3545;
    color: #fff;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .filters-grid {
        grid-template-columns: 1fr;
    }

    .filters-title {
        font-size: 16px;
    }
}

/* Mobile Optimization - Table Spacing */
@media (max-width: 480px) {

    /* Table Header and Cells */
    .customers-table th {
        padding: 4px 2px;
        font-size: 11px;
    }

    .customers-table td {
        padding: 2px 1px;
    }

    .customers-table tbody tr {
        height: 32px;
    }

    /* Customer Info */
    .customer-avatar {
        width: 26px;
        height: 26px;
        font-size: 13px;
    }

    .customer-name {
        font-size: 12px;
        margin-bottom: 0px;
    }

    .customer-id {
        font-size: 10px;
    }

    /* Phone Cells */
    .phone-cell {
        font-size: 11px;
        gap: 3px;
    }

    .phone-cell i {
        font-size: 10px;
    }

    /* Classification Tag */
    .classification-tag {
        padding: 3px 6px;
        font-size: 10px;
        gap: 3px;
    }

    .classification-tag i {
        font-size: 9px;
    }

    /* Action Buttons */
    .btn-action {
        width: 35px;
        height: 26px;
        font-size: 10px;
    }

    .btn-action i {
        font-size: 10px;
    }

    /* Content Card */
    .content-card {
        padding: 12px;
    }

    /* Toolbar */
    .table-toolbar {
        margin-bottom: 12px;
        gap: 6px;
    }

    .search-input-wrapper {
        max-width: 100%;
    }

    .search-input {
        font-size: 14px;
        font-weight: 600;
        padding: 8px 32px 8px 10px;
    }

    /* Container */
    .customers-main-container {
        padding: 8px;
    }

    /* Header */
    .customers-header {
        margin-bottom: 12px;
    }

    .page-title {
        font-size: 22px;
        gap: 6px;
        margin-bottom: 2px;
    }

    .page-subtitle {
        font-size: 12px;
    }

    .title-icon {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
}

/* Empty State Container */
.empty-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 500px;
    padding: 40px 20px;
    background: #f9fafb;
    border-radius: 16px;
    border: 2px dashed #e5e7eb;
    animation: fadeIn 0.4s ease-out;
}

.empty-content {
    text-align: center;
    max-width: 450px;
}

.empty-icon-large {
    font-size: 120px;
    color: #0ea5e9;
    margin-bottom: 32px;
    opacity: 0.8;
    animation: bounce 2s infinite;
}

.empty-title {
    font-size: 28px;
    font-weight: 900;
    color: #0a0e27;
    margin-bottom: 16px;
    letter-spacing: 0.5px;
}

.empty-description {
    font-size: 16px;
    color: #64748b;
    margin-bottom: 32px;
    line-height: 1.8;
    font-weight: 500;
}

.empty-description strong {
    color: #0ea5e9;
    font-weight: 700;
}

.empty-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 28px;
}

.btn-empty-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 28px;
    background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

.btn-empty-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(14, 165, 233, 0.4);
}

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

.btn-empty-primary i {
    font-size: 18px;
}

.btn-empty-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 28px;
    background: white;
    color: #0a0e27;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.3px;
}

.btn-empty-secondary:hover {
    border-color: #0ea5e9;
    background: #f0f9ff;
    color: #0ea5e9;
}

.btn-empty-secondary i {
    font-size: 18px;
}

.empty-suggestion {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 20px;
    background: #fffbeb;
    border-radius: 12px;
    border-left: 4px solid #f59e0b;
    color: #92400e;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.6;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

.form-input {
    padding-right: 35px;
}