/* ═══════════════════════════════════════════
   IFNEX Orders & Order Form Styles
   ═══════════════════════════════════════════ */

:root {
    --ifnex-primary: #f59e0b;
    --ifnex-primary-dark: #d97706;
    --ifnex-dark: #1a1a2e;
    --ifnex-gray: #6b7280;
    --ifnex-light: #f9fafb;
    --ifnex-border: #e5e7eb;
    --ifnex-success: #10b981;
    --ifnex-danger: #ef4444;
    --ifnex-info: #3b82f6;
    --ifnex-warning: #f59e0b;
    --ifnex-radius: 12px;
}

/* ─── General Buttons ─── */
.ifnex-btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none !important;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}
.ifnex-btn:hover { opacity: 0.9; transform: translateY(-1px); }
.ifnex-btn-primary { background: var(--ifnex-primary); color: #fff; }
.ifnex-btn-success { background: var(--ifnex-success); color: #fff; }
.ifnex-btn-danger { background: var(--ifnex-danger); color: #fff; }
.ifnex-btn-info { background: var(--ifnex-info); color: #fff; }
.ifnex-btn-sm { padding: 6px 12px; font-size: 12px; }

/* ─── Badges ─── */
.ifnex-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}
.ifnex-badge-success { background: #d1fae5; color: #065f46; }
.ifnex-badge-danger { background: #fee2e2; color: #991b1b; }
.ifnex-badge-info { background: #dbeafe; color: #1e40af; }
.ifnex-badge-warning { background: #fef3c7; color: #92400e; }
.ifnex-badge-gray { background: #f3f4f6; color: #374151; }
.ifnex-badge-primary { background: #fef3c7; color: #92400e; }
.ifnex-badge-purple { background: #ede9fe; color: #5b21b6; }

/* ═══ Orders List ═══ */
.ifnex-orders-list { max-width: 1200px; margin: 0 auto; padding: 20px 0; }
.ifnex-orders-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 20px; flex-wrap: wrap; gap: 12px;
}
.ifnex-orders-header h2 { margin: 0; color: var(--ifnex-dark); }

.ifnex-filter-bar {
    display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px;
    padding: 12px; background: #fff; border-radius: var(--ifnex-radius);
    border: 1px solid var(--ifnex-border);
}
.ifnex-filter-bar a {
    padding: 6px 14px; border-radius: 999px; font-size: 13px;
    text-decoration: none !important; color: var(--ifnex-gray);
    border: 1px solid var(--ifnex-border); transition: all 0.2s;
}
.ifnex-filter-bar a:hover { border-color: var(--ifnex-primary); color: var(--ifnex-primary); }
.ifnex-filter-bar a.active {
    background: var(--ifnex-primary); color: #fff; border-color: var(--ifnex-primary);
}

.ifnex-orders-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}
.ifnex-order-card {
    background: #fff; border-radius: var(--ifnex-radius);
    border: 1px solid var(--ifnex-border); padding: 20px;
    transition: box-shadow 0.2s;
}
.ifnex-order-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.08); }

.ifnex-order-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--ifnex-border);
}
.ifnex-awb code {
    background: var(--ifnex-light); padding: 4px 8px; border-radius: 6px;
    font-size: 13px; color: var(--ifnex-dark); font-weight: 700;
}

.ifnex-order-route {
    display: flex; align-items: center; gap: 12px; margin-bottom: 16px;
}
.ifnex-route-from, .ifnex-route-to { flex: 1; }
.ifnex-route-arrow { color: var(--ifnex-primary); font-size: 18px; }
.ifnex-label { display: block; font-size: 11px; color: var(--ifnex-gray); margin-bottom: 2px; }
.ifnex-country { font-weight: 600; color: var(--ifnex-dark); }

.ifnex-order-details {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
    margin-bottom: 16px; padding: 12px; background: var(--ifnex-light);
    border-radius: 8px;
}
.ifnex-detail-item { font-size: 13px; }
.ifnex-price { font-weight: 700; color: var(--ifnex-primary-dark); }

.ifnex-order-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.ifnex-empty-state {
    text-align: center; padding: 60px 20px; background: #fff;
    border-radius: var(--ifnex-radius); border: 1px dashed var(--ifnex-border);
}
.ifnex-empty-state p { font-size: 18px; color: var(--ifnex-gray); margin-bottom: 20px; }

.ifnex-pagination { display: flex; gap: 6px; justify-content: center; margin-top: 24px; }
.ifnex-pagination a {
    padding: 6px 12px; border-radius: 6px; text-decoration: none !important;
    border: 1px solid var(--ifnex-border); color: var(--ifnex-gray); font-size: 13px;
}
.ifnex-pagination a.active { background: var(--ifnex-primary); color: #fff; border-color: var(--ifnex-primary); }

/* ═══ Order Form (Multi-step) ═══ */
.ifnex-order-form-container {
    max-width: 900px; margin: 0 auto; padding: 20px 0;
}

.ifnex-steps {
    display: flex; justify-content: space-between; margin-bottom: 32px;
    position: relative;
}
.ifnex-steps::before {
    content: ''; position: absolute; top: 20px; left: 10%; right: 10%;
    height: 2px; background: var(--ifnex-border); z-index: 0;
}
.ifnex-step {
    position: relative; z-index: 1; text-align: center; flex: 1;
    font-size: 13px; color: var(--ifnex-gray);
}
.ifnex-step span {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 50%; background: #fff;
    border: 2px solid var(--ifnex-border); margin-bottom: 6px;
    font-weight: 700; transition: all 0.3s;
}
.ifnex-step.active span, .ifnex-step.done span {
    background: var(--ifnex-primary); border-color: var(--ifnex-primary); color: #fff;
}
.ifnex-step.active { color: var(--ifnex-primary-dark); font-weight: 700; }

.ifnex-form-step { display: none !important; }
.ifnex-form-step.active { display: block !important; }
@keyframes ifnexFadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; } }

.ifnex-form-card {
    background: #fff; border-radius: var(--ifnex-radius);
    border: 1px solid var(--ifnex-border); padding: 28px;
}
.ifnex-form-card h3 { margin-top: 0; color: var(--ifnex-dark); }

.ifnex-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ifnex-form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .ifnex-form-grid { grid-template-columns: 1fr; } }

.ifnex-field label {
    display: block; font-size: 13px; font-weight: 600;
    color: var(--ifnex-dark); margin-bottom: 6px;
}
.ifnex-field input, .ifnex-field select, .ifnex-field textarea {
    width: 100%; padding: 10px 12px; border: 1px solid var(--ifnex-border);
    border-radius: 8px; font-size: 14px; background: #fff;
    transition: border-color 0.2s;
}
.ifnex-field input:focus, .ifnex-field select:focus, .ifnex-field textarea:focus {
    outline: none; border-color: var(--ifnex-primary);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.ifnex-form-nav {
    display: flex; justify-content: space-between; margin-top: 24px; gap: 12px;
}

/* ─── Price Summary ─── */
.ifnex-price-summary {
    background: var(--ifnex-light); border-radius: 8px; padding: 20px;
}
.ifnex-price-row {
    display: flex; justify-content: space-between; padding: 8px 0;
    font-size: 14px; border-bottom: 1px dashed var(--ifnex-border);
}
.ifnex-price-row.total {
    border-bottom: none; font-size: 18px; font-weight: 800;
    color: var(--ifnex-primary-dark); padding-top: 12px;
}

.ifnex-error-box {
    background: #fee2e2; color: #991b1b; padding: 12px 16px;
    border-radius: 8px; margin-bottom: 16px; font-size: 14px;
}
.ifnex-success-box {
    background: #d1fae5; color: #065f46; padding: 20px;
    border-radius: 8px; text-align: center; font-size: 16px;
}

.ifnex-login-prompt {
    max-width: 500px; margin: 40px auto; text-align: center;
    background: #fff; padding: 40px; border-radius: var(--ifnex-radius);
    border: 1px solid var(--ifnex-border);
}

/* ═══ Payment Page ═══ */
.ifnex-payment-page { max-width: 700px; margin: 0 auto; padding: 20px 0; }
.ifnex-payment-card {
    background: #fff; border-radius: var(--ifnex-radius);
    border: 1px solid var(--ifnex-border); padding: 32px;
}
.ifnex-payment-card h2 { margin-top: 0; color: var(--ifnex-dark); }

.ifnex-order-summary {
    background: var(--ifnex-light); border-radius: 8px;
    padding: 20px; margin-bottom: 24px;
}
.ifnex-summary-row {
    display: flex; justify-content: space-between; padding: 8px 0;
    border-bottom: 1px dashed var(--ifnex-border);
}
.ifnex-summary-row:last-child { border-bottom: none; }
.ifnex-summary-row.total {
    font-size: 18px; font-weight: 700; color: var(--ifnex-primary-dark);
    padding-top: 12px; margin-top: 8px; border-top: 2px solid var(--ifnex-primary);
}

.ifnex-payment-methods { display: grid; gap: 16px; }
.ifnex-payment-option {
    border: 2px solid var(--ifnex-border); border-radius: 8px;
    padding: 20px; transition: all 0.2s;
}
.ifnex-payment-option:hover { border-color: var(--ifnex-primary); }
.ifnex-payment-option.disabled { opacity: 0.5; pointer-events: none; }
.ifnex-payment-option h3 { margin-top: 0; color: var(--ifnex-dark); }
.ifnex-payment-option p { color: var(--ifnex-gray); margin: 8px 0 16px; }

.ifnex-warning {
    background: #fef3c7; color: #92400e; padding: 10px;
    border-radius: 6px; font-size: 13px; margin-bottom: 12px;
}

.ifnex-payment-footer {
    margin-top: 24px; padding-top: 20px;
    border-top: 1px solid var(--ifnex-border); text-align: center;
}

/* ═══ Order Detail Page ═══ */
.ifnex-order-detail { max-width: 900px; margin: 0 auto; padding: 20px 0; }

.ifnex-detail-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 20px; flex-wrap: wrap; gap: 12px;
}
.ifnex-detail-title { display: flex; align-items: center; gap: 12px; }
.ifnex-detail-title h2 { margin: 0; color: var(--ifnex-dark); }
.ifnex-awb-code {
    background: var(--ifnex-dark); color: #fff; padding: 6px 12px;
    border-radius: 6px; font-size: 14px; font-weight: 700;
}
.ifnex-badge-lg { padding: 8px 20px; font-size: 14px; }

.ifnex-detail-actions {
    display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px;
    padding: 16px; background: var(--ifnex-light); border-radius: 8px;
}

.ifnex-detail-section {
    background: #fff; border: 1px solid var(--ifnex-border);
    border-radius: var(--ifnex-radius); padding: 24px; margin-bottom: 20px;
}
.ifnex-detail-section h3 {
    margin-top: 0; color: var(--ifnex-dark); padding-bottom: 12px;
    border-bottom: 1px solid var(--ifnex-border); margin-bottom: 16px;
}

.ifnex-route-detail {
    display: flex; align-items: center; gap: 20px; padding: 20px;
}
.ifnex-route-point {
    flex: 1; text-align: center; padding: 20px;
    background: var(--ifnex-light); border-radius: 8px;
}
.ifnex-point-label {
    font-size: 12px; color: var(--ifnex-gray); text-transform: uppercase;
    letter-spacing: 1px; margin-bottom: 8px;
}
.ifnex-point-country {
    font-size: 20px; font-weight: 700; color: var(--ifnex-dark);
    margin-bottom: 4px;
}
.ifnex-point-iso {
    font-size: 13px; color: var(--ifnex-gray); font-weight: 600;
}
.ifnex-route-line {
    display: flex; align-items: center; justify-content: center;
    flex: 0.5;
}
.ifnex-plane-icon { font-size: 32px; }

.ifnex-info-grid {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
}
.ifnex-info-item.full { grid-column: 1 / -1; }
.ifnex-info-label {
    display: block; font-size: 12px; color: var(--ifnex-gray);
    text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px;
}
.ifnex-info-value { font-size: 15px; color: var(--ifnex-dark); font-weight: 500; }

.ifnex-price-breakdown { padding: 8px 0; }
.ifnex-price-row {
    display: flex; justify-content: space-between; padding: 10px 0;
    border-bottom: 1px dashed var(--ifnex-border); font-size: 14px;
}
.ifnex-price-row:last-child { border-bottom: none; }
.ifnex-price-row.total {
    font-size: 18px; font-weight: 800; color: var(--ifnex-primary-dark);
    padding-top: 16px; margin-top: 8px; border-top: 2px solid var(--ifnex-primary);
    border-bottom: none;
}

.ifnex-text-success { color: var(--ifnex-success); font-weight: 600; }
.ifnex-text-warning { color: var(--ifnex-warning); font-weight: 600; }

/* Timeline */
.ifnex-timeline { position: relative; padding-right: 20px; }
.ifnex-timeline::before {
    content: ''; position: absolute; right: 8px; top: 0; bottom: 0;
    width: 2px; background: var(--ifnex-border);
}
.ifnex-timeline-item {
    position: relative; padding-right: 32px; padding-bottom: 20px;
}
.ifnex-timeline-item:last-child { padding-bottom: 0; }
.ifnex-timeline-dot {
    position: absolute; right: -20px; top: 4px;
    width: 16px; height: 16px; border-radius: 50%;
    background: var(--ifnex-primary); border: 3px solid #fff;
    box-shadow: 0 0 0 2px var(--ifnex-border);
}
.ifnex-timeline-content {
    background: var(--ifnex-light); padding: 12px 16px;
    border-radius: 8px; border-right: 3px solid var(--ifnex-primary);
}
.ifnex-timeline-header {
    display: flex; justify-content: space-between; flex-wrap: wrap;
    gap: 8px; margin-bottom: 4px;
}
.ifnex-timeline-date { font-size: 12px; color: var(--ifnex-gray); }
.ifnex-timeline-location { font-size: 13px; color: var(--ifnex-gray); }
.ifnex-empty-timeline { color: var(--ifnex-gray); font-style: italic; }

@media (max-width: 640px) {
    .ifnex-route-detail { flex-direction: column; }
    .ifnex-route-line { transform: rotate(90deg); }
    .ifnex-info-grid { grid-template-columns: 1fr; }
}

@media print {
    .ifnex-detail-actions { display: none !important; }
    .ifnex-order-detail { max-width: 100%; }
}

/* ═══ Modern Customer Dashboard (ifnx) ═══ */
.ifnx-dashboard {
    display: flex !important; gap: 24px; max-width: 1240px; margin: 0 auto; padding: 24px 0;
    font-family: inherit;
}

/* ── Sidebar ─ */
.ifnx-sidebar {
    width: 260px !important; flex-shrink: 0 !important; align-self: flex-start !important;
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%) !important;
    border-radius: 20px; overflow: hidden;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.25);
}
.ifnx-user-card { padding: 28px 20px; text-align: center; border-bottom: 1px solid rgba(255,255,255,0.08); }
.ifnx-avatar {
    width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 50%;
    background: linear-gradient(135deg, #f97316, #fb923c);
    display: flex; align-items: center; justify-content: center; color: #fff;
    box-shadow: 0 6px 18px rgba(249, 115, 22, 0.4);
}
.ifnx-user-name { color: #fff; font-weight: 700; font-size: 16px; }
.ifnx-user-email { color: rgba(255,255,255,0.55); font-size: 12px; margin-top: 4px; direction: ltr; }

.ifnx-menu { padding: 12px 0; display: flex !important; flex-direction: column !important; }
.ifnx-menu-item {
    display: flex; align-items: center; gap: 12px;
    padding: 13px 22px; color: rgba(255,255,255,0.72);
    text-decoration: none; font-size: 14px; font-weight: 500;
    border-right: 3px solid transparent; transition: all 0.25s ease;
}
.ifnx-menu-item:hover { background: rgba(255,255,255,0.06); color: #fff; }
.ifnx-menu-item.active {
    background: linear-gradient(90deg, rgba(249,115,22,0.18), transparent);
    border-right-color: #f97316; color: #fff; font-weight: 700;
}
.ifnx-menu-icon { display: flex; align-items: center; }
.ifnx-menu-divider { height: 1px; background: rgba(255,255,255,0.08); margin: 10px 20px; }
.ifnx-menu-item.logout { color: #f87171; }
.ifnx-menu-item.logout:hover { background: rgba(248,113,113,0.1); color: #f87171; }

/* ── Content ── */
.ifnx-content { flex: 1; min-width: 0; }
.ifnx-content-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 20px; flex-wrap: wrap; gap: 8px;
}
.ifnx-content-header h2 { margin: 0; color: #0f172a; font-size: 22px; font-weight: 800; }
.ifnx-breadcrumb { color: #94a3b8; font-size: 13px; }

/* ── Stats ─ */
.ifnx-stats {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 16px; margin-bottom: 24px;
}
.ifnx-stat {
    background: #fff; border-radius: 16px; padding: 18px;
    display: flex; align-items: center; gap: 14px;
    box-shadow: 0 1px 3px rgba(15,23,42,0.06), 0 8px 24px rgba(15,23,42,0.05);
    border: 1px solid #eef2f7; transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.ifnx-stat:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(15,23,42,0.1); }
.ifnx-stat-icon {
    width: 48px; height: 48px; border-radius: 14px; flex-shrink: 0;
    background: var(--tint); color: var(--clr);
    display: flex; align-items: center; justify-content: center;
}
.ifnx-stat-value { display: block; font-size: 20px; font-weight: 800; color: #0f172a; }
.ifnx-stat-label { display: block; font-size: 12px; color: #64748b; margin-top: 2px; }

/* ── Cards ── */
.ifnx-card {
    background: #fff; border-radius: 16px; padding: 22px;
    border: 1px solid #eef2f7;
    box-shadow: 0 1px 3px rgba(15,23,42,0.06), 0 8px 24px rgba(15,23,42,0.05);
}
.ifnx-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.ifnx-card-header h3 { margin: 0; color: #0f172a; font-size: 16px; font-weight: 700; }
.ifnx-link { color: #f97316; font-size: 13px; text-decoration: none; font-weight: 600; }
.ifnx-link:hover { text-decoration: underline; }

.ifnx-empty { text-align: center; padding: 40px 0; color: #94a3b8; }
.ifnx-empty svg { opacity: 0.4; margin-bottom: 12px; }
.ifnx-empty p { margin-bottom: 16px; }

.ifnx-order-list { display: flex; flex-direction: column; gap: 10px; }
.ifnx-order-row {
    display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
    padding: 14px 16px; background: #f8fafc; border-radius: 12px;
    border: 1px solid #eef2f7; transition: background 0.2s;
}
.ifnx-order-row:hover { background: #f1f5f9; }
.ifnx-order-awb code { font-weight: 700; color: #0f172a; background: #fff; padding: 4px 10px; border-radius: 8px; border: 1px solid #e2e8f0; }
.ifnx-order-route { color: #64748b; font-size: 13px; flex: 1; }
.ifnx-order-amount { font-weight: 700; color: #0f172a; }
.ifnx-order-amount small { color: #94a3b8; font-weight: 400; }

/* ── Wallet Hero ── */
.ifnx-wallet-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 60%, #334155 100%);
    border-radius: 20px; padding: 40px; color: #fff; text-align: center;
    position: relative; overflow: hidden;
    box-shadow: 0 15px 40px rgba(15,23,42,0.3);
}
.ifnx-wallet-hero::before {
    content: ''; position: absolute; top: -60px; left: -60px;
    width: 200px; height: 200px; border-radius: 50%;
    background: radial-gradient(circle, rgba(249,115,22,0.35), transparent 70%);
}
.ifnx-wallet-label { font-size: 14px; color: rgba(255,255,255,0.65); margin-bottom: 10px; }
.ifnx-wallet-amount { font-size: 42px; font-weight: 800; }
.ifnx-wallet-amount small { font-size: 16px; font-weight: 400; color: rgba(255,255,255,0.6); }
.ifnx-wallet-actions { margin-top: 26px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.ifnx-wallet-btn {
    background: linear-gradient(135deg, #f97316, #fb923c); color: #fff;
    padding: 12px 26px; border-radius: 12px; text-decoration: none;
    font-weight: 700; font-size: 14px; box-shadow: 0 6px 18px rgba(249,115,22,0.4);
    transition: transform 0.2s;
}
.ifnx-wallet-btn:hover { transform: translateY(-2px); }
.ifnx-wallet-btn.ghost { background: rgba(255,255,255,0.1); box-shadow: none; border: 1px solid rgba(255,255,255,0.2); }

/* ── Responsive ── */
@media (max-width: 900px) {
    .ifnx-dashboard { flex-direction: column; }
    .ifnx-sidebar { width: 100%; }
    .ifnx-menu { flex-direction: row; flex-wrap: wrap; padding: 10px; }
    .ifnx-menu-item { border-right: none; border-bottom: 3px solid transparent; padding: 10px 14px; }
    .ifnx-menu-item.active { border-bottom-color: #f97316; }
    .ifnx-menu-divider { display: none; }
}

/* ═══ Transactions (Modernized) ═══ */
.ifnex-transactions h3 {
    margin: 0 0 20px 0;
    color: #0f172a;
    font-size: 20px;
    font-weight: 800;
}

.ifnex-transactions-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ifnex-transaction-item {
    background: #fff;
    border-radius: 14px;
    padding: 18px 20px;
    border: 1px solid #eef2f7;
    box-shadow: 0 1px 3px rgba(15,23,42,0.04), 0 6px 20px rgba(15,23,42,0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.ifnex-transaction-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(15,23,42,0.1);
}

.ifnex-transaction-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.ifnex-transaction-type {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    text-transform: capitalize;
}
.ifnex-transaction-type.deposit,
.ifnex-transaction-type.credit {
    background: #d1fae5;
    color: #065f46;
}
.ifnex-transaction-type.withdraw,
.ifnex-transaction-type.debit {
    background: #fee2e2;
    color: #991b1b;
}
.ifnex-transaction-type.order_payment {
    background: #fef3c7;
    color: #92400e;
}
.ifnex-transaction-type.refund {
    background: #e0e7ff;
    color: #3730a3;
}
.ifnex-transaction-type.adjustment {
    background: #f3f4f6;
    color: #374151;
}

.ifnex-transaction-amount {
    font-size: 16px;
    font-weight: 800;
    font-family: 'Inter', 'Tahoma', sans-serif;
}
.ifnex-transaction-amount.positive { color: #059669; }
.ifnex-transaction-amount.negative { color: #dc2626; }

.ifnex-transaction-details {
    padding-top: 10px;
    border-top: 1px solid #f1f5f9;
}

.ifnex-transaction-description {
    font-size: 14px;
    color: #334155;
    margin: 0 0 8px 0;
    line-height: 1.5;
}

.ifnex-transaction-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.ifnex-transaction-status {
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 999px;
    font-weight: 600;
}
.ifnex-transaction-status.pending {
    background: #fef3c7;
    color: #92400e;
}
.ifnex-transaction-status.completed,
.ifnex-transaction-status.success {
    background: #d1fae5;
    color: #065f46;
}
.ifnex-transaction-status.failed {
    background: #fee2e2;
    color: #991b1b;
}

.ifnex-transaction-date {
    font-size: 12px;
    color: #94a3b8;
    direction: ltr;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.ifnex-transaction-ref {
    font-size: 12px;
    color: #94a3b8;
    margin: 8px 0 0 0;
    direction: ltr;
}
.ifnex-transaction-ref strong {
    color: #64748b;
    font-weight: 600;
}

@media (max-width: 640px) {
    .ifnex-transaction-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .ifnex-transaction-meta {
        flex-direction: column;
        gap: 6px;
        align-items: flex-start;
    }
}

/* ── English Address Warning ── */
.ifnex-address-warning {
    background: #fffbeb;
    color: #92400e;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-top: 6px;
    border: 1px solid #fde68a;
    display: flex;
    align-items: center;
    gap: 6px;
    animation: ifnexFadeIn 0.25s ease;
}

/* ═══ Notifications ═══ */
.ifnx-notif-badge {
    position: absolute;
    top: -6px;
    right: -10px;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    min-width: 18px;
    height: 18px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    box-shadow: 0 2px 6px rgba(239,68,68,0.4);
    line-height: 1;
}

.ifnx-notif-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ifnx-notif-item {
    display: flex;
    gap: 14px;
    padding: 16px 18px;
    background: #fff;
    border-radius: 14px;
    border: 1px solid #eef2f7;
    box-shadow: 0 1px 3px rgba(15,23,42,0.04);
    transition: all 0.2s ease;
    cursor: pointer;
}
.ifnx-notif-item:hover {
    box-shadow: 0 6px 20px rgba(15,23,42,0.08);
    transform: translateY(-1px);
}
.ifnx-notif-item.unread {
    background: #fffbeb;
    border-color: #fde68a;
}

.ifnx-notif-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 5px;
    background: #e2e8f0;
}
.ifnx-notif-item.unread .ifnx-notif-dot {
    background: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245,158,11,0.2);
}

.ifnx-notif-body { flex: 1; min-width: 0; }

.ifnx-notif-title {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 4px;
}
.ifnx-notif-item.unread .ifnx-notif-title { color: #92400e; }

.ifnx-notif-message {
    font-size: 13px;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 6px;
}

.ifnx-notif-link {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    color: #f97316;
    text-decoration: none;
    margin-bottom: 6px;
}
.ifnx-notif-link:hover { text-decoration: underline; }

.ifnx-notif-time {
    font-size: 11px;
    color: #94a3b8;
    direction: ltr;
    display: inline-block;
}

@media (max-width: 640px) {
    .ifnx-notif-item { padding: 12px 14px; }
}

/* ═══════════════════════════════════════════
   Order Detail - Documents & Commitment Forms
   ═══════════════════════════════════════════ */

.ifnex-docs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.ifnex-doc-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 12px;
    background: #fff;
    border: 1px solid var(--ifnex-border);
    border-radius: var(--ifnex-radius);
    text-decoration: none !important;
    transition: all 0.2s;
}

.ifnex-doc-btn:hover {
    border-color: var(--ifnex-primary);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.ifnex-doc-icon {
    font-size: 28px;
    line-height: 1;
}

.ifnex-doc-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--ifnex-dark);
}

.ifnex-forms-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 12px;
}

.ifnex-form-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 14px;
    background: #fff;
    border: 1px solid var(--ifnex-border);
    border-radius: var(--ifnex-radius);
}

.ifnex-form-info {
    flex: 1;
    min-width: 0;
}

.ifnex-form-info strong {
    display: block;
    font-size: 14px;
    color: var(--ifnex-dark);
    margin-bottom: 4px;
}

.ifnex-form-info p {
    margin: 0;
    font-size: 12px;
    color: var(--ifnex-gray);
}

.ifnex-form-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.ifnex-form-actions .ifnex-badge {
    margin-right: 4px;
}

.ifnex-empty-state {
    color: var(--ifnex-gray);
    font-size: 14px;
    margin: 8px 0;
}

.ifnex-loading {
    font-size: 12px;
    color: var(--ifnex-primary);
    font-weight: 600;
}

.ifnex-text-warning {
    color: var(--ifnex-warning);
    font-size: 12px;
    margin-top: 4px;
}

@media (max-width: 640px) {
    .ifnex-form-item {
        flex-direction: column;
    }
    
    .ifnex-form-actions {
        width: 100%;
    }
}

/* ════════ Profile Page Styling ════════ */

.ifnex-user-profile {
    max-width: 800px;
    margin: 0 auto;
}

.ifnex-profile-header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #ffffff;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.ifnex-profile-header h2 {
    margin: 0 0 8px 0;
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
}

.ifnex-profile-info {
    flex: 1;
    min-width: 200px;
}

.ifnex-profile-info p {
    margin: 4px 0;
    font-size: 14px;
    color: #cbd5e1;
}

.ifnex-profile-info p strong {
    color: #f59e0b;
    font-weight: 600;
    margin-left: 4px;
}

/* ─── Stats Grid ─── */
.ifnex-stats-grid {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
}

.ifnex-stats-grid h3 {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
}

.ifnex-stats-cards {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

@media (max-width: 768px) {
    .ifnex-stats-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .ifnex-stats-cards {
        grid-template-columns: 1fr;
    }
}

.ifnex-stat-card {
    text-align: center;
    padding: 16px 8px;
    border-radius: 12px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    transition: transform 0.2s, box-shadow 0.2s;
}

.ifnex-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.ifnex-stat-value {
    font-size: 28px;
    font-weight: 800;
    color: #111827;
    line-height: 1.2;
    margin-bottom: 4px;
}

.ifnex-stat-label {
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
}

/* Color variants */
.ifnex-stat-warning {
    background: #fffbeb;
    border-color: #fed7aa;
}
.ifnex-stat-warning .ifnex-stat-value { color: #d97706; }

.ifnex-stat-info {
    background: #eff6ff;
    border-color: #bfdbfe;
}
.ifnex-stat-info .ifnex-stat-value { color: #2563eb; }

.ifnex-stat-success {
    background: #ecfdf5;
    border-color: #a7f3d0;
}
.ifnex-stat-success .ifnex-stat-value { color: #059669; }

.ifnex-total-spent {
    text-align: center;
    font-size: 15px;
    color: #4b5563;
    padding: 12px;
    background: #f3f4f6;
    border-radius: 8px;
    margin: 0;
}

.ifnex-total-spent strong {
    color: #1f2937;
}

/* ─── Dark mode ─── */
@media (prefers-color-scheme: dark) {
    .ifnex-stats-grid {
        background: #1e293b;
        border-color: #334155;
    }
    .ifnex-stats-grid h3 {
        color: #f9fafb;
    }
    .ifnex-stat-card {
        background: #334155;
        border-color: #475569;
    }
    .ifnex-stat-value {
        color: #f9fafb;
    }
    .ifnex-stat-label {
        color: #94a3b8;
    }
    .ifnex-total-spent {
        background: #334155;
        color: #cbd5e1;
    }
    .ifnex-total-spent strong {
        color: #f9fafb;
    }
}