:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-soft: #eff6ff;
    --bg: #f8fafc;
    --bg-secondary: #f1f5f9;
    --card-bg: #ffffff;
    --card-border: #e2e8f0;
    --border-color: #e2e8f0;
    --input-border: #d1d5db;
    --text-main: #0f172a;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --text-muted: #64748b;
    --accent: #16a34a;
    --danger: #dc2626;
    --warning: #ca8a04;
}

.animate-spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: radial-gradient(circle at top, #e0f2fe 0, #f8fafc 45%);
    color: var(--text-main);
}

.app {
    min-height: 100vh;
    max-width: 480px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    background: linear-gradient(to bottom, #ffffff, #f1f5f9);
}

.app-header {
    padding: 18px 18px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-icon {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: radial-gradient(circle at 30% 20%, #38bdf8, #2563eb);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    color: #ffffff;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.25);
}

.brand-text-title {
    font-size: 18px;
    font-weight: 600;
}

.brand-text-subtitle {
    font-size: 12px;
    color: var(--text-muted);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: #ffffff;
    border: 1px solid var(--card-border);
    border-radius: 999px;
    font-size: 13px;
    color: var(--text-main);
    font-weight: 500;
}

.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.user-name {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 480px) {
    .user-name {
        display: none;
    }
}


.pill {
    padding: 6px 11px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid var(--card-border);
    font-size: 11px;
    color: var(--text-muted);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.sync-btn {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--card-border);
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    color: var(--text-muted);
}

.sync-btn svg {
    width: 16px;
    height: 16px;
}

.sync-btn span {
    font-size: 17px;
}

.sync-btn:hover {
    background: #f8fafc;
}

.search-container {
    padding: 11px 17px 16px;
}

.search-box {
    background: #ffffff;
    border-radius: 12px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    border: 1px solid var(--card-border);
}

.search-box input {
    border: none;
    outline: none;
    font-size: 14px;
    width: 100%;
    color: var(--text-main);
    background: transparent;
}

.search-box input::placeholder {
    color: #94a3b8;
}

.search-icon {
    color: var(--text-muted);
}

.search-icon svg {
    width: 18px;
    height: 18px;
}

/* Reports Page */
.reports-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px 24px 24px;
    color: white;
}

.reports-header-top {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 16px;
}

.header-back-btn {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.2s;
    flex-shrink: 0;
    backdrop-filter: blur(10px);
}

.header-back-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateX(-2px);
}

.header-back-btn svg {
    width: 20px;
    height: 20px;
}

.reports-header-content {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.reports-icon {
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    flex-shrink: 0;
}

.reports-icon svg {
    width: 28px;
    height: 28px;
    color: white;
}

.reports-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    color: white;
}

.reports-subtitle {
    font-size: 14px;
    margin: 4px 0 0 0;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.user-info-light {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.user-info-light .user-name {
    color: white;
}

.sync-btn-light {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    backdrop-filter: blur(10px);
}

.sync-btn-light:hover {
    background: rgba(255, 255, 255, 0.3);
}

.reports-time {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 13px;
    backdrop-filter: blur(10px);
    width: fit-content;
}

.reports-time svg {
    width: 14px;
    height: 14px;
}

@media (max-width: 900px) {
    .reports-header-top {
        flex-wrap: wrap;
    }

    .header-actions {
        order: 3;
        width: 100%;
        justify-content: flex-end;
    }
}

@media (max-width: 600px) {
    .reports-header {
        padding: 16px 18px 20px;
    }

    .reports-header-top {
        gap: 12px;
    }

    .reports-icon {
        width: 48px;
        height: 48px;
    }

    .reports-icon svg {
        width: 24px;
        height: 24px;
    }

    .reports-title {
        font-size: 20px;
    }

    .reports-subtitle {
        font-size: 13px;
    }

    .header-actions .user-name {
        display: none;
    }

    .reports-time {
        font-size: 12px;
        padding: 6px 12px;
    }
}

.reports-container {
    padding: 24px 18px;
    background: #f9fafb;
    min-height: calc(100vh - 200px);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

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

    .reports-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .reports-time {
        align-self: stretch;
        justify-content: center;
    }
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.stat-card-large {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.stat-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.stat-icon-wrapper {
    position: relative;
}

.stat-card-large .stat-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.stat-card-today .stat-icon {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
}

.stat-card-week .stat-icon {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
}

.stat-card-month .stat-icon {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
}

.stat-card-large .stat-icon svg {
    width: 32px;
    height: 32px;
    color: #374151;
    stroke-width: 2.5;
}

.stat-badge {
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-badge-today {
    background: #fef3c7;
    color: #92400e;
}

.stat-badge-week {
    background: #dbeafe;
    color: #1e40af;
}

.stat-badge-month {
    background: #dcfce7;
    color: #166534;
}

.stat-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-value {
    font-size: 48px;
    font-weight: 800;
    color: #111827;
    line-height: 1;
    letter-spacing: -0.02em;
}

.stat-label {
    font-size: 14px;
    color: #6b7280;
    font-weight: 600;
    margin-top: 4px;
}

.stat-subtitle {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #9ca3af;
    margin-top: 8px;
}

.stat-subtitle svg {
    width: 14px;
    height: 14px;
}

/* Quick Info Section */
.quick-info {
    margin-top: 8px;
}

.quick-info-card {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.quick-info-card svg {
    width: 20px;
    height: 20px;
    color: #2563eb;
    flex-shrink: 0;
}

.quick-info-card p {
    margin: 0;
    font-size: 13px;
    color: #1e40af;
    font-weight: 500;
}



.search-btn {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.search-btn:hover {
    background: var(--primary-dark);
}

.filters {
    padding: 0 18px 8px;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
}

.filters::-webkit-scrollbar {
    display: none;
}

.filter-chip {
    white-space: nowrap;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 13px;
    border: 1px solid var(--card-border);
    background: #ffffff;
    color: var(--text-muted);
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.filter-chip:hover {
    background: #f8fafc;
    border-color: var(--primary);
}

.filter-chip.active {
    background: var(--primary-soft);
    border-color: var(--primary);
    color: var(--primary);
    font-weight: 600;
}

/* Specific colors for active filters */
.filter-chip[href*="pending"].active {
    background: #fef9c3;
    border-color: #eab308;
    color: #854d0e;
}

.filter-chip[href*="processing"].active {
    background: #dcfce7;
    border-color: #22c55e;
    color: #166534;
}

.filter-chip[href*="on-hold"].active {
    background: #ffedd5;
    border-color: #f97316;
    color: #9a3412;
}

.filter-chip[href*="sent_to_embassy"].active {
    background: #cffafe;
    border-color: #06b6d4;
    color: #155e75;
}

.filter-chip[href*="completed"].active {
    background: #dbeafe;
    border-color: #3b82f6;
    color: #1d4ed8;
}

.filter-chip[href*="refunded"].active {
    background: #f3f4f6;
    border-color: #6b7280;
    color: #374151;
}

.summary {
    padding: 0 18px 10px;
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
}

.summary strong {
    color: var(--text-main);
}

.orders-list {
    padding: 4px 12px 16px;
    flex: 1;
    overflow-y: auto;
}

.order-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 0;
    margin-bottom: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    border: 1px solid var(--card-border);
    display: flex;
    height: 141px;
    overflow: hidden;
    text-decoration: none;
    /* Remove underline from link */
    color: inherit;
    /* Inherit text color */
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.order-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.06);
    border-color: var(--primary-soft);
}

.order-image {
    width: 110px;
    height: 100%;
    min-height: 120px;
    flex-shrink: 0;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    border-right: 1px solid var(--card-border);
}

.order-image img {
    width: 145%;
    height: 107%;
    object-fit: cover;
    object-position: center;
    padding: 4px;
    background-size: cover;
}

.order-image-placeholder {
    background: linear-gradient(135deg, #e0f2fe 0%, #dbeafe 100%);
    color: #0284c7;
}

.order-image-placeholder svg {
    width: 36px;
    height: 36px;
}

.order-content {
    flex: 1;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    justify-content: space-between;
}

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

.order-id {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
}

.order-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.4;
    margin-bottom: 2px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.status-badge {
    font-size: 10px;
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Sent to the embassy - Teal/Cyan */
.status-Sent.to.the.embassy,
[data-status="Sent to the embassy"] .status-badge {
    background: #a5f3fc;
    color: #155e75;
}

/* Payment Verification - Yellow/Gold */
.status-Payment.Verification,
[data-status="Payment Verification"] .status-badge {
    background: #fef3c7;
    color: #92400e;
}

/* Dummy Flight - Gray */
.status-Dummy.Flight,
[data-status="Dummy Flight"] .status-badge {
    background: #e5e7eb;
    color: #374151;
}

/* Under Translation - Purple/Lavender */
.status-Under.Translation,
[data-status="Under Translation"] .status-badge {
    background: #e9d5ff;
    color: #6b21a8;
}

/* Document processing - Rose/Pink */
.status-Document.processing,
[data-status="Document processing"] .status-badge {
    background: #fecdd3;
    color: #9f1239;
}

/* Employment Letter - Magenta/Pink */
.status-Employment.Letter,
[data-status="Employment Letter"] .status-badge {
    background: #f5d0fe;
    color: #a21caf;
}

/* eSim - Light Purple */
.status-eSim,
[data-status="eSim"] .status-badge {
    background: #ddd6fe;
    color: #5b21b6;
}

/* Pending Payment - Yellow */
.status-Pending.Payment,
[data-status="Pending Payment"] .status-badge {
    background: #fef9c3;
    color: #854d0e;
}

/* Make profile info items clickable */
.profile-info-item-clickable {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.profile-info-item-clickable:hover {
    background-color: var(--card-bg-hover);
}

/* Adjust avatar size (already reduced) */
.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* Processing - Green */
[class*="Processing"] {
    background: #dcfce7 !important;
    color: #166534 !important;
}

/* Incomplete documents - Orange */
.status-Incomplete.documents,
[data-status="Incomplete documents"] .status-badge {
    background: #fed7aa;
    color: #9a3412;
}

/* Completed - Blue */
.status-Completed,
[data-status="Completed"] .status-badge {
    background: #dbeafe;
    color: #1d4ed8;
}

/* Cancelled - Red */
.status-Cancelled,
[data-status="Cancelled"] .status-badge {
    background: #fee2e2;
    color: #991b1b;
}

/* Refunded - Gray */
.status-refunded,
[data-status="refunded"] .status-badge,
[data-status="Refunded"] .status-badge {
    background: #f3f4f6;
    color: #374151;
}

/* Refunded - Amber */
.status-Refunded,
[data-status="Refunded"] .status-badge {
    background: #fde68a;
    color: #78350f;
}

/* Failed - Dark Red */
.status-Failed,
[data-status="Failed"] .status-badge {
    background: #fecaca;
    color: #7f1d1d;
}

/* Draft - Light Gray */
.status-Draft,
[data-status="Draft"] .status-badge {
    background: #f3f4f6;
    color: #4b5563;
}

/* Legacy statuses for backward compatibility */
.status-Pending {
    background: #fef9c3;
    color: #854d0e;
}

.status-Shipped {
    background: #e0f2fe;
    color: #075985;
}

/* .order-customer removed – use .order-title instead */

.order-middle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: -4px;
}

.order-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.order-tracking-preview {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted);
    flex: 1;
    overflow: hidden;
}

.order-tracking-preview svg {
    flex-shrink: 0;
    color: #2563eb;
}

/* Skeleton Loading */
@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }

    100% {
        opacity: 1;
    }
}

.skeleton {
    background: #e2e8f0;
    border-radius: 8px;
    animation: pulse 1.5s ease-in-out infinite;
    color: transparent;
}

.skeleton-text {
    height: 1em;
    margin-bottom: 0.5em;
    background: #cbd5e1;
    border-radius: 4px;
}

.skeleton-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}

/* Specific skeletons for order cards */
.order-card.skeleton {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    background: #f9fafb;
    border: 1px solid var(--card-border);
    border-radius: 12px;
}

.order-card.skeleton .order-title,
.order-card.skeleton .order-date,
.order-card.skeleton .order-total {
    background: #e5e7eb;
    height: 1.2em;
    border-radius: 4px;
}

/* Skeleton for stats cards */
.stat-card.skeleton {
    background: #e5e7eb;
    height: 120px;
    border-radius: 12px;
}

.order-tracking-preview span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.customer-name {
    font-weight: 500;
    color: var(--text-main);
    font-size: 13px;
    margin-bottom: 2px;
}

.order-date {
    display: flex;
    align-items: center;
    font-size: 11px;
    color: var(--text-muted);
}

.order-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}

.amount {
    font-weight: 600;
    font-size: 16px;
}

.items {
    color: var(--text-muted);
    font-size: 11px;
}

.order-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed var(--card-border);
}

.order-total {
    margin-left: auto;
}

.order-total {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
}

.quick-btn {
    padding: 7px 12px;
    border-radius: 999px;
    border: none;
    background: var(--primary);
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.quick-btn span.icon {
    font-size: 14px;
}

.quick-btn svg {
    width: 16px;
    height: 16px;
}

.empty-state {
    text-align: center;
    padding: 30px 20px;
    color: var(--text-muted);
    font-size: 13px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 16px;
    margin-bottom: 80px;
    /* Space for bottom nav */
}

.page-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.page-btn:hover:not(.disabled) {
    background: var(--bg-secondary);
    border-color: var(--text-secondary);
}

.page-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--bg-secondary);
}

.page-numbers {
    display: flex;
    align-items: center;
    gap: 4px;
}

.page-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.page-num:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.page-num.active {
    background: var(--primary);
    color: white;
}

.page-dots {
    color: var(--text-secondary);
    padding: 0 4px;
}

/* Bottom Navigation */
.bottom-nav {
    border-top: 1px solid var(--card-border);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-around;
    padding: 12px 0 24px;
    /* Extra padding for iPhone home indicator */
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    color: var(--text-muted);
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    flex: 1;
    /* Fill available space */
    padding: 8px 0;
    /* Increase touch area */
}

.nav-item.active {
    color: var(--primary);
}

.nav-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2px;
    transition: all 0.2s;
}

.nav-item.active .nav-icon {
    transform: translateY(-2px);
}

.nav-icon svg {
    width: 24px;
    height: 24px;
}

@media (min-width: 768px) {
    .app {
        margin-top: 20px;
        margin-bottom: 20px;
        border-radius: 24px;
        box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
        overflow: hidden;
        border: 1px solid var(--card-border);
    }
}

/* ===== Order Details Page Styles ===== */

.back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid var(--card-border);
    color: var(--text-main);
    text-decoration: none;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.back-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
    transform: translateX(-2px);
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.2);
}

.back-btn svg {
    width: 20px;
    height: 20px;
}

.details-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 18px;
    margin: 12px 18px;
    border: 1px solid var(--card-border);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-main);
    margin: 0 0 16px 0;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--card-border);
}

.order-visa-image {
    width: 100%;
    max-width: 300px;
    margin: 0 auto 20px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.order-visa-image img {
    width: 100%;
    height: auto;
    display: block;
}

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

.info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main);
}

/* Social Media Profile Styles */
.customer-profile-card .card-title {
    text-align: center;
}

.profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
    text-align: center;
}

.profile-avatar-wrapper {
    position: relative;
    margin-bottom: 16px;
}

.profile-avatar {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 4px solid #ffffff;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.15), 0 0 0 1px var(--card-border);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.profile-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 32px rgba(37, 99, 235, 0.25), 0 0 0 1px var(--primary);
}

.profile-status-indicator {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    background: #10b981;
    border: 3px solid #ffffff;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.profile-name {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 4px 0;
    letter-spacing: -0.02em;
}

.profile-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
    font-weight: 500;
}

/* Profile Stats */
.profile-stats {
    display: none;
    justify-content: space-around;
    padding: 20px 16px;
    margin: 16px 0;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    border: 1px solid var(--card-border);
}

.profile-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex: 1;
}

.profile-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

.profile-stat-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Profile Info Grid */
.profile-info-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

.profile-info-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    background: #f8fafc;
    border: 1px solid var(--card-border);
    border-radius: 10px;
    transition: all 0.2s;
}

.profile-info-item:hover {
    background: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.08);
}

.profile-info-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--primary);
}

.profile-info-icon i {
    width: 20px;
    height: 20px;
}

.profile-info-content {
    flex: 1;
    min-width: 0;
}

.profile-info-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.profile-info-value {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    word-break: break-word;
}

.profile-info-value.email-trigger,
.profile-info-value.phone-trigger {
    color: var(--primary);
    cursor: pointer;
    transition: all 0.2s;
}

.profile-info-value.email-trigger:hover,
.profile-info-value.phone-trigger:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}


.amount-large {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
}

.tracking-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.tracking-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.tracking-link svg {
    width: 16px;
    height: 16px;
}

.section-subtitle {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    margin: 20px 0 12px 0;
}

.documents-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--card-border);
}

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

.document-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px;
    background: #f8fafc;
    border: 1px solid var(--card-border);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-main);
    transition: all 0.2s;
}

.document-link:hover {
    background: #f1f5f9;
    border-color: var(--primary);
    transform: translateY(-2px);
}

.document-link svg {
    width: 28px;
    height: 28px;
    color: var(--primary);
}

.document-link span {
    font-size: 12px;
    font-weight: 500;
}

.document-link-more {
    background: linear-gradient(135deg, #eff6ff 0%, #e0f2fe 100%);
    border-color: var(--primary);
}

.document-link-more:hover {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-color: #1d4ed8;
}

.document-link-more svg {
    color: var(--primary);
}


.error-state {
    text-align: center;
    padding: 60px 20px;
}

.error-state svg {
    width: 64px;
    height: 64px;
    color: var(--danger);
    margin-bottom: 16px;
}

.error-state h2 {
    font-size: 18px;
    color: var(--text-main);
    margin-bottom: 20px;
}

.btn-primary {
    display: inline-block;
    padding: 10px 20px;
    background: var(--primary);
    color: #ffffff;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s;
}

.btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

@media (min-width: 640px) {
    .info-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .documents-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Page Loader — slim top progress bar */
#page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    z-index: 99999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
}

#page-loader.active {
    opacity: 1;
}

#page-loader::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: var(--loader-pct, 0%);
    background: linear-gradient(90deg, #2563eb, #60a5fa, #2563eb);
    background-size: 200% 100%;
    border-radius: 0 2px 2px 0;
    box-shadow: 0 0 10px rgba(37, 99, 235, 0.6), 0 0 4px rgba(96, 165, 250, 0.4);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: loader-shimmer 1.2s linear infinite;
}

@keyframes loader-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@keyframes loader-progress {
    0%   { transform: translateX(-100%); }
    50%  { transform: translateX(0); }
    100% { transform: translateX(100%); }
}


#page-content {
    transition: opacity 0.2s ease;
}

/* Order Management Inputs */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.input-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-main);
}

.input-field {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--card-border);
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-main);
    background: white;
    transition: all 0.2s;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.input-field:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.input-field::placeholder {
    color: var(--text-muted);
}

textarea.input-field {
    resize: vertical;
    min-height: 80px;
}

.btn-save {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 8px;
}

.btn-save:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

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

.btn-save svg {
    width: 18px;
    height: 18px;
}

.spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Status Dropdown Styling */
.status-dropdown {
    position: relative;
    width: 100%;
}

.status-dropdown-trigger {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--card-border);
    border-radius: 8px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    color: var(--text-main);
}

.status-dropdown-trigger:hover {
    border-color: var(--primary);
}

.status-dropdown-trigger:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.status-dropdown-selected {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.status-dropdown-icon {
    width: 18px;
    height: 18px;
    transition: transform 0.2s;
    color: var(--text-muted);
}

.status-dropdown-trigger.open .status-dropdown-icon {
    transform: rotate(180deg);
}

.status-dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--card-border);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.2s ease-in-out;
}

.status-dropdown-menu.open {
    max-height: 400px;
    opacity: 1;
    overflow-y: auto;
}

.status-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    cursor: pointer;
    transition: all 0.15s;
    font-size: 14px;
}

.status-dropdown-item:hover {
    background: #f8fafc;
}

.status-dropdown-item.selected {
    background: var(--primary-soft);
    font-weight: 600;
}

.status-dropdown-item .status-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Status-specific colors */
.status-dropdown-item[data-value="pending"] .status-icon {
    color: #eab308;
}

.status-dropdown-item[data-value="processing"] .status-icon {
    color: #22c55e;
}

.status-dropdown-item[data-value="on-hold"] .status-icon {
    color: #f97316;
}

.status-dropdown-item[data-value="sent_to_embassy"] .status-icon {
    color: #06b6d4;
}

.status-dropdown-item[data-value="completed"] .status-icon {
    color: #22c55e;
}

.status-dropdown-item[data-value="cancelled"] .status-icon {
    color: #ef4444;
}

.status-dropdown-item[data-value="refunded"] .status-icon {
    color: #6b7280;
}

.status-dropdown-item[data-value="failed"] .status-icon {
    color: #dc2626;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: scale(0.95);
    transition: all 0.2s;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

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

.modal-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-main);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #f1f5f9;
    color: var(--text-main);
}

.modal-close svg {
    width: 20px;
    height: 20px;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--card-border);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.btn-cancel {
    padding: 8px 16px;
    background: white;
    border: 1px solid var(--card-border);
    border-radius: 8px;
    color: var(--text-main);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-cancel:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

/* Template Dropdown Styles */
.template-dropdown {
    position: relative;
    width: 100%;
}

.template-dropdown-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: white;
    border: 1px solid var(--card-border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}

.template-dropdown-trigger:hover {
    border-color: var(--primary);
}

.template-dropdown-selected {
    color: var(--text-main);
}

.template-dropdown-icon {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    transition: transform 0.2s;
}

.template-dropdown.active .template-dropdown-icon {
    transform: rotate(180deg);
}

.template-dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--card-border);
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    max-height: 300px;
    overflow: hidden;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s;
}

.template-dropdown.active .template-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.template-search-wrapper {
    padding: 8px;
    border-bottom: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    gap: 8px;
}

.template-search {
    flex: 1;
    border: none;
    outline: none;
    font-size: 14px;
    color: var(--text-main);
}

.template-search::placeholder {
    color: var(--text-muted);
}

.template-dropdown-items {
    max-height: 240px;
    overflow-y: auto;
}

.template-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    color: var(--text-main);
}

.template-dropdown-item:hover {
    background: #f8fafc;
}

.template-dropdown-item.selected {
    background: #eff6ff;
    color: var(--primary);
}

.template-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: var(--text-muted);
}

.template-dropdown-item.selected .template-icon {
    color: var(--primary);
}

.template-dropdown-item.hidden {
    display: none;
}

/* Language Switch Styles */
.language-switch {
    display: flex;
    gap: 8px;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 8px;
}

.lang-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    background: transparent;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.5);
}

.lang-btn.active {
    background: white;
    color: var(--primary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.lang-btn svg {
    flex-shrink: 0;
}

/* Email Language Switch Styles */
.email-lang-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    background: transparent;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.email-lang-btn:hover {
    background: rgba(255, 255, 255, 0.5);
}

.email-lang-btn.active {
    background: white;
    color: var(--primary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.email-lang-btn svg {
    flex-shrink: 0;
}

/* New Reports Page Styles - Enhanced UX */
.reports-header-simple {
    padding: 24px 32px;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.back-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    width: fit-content;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s;
    margin-left: -12px;
}

.back-link:hover {
    color: #0f172a;
    background: #f1f5f9;
}

.back-link svg {
    width: 18px;
    height: 18px;
}

.reports-header-simple h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.reports-container-new {
    padding: 32px;
    background: #f8fafc;
    min-height: calc(100vh - 150px);
    padding-bottom: 100px;
    margin-bottom: 50px;
    /* Added bottom spacing */
}

.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    max-width: 1600px;
    margin: 0 auto;
}

/* Force 4 columns on large screens if space permits, but allow wrapping */
@media (min-width: 1400px) {
    .reports-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.report-card {
    border-radius: 16px;
    padding: 28px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 180px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.report-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.card-white {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    /* Changed from dashed for cleaner look */
}

.border-gray {
    border: 1px solid #cbd5e1;
}

/* Text Colors */
.text-blue {
    color: #2563eb;
}

.text-orange {
    color: #ea580c;
}

.text-green {
    color: #16a34a;
}

.text-red {
    color: #dc2626;
}

/* Background Colors - slightly more vibrant/clean */
.bg-green-light {
    background-color: #dcfce7;
    border: 1px solid #bbf7d0;
}

.bg-blue-light {
    background-color: #dbeafe;
    border: 1px solid #bfdbfe;
}

.bg-pink-light {
    background-color: #fae8ff;
    border: 1px solid #f0abfc;
}

.bg-cyan-light {
    background-color: #cffafe;
    border: 1px solid #a5f3fc;
}

.bg-gray-light {
    background-color: #f1f5f9;
    border: 1px solid #e2e8f0;
}

.bg-yellow-light {
    background-color: #fef9c3;
    border: 1px solid #fde047;
}

.bg-orange-light {
    background-color: #ffedd5;
    border: 1px solid #fed7aa;
}

/* Typography */
.report-label {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: -0.01em;
}

.report-sublabel {
    font-size: 14px;
    opacity: 0.7;
    margin-bottom: auto;
    /* Pushes value to bottom */
    font-weight: 500;
    line-height: 1.4;
}

.report-value {
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-top: 16px;
}

/* Dark Text Variants for Colored Cards */
.report-label-dark {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 6px;
    letter-spacing: -0.01em;
}

.report-sublabel-dark {
    font-size: 14px;
    color: #475569;
    margin-bottom: auto;
    font-weight: 500;
    line-height: 1.4;
}

.report-value-dark {
    font-size: 48px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.03em;
    margin-top: 12px;
}

/* Mobile Optimizations */
@media (max-width: 640px) {
    .reports-header-simple {
        padding: 16px 20px;
    }

    .reports-header-simple h1 {
        font-size: 24px;
    }

    .reports-container-new {
        padding: 16px;
    }

    .reports-grid {
        grid-template-columns: 1fr;
        /* Full width on mobile */
        gap: 16px;
    }

    .report-card {
        padding: 20px;
        min-height: 140px;
    }

    .report-value {
        font-size: 32px;
    }

    .report-value-dark {
        font-size: 40px;
    }
}

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

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 0;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    animation: modalSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }

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

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

.modal-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.close-modal {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
}

.close-modal:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--card-border);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
}

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

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--input-border);
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-primary);
    transition: all 0.2s;
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-control[readonly] {
    background-color: var(--bg-secondary);
    cursor: not-allowed;
    color: var(--text-secondary);
}

/* Enhanced Button Styles */
.btn-secondary {
    background: white;
    border: 1px solid var(--card-border);
    color: var(--text-primary);
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-secondary:hover {
    background: var(--bg-secondary);
    border-color: var(--input-border);
}

.btn-primary {
    background: var(--primary);
    border: 1px solid var(--primary);
    color: white;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-primary:active {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(0);
}

/* Searchable Select Styles */
.searchable-select {
    position: relative;
    width: 100%;
}

.select-trigger {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--input-border);
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-primary);
    background: white;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}

.select-trigger:after {
    content: '';
    width: 10px;
    height: 10px;
    border-right: 2px solid var(--text-muted);
    border-bottom: 2px solid var(--text-muted);
    transform: rotate(45deg) translateY(-2px);
    transition: all 0.2s;
    margin-left: 8px;
}

.searchable-select.open .select-trigger {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.searchable-select.open .select-trigger:after {
    transform: rotate(-135deg) translateY(-2px);
}

.select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: white;
    border: 1px solid var(--card-border);
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    margin-top: 4px;
    z-index: 1001;
    display: none;
    overflow: hidden;
    animation: fadeIn 0.1s ease-out;
}

.searchable-select.open .select-dropdown {
    display: block;
}

.select-search {
    width: 100%;
    padding: 10px 12px;
    border: none;
    border-bottom: 1px solid var(--bg-secondary);
    font-size: 14px;
    outline: none;
    background: var(--bg-secondary);
}

.select-options {
    max-height: 200px;
    overflow-y: auto;
}

.select-option {
    padding: 10px 12px;
    font-size: 14px;
    color: var(--text-primary);
    cursor: pointer;
    transition: background 0.1s;
}

.select-option:hover,
.select-option.highlighted {
    background: var(--bg-secondary);
}

.select-option.selected {
    background: #eff6ff;
    color: var(--primary);
    font-weight: 500;
}

.select-optgroup {
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    background: #f8fafc;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: sticky;
    top: 0;
}