/* ============================================
PREMIUM DESIGN SYSTEM
============================================ */

/* Search Section */
.search-wrapper {
    position: relative;
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 14px;
    z-index: 1;
}

.search-input {
    width: 100%;
    padding: 8px 15px 8px 80px;
    border: 2px solid #e5e7eb;
    border-radius: 50px;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #ffffff;
}

.search-input:focus {
    outline: none;
    border-color: #a62626;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.search-button {
    position: absolute;
    left: 5px;
    top: 5px;
    bottom: 5px;
    background: linear-gradient(135deg, #a62626 0%, #764ba2 100%);
    border: none;
    border-radius: 50px;
    padding: 4px 25px 0px 25px;
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-button:hover {
    transform: translateX(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Alert Styles */
.alert-modern {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    border-radius: 16px;
    margin-bottom: 20px;
    animation: slideInRight 0.5s ease;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

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

.alert-success-modern {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.alert-warning-modern {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.alert-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}

.alert-content {
    flex: 1;
    font-size: 14px;
}

.alert-close {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.alert-close:hover {
    opacity: 1;
}


/* Premium Table Styles */
.premium-table-container {
    background: white;
    border-radius: 18px;
    border: 1px solid #e5e7eb;

    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.premium-table {}

.premium-table th {
    padding: 20px 24px;
    background: #f9fafb;
    /* border-bottom: 1px solid #e5e7eb; */
}

.premium-table-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.premium-table-title i {
    font-size: 24px;
    color: #a62626;
}

.premium-table-title h5 {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
}

.premium-table-actions {
    display: flex;
    gap: 8px;
}

.table-action-btn {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: white;
    border: 1px solid #e5e7eb;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.3s;
}

.table-action-btn:hover {
    background: #a62626;
    color: white;
    transform: translateY(-2px);
}

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

.premium-table thead tr {
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.premium-table th {
    padding: 16px 20px;
    text-align: right;
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.premium-table td {
    padding: 10px 10px;
    border-bottom: 1px solid #f3f4f6;
}

.premium-table tbody tr {
    transition: all 0.3s;
}

.premium-table tbody tr:hover {
    background: #f9fafb;
    transform: scale(1.01);
}

.index-badge {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    color: #4b5563;
}

.order-id {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: #1f2937;
}

.order-id i {
    color: #a62626;
    font-size: 18px;
}

.seller-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.seller-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #a6262620 0%, #764ba220 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a62626;
}

.seller-details {
    flex: 1;
}

.seller-name {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
}

.seller-contact {
    font-size: 12px;
    color: #6b7280;
}

.seller-contact i {
    margin-left: 4px;
    font-size: 10px;
}

.amount-badge {
    display: inline-flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    background: #f3f4f6;
    gap: 4px;
    padding: 5px 12px;
    border-radius: 12px;
}

.amount-number {
    font-size: 14px;
    font-weight: 700;
    color: #1f2937;
}

.amount-currency {
    font-size: 10px;
    color: #6b7280;
}

.date-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6b7280;
    font-size: 13px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 500;
}

.status-completed {
    background: #d1fae5;
    color: #065f46;
}

.status-pending {
    background: #fed7aa;
    color: #92400e;
}

.status-processing {
    background: #d1f5ff;
    color: #0e7490;
}

.status-canceled {
    background: #fee2e2;
    color: #991b1b;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 50px;
    color: #6b7280;
    text-decoration: none;
    font-size: 12px;
    transition: all 0.3s;
}

.action-btn:hover {
    background: #a62626;
    border-color: #a62626;
    color: white !important;
    transform: translateX(-2px);
}


/* Modern Card Design */
.premium-table-footer {
    padding: 20px 28px;
    background: white;
    border-top: 1px solid #f0f2f5;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    border-radius: 0 0 24px 24px;
}

.table-information {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    background: #f9fafb;
    padding: 10px 20px;
    border-radius: 40px;
}

.table-information span {
    color: #a62626;
    font-weight: 700;
    margin: 0 4px;
}

.table-information i {
    color: #a62626;
    font-size: 14px;
}




/* Order Card for Desktop Alternative */
.order-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    margin-bottom: 10px;
}

.order-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.order-card-header {
    padding: 20px;
    background: #f9fafb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e5e7eb;
}

.order-number {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 16px;
}

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

.seller-section {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f3f4f6;
}

.seller-avatar-lg {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #a6262620 0%, #764ba220 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #a62626;
}

.seller-name-lg {
    font-weight: 600;
    font-size: 16px;
    color: #1f2937;
    margin-bottom: 6px;
}

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

.detail-item {
    padding: 12px;
    background: #f9fafb;
    border-radius: 12px;
}

.detail-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #6b7280;
    margin-bottom: 8px;
}

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

.detail-value.amount {
    font-size: 18px;
    color: #a62626;
}

.detail-value small {
    font-size: 11px;
    font-weight: 400;
}

.order-card-footer {
    padding: 16px 20px;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
}

.btn-view-details {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    color: #6b7280;
    text-decoration: none;
    font-size: 13px;
    transition: all 0.3s;
}

.btn-view-details:hover {
    background: #a62626;
    border-color: #a62626;
    color: white;
    gap: 12px;
}



/* Mobile Table Styles */
.mobile-orders-container {
    padding: 16px 0px 24px 0px;
    background: #ffffff;
    min-height: 100vh;
}

.mobile-orders-table {
    width: 100%;
    overflow-x: hidden;
}

.mobile-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 12px;
}

.mobile-table-row {
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid #eeebeb;
    margin-left: 4px;
    margin-right: 4px;
    box-shadow: 0 4px 7px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: block;
    margin-bottom: 5px;
}

.mobile-table-cell {
    display: block;
    padding: 0;
    background: white;
}

/* Row Header Styles */
.mobile-row-header {
    padding: 0;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
    border-radius: 20px;
}

.mobile-row-header:active {
    transform: scale(0.98);
}

.mobile-row-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    gap: 12px;
}

.mobile-row-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Row 1: Status and Reference Number - Same Line */
.mobile-row-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 12px;
}

.mobile-row-top .order-badge {
    flex-shrink: 0;
}

.mobile-order-number {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #4b5563;
    direction: ltr;
    flex-shrink: 0;
}

.mobile-order-number i {
    color: #a62626;
    font-size: 13px;
}

.mobile-order-number .number {
    font-weight: 700;
    color: #1f2937;
    direction: ltr;
    display: inline-block;
    font-size: 13px;
}

/* Row 2: Store Info and Price - Same Line */
.mobile-row-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 12px;
}

.seller-info-compact {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
    flex: 1;
    overflow: hidden;
}

.seller-info-compact i {
    font-size: 12px;
    color: #a62626;
    flex-shrink: 0;
}

.seller-name-compact {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 13px;
    font-weight: 500;
    color: #4b5563;
}

.mobile-order-price {
    display: flex;
    align-items: baseline;
    gap: 2px;
    flex-shrink: 0;
}

.mobile-order-price i {
    color: #a62626;
    font-size: 12px;
}

.mobile-order-price .price-number {
    font-size: 16px;
    font-weight: 800;
    color: #a62626;
}

.mobile-order-price .price-unit {
    font-size: 10px;
    color: #9ca3af;
}

/* Expand Icon */
.mobile-row-expand-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #f5f5f5;
    border-radius: 50%;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.expand-icon {
    font-size: 14px;
    color: #a62626;
    transition: transform 0.3s ease;
}

.expand-icon.rotated {
    transform: rotate(180deg);
}

/* Collapsible Details Row */
.mobile-details-row {
    background: #fafafa;
    border-top: 1px solid #f0f0f0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.mobile-details-content {
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* Info Rows */
.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #e5e7eb;
}

.info-row:last-of-type {
    border-bottom: none;
}

.info-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
}

.info-label i {
    font-size: 14px;
    color: #a62626;
    width: 18px;
}

.info-value {
    font-size: 14px;
    font-weight: 500;
    color: #1f2937;
}

/* Action Button */
.details-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px 18px;
    background: #a62626;
    border-radius: 40px;
    color: white;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
    margin-top: 8px;
}

.details-button:active {
    background: #8b1a1a;
    transform: scale(0.97);
}

/* Status Badge Styles */
.order-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
}

.order-badge.status-pending {
    background: #fef3c7;
    color: #d97706;
}

.order-badge.status-processing {
    background: #dbeafe;
    color: #2563eb;
}

.order-badge.status-completed {
    background: #d1fae5;
    color: #059669;
}

.order-badge.status-canceled {
    background: #fee2e2;
    color: #dc2626;
}

/* Pagination */
.pagination-wrapper {
    margin-top: 0px;
    padding: 8px 0 16px 0;
}

.pagination-wrapper .pagination {
    justify-content: center;
    gap: 6px;
}

.table-pagination .page-link {
    border-radius: 20px;
    padding: 7px 12px;
    font-size: 13px;
    /* background: #f5f5f5; */
    color: #6b7280;

}

.table-pagination .page-item.active .page-link {
    background: #a62626;
    border-radius: 20px !important;
    color: white;
}


.mobile-pagination-wrapper {
    margin-top: 0px;
    padding: 8px 0 16px 0;
}

.mobile-pagination-wrapper .pagination {
    justify-content: center;
    gap: 6px;
}

.mobile-pagination-wrapper .page-link {
    border-radius: 20px;
    padding: 7px 12px;
    font-size: 13px;
    /* background: #f5f5f5; */
    color: #6b7280;

}

.mobile-pagination-wrapper .page-item.active .page-link {
    background: #a62626;
    border-radius: 20px;
    color: white;
}

/* Animations */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

.mobile-details-row.showing {
    animation: slideDown 0.3s ease-out forwards;
}

/* Responsive Adjustments */
@media (max-width: 380px) {
    .mobile-row-content {
        padding: 12px;
    }

    .mobile-row-left {
        gap: 10px;
    }

    .mobile-row-top,
    .mobile-row-bottom {
        gap: 8px;
    }

    .order-badge {
        padding: 5px 10px;
        font-size: 12px;
    }

    .order-badge i {
        font-size: 10px;
    }

    .mobile-order-number {
        font-size: 13px;
        margin-left: 5px;
    }

    .mobile-order-number .number {
        font-size: 13px;
    }

    .seller-info-compact {
        font-size: 11px;
    }

    .seller-name-compact {
        font-size: 13px;
    }

    .mobile-order-price .price-number {
        font-size: 11px;
    }

    .mobile-row-expand-icon {
        width: 28px;
        height: 28px;
    }

    .expand-icon {
        font-size: 12px;
    }

    .mobile-details-content {
        padding: 3px;
        padding-bottom: 15px;
        padding-left: 15px;
        padding-right: 15px;
    }

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

    .info-value {
        font-size: 13px;
    }
}

/* For screens between 381px and 480px */
@media (min-width: 381px) and (max-width: 480px) {
    .mobile-row-content {
        padding: 14px;
    }

    .order-badge {
        padding: 5px 10px;
        font-size: 11px;
    }

    .mobile-order-number .number {
        font-size: 12px;
    }

    .seller-name-compact {
        font-size: 12px;
    }

    .mobile-order-price .price-number {
        font-size: 15px;
    }
}

/* Safe area for notched phones */
@supports (padding: max(0px)) {
    .mobile-orders-container {
        padding-left: max(0px, env(safe-area-inset-left));
        padding-right: max(0px, env(safe-area-inset-right));
        padding-bottom: max(24px, env(safe-area-inset-bottom));
    }
}


/* Empty State */
.empty-state-modern {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 32px;
    margin: 40px auto;
    max-width: 500px;
    animation: fadeIn 0.5s ease;
}

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

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

.empty-state-icon {
    font-size: 80px;
    color: #d1d5db;
    margin-bottom: 20px;
}

.empty-state-image {
    width: 120px;
    height: 120px;
    border-radius: 60px;
    margin: 20px auto;
    opacity: 0.5;
}

.empty-state-title {
    font-size: 24px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 10px;
}

.empty-state-description {
    color: #6b7280;
    margin-bottom: 30px;
}

.empty-state-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 30px;
    background: linear-gradient(135deg, #a62626 0%, #764ba2 100%);
    color: white;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s;
}

.empty-state-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

/* Pagination Styling */
.pagination {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0;
}


.breadcrumb-link:hover {
    background: #e5e7eb !important;
    transform: translateY(-1px);
}



.bread-crumb-wrapper {
    margin-bottom: 8px;
    margin-top: 18px;
    font-family: 'yekan', sans-serif;
    padding-right: 5px;
}

.bread-crumb-wrapper .link {
    color: #aaa;
    text-decoration: none;
    font-size: 15px;
}

.bread-crumb-wrapper .slash {
    color: #ddd;
    margin: 0 6px;
}

.bread-crumb-wrapper .active-link {
    color: #333;
    font-size: 15px;
    font-weight: 500;
}



/* Responsive Adjustments */
@media (max-width: 768px) {
    .premium-table-container {
        margin: 0 16px;
    }
}

/* Print Styles */
@media print {

    .search-wrapper,
    /* .stat-card-trend, */
    .premium-table-actions,
    .action-btn,
    .mobile-card-footer,
    .order-card-footer {
        display: none;
    }

    .premium-table-container,
    .order-card,
    .mobile-order-card {
        box-shadow: none;
        border: 1px solid #e5e7eb;
    }
}



.purchase-card-background:hover {
    background-color: #edeff1 !important;
    /* beautiful soft blue */
}



/* Desktop */
.loading-indicator {
    right: 50%;
    transform: translateX(50%);
}

/* Mobile */
@media (max-width: 768px) {
    .loading-indicator {
        right: 30%;
        transform: none;
    }
}




.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top-right-radius: 20px !important;
    border-top-left-radius: 20px !important;
    background: linear-gradient(135deg, #f8f9fa 0%, #f1f3f5 100%);
    padding: 10px 15px;
    margin: 0;
    border-bottom: 1px solid #e9ecef;
}



/* Base button style */
.btn-cancel {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    border-radius: 20px;
    padding: 8px 20px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

/* Hover effect */
.btn-cancel:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

/* Active/Click effect (optional) */
.btn-cancel:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}


/* Base button style */
.btn-pr {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    background: #a62626;
    border: none;
    border-radius: 20px;
    padding: 8px 20px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    color: white;
}

/* Hover effect */
.btn-pr:hover {
    background: #7a1515;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(166, 38, 38, 0.3);
}

/* Active/Click effect (optional) */
.btn-pr:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}