* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

header {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 15px;
}

header nav {
    display: flex;
    gap: 10px;
}

header .nav-link {
    padding: 6px 14px;
    background: #f0f0f0;
    color: #666;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.9em;
}

header .nav-link:hover {
    background: #e0e0e0;
    color: #333;
}

header .nav-link.active {
    background: #667eea;
    color: white;
}

.logout-link {
    background: #ef4444 !important;
    color: white !important;
}

.logout-link:hover {
    background: #dc2626 !important;
}

.user-info {
    font-size: 0.95em;
    color: #666;
    margin-right: 10px;
}

header h1 {
    color: #333;
    font-size: 2em;
}

.stats {
    font-size: 1.1em;
    color: #666;
}

.filters {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.filters h2 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.5em;
}

.provider-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.provider-btn {
    padding: 12px 24px;
    border: 2px solid #667eea;
    background: white;
    color: #667eea;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.3s ease;
    font-weight: 500;
}

.provider-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.provider-btn.active {
    background: #667eea;
    color: white;
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.main-content {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.orders-section {
    flex: 1;
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.orders-section h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 1.2em;
}

.orders-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 20px;
}

.order-card {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
}

.order-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.order-id {
    font-size: 1.2em;
    font-weight: bold;
    color: #333;
}

.order-state {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 500;
}

.order-state.pending {
    background: #fff3cd;
    color: #856404;
}

.order-state.processing {
    background: #cfe2ff;
    color: #084298;
}

.order-state.completed {
    background: #d1e7dd;
    color: #0f5132;
}

.order-state.error {
    background: #f8d7da;
    color: #842029;
}

.order-state.cancelled {
    background: #e2e3e5;
    color: #41464b;
}

.order-info {
    margin-bottom: 10px;
}

.order-info label {
    font-weight: 600;
    color: #666;
    display: inline-block;
    min-width: 120px;
}

.order-info span {
    color: #333;
}

.provider-website-link {
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    color: #667eea;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 4px 8px;
    border-radius: 4px;
    vertical-align: middle;
}

.provider-website-link:hover {
    color: #5568d3;
    background: #f0f0f0;
    transform: translateY(-1px);
}

.provider-website-link svg {
    width: 16px;
    height: 16px;
    display: block;
}

.provider-badge {
    display: inline-block;
    padding: 4px 12px;
    background: #667eea;
    color: white;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 500;
    margin-left: 5px;
}

.provider-sidebar {
    width: 250px;
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.provider-sidebar h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.3em;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

.provider-website-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.provider-website-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: #333;
}

.provider-website-item:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.provider-website-item .provider-name {
    font-weight: 500;
    flex: 1;
}

.provider-website-item .external-icon {
    width: 16px;
    height: 16px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    flex-shrink: 0;
}

.provider-website-item:hover .external-icon {
    opacity: 1;
}

@media (max-width: 1200px) {
    .main-content {
        flex-direction: column;
    }
    
    .provider-sidebar {
        width: 100%;
        position: static;
        max-height: none;
    }
    
    .provider-website-list {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .provider-website-item {
        flex: 1;
        min-width: 150px;
    }
}

.order-response {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.response-content {
    margin-top: 8px;
    max-height: 300px;
    overflow-y: auto;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 12px;
}

.response-json {
    margin: 0;
    padding: 0;
    font-family: 'Courier New', 'Monaco', 'Consolas', monospace;
    font-size: 0.85em;
    line-height: 1.5;
    color: #333;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-x: auto;
}

.account-list {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.account-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.account-list-title {
    font-weight: 600;
    color: #666;
}

.copy-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85em;
    transition: all 0.3s ease;
    font-weight: 500;
}

.copy-btn:hover {
    background: #5568d3;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
}

.copy-btn:active {
    transform: translateY(0);
}

.copy-btn svg {
    width: 14px;
    height: 14px;
}

.account-items-container {
    max-height: 200px;
    overflow-y: auto;
}

.account-item {
    background: white;
    padding: 8px 12px;
    margin-bottom: 5px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    word-break: break-all;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state h3 {
    font-size: 1.5em;
    margin-bottom: 10px;
}

.empty-state p {
    font-size: 1.1em;
}

.copy-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 24px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 10000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideIn 0.3s ease;
}

.copy-message.success {
    background: #10b981;
}

.copy-message.error {
    background: #ef4444;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 分页控件样式 */
#pagination-container {
    margin-top: 30px;
    display: flex;
    justify-content: center;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.page-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 40px;
    justify-content: center;
}

.page-btn:hover:not(.disabled):not(.active) {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.page-btn:active:not(.disabled) {
    transform: translateY(0);
}

.page-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
    cursor: default;
}

.page-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f0f0f0;
    border-color: #d0d0d0;
    color: #999;
}

.page-btn svg {
    width: 14px;
    height: 14px;
}

.page-ellipsis {
    padding: 8px 4px;
    color: #666;
    font-weight: 500;
}

.page-info {
    margin-left: 20px;
    padding: 8px 16px;
    color: #666;
    font-size: 0.9em;
    font-weight: 500;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .orders-container {
        grid-template-columns: 1fr;
    }
    
    header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .pagination {
        gap: 4px;
    }
    
    .page-btn {
        padding: 6px 12px;
        font-size: 0.85em;
        min-width: 36px;
    }
    
    .page-info {
        margin-left: 10px;
        font-size: 0.85em;
        padding: 6px 12px;
    }
}

