/* CoinMango Order Tracker Modern Styles */
.cm-modern-tracker {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #f8fafc;
    min-height: 100vh;
}

/* Header Styles */
.cm-tracker-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    color: white;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.cm-tracker-title h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: white;
}

.cm-tracker-title p {
    font-size: 1.1rem;
    margin: 0;
    opacity: 0.9;
}

.cm-tracker-stats {
    display: flex;
    gap: 20px;
}

.cm-stat-card {
    text-align: center;
    padding: 20px 30px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    color: white;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.cm-stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
}

.cm-stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-top: 5px;
}

/* Orders Grid */
.cm-orders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(450px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

/* Order Card */
.cm-order-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e1e8ed;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.cm-order-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.cm-order-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 25px 25px 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-bottom: 1px solid #e2e8f0;
}

.cm-order-meta {
    flex: 1;
}

.cm-order-id {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 8px;
    font-family: 'Courier New', monospace;
}

.cm-order-date {
    display: flex;
    gap: 12px;
    font-size: 0.9rem;
    color: #718096;
}

.cm-date {
    font-weight: 600;
    color: #4a5568;
}

.cm-time {
    opacity: 0.8;
}

.cm-status-badge {
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 0.8rem;
    font-weight: 700;
    color: white;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cm-order-content {
    padding: 25px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 25px;
    align-items: start;
}

.cm-service-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2d3748;
    margin: 0 0 15px 0;
    line-height: 1.3;
}

.cm-service-details {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cm-detail-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
}

.cm-detail-label {
    font-weight: 600;
    color: #718096;
    min-width: 60px;
    font-size: 0.85rem;
}

.cm-detail-value {
    color: #2d3748;
    word-break: break-all;
    font-weight: 500;
}

.cm-order-summary {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #f7fafc;
    padding: 20px;
    border-radius: 15px;
    border: 1px solid #e2e8f0;
}

.cm-amount-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: #27ae60;
    display: block;
    line-height: 1;
}

.cm-amount-label {
    font-size: 0.75rem;
    color: #718096;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
}

.cm-payment-method {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-end;
    font-size: 0.9rem;
    color: #718096;
    font-weight: 500;
}

.cm-payment-icon {
    font-size: 1.1rem;
}

.cm-order-footer {
    padding: 20px 25px 25px;
    border-top: 1px solid #f1f3f4;
    background: #fafbfc;
}

.cm-order-actions {
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.cm-btn-view {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    flex: 1;
    justify-content: center;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.cm-btn-view:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    color: white;
    text-decoration: none;
}

.cm-btn-resume {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    flex: 1;
    justify-content: center;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

.cm-btn-resume:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(39, 174, 96, 0.4);
    color: white;
    text-decoration: none;
}

/* Progress Bar */
.cm-order-progress {
    padding: 20px 25px;
    background: linear-gradient(135deg, #edf2f7 0%, #f7fafc 100%);
    border-top: 1px solid #e2e8f0;
}

.cm-progress-bar {
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}

.cm-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    border-radius: 4px;
    transition: width 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cm-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.cm-progress-text {
    font-size: 0.85rem;
    color: #718096;
    text-align: center;
    font-weight: 600;
}

/* No Orders State */
.cm-no-orders {
    text-align: center;
    padding: 80px 40px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin: 40px 0;
    border: 2px dashed #e2e8f0;
}

.cm-no-orders-icon {
    font-size: 5rem;
    margin-bottom: 25px;
    opacity: 0.7;
}

.cm-no-orders h3 {
    font-size: 1.8rem;
    color: #2d3748;
    margin-bottom: 15px;
    font-weight: 700;
}

.cm-no-orders p {
    color: #718096;
    margin-bottom: 30px;
    font-size: 1.1rem;
    line-height: 1.6;
}

.cm-btn-primary {
    display: inline-block;
    padding: 15px 35px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 700;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.cm-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
    color: white;
    text-decoration: none;
}

/* Footer Note */
.cm-tracker-footer {
    margin-top: 50px;
}

.cm-footer-note {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 25px;
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    border-radius: 15px;
    border-left: 5px solid #667eea;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.cm-note-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    opacity: 0.8;
}

.cm-note-content {
    flex: 1;
    color: #4a5568;
    font-size: 0.95rem;
    line-height: 1.6;
}

.cm-note-content strong {
    color: #2d3748;
}

/* Status-specific styling */
.cm-order-card[data-status="completed"] {
    border-top: 4px solid #2ecc71;
}

.cm-order-card[data-status="paid"] {
    border-top: 4px solid #27ae60;
}

.cm-order-card[data-status="processing"] {
    border-top: 4px solid #3498db;
}

.cm-order-card[data-status="pending"] {
    border-top: 4px solid #f39c12;
}

.cm-order-card[data-status="expired"],
.cm-order-card[data-status="failed"] {
    border-top: 4px solid #e74c3c;
}

/* Order Detail Page Styles */
.cm-order-detail-page {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    background: #f8fafc;
    min-height: 100vh;
}

.cm-order-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    color: white;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.cm-order-detail-title h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: white;
}

.cm-order-detail-title p {
    font-size: 1.1rem;
    margin: 0;
    opacity: 0.9;
}

.cm-btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.cm-btn-back:hover {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    text-decoration: none;
}

.cm-order-detail-content {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.cm-detail-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.cm-detail-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    background: linear-gradient(135deg, #f8fafc 0%, #edf2f7 100%);
    border-bottom: 1px solid #e2e8f0;
}

.cm-detail-card-header h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2d3748;
    margin: 0;
}

.cm-status-badge.large {
    padding: 10px 20px;
    font-size: 0.9rem;
    border-radius: 25px;
}

.cm-detail-card-body {
    padding: 30px;
}

.cm-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.cm-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #f1f3f4;
}

.cm-detail-item:last-child {
    border-bottom: none;
}

.cm-detail-label {
    font-weight: 600;
    color: #718096;
    font-size: 0.95rem;
}

.cm-detail-value {
    color: #2d3748;
    font-weight: 500;
    text-align: right;
}

.cm-detail-value.price {
    font-size: 1.3rem;
    font-weight: 700;
    color: #27ae60;
}

.cm-action-section {
    text-align: center;
    padding: 40px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    border: 2px dashed #e2e8f0;
}

.cm-btn-resume-large {
    display: inline-block;
    padding: 18px 40px;
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    text-decoration: none;
    border-radius: 15px;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(39, 174, 96, 0.3);
    border: none;
    cursor: pointer;
}

.cm-btn-resume-large:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(39, 174, 96, 0.4);
    color: white;
    text-decoration: none;
}

.cm-action-note {
    margin-top: 15px;
    color: #718096;
    font-size: 0.95rem;
}

.cm-expired-notice {
    text-align: center;
    padding: 50px 40px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    border: 2px dashed #e74c3c;
}

.cm-expired-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.7;
}

.cm-expired-notice h4 {
    font-size: 1.5rem;
    color: #e74c3c;
    margin-bottom: 15px;
    font-weight: 700;
}

.cm-expired-notice p {
    color: #718096;
    margin-bottom: 25px;
    font-size: 1rem;
}

/* Unauthorized and Not Found States */
.cm-unauthorized,
.cm-order-not-found {
    text-align: center;
    padding: 80px 40px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin: 40px auto;
    max-width: 600px;
    border: 2px dashed #e2e8f0;
}

.cm-unauthorized-icon,
.cm-not-found-icon {
    font-size: 5rem;
    margin-bottom: 25px;
    opacity: 0.7;
}

.cm-unauthorized h2,
.cm-order-not-found h2 {
    font-size: 2rem;
    color: #2d3748;
    margin-bottom: 15px;
    font-weight: 700;
}

.cm-unauthorized p,
.cm-order-not-found p {
    color: #718096;
    margin-bottom: 30px;
    font-size: 1.1rem;
    line-height: 1.6;
}

.cm-unauthorized-actions,
.cm-not-found-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.cm-btn-secondary {
    display: inline-block;
    padding: 12px 25px;
    background: #718096;
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.cm-btn-secondary:hover {
    background: #4a5568;
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .cm-tracker-header,
    .cm-order-detail-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        text-align: center;
    }

    .cm-orders-grid {
        grid-template-columns: 1fr;
    }

    .cm-order-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .cm-order-summary {
        text-align: left;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .cm-order-actions {
        flex-direction: column;
    }

    .cm-tracker-title h1,
    .cm-order-detail-title h1 {
        font-size: 2rem;
    }

    .cm-modern-tracker,
    .cm-order-detail-page {
        padding: 15px;
    }

    .cm-detail-grid {
        grid-template-columns: 1fr;
    }

    .cm-detail-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .cm-detail-value {
        text-align: left;
    }

    .cm-unauthorized-actions,
    .cm-not-found-actions {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .cm-modern-tracker,
    .cm-order-detail-page {
        padding: 10px;
    }

    .cm-order-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .cm-status-badge {
        align-self: flex-start;
    }

    .cm-order-content {
        padding: 20px;
    }

    .cm-order-footer {
        padding: 20px;
    }

    .cm-tracker-title h1,
    .cm-order-detail-title h1 {
        font-size: 1.75rem;
    }

    .cm-stat-card {
        padding: 15px 20px;
    }

    .cm-stat-number {
        font-size: 2rem;
    }

    .cm-detail-card-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .cm-detail-card-body {
        padding: 20px;
    }
}

/* Animation for new orders */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cm-order-card {
    animation: slideInUp 0.6s ease-out;
}

/* Loading state */
.cm-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}