/* styles.css - Modern, responsive, RTL-friendly styles */
:root {
    --primary-color: #4361ee;
    --primary-dark: #3a56d4;
    --secondary-color: #7209b7;
    --success-color: #2ecc71;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --gray-color: #95a5a6;
    --border-color: #dfe6e9;
    --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* Dark Mode Variables */
.dark-mode {
    --primary-color: #5a7dff;
    --primary-dark: #4a6df0;
    --dark-color: #ecf0f1;
    --light-color: #2c3e50;
    --border-color: #34495e;
    --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

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

html[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

body {
    font-family: 'Noto Sans Arabic', 'Roboto', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: var(--dark-color);
    line-height: 1.6;
    min-height: 100vh;
    transition: var(--transition);
}

.dark-mode body {
    background: linear-gradient(135deg, #2c3e50 0%, #1a252f 100%);
    color: var(--light-color);
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Navigation */
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: white;
    box-shadow: var(--card-shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.dark-mode .nav-container {
    background: var(--light-color);
}

.logo-img {
    height: 50px;
    width: auto;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: var(--transition);
}

.nav-links a:hover {
    background: var(--primary-color);
    color: white;
}

.nav-actions {
    display: flex;
    gap: 1rem;
}

/* Progress Container */
.progress-container {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    margin: 2rem auto;
    max-width: 1200px;
    box-shadow: var(--card-shadow);
}

.dark-mode .progress-container {
    background: var(--light-color);
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    position: relative;
}

.progress-steps::before {
    content: '';
    position: absolute;
    top: 50%;
    right: 0;
    left: 0;
    height: 2px;
    background: var(--border-color);
    transform: translateY(-50%);
    z-index: 1;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 0.5rem;
    transition: var(--transition);
}

.step.active .step-number {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.step.completed .step-number {
    background: var(--success-color);
    color: white;
    border-color: var(--success-color);
}

.step-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray-color);
}

.step.active .step-label {
    color: var(--primary-color);
}

.progress-bar {
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary-color);
    width: 0%;
    transition: width 0.5s ease;
}

/* Form Sections */
.form-section {
    display: none;
    background: white;
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--card-shadow);
}

.dark-mode .form-section {
    background: var(--light-color);
}

.form-section.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

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

.section-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.section-header h1 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.8rem;
}

.section-header p {
    color: var(--gray-color);
    font-size: 1rem;
}

/* Form Container */
.page-a-main {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

@media (max-width: 1024px) {
    .page-a-main {
        grid-template-columns: 1fr;
    }
}

.form-container {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.dark-mode .form-container {
    background: #34495e;
}

/* Form Groups */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark-color);
}

.dark-mode .form-group label {
    color: var(--light-color);
}

.form-group label i {
    margin-left: 0.5rem;
    color: var(--primary-color);
}

.required {
    color: var(--danger-color);
}

input, select, textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
    font-family: inherit;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.inline-fields {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 1rem;
}

@media (max-width: 768px) {
    .inline-fields {
        grid-template-columns: 1fr;
    }
}

.helper-text {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.85rem;
    color: var(--gray-color);
}

/* Error Messages */
.error-message {
    display: none;
    color: var(--danger-color);
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn i {
    font-size: 0.9em;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.3);
}

.btn-secondary {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

.btn-outline {
    background: transparent;
    color: var(--dark-color);
    border: 2px solid var(--border-color);
}

.btn-outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-danger {
    background: var(--danger-color);
    color: white;
    border: none;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

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

/* Form Actions */
.form-actions, .step-navigation, .final-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

/* Summary Card */
.summary-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.dark-mode .summary-card {
    background: var(--light-color);
}

.summary-header {
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.summary-header h3 {
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.summary-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.summary-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.summary-section h4 {
    color: var(--dark-color);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.dark-mode .summary-section h4 {
    color: var(--light-color);
}

.summary-signature {
    max-width: 100%;
    height: auto;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.5rem;
    background: white;
}

.placeholder-text {
    color: var(--gray-color);
    font-style: italic;
    text-align: center;
    padding: 2rem;
}

/* Status Items */
.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 0.5rem;
}

.dark-mode .status-item {
    background: #2c3e50;
}

.status-label {
    font-weight: 600;
}

.status-value {
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

.status-value.complete {
    background: #d4edda;
    color: #155724;
}

.status-value.incomplete {
    background: #f8d7da;
    color: #721c24;
}

.status-value.pending {
    background: #fff3cd;
    color: #856404;
}

/* Signature Step */
.signature-step-container {
    max-width: 800px;
    margin: 0 auto;
}

.signature-instructions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.instruction-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    border: 2px solid var(--border-color);
    transition: var(--transition);
}

.dark-mode .instruction-card {
    background: var(--light-color);
}

.instruction-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
}

.instruction-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.signature-action {
    text-align: center;
    margin: 2rem 0;
}

.signature-preview {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.preview-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

/* KYC Container */
.kyc-container {
    max-width: 1000px;
    margin: 0 auto;
}

.kyc-progress {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--card-shadow);
}

.dark-mode .kyc-progress {
    background: var(--light-color);
}

.progress-stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
    line-height: 1;
}

.stat-label {
    color: var(--gray-color);
    font-size: 0.9rem;
}

/* KYC Steps */
.kyc-step {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--card-shadow);
    border: 2px solid var(--border-color);
}

.dark-mode .kyc-step {
    background: var(--light-color);
}

.kyc-step.completed {
    border-color: var(--success-color);
}

.step-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.step-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-icon i {
    color: white;
    font-size: 1.5rem;
}

.step-info {
    flex: 1;
}

.step-info h4 {
    color: var(--dark-color);
    margin-bottom: 0.25rem;
}

.dark-mode .step-info h4 {
    color: var(--light-color);
}

.step-info p {
    color: var(--gray-color);
    font-size: 0.9rem;
}

.status-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-badge.pending {
    background: #fff3cd;
    color: #856404;
}

.status-badge.complete {
    background: #d4edda;
    color: #155724;
}

/* Camera View */
.camera-view {
    position: relative;
    width: 100%;
    height: 400px;
    border-radius: 10px;
    overflow: hidden;
    background: #000;
    margin-bottom: 1rem;
}

.camera-view video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.camera-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.capture-frame {
    width: 300px;
    height: 200px;
    border: 3px dashed rgba(255, 255, 255, 0.5);
    border-radius: 10px;
}

.capture-frame.selfie {
    width: 250px;
    height: 250px;
    border-radius: 50%;
}

.camera-instructions {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.75rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.camera-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

/* Preview and Upload Areas */
.preview-area, .uploaded-area {
    text-align: center;
}

.preview-header, .uploaded-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.preview-area img, .uploaded-area img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 10px;
    border: 2px solid var(--border-color);
    margin-bottom: 1rem;
}

.success {
    color: var(--success-color);
}

/* Review Container */
.review-container {
    max-width: 1000px;
    margin: 0 auto;
}

.review-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.review-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
}

.dark-mode .review-card {
    background: var(--light-color);
}

.review-card-header {
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.review-card-header h4 {
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Timeline */
.process-timeline {
    position: relative;
    padding-right: 20px;
}

.process-timeline::before {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
}

.timeline-item {
    position: relative;
    padding-bottom: 1.5rem;
}

.timeline-dot {
    position: absolute;
    right: -9px;
    top: 5px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--border-color);
    z-index: 1;
}

.timeline-dot.active {
    background: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(67, 97, 238, 0.2);
}

.timeline-content {
    margin-right: 25px;
}

.timeline-content h5 {
    color: var(--dark-color);
    margin-bottom: 0.25rem;
}

.dark-mode .timeline-content h5 {
    color: var(--light-color);
}

.timeline-content p {
    color: var(--gray-color);
    font-size: 0.9rem;
}

/* Final Review */
.final-review {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--card-shadow);
}

.dark-mode .final-review {
    background: var(--light-color);
}

.review-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.review-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 6px;
}

.dark-mode .review-item {
    background: #2c3e50;
}

.review-label {
    font-weight: 600;
}

/* Terms Agreement */
.terms-agreement {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--card-shadow);
}

.dark-mode .terms-agreement {
    background: var(--light-color);
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 0.25rem;
}

.terms-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.terms-link:hover {
    text-decoration: underline;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal:not(.hidden) {
    display: flex;
    animation: modalFadeIn 0.3s ease;
}

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

.modal-content {
    background: white;
    border-radius: 15px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

.dark-mode .modal-content {
    background: var(--light-color);
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--gray-color);
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--danger-color);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* Success Modal */
.success-modal {
    text-align: center;
    max-width: 500px;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: var(--success-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.success-icon i {
    color: white;
    font-size: 2.5rem;
}

.success-message {
    color: var(--gray-color);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.success-details {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.dark-mode .success-details {
    background: #2c3e50;
}

.success-details p {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-content {
    background: white;
    border-radius: 15px;
    padding: 3rem;
    text-align: center;
    max-width: 400px;
    width: 90%;
}

.dark-mode .loading-content {
    background: var(--light-color);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem;
}

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

.loading-content h3 {
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.dark-mode .loading-content h3 {
    color: var(--light-color);
}

#loadingMessage {
    color: var(--gray-color);
}

/* Hidden Utility */
.hidden {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .progress-steps {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .progress-steps::before {
        display: none;
    }
    
    .step {
        flex: 1 0 45%;
        margin-bottom: 1rem;
    }
    
    .camera-view {
        height: 300px;
    }
    
    .capture-frame {
        width: 200px;
        height: 150px;
    }
    
    .capture-frame.selfie {
        width: 180px;
        height: 180px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .form-section {
        padding: 1rem;
    }
    
    .form-container {
        padding: 1rem;
    }
    
    .btn-large {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    .modal-content {
        margin: 0.5rem;
        max-height: 95vh;
    }
}

/* ==================== PAGE B SPECIFIC STYLES ==================== */

/* Page Header */
.page-header-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 0 0 20px 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.dark-mode .page-header-section {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #5a189a 100%);
}

.page-header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.page-title {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.page-title i {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.page-title span {
    font-size: 1.8rem;
    font-weight: 700;
}

.page-subtitle {
    font-size: 0.9rem;
    opacity: 0.9;
    font-weight: 400;
}

.page-header-actions {
    display: flex;
    align-items: center;
    gap: 2rem;
}

/* Wallet Balance */
.wallet-balance {
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 1rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.wallet-balance i {
    font-size: 1.8rem;
    color: #ffd166;
}

.wallet-info {
    display: flex;
    flex-direction: column;
}

.wallet-label {
    font-size: 0.85rem;
    opacity: 0.9;
}

.wallet-amount {
    font-size: 1.4rem;
    font-weight: 700;
    color: #ffd166;
}

/* Dark Mode Toggle */
.dark-mode-toggle {
    display: flex;
    align-items: center;
}

.toggle-switch {
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
}

.toggle-switch input {
    display: none;
}

.toggle-slider {
    width: 60px;
    height: 30px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 50px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px;
    transition: var(--transition);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    left: 3px;
    top: 3px;
    transition: transform 0.3s ease;
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(30px);
}

.toggle-slider i {
    font-size: 0.8rem;
    color: white;
    z-index: 1;
}

.toggle-label {
    font-weight: 600;
    font-size: 0.95rem;
}

/* Trading Main Layout */
.trading-main {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

@media (max-width: 1200px) {
    .trading-main {
        grid-template-columns: 1fr;
    }
}

.trading-left-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.trading-right-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Trading Cards */
.trading-card {
    background: white;
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.dark-mode .trading-card {
    background: var(--light-color);
    border-color: #3a506b;
}

.trading-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.trading-card.full-height {
    height: calc(100% - 1.5rem);
}

.card-header {
    padding: 1.5rem;
    border-bottom: 2px solid var(--border-color);
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.dark-mode .card-header {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    border-bottom-color: #3a506b;
}

.card-header h2 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.4rem;
}

.card-header p {
    color: var(--gray-color);
    font-size: 0.95rem;
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    background: #f8f9fa;
}

.dark-mode .card-footer {
    background: #2c3e50;
    border-top-color: #3a506b;
}

/* Modern Form Elements */
.modern-select {
    position: relative;
}

.select-with-icon {
    position: relative;
}

.select-with-icon select {
    width: 100%;
    padding: 0.75rem 1rem;
    padding-right: 3rem;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    appearance: none;
    cursor: pointer;
    transition: var(--transition);
}

.dark-mode .select-with-icon select {
    background: #2c3e50;
    border-color: #3a506b;
    color: white;
}

.select-with-icon select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
    outline: none;
}

.select-arrow {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
    pointer-events: none;
}

.modern-input {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    transition: var(--transition);
    background: white;
}

.dark-mode .modern-input {
    background: #2c3e50;
    border-color: #3a506b;
    color: white;
}

.modern-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
    outline: none;
}

/* Company Metadata */
.company-metadata-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin: 1.5rem 0;
}

.metadata-item {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.dark-mode .metadata-item {
    background: #2c3e50;
}

.metadata-label {
    font-size: 0.85rem;
    color: var(--gray-color);
}

.metadata-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark-color);
}

.dark-mode .metadata-value {
    color: white;
}

.metadata-value.positive {
    color: var(--success-color);
}

.metadata-value.negative {
    color: var(--danger-color);
}

/* File Upload */
.file-upload-wrapper {
    position: relative;
}

.file-input {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.file-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 2rem;
    border: 2px dashed var(--border-color);
    border-radius: 10px;
    background: #f8f9fa;
    transition: var(--transition);
    cursor: pointer;
    text-align: center;
}

.dark-mode .file-upload-label {
    background: #2c3e50;
    border-color: #3a506b;
}

.file-upload-label:hover {
    border-color: var(--primary-color);
    background: rgba(67, 97, 238, 0.05);
}

.file-upload-label i {
    font-size: 2.5rem;
    color: var(--primary-color);
}

.file-upload-label span {
    font-weight: 600;
    color: var(--dark-color);
}

.dark-mode .file-upload-label span {
    color: white;
}

.file-upload-label small {
    color: var(--gray-color);
    font-size: 0.85rem;
}

/* Trading Controls */
.amount-input-wrapper {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.amount-input-wrapper input {
    flex: 1;
}

.amount-actions {
    display: flex;
    gap: 0.5rem;
}

.current-price-display {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin: 1.5rem 0;
    padding: 1rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
}

.dark-mode .current-price-display {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

.price-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.price-item span:first-child {
    font-size: 0.9rem;
    color: var(--gray-color);
}

.price-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Trading Buttons */
.trading-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
}

.btn-buy-large, .btn-sell-large {
    padding: 1.5rem;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: white;
}

.btn-buy-large {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
}

.btn-buy-large:hover:not(:disabled) {
    background: linear-gradient(135deg, #27ae60 0%, #219653 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(46, 204, 113, 0.3);
}

.btn-sell-large {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

.btn-sell-large:hover:not(:disabled) {
    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.3);
}

.btn-buy-large:disabled, .btn-sell-large:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.btn-buy-large i, .btn-sell-large i {
    font-size: 1.8rem;
}

.btn-buy-large small, .btn-sell-large small {
    font-size: 0.85rem;
    opacity: 0.9;
    font-weight: 400;
}

/* Chart Container */
.chart-container {
    position: relative;
    height: 400px;
    padding: 1rem;
}

.chart-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    z-index: 10;
    border-radius: 10px;
}

.dark-mode .chart-loading {
    background: rgba(44, 62, 80, 0.9);
}

.chart-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

.timeframe-selector {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.timeframe-btn {
    padding: 0.5rem 1rem;
    border: 2px solid var(--border-color);
    background: white;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.dark-mode .timeframe-btn {
    background: #2c3e50;
    border-color: #3a506b;
    color: white;
}

.timeframe-btn:hover {
    border-color: var(--primary-color);
}

.timeframe-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.chart-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

@media (max-width: 768px) {
    .chart-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

.stat {
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 0.85rem;
    color: var(--gray-color);
    margin-bottom: 0.25rem;
}

.stat-value {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark-color);
}

.dark-mode .stat-value {
    color: white;
}

/* Orders Table */
.orders-container {
    padding: 0;
}

.orders-scroll {
    max-height: 300px;
    overflow-y: auto;
}

.modern-table {
    width: 100%;
    border-collapse: collapse;
}

.modern-table thead {
    background: #f8f9fa;
    position: sticky;
    top: 0;
    z-index: 1;
}

.dark-mode .modern-table thead {
    background: #2c3e50;
}

.modern-table th {
    padding: 1rem;
    text-align: right;
    font-weight: 600;
    color: var(--dark-color);
    border-bottom: 2px solid var(--border-color);
}

.dark-mode .modern-table th {
    color: white;
    border-bottom-color: #3a506b;
}

.modern-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--dark-color);
}

.dark-mode .modern-table td {
    color: white;
    border-bottom-color: #3a506b;
}

.modern-table tbody tr:hover {
    background: rgba(67, 97, 238, 0.05);
}

.dark-mode .modern-table tbody tr:hover {
    background: rgba(67, 97, 238, 0.1);
}

.order-type {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.order-type.buy {
    background: rgba(46, 204, 113, 0.15);
    color: #27ae60;
}

.order-type.sell {
    background: rgba(231, 76, 60, 0.15);
    color: #c0392b;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-badge.pending {
    background: rgba(243, 156, 18, 0.15);
    color: #f39c12;
}

.status-badge.completed {
    background: rgba(46, 204, 113, 0.15);
    color: #27ae60;
}

.empty-row td {
    text-align: center;
    padding: 3rem !important;
    color: var(--gray-color) !important;
}

.empty-row i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.orders-filter {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.small-select {
    padding: 0.5rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: white;
    font-size: 0.9rem;
    min-width: 120px;
}

.dark-mode .small-select {
    background: #2c3e50;
    border-color: #3a506b;
    color: white;
}

.export-buttons {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* Order Confirmation Modal */
.modal-xl {
    max-width: 1000px;
}

.order-confirmation-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

@media (max-width: 768px) {
    .order-confirmation-grid {
        grid-template-columns: 1fr;
    }
}

.order-details-section, .client-terms-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.order-details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.detail-item {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.dark-mode .detail-item {
    background: #2c3e50;
}

.detail-label {
    font-size: 0.85rem;
    color: var(--gray-color);
}

.detail-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark-color);
}

.dark-mode .detail-value {
    color: white;
}

.detail-value.buy {
    color: var(--success-color);
}

.detail-value.sell {
    color: var(--danger-color);
}

.fees-breakdown {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1.5rem;
}

.dark-mode .fees-breakdown {
    background: #2c3e50;
}

.fees-breakdown h4 {
    margin-bottom: 1rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.fee-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.fee-item:last-child {
    border-bottom: none;
}

.fee-item.total {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary-color);
    padding-top: 1rem;
    margin-top: 0.5rem;
    border-top: 2px solid var(--border-color);
}

.client-info-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1.5rem;
}

.dark-mode .client-info-card {
    background: #2c3e50;
}

.client-info-card h4 {
    margin-bottom: 1rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.terms-section {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1.5rem;
}

.dark-mode .terms-section {
    background: #2c3e50;
}

.terms-section h4 {
    margin-bottom: 1rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.terms-content {
    margin-bottom: 1.5rem;
}

.terms-content p {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.terms-content p:last-child {
    border-bottom: none;
}

.terms-content p::before {
    content: '✓';
    color: var(--success-color);
    font-weight: bold;
}

.terms-checkbox {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: var(--transition);
}

.dark-mode .terms-checkbox {
    background: #34495e;
    border-color: #3a506b;
}

.terms-checkbox:hover {
    border-color: var(--primary-color);
}

.terms-checkbox input {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.terms-checkbox label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 600;
}

.terms-checkbox label i {
    color: var(--success-color);
}

.signature-preview {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
}

.dark-mode .signature-preview {
    background: #2c3e50;
}

.signature-preview h4 {
    margin-bottom: 1rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

#clientSignatureImage {
    max-width: 200px;
    max-height: 100px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.5rem;
    background: white;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .page-header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .page-header-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .wallet-balance {
        width: 100%;
        justify-content: center;
    }
    
    .trading-buttons {
        grid-template-columns: 1fr;
    }
    
    .company-metadata-grid {
        grid-template-columns: 1fr;
    }
    
    .order-details-grid {
        grid-template-columns: 1fr;
    }
    
    .chart-stats {
        grid-template-columns: 1fr;
    }
    
    .orders-filter {
        flex-direction: column;
    }
    
    .export-buttons {
        flex-direction: column;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

.flex {
    display: flex;
}

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

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.gap-1 {
    gap: 1rem;
}

.gap-2 {
    gap: 2rem;
}

.mt-1 {
    margin-top: 1rem;
}

.mt-2 {
    margin-top: 2rem;
}

.mb-1 {
    margin-bottom: 1rem;
}

.mb-2 {
    margin-bottom: 2rem;
}

.p-1 {
    padding: 1rem;
}

.p-2 {
    padding: 2rem;
}


/* Add these styles to the end of your existing styles.css file */

/* Spinner for loading states */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color, #dfe6e9);
    border-top-color: var(--primary-color, #4361ee);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* Page Header Styles */
.page-header-section {
    background: linear-gradient(135deg, var(--primary-color, #4361ee) 0%, var(--secondary-color, #7209b7) 100%);
    color: white;
    padding: 3rem 2rem;
    margin-bottom: 2rem;
    border-radius: 0 0 20px 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.dark-mode .page-header-section {
    background: linear-gradient(135deg, var(--primary-dark, #3a56d4) 0%, #5a189a 100%);
}

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

.page-title {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.page-title .ar-large {
    font-size: 2.2rem;
    font-weight: 700;
}

.page-title .subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 400;
}

/* Section Title */
.section-title {
    color: var(--primary-color, #4361ee);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Button styles */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition, all 0.3s ease);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn i {
    font-size: 0.9em;
}

.btn-primary {
    background: var(--primary-color, #4361ee);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-dark, #3a56d4);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.3);
}

.btn-secondary {
    background: white;
    color: var(--primary-color, #4361ee);
    border: 2px solid var(--primary-color, #4361ee);
}

.btn-secondary:hover {
    background: var(--primary-color, #4361ee);
    color: white;
}

.btn-outline {
    background: transparent;
    color: var(--dark-color, #2c3e50);
    border: 2px solid var(--border-color, #dfe6e9);
}

.dark-mode .btn-outline {
    color: var(--light-color, #ecf0f1);
}

.btn-outline:hover {
    border-color: var(--primary-color, #4361ee);
    color: var(--primary-color, #4361ee);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

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

/* Form styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark-color, #2c3e50);
}

.dark-mode .form-group label {
    color: var(--light-color, #ecf0f1);
}

.form-group label i {
    margin-left: 0.5rem;
    color: var(--primary-color, #4361ee);
}

input, select, textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color, #dfe6e9);
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition, all 0.3s ease);
    font-family: inherit;
    background: var(--bg-color, white);
    color: var(--text-color, #2c3e50);
}

.dark-mode input,
.dark-mode select,
.dark-mode textarea {
    background: var(--light-color, #2c3e50);
    border-color: #3a506b;
    color: var(--dark-color, #ecf0f1);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-color, #4361ee);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.helper-text {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.85rem;
    color: var(--gray-color, #95a5a6);
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 0.25rem;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal:not(.hidden) {
    display: flex;
    animation: modalFadeIn 0.3s ease;
}

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

.modal-content {
    background: var(--bg-color, white);
    border-radius: 15px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

.dark-mode .modal-content {
    background: var(--light-color, #2c3e50);
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color, #dfe6e9);
}

.modal-header h2 {
    color: var(--primary-color, #4361ee);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--gray-color, #95a5a6);
    transition: var(--transition, all 0.3s ease);
}

.modal-close:hover {
    color: var(--danger-color, #e74c3c);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color, #dfe6e9);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* Dark mode variables */
:root {
    --primary-color: #4361ee;
    --primary-dark: #3a56d4;
    --primary-light: #667eea;
    --secondary-color: #7209b7;
    --success-color: #2ecc71;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --gray-color: #95a5a6;
    --border-color: #dfe6e9;
    --border-light: #dfe6e9;
    --bg-color: white;
    --bg-secondary: #f8f9fa;
    --text-color: #2c3e50;
    --text-secondary: #95a5a6;
    --text-muted: #b2bec3;
    --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 25px rgba(0, 0, 0, 0.15);
    --border-radius: 8px;
    --border-radius-lg: 16px;
    --transition: all 0.3s ease;
}

.dark-mode {
    --primary-color: #5a7dff;
    --primary-dark: #4a6df0;
    --primary-light: #7b9cff;
    --dark-color: #ecf0f1;
    --light-color: #2c3e50;
    --border-color: #34495e;
    --border-light: #3a506b;
    --bg-color: #1a252f;
    --bg-secondary: #2c3e50;
    --text-color: #ecf0f1;
    --text-secondary: #bdc3c7;
    --text-muted: #7f8c8d;
    --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 25px rgba(0, 0, 0, 0.5);
}

/* Utility classes */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.ml-1 { margin-left: 1rem; }
.mr-1 { margin-right: 1rem; }
.p-1 { padding: 1rem; }
.p-2 { padding: 2rem; }

/* Responsive adjustments */
@media (max-width: 768px) {
    .page-header-section {
        padding: 2rem 1rem;
    }
    
    .page-title .ar-large {
        font-size: 1.8rem;
    }
    
    .page-title .subtitle {
        font-size: 1rem;
    }
    
    .container {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .page-header-section {
        padding: 1.5rem 1rem;
    }
    
    .page-title .ar-large {
        font-size: 1.5rem;
    }
    
    .page-title .subtitle {
        font-size: 0.9rem;
    }
    
    .container {
        padding: 10px;
    }
}