/* ===== المتغيرات العامة ===== */
:root {
    --primary: #0f766e;
    --primary-dark: #0d5c56;
    --primary-light: #14b8a6;
    --secondary: #6366f1;
    --accent: #f59e0b;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #1e293b;
    --dark-light: #334155;
    --light: #f1f5f9;
    --white: #ffffff;
    --text: #334155;
    --text-light: #64748b;
    --border: #e2e8f0;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --radius: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== الأساسيات ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Tajawal', sans-serif;
    background: linear-gradient(160deg, #0a0f1a 0%, #111827 40%, #0f3a36 100%);
    min-height: 100vh;
    color: var(--text);
    line-height: 1.7;
    overflow-x: hidden;
}

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

/* ===== الخلفية المتحركة ===== */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.plane {
    position: absolute;
    color: rgba(255, 255, 255, 0.02);
    font-size: 80px;
    animation: flyPlane 40s linear infinite;
}

.plane-1 { top: 10%; animation-delay: 0s; }
.plane-2 { top: 40%; animation-delay: -12s; font-size: 60px; }
.plane-3 { top: 70%; animation-delay: -24s; font-size: 100px; }

@keyframes flyPlane {
    0% { left: -150px; transform: rotate(-10deg); }
    100% { left: 110%; transform: rotate(-10deg); }
}

.cloud {
    position: absolute;
    background: rgba(255, 255, 255, 0.015);
    border-radius: 100px;
    animation: floatCloud 50s linear infinite;
}

.cloud-1 { width: 300px; height: 80px; top: 20%; animation-delay: 0s; }
.cloud-2 { width: 200px; height: 60px; top: 50%; animation-delay: -18s; }
.cloud-3 { width: 400px; height: 100px; top: 80%; animation-delay: -32s; }

@keyframes floatCloud {
    0% { right: -400px; }
    100% { right: 110%; }
}

/* ===== الهيدر ===== */
.header {
    background: rgba(10, 15, 26, 0.9);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 72px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--white);
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.logo i {
    font-size: 1.8rem;
    color: var(--primary-light);
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.08); opacity: 0.9; }
}

.nav {
    display: flex;
    gap: 6px;
    background: rgba(255, 255, 255, 0.03);
    padding: 6px;
    border-radius: var(--radius);
}

.nav-link {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 8px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-link:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.08);
}

.nav-link.active {
    color: var(--white);
    background: var(--primary);
    box-shadow: 0 4px 12px rgba(15, 118, 110, 0.4);
}

.nav-link i {
    font-size: 1rem;
}

/* ===== المحتوى الرئيسي ===== */
.main-content {
    position: relative;
    z-index: 1;
    padding: 48px 0;
    min-height: calc(100vh - 150px);
}

.page {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.page.active {
    display: block;
}

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

.page-header {
    text-align: center;
    margin-bottom: 48px;
    color: var(--white);
}

.page-header h1 {
    font-size: 2.2rem;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.page-header h1 i {
    color: var(--primary-light);
    font-size: 1.8rem;
}

.page-header p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.05rem;
    max-width: 500px;
    margin: 0 auto;
}

/* ===== منطقة الرفع ===== */
.upload-section {
    max-width: 720px;
    margin: 0 auto 48px;
}

.upload-zone {
    background: rgba(255, 255, 255, 0.03);
    border: 2px dashed rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-xl);
    padding: 56px 40px;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.upload-zone::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(20, 184, 166, 0.05) 0%, transparent 70%);
    opacity: 0;
    transition: var(--transition);
}

.upload-zone:hover::before,
.upload-zone.drag-over::before {
    opacity: 1;
}

.upload-zone:hover,
.upload-zone.drag-over {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary-light);
    transform: scale(1.01);
}

.upload-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 24px;
    background: linear-gradient(145deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.8rem;
    color: var(--white);
    animation: float 4s ease-in-out infinite;
    box-shadow: 0 16px 40px rgba(15, 118, 110, 0.35);
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.upload-zone h3 {
    color: var(--white);
    font-size: 1.35rem;
    margin-bottom: 8px;
    font-weight: 600;
}

.upload-zone p {
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 24px;
    font-size: 0.95rem;
}

/* ===== شريط التقدم ===== */
.progress-container {
    margin-top: 32px;
    text-align: center;
    background: rgba(0, 0, 0, 0.2);
    padding: 24px;
    border-radius: var(--radius);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
    width: 0%;
    transition: width 0.4s ease;
    border-radius: 4px;
}

.progress-text {
    display: block;
    margin-top: 16px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    font-size: 0.95rem;
}

/* ===== الأزرار ===== */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(255,255,255,0.1), transparent);
    opacity: 0;
    transition: var(--transition);
}

.btn:hover::before {
    opacity: 1;
}

.btn-primary {
    background: linear-gradient(145deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--white);
    box-shadow: 0 4px 16px rgba(15, 118, 110, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(15, 118, 110, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-success {
    background: linear-gradient(145deg, var(--success) 0%, #059669 100%);
    color: var(--white);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
}

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

.btn-danger {
    background: linear-gradient(145deg, var(--danger) 0%, #dc2626 100%);
    color: var(--white);
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.4);
}

.btn-sm {
    padding: 8px 14px;
    font-size: 0.85rem;
    border-radius: 8px;
}

/* ===== قسم النتائج ===== */
.result-section {
    max-width: 1200px;
    margin: 0 auto;
}

.result-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 24px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.result-header h2 {
    color: var(--success);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-weight: 700;
}

/* تبويبات نتائج الرفع المتعدد */
.multi-results-tabs {
    display: none;
    margin: 0 0 24px;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius);
}

.multi-result-tab {
    background: rgba(15, 23, 42, 0.8);
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    color: #e5e7eb;
    padding: 8px 16px;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.multi-result-tab:hover {
    border-color: var(--primary);
    background: rgba(15, 118, 110, 0.15);
}

.multi-result-tab.active {
    background: linear-gradient(145deg, var(--primary), var(--success));
    border-color: transparent;
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(15, 118, 110, 0.4);
}

.multi-result-index {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

.multi-result-tab.active .multi-result-index {
    background: rgba(0, 0, 0, 0.25);
}

.multi-result-name {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ===== شبكة النتائج ===== */
.result-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

@media (max-width: 900px) {
    .result-grid {
        grid-template-columns: 1fr;
    }
}

.result-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    transition: var(--transition);
}

.result-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.15);
}

.card-header {
    background: linear-gradient(145deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--white);
    padding: 18px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.ticket-info .card-header { background: linear-gradient(145deg, #5b5fc7 0%, #7c7ff2 100%); }
.passenger-info .card-header { background: linear-gradient(145deg, #d97706 0%, #f59e0b 100%); }
.flight-info .card-header { background: linear-gradient(145deg, #0f766e 0%, #14b8a6 100%); }
.airline-info .card-header { background: linear-gradient(145deg, #db2777 0%, #ec4899 100%); }

.card-header i {
    font-size: 1.3rem;
    opacity: 0.9;
}

.card-header h3 {
    font-size: 1rem;
    font-weight: 600;
}

.card-body {
    padding: 20px 24px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.info-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.info-item:first-child {
    padding-top: 0;
}

.info-item .label {
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: 500;
}

.info-item .value {
    color: var(--dark);
    font-weight: 600;
    font-size: 0.95rem;
}

.info-item .value.highlight {
    color: var(--primary);
    font-size: 1.05rem;
    font-weight: 700;
}

/* ===== مسار الرحلة ===== */
.flight-route {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

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

.route-point .code {
    display: block;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.02em;
}

.route-point .label {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 4px;
}

.route-line {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin: 0 16px;
}

.route-line::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 1px;
}

.route-line i {
    background: var(--white);
    padding: 6px;
    position: relative;
    color: var(--primary);
    font-size: 1.1rem;
    transform: rotate(-45deg);
}

/* ===== شعار الخطوط الجوية ===== */
.airline-logo {
    width: 72px;
    height: 72px;
    margin: 0 auto 16px;
    background: linear-gradient(145deg, var(--light) 0%, var(--white) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--primary);
    border: 2px solid var(--border);
    box-shadow: var(--shadow);
}

/* ===== النص المستخرج ===== */
.extracted-text-section {
    text-align: center;
    margin: 32px 0;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.extracted-text {
    background: #0d1117;
    border-radius: var(--radius);
    padding: 24px;
    margin-top: 20px;
    max-height: 350px;
    overflow: auto;
    text-align: right;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.extracted-text pre {
    color: #8b949e;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.85rem;
    white-space: pre-wrap;
    word-wrap: break-word;
    direction: ltr;
    text-align: left;
    line-height: 1.8;
}

/* ===== أزرار الإجراءات ===== */
.action-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 32px;
}

/* ===== أنواع التذاكر ===== */
.supported-types {
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-xl);
    padding: 40px;
    margin-top: 56px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.supported-types h3 {
    color: var(--white);
    text-align: center;
    margin-bottom: 32px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 600;
}

.supported-types h3 i {
    color: var(--success);
}

.types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.type-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px 16px;
    border-radius: var(--radius);
    text-align: center;
    color: var(--white);
    transition: var(--transition);
    border: 1px solid transparent;
}

.type-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.type-item i {
    font-size: 1.6rem;
    margin-bottom: 10px;
    color: var(--primary-light);
    display: block;
}

.type-item span {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
}

/* ===== شبكة الخطوط الجوية ===== */
.airlines-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.airlines-grid .type-item {
    flex-direction: column;
    padding: 24px 16px;
}

.airlines-grid .type-item small {
    display: block;
    margin-top: 6px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
}

/* ===== صفحة التذاكر ===== */
.filters-section {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-lg);
}

.search-box {
    position: relative;
    margin-bottom: 20px;
}

.search-box i {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 1rem;
}

.search-box input {
    width: 100%;
    padding: 14px 48px 14px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
    background: var(--light);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.1);
}

.filters {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.filters select,
.filters input[type="date"] {
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.9rem;
    background: var(--light);
    min-width: 170px;
    cursor: pointer;
    transition: var(--transition);
}

.filters select:focus,
.filters input[type="date"]:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--white);
}

/* ===== جدول التذاكر ===== */
.tickets-table-container {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

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

.tickets-table th,
.tickets-table td {
    padding: 14px 16px;
    text-align: right;
    border-bottom: 1px solid var(--border);
}

.tickets-table th {
    background: linear-gradient(145deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--white);
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
}

.tickets-table tbody tr {
    transition: var(--transition);
}

.tickets-table tbody tr:hover {
    background: rgba(15, 118, 110, 0.04);
}

.tickets-table tbody tr:last-child td {
    border-bottom: none;
}

.tickets-table td {
    font-size: 0.88rem;
    color: var(--text);
}

.status-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
}

.status-active { background: rgba(16, 185, 129, 0.12); color: #059669; }
.status-used { background: rgba(99, 102, 241, 0.12); color: #5b5fc7; }
.status-cancelled { background: rgba(239, 68, 68, 0.12); color: #dc2626; }
.status-refunded { background: rgba(245, 158, 11, 0.12); color: #d97706; }

/* ===== التصفح ===== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 28px;
}

.pagination button {
    padding: 10px 16px;
    border: none;
    background: rgba(255, 255, 255, 0.08);
    color: var(--white);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    font-weight: 500;
}

.pagination button:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.15);
}

.pagination button.active {
    background: var(--primary);
    box-shadow: 0 4px 12px rgba(15, 118, 110, 0.4);
}

.pagination button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ===== صفحة الإحصائيات ===== */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

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

@media (max-width: 600px) {
    .stats-cards {
        grid-template-columns: 1fr;
    }
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 18px;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-card.total .stat-icon { background: rgba(99, 102, 241, 0.12); color: var(--secondary); }
.stat-card.active .stat-icon { background: rgba(16, 185, 129, 0.12); color: var(--success); }
.stat-card.revenue .stat-icon { background: rgba(16, 185, 129, 0.12); color: var(--success); }
.stat-card.airlines-count .stat-icon { background: rgba(139, 92, 246, 0.12); color: #8b5cf6; }

.stat-info {
    flex: 1;
}

.stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--dark);
    line-height: 1;
    letter-spacing: -0.02em;
}

.stat-label {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-top: 6px;
}

/* ===== الرسوم البيانية ===== */
.charts-section {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

@media (max-width: 900px) {
    .charts-section {
        grid-template-columns: 1fr;
    }
}

.chart-container {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-lg);
}

.chart-container h3 {
    color: var(--dark);
    margin-bottom: 24px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.chart-container h3 i {
    color: var(--primary);
    font-size: 1rem;
}

.chart-content {
    min-height: 220px;
}

.chart-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.chart-bar:last-child {
    margin-bottom: 0;
}

.chart-bar-label {
    width: 130px;
    font-size: 0.88rem;
    color: var(--text);
    text-align: right;
    font-weight: 500;
}

.chart-bar-fill {
    flex: 1;
    height: 32px;
    background: var(--light);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.chart-bar-value {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 8px;
    transition: width 0.8s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 12px;
    color: var(--white);
    font-weight: 600;
    font-size: 0.8rem;
    min-width: 40px;
}

.chart-container.full-width {
    grid-column: 1 / -1;
}

/* ===== إحصائيات الأسعار ===== */
.pricing-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

@media (max-width: 700px) {
    .pricing-stats {
        grid-template-columns: 1fr;
    }
}

.pricing-stat-item {
    background: var(--light);
    padding: 24px;
    border-radius: var(--radius);
    text-align: center;
    transition: var(--transition);
}

.pricing-stat-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.pricing-stat-item .stat-title {
    display: block;
    font-size: 0.88rem;
    color: var(--text-light);
    margin-bottom: 10px;
    font-weight: 500;
}

.pricing-stat-item .stat-amount {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--dark);
}

.pricing-stat-item .stat-amount.highlight {
    color: var(--primary);
    font-size: 1.8rem;
}

/* ===== Modal ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal.show {
    display: flex;
    animation: fadeIn 0.25s ease;
}

.modal-content {
    background: var(--white);
    border-radius: var(--radius-xl);
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow: auto;
    animation: scaleIn 0.3s ease;
}

@keyframes scaleIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-header {
    background: linear-gradient(145deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--white);
    padding: 24px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
}

.modal-header h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.2rem;
    font-weight: 600;
}

.close-btn {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.9;
    transition: var(--transition);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.25);
}

.modal-body {
    padding: 28px;
}

/* ===== التذييل ===== */
.footer {
    background: rgba(10, 15, 26, 0.95);
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
    padding: 24px;
    position: relative;
    z-index: 1;
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 12px;
        height: auto;
        padding: 16px;
    }
    
    .nav {
        width: 100%;
        justify-content: center;
    }
    
    .nav-link {
        padding: 10px 14px;
        font-size: 0.85rem;
    }
    
    .page-header h1 {
        font-size: 1.6rem;
    }
    
    .upload-zone {
        padding: 40px 24px;
    }
    
    .upload-icon {
        width: 80px;
        height: 80px;
        font-size: 2.2rem;
    }
    
    .filters {
        flex-direction: column;
    }
    
    .filters select,
    .filters input[type="date"],
    .filters .btn {
        width: 100%;
    }
    
    .tickets-table {
        font-size: 0.8rem;
    }
    
    .tickets-table th,
    .tickets-table td {
        padding: 10px 8px;
    }
}

/* ===== Loading Animation ===== */
.loading {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(15, 118, 110, 0.2);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 0.8s linear infinite;
}

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

/* ===== Empty State ===== */
.empty-state {
    text-align: center;
    padding: 60px 24px;
    color: var(--text-light);
}

.empty-state i {
    font-size: 3.5rem;
    color: var(--border);
    margin-bottom: 20px;
}

.empty-state h3 {
    color: var(--text);
    margin-bottom: 8px;
    font-weight: 600;
}

.empty-state p {
    font-size: 0.95rem;
}

/* ===== Tooltip ===== */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--dark);
    color: var(--white);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.78rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    margin-bottom: 6px;
    pointer-events: none;
}

[data-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
}

/* ===== قسم الأسعار ===== */
.pricing-section {
    margin-top: 24px;
}

.pricing-info .card-header {
    background: linear-gradient(145deg, #059669 0%, #10b981 100%);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

@media (max-width: 600px) {
    .pricing-grid {
        grid-template-columns: 1fr;
    }
}

.price-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: var(--light);
    border-radius: var(--radius);
    transition: var(--transition);
}

.price-item:hover {
    background: #e8eef3;
}

.price-item.total {
    background: linear-gradient(145deg, var(--primary) 0%, var(--primary-light) 100%);
    grid-column: 1 / -1;
}

.price-item.total .price-label,
.price-item.total .price-value {
    color: var(--white);
}

.price-icon {
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--primary);
    flex-shrink: 0;
}

.price-item.total .price-icon {
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
}

.price-details {
    flex: 1;
}

.price-label {
    display: block;
    font-size: 0.82rem;
    color: var(--text-light);
    margin-bottom: 4px;
}

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

.price-value.highlight {
    color: var(--primary);
    font-size: 1.2rem;
}

.price-item.total .price-value {
    font-size: 1.35rem;
}

/* ===== قسم الرحلات المتعددة ===== */
.segments-section {
    margin-top: 24px;
}

.segments-info .card-header {
    background: linear-gradient(145deg, #7c3aed 0%, #8b5cf6 100%);
}

.segments-timeline {
    position: relative;
}

.segment-item {
    display: flex;
    gap: 18px;
    padding: 18px;
    background: var(--light);
    border-radius: var(--radius);
    margin-bottom: 12px;
    position: relative;
    transition: var(--transition);
    border-right: 4px solid var(--primary);
}

.segment-item:hover {
    transform: translateX(-4px);
    box-shadow: var(--shadow);
}

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

.segment-number {
    width: 36px;
    height: 36px;
    background: linear-gradient(145deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
}

.segment-details {
    flex: 1;
}

.segment-route {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 10px;
}

.segment-from,
.segment-to {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--dark);
}

.segment-plane {
    color: var(--primary);
    font-size: 1.1rem;
    animation: flyRight 2s ease-in-out infinite;
}

@keyframes flyRight {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(6px); }
}

.segment-info {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    color: var(--text-light);
    font-size: 0.88rem;
}

.segment-info span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.segment-info i {
    color: var(--primary);
    font-size: 0.9rem;
}

/* ===== Modal Pricing ===== */
.modal-pricing .pricing-grid {
    background: var(--light);
    padding: 20px;
    border-radius: var(--radius);
}

.modal-grid .price-item {
    background: var(--white);
}

.modal-grid .price-item.total {
    background: linear-gradient(145deg, var(--primary) 0%, var(--primary-light) 100%);
}

/* ===== خلية السعر في الجدول ===== */
.price-cell {
    font-weight: 600;
    color: var(--primary) !important;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.25);
}

/* ===== Selection ===== */
::selection {
    background: var(--primary);
    color: var(--white);
}
/* ===== Force English Numbers ===== */
.value, .price-value, .stat-value, .stat-amount, .price-cell, .highlight, .code, .stat-number, .financial-value {
    font-family: 'Segoe UI', Tahoma, Arial, sans-serif !important;
    direction: ltr !important;
}

/* ===== صفحة الإحصائيات الجديدة ===== */

/* بطاقات الإحصائيات الرئيسية */
.stats-overview {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card-new {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.stat-card-new:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.stat-card-inner {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
}

.stat-icon-wrap {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}

.stat-card-new.primary .stat-icon-wrap {
    background: linear-gradient(145deg, #0f766e 0%, #14b8a6 100%);
    color: white;
}

.stat-card-new.success .stat-icon-wrap {
    background: linear-gradient(145deg, #059669 0%, #10b981 100%);
    color: white;
}

.stat-card-new.warning .stat-icon-wrap {
    background: linear-gradient(145deg, #d97706 0%, #f59e0b 100%);
    color: white;
}

.stat-card-new.info .stat-icon-wrap {
    background: linear-gradient(145deg, #4f46e5 0%, #6366f1 100%);
    color: white;
}

.stat-data {
    flex: 1;
}

.stat-number {
    display: block;
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--dark);
    line-height: 1.2;
}

.stat-card-new .stat-title {
    display: block;
    font-size: 0.95rem;
    color: var(--text-light);
    margin-top: 4px;
}

.stat-footer {
    background: var(--light);
    padding: 12px 24px;
    font-size: 0.85rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 8px;
}

.stat-footer i {
    font-size: 0.9rem;
}

/* القسم المالي */
.financial-section {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 32px;
    box-shadow: var(--shadow);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.section-header h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-header h2 i {
    color: var(--primary);
    font-size: 1.4rem;
}

.view-all-link {
    color: var(--primary);
    font-size: 0.95rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.view-all-link:hover {
    color: var(--primary-dark);
    gap: 10px;
}

.financial-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.financial-card {
    border-radius: var(--radius);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 18px;
    transition: var(--transition);
}

.financial-card:hover {
    transform: scale(1.02);
}

.financial-card.base {
    background: linear-gradient(145deg, #f0fdf4 0%, #dcfce7 100%);
    border: 1px solid #bbf7d0;
}

.financial-card.taxes {
    background: linear-gradient(145deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #fcd34d;
}

.financial-card.total {
    background: linear-gradient(145deg, #0f766e 0%, #14b8a6 100%);
}

.financial-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.financial-card.base .financial-icon {
    background: rgba(16, 185, 129, 0.2);
    color: #059669;
}

.financial-card.taxes .financial-icon {
    background: rgba(217, 119, 6, 0.2);
    color: #b45309;
}

.financial-card.total .financial-icon {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.financial-info {
    flex: 1;
}

.financial-label {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 6px;
}

.financial-card.base .financial-label,
.financial-card.taxes .financial-label {
    color: var(--text-light);
}

.financial-card.total .financial-label {
    color: rgba(255, 255, 255, 0.85);
}

.financial-value {
    display: block;
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1.2;
}

.financial-card.base .financial-value {
    color: #059669;
}

.financial-card.taxes .financial-value {
    color: #b45309;
}

.financial-card.total .financial-value {
    color: white;
}

.financial-currency {
    display: block;
    font-size: 0.85rem;
    margin-top: 4px;
}

.financial-card.base .financial-currency,
.financial-card.taxes .financial-currency {
    color: var(--text-light);
}

.financial-card.total .financial-currency {
    color: rgba(255, 255, 255, 0.7);
}

/* شبكة الرسوم البيانية */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

.chart-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.chart-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.chart-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.chart-header h3 i {
    color: var(--primary);
}

.chart-body {
    padding: 24px;
    max-height: 400px;
    overflow-y: auto;
}

/* عناصر الرسم البياني */
.chart-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}

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

.chart-item-label {
    width: 140px;
    font-weight: 600;
    color: var(--dark);
    font-size: 0.95rem;
}

.chart-item-bar-wrap {
    flex: 1;
    height: 28px;
    background: var(--light);
    border-radius: 14px;
    overflow: hidden;
    position: relative;
}

.chart-item-bar {
    height: 100%;
    border-radius: 14px;
    display: flex;
    align-items: center;
    padding-right: 12px;
    font-size: 0.85rem;
    font-weight: 700;
    color: white;
    min-width: fit-content;
    transition: width 0.8s ease-out;
}

.chart-item-value {
    width: 50px;
    text-align: center;
    font-weight: 700;
    color: var(--dark);
    font-size: 1rem;
}

/* ألوان متنوعة للرسوم البيانية */
.chart-item:nth-child(1) .chart-item-bar { background: linear-gradient(90deg, #0f766e, #14b8a6); }
.chart-item:nth-child(2) .chart-item-bar { background: linear-gradient(90deg, #4f46e5, #6366f1); }
.chart-item:nth-child(3) .chart-item-bar { background: linear-gradient(90deg, #dc2626, #ef4444); }
.chart-item:nth-child(4) .chart-item-bar { background: linear-gradient(90deg, #d97706, #f59e0b); }
.chart-item:nth-child(5) .chart-item-bar { background: linear-gradient(90deg, #059669, #10b981); }
.chart-item:nth-child(6) .chart-item-bar { background: linear-gradient(90deg, #7c3aed, #8b5cf6); }
.chart-item:nth-child(7) .chart-item-bar { background: linear-gradient(90deg, #db2777, #ec4899); }
.chart-item:nth-child(8) .chart-item-bar { background: linear-gradient(90deg, #0284c7, #0ea5e9); }
.chart-item:nth-child(9) .chart-item-bar { background: linear-gradient(90deg, #65a30d, #84cc16); }
.chart-item:nth-child(10) .chart-item-bar { background: linear-gradient(90deg, #0891b2, #06b6d4); }

/* قسم أحدث التذاكر */
.recent-section {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow);
}

.recent-tickets-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.recent-ticket-card {
    background: var(--light);
    border-radius: var(--radius);
    padding: 20px;
    transition: var(--transition);
    border-right: 4px solid var(--primary);
    cursor: pointer;
}

.recent-ticket-card:hover {
    transform: translateX(-4px);
    box-shadow: var(--shadow);
}

.recent-ticket-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 14px;
}

.recent-ticket-pnr {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--primary);
}

.recent-ticket-date {
    font-size: 0.8rem;
    color: var(--text-light);
    background: var(--white);
    padding: 4px 10px;
    border-radius: 20px;
}

.recent-ticket-passenger {
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.recent-ticket-passenger i {
    color: var(--primary);
}

.recent-ticket-route {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    color: var(--text-light);
}

.recent-ticket-route .route-code {
    font-weight: 700;
    color: var(--dark);
}

.recent-ticket-route i {
    color: var(--primary);
    font-size: 0.85rem;
}

.recent-ticket-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed var(--border);
}

.recent-ticket-airline {
    font-size: 0.85rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 6px;
}

.recent-ticket-amount {
    font-weight: 700;
    color: var(--primary);
}

/* حالة فارغة */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.3;
}

.empty-state p {
    font-size: 1.1rem;
}

/* Responsive */
@media (max-width: 1200px) {
    .stats-overview {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .charts-grid {
        grid-template-columns: 1fr;
    }
    
    .recent-tickets-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .stats-overview {
        grid-template-columns: 1fr;
    }
    
    .financial-cards {
        grid-template-columns: 1fr;
    }
    
    .recent-tickets-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    .financial-value {
        font-size: 1.5rem;
    }
    
    .currency-stats-container {
        grid-template-columns: 1fr;
    }
}

/* ===== بطاقات العملات ===== */
.currency-stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.currency-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.currency-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.currency-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.currency-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

/* ألوان العملات */
.currency-card.usd .currency-icon {
    background: linear-gradient(145deg, #059669 0%, #10b981 100%);
    color: white;
}

.currency-card.usd .currency-header {
    background: linear-gradient(145deg, #ecfdf5 0%, #d1fae5 100%);
}

.currency-card.iqd .currency-icon {
    background: linear-gradient(145deg, #d97706 0%, #f59e0b 100%);
    color: white;
}

.currency-card.iqd .currency-header {
    background: linear-gradient(145deg, #fffbeb 0%, #fef3c7 100%);
}

.currency-card.eur .currency-icon {
    background: linear-gradient(145deg, #4f46e5 0%, #6366f1 100%);
    color: white;
}

.currency-card.eur .currency-header {
    background: linear-gradient(145deg, #eef2ff 0%, #e0e7ff 100%);
}

.currency-card.aed .currency-icon {
    background: linear-gradient(145deg, #dc2626 0%, #ef4444 100%);
    color: white;
}

.currency-card.aed .currency-header {
    background: linear-gradient(145deg, #fef2f2 0%, #fee2e2 100%);
}

.currency-card.default .currency-icon {
    background: linear-gradient(145deg, #64748b 0%, #94a3b8 100%);
    color: white;
}

.currency-card.default .currency-header {
    background: linear-gradient(145deg, #f8fafc 0%, #f1f5f9 100%);
}

.currency-title {
    flex: 1;
}

.currency-name {
    display: block;
    font-weight: 700;
    color: var(--dark);
    font-size: 1.1rem;
}

.currency-code {
    display: block;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 2px;
}

.currency-badge {
    background: var(--primary);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.currency-body {
    padding: 20px 24px;
}

.currency-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px dashed var(--border);
}

.currency-stat:last-child {
    border-bottom: none;
}

.currency-stat .stat-label {
    color: var(--text-light);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.currency-stat .stat-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--dark);
}

.currency-stat.total {
    background: linear-gradient(145deg, #0f766e 0%, #14b8a6 100%);
    margin: 14px -24px -20px;
    padding: 18px 24px;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.currency-stat.total .stat-label {
    color: rgba(255, 255, 255, 0.9);
}

.currency-stat.total .stat-label i {
    color: rgba(255, 255, 255, 0.8);
}

.currency-stat.total .stat-value {
    color: white;
    font-size: 1.4rem;
}

/* ===== قسم إحصائيات الشركات - جدول ===== */
.companies-section {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 32px;
    box-shadow: var(--shadow);
}

.companies-table-container {
    overflow-x: auto;
    margin-top: 20px;
}

.companies-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.companies-table thead {
    background: linear-gradient(145deg, #0f766e 0%, #14b8a6 100%);
}

.companies-table thead th {
    color: white;
    font-weight: 600;
    padding: 16px 20px;
    text-align: right;
    white-space: nowrap;
}

.companies-table thead th:first-child {
    border-radius: 0 12px 0 0;
    width: 50px;
    text-align: center;
}

.companies-table thead th:last-child {
    border-radius: 12px 0 0 0;
}

.companies-table tbody tr {
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

.companies-table tbody tr:hover {
    background: var(--light);
}

.companies-table tbody tr:last-child {
    border-bottom: none;
}

.companies-table tbody td {
    padding: 16px 20px;
    vertical-align: middle;
}

.companies-table .row-number {
    text-align: center;
    color: var(--text-light);
    font-weight: 600;
    width: 50px;
}

.companies-table .company-name-cell {
    font-weight: 600;
    color: var(--dark);
}

.companies-table .company-name-cell i {
    color: var(--primary);
    margin-left: 10px;
}

.companies-table .tickets-count-cell {
    text-align: center;
}

.badge-tickets {
    display: inline-block;
    background: linear-gradient(145deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
}

.companies-table .amount-cell {
    font-weight: 700;
    direction: ltr;
    text-align: left;
}

.companies-table .amount-cell.iqd {
    color: #d97706;
}

.companies-table .amount-cell.usd {
    color: #059669;
}

.companies-table .amount-cell.other {
    color: var(--secondary);
}

.other-currency {
    display: inline-block;
    background: var(--light);
    padding: 4px 10px;
    border-radius: 6px;
    margin: 2px;
    font-size: 0.85rem;
}

.other-currency small {
    color: var(--text-light);
    margin-right: 4px;
}

.empty-cell {
    text-align: center;
    padding: 40px !important;
    color: var(--text-light);
}

.empty-cell i {
    margin-left: 10px;
    font-size: 1.2rem;
}

/* Responsive للجدول */
@media (max-width: 900px) {
    .companies-table {
        font-size: 0.85rem;
    }
    
    .companies-table thead th,
    .companies-table tbody td {
        padding: 12px 10px;
    }
    
    .badge-tickets {
        padding: 4px 10px;
        font-size: 0.8rem;
    }
}

@media (max-width: 600px) {
    .companies-table thead th:nth-child(6),
    .companies-table tbody td:nth-child(6) {
        display: none;
    }
}

/* ===== صفحة التذاكر المحسنة ===== */

/* بطاقة الفلاتر */
.filters-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 24px;
    overflow: hidden;
}

.filters-header {
    background: linear-gradient(145deg, var(--dark) 0%, var(--dark-light) 100%);
    padding: 16px 24px;
}

.filters-header h3 {
    color: white;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.filters-body {
    padding: 24px;
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.filter-row:last-child {
    margin-bottom: 0;
}

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

.filter-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-group label i {
    color: var(--primary);
    font-size: 0.9rem;
}

.filter-group input,
.filter-group select {
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.95rem;
    background: var(--light);
    transition: var(--transition);
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.1);
}

.filter-group.search-group {
    grid-column: span 2;
}

.filter-group.filter-actions {
    flex-direction: row;
    align-items: flex-end;
    gap: 10px;
}

.filter-group.filter-actions .btn {
    flex: 1;
    justify-content: center;
}

/* بطاقة جدول التذاكر */
.tickets-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}

/* جدول التذاكر الجديد */
.tickets-table-new {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.tickets-table-new thead {
    background: linear-gradient(145deg, #0f766e 0%, #14b8a6 100%);
}

.tickets-table-new thead th {
    color: white;
    font-weight: 600;
    padding: 16px 14px;
    text-align: right;
    white-space: nowrap;
    font-size: 0.9rem;
}

.tickets-table-new thead th.th-num {
    width: 60px;
    text-align: center;
}

.tickets-table-new thead th.th-actions {
    width: 100px;
    text-align: center;
}

.tickets-table-new tbody tr {
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

.tickets-table-new tbody tr:hover {
    background: rgba(15, 118, 110, 0.04);
}

.tickets-table-new tbody tr:last-child {
    border-bottom: none;
}

.tickets-table-new tbody td {
    padding: 14px;
    vertical-align: middle;
}

.tickets-table-new .td-num {
    text-align: center;
    color: var(--text-light);
    font-weight: 600;
}

.tickets-table-new .td-ticket {
    font-family: 'Segoe UI', monospace;
    font-size: 0.85rem;
    direction: ltr;
}

.tickets-table-new .td-pnr .pnr-badge {
    background: linear-gradient(145deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.9rem;
    display: inline-block;
}

.tickets-table-new .td-passenger {
    font-weight: 600;
    color: var(--dark);
}

.tickets-table-new .td-passenger i {
    color: var(--primary);
    margin-left: 8px;
}

.tickets-table-new .td-company .company-badge {
    background: var(--light);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--text);
    display: inline-block;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tickets-table-new .td-route {
    font-weight: 700;
    color: var(--dark);
    white-space: nowrap;
}

.tickets-table-new .td-date {
    white-space: nowrap;
    color: var(--text-light);
}

.tickets-table-new .td-airline {
    font-size: 0.85rem;
}

.tickets-table-new .td-amount {
    white-space: nowrap;
}

.tickets-table-new .td-amount .amount-value {
    font-weight: 700;
    color: var(--primary);
    font-family: 'Segoe UI', sans-serif;
}

.tickets-table-new .td-amount .amount-currency {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-right: 4px;
}

.tickets-table-new .td-status .status-badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.tickets-table-new .td-actions {
    text-align: center;
    white-space: nowrap;
}

/* أزرار الإجراءات */
.btn-action {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 3px;
}

.btn-action.btn-view {
    background: rgba(15, 118, 110, 0.1);
    color: var(--primary);
}

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

.btn-action.btn-delete {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.btn-action.btn-delete:hover {
    background: var(--danger);
    color: white;
}

/* حالة التحميل */
.loading-row {
    text-align: center;
    padding: 40px !important;
    color: var(--text-light);
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 10px;
}

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

/* حالة فارغة */
.empty-state-row {
    text-align: center;
    padding: 60px 20px !important;
}

.empty-content {
    color: var(--text-light);
}

.empty-content i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.3;
}

.empty-content h3 {
    margin-bottom: 10px;
    color: var(--dark);
}

/* Responsive */
@media (max-width: 1200px) {
    .filter-group.search-group {
        grid-column: span 1;
    }
    
    .tickets-table-new .td-ticket {
        display: none;
    }
}

@media (max-width: 900px) {
    .filter-row {
        grid-template-columns: 1fr 1fr;
    }
    
    .tickets-table-new {
        font-size: 0.85rem;
    }
    
    .tickets-table-new thead th,
    .tickets-table-new tbody td {
        padding: 10px 8px;
    }
    
    .tickets-table-new .td-company {
        display: none;
    }
}

@media (max-width: 600px) {
    .filter-row {
        grid-template-columns: 1fr;
    }
    
    .filter-group.filter-actions {
        flex-direction: column;
    }
    
    .tickets-table-new .td-airline,
    .tickets-table-new .td-date {
        display: none;
    }
}
