:root {
    --primary: #f0b90b;
    --success: #02c076;
    --danger: #f84960;
    --background: #0f0f0f;
    --card-bg: #1a1a1a;
    --border: #333;
    --text-primary: #eaecef;
    --text-secondary: #848e9c;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #0a0a0a;
    color: #888888;
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px;
    background-color: black;
}

/* Header */
.header {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.header h1 {
    font-size: 20px;
    font-weight: 600;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
      -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    color: #ffffff;
    margin-bottom: 12px;
}

.header-actions {
    display: flex;
    gap: 12px;
}

/* Buttons */
.btn-primary, .btn-secondary, .btn-success, .btn-danger {
    padding: 12px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: 1;
    transition: background 0.2s ease;
}

.btn-primary {
    background: #000000;
    color: #eaecef96;
    font-size: 13px;
     border-top: 1px solid var(--border);
}

.btn-primary:hover {
    background: #343432;
}

.btn-secondary {
    background: #000000;
    color: #eaecef96;
    font-size: 13px;
     border: 1px solid #222222;
}



.btn-secondary:hover {
    background: #444;
}

.btn-success {
    background: #000000;
    color: #eaecef96;
    border: 1px solid #222222;
}

.btn-success:hover {
    background: #242525;
}

.btn-danger {
    background: #000000;
    color: #eaecef96;
    border: 1px solid #222222;
}

.btn-danger:hover {
    background: #201f1f;
}

/* Filters */
.filters {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 20px;
    padding: 16px;
    background: #000000;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.filter-group label {
    font-size: 14px;
    font-weight: 500;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
      -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    /* display: flex; */
    color: #ffffff;
    margin-bottom: 6px;
    display: block;
}

.filter-group select, .filter-group input {
    width: 100%;
    padding: 10px 12px;
    background: #000000;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    color: #888888;
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: var(--primary);
}

/* Trades List */
.trades-list {
    background: var(--card-bg);
    border-radius: 8px;
    border: 1px solid var(--border);
    overflow: hidden;
}

.list-header {
    padding: 16px;
    background: #000000;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.list-header h2 {
    font-size: 16px;
    font-weight: 600;
    color: #006ba1;
}

#total-trades {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

.trades-container {
    padding: 0;
}

/* Trade Items */
.trade-item {
    display: flex;
    flex-direction: column;
    padding: 16px;
    border-bottom: 1px solid var(--border);
    gap: 12px;
    background-color: black;
}

.trade-item:last-child {
    border-bottom: none;
}

.trade-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.trade-ref {
    font-weight: 600;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
      -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    color: #ffffff;
    font-size: 16px;
}

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

.trade-detail {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.trade-detail .label {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
      -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
}

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

.trade-status {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    background-color: #111111de;
    color: #888888;
}

.status-pending {
    background: var(--primary);
    color: #000;
}

.status-paid {
    background: var(--success);
    color: white;
}

.status-completed {
    background: #0a0a0a;
    color: white;
}

.status-disputed {
    background: var(--danger);
    color: white;
}

.status-cancelled {
    background: #0a0a0a;
    color: white;
}

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

.trade-actions button {
    flex: 1;
    padding: 8px 12px;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background-color: #222222;
    color: #888888;
    border: 1px solid #222222;
}

.btn-view {
    background: #0f0f0f;
    color: #eaecef;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
}

.btn-chat {
    background: #0f0f0f;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    position: relative;
    border: 1px solid #222222;
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--danger);
    color: white;
    border-radius: 50%;
    padding: 2px 4px;
    font-size: 10px;
    min-width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Loading States */
.loading, .no-trades {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
    font-size: 14px;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 15, 15, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 16px;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: var(--card-bg);
    border-radius: 8px;
    width: 100%;
    max-width: 500px;
    border: 1px solid var(--border);
    max-height: 90vh;
    overflow-y: auto;
}

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

.modal-header h3 {
    font-size: 16px;
    font-weight: 600;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
      -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    color: #ffffff;
}

.modal-header .close {
    font-size: 18px;
    cursor: pointer;
    color: var(--text-secondary);
    background: none;
    border: none;
}

.modal-body {
    padding: 16px;
    background-color: #000000;
    color: #848e9c;
     border: 1px solid var(--border);
}


#payment-proof {
    background-color: #000; /* solid black background */
    color: #ffd700; /* gold text to match theme */
    border: 1px solid rgba(255, 215, 0, 0.3); /* soft gold border */
    border-radius: 8px;
    padding: 10px 14px;
    width: 100%;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Hover effect */
#payment-proof:hover {
    border-color: #ffd700;
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.3);
}

/* Focus effect */
#payment-proof:focus {
    outline: none;
    border-color: #ffd700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
}

/* To hide default file input button (optional, for custom look) */
#payment-proof::-webkit-file-upload-button {
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    color: #000;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

#payment-proof::-webkit-file-upload-button:hover {
    background: linear-gradient(135deg, #ffb700, #ff7300);
    transform: translateY(-2px);
}

.btn-primary {
    background: #000000;
    color: #eaecef96;
    font-size: 13px;
     border-top: 1px solid var(--border);
}

.modal-footer {
    padding: 16px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 8px;
    background-color: black;
}

.modal-footer button {
    flex: 1;
    color: #888888;
    background-color: black;
    border: 1px solid #222222;
}

/* Trade Details */
.trade-details-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.detail-section {
    padding: 12px;
    background: #000000;
    border-radius: 6px;
    border: 1px solid var(--border);
}

.detail-section h4 {
    margin-bottom: 8px;
    color: #888888;
    font-size: 14px;
    font-weight: 600;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid var(--border);
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-item .label {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
      -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    color: #ffffff;
    font-size: 13px;
}

.detail-item .value {
    font-weight: 600;
    color: #6b7280;
    font-size: 13px;
}

/* Counterparty */
.counterparty-details {
    background: var(--card-bg);
    padding: 12px;
    border-radius: 6px;
    border: 1px solid var(--border);
}

.counterparty-details h3 {
    color: var(--primary);
    border-bottom: 1px solid var(--border);
    padding-bottom: 6px;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

.action-buttons button {
    flex: 1;
    background-color: black;
    border: 1px solid #222222;
    color: #fff;
}

/* Review Section */
.review-section {
    padding: 12px;
    background: #000000;
    border-radius: 6px;
    margin-bottom: 16px;
    border: 1px solid var(--border);
}

.review-options {
    display: flex;
    gap: 8px;
    margin: 12px 0;
}

.btn-review-good, .btn-review-bad {
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--card-bg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-weight: 500;
    flex: 1;
    font-size: 14px;
    color: #888888;
}

.btn-review-good.active {
    background: #1a3a2a;
    border-color: var(--success);
    color: var(--success);
}

.btn-review-bad.active {
    background: #3a1a1a;
    border-color: var(--danger);
    color: var(--danger);
}

.btn-confirm-review {
    padding: 10px 16px;
    background: #0a0a0a;
    color: #888888;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    width: 100%;
    margin-top: 8px;
}

/* FAQ Section */
.faq-section {
    padding: 12px;
    background: #000000;
    border-radius: 6px;
    border: 1px solid var(--border);
}

.faq-section h5 {
    color: var(--text-primary);
    border-bottom: 1px solid var(--border);
    padding-bottom: 8px;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
}

.faq-btn {
    display: block;
    width: 100%;
    text-align: left;
    padding: 10px 12px;
    margin: 4px 0;
    background: #000000;
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-primary);
}

/* Completed Trade */
.trade-completed-banner {
    background: #000000;
    border: 1px solid #888888;
    color: #888888;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 16px;
    text-align: center;
}

.trade-completed-banner h3 {
    color: var(--success);
    margin-bottom: 8px;
    font-size: 16px;
    font-weight: 600;
}

.payment-proof-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.payment-proof-preview {
    width: 100%;
    max-width: 200px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.payment-proof-image {
    width: 100%;
    height: auto;
    display: block;
}

.btn-download-proof {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--border);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    font-size: 13px;
}

/* Dispute Modal */
.dispute-modal-content .modal-body {
    padding: 16px;
}

.dispute-modal-content .form-group {
    margin-bottom: 12px;
}

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

.dispute-modal-content .form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    background-color: var(--background);
    color: var(--text-primary);
}

.dispute-modal-content textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

.dispute-modal-content .modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 0 16px 16px;
}

.dispute-modal-content .btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: 1;
}



#dispute-reason-select {
    background-color: #000; /* solid black background */
    color: #888888; /* gold text for options */
    border: 1px solid rgba(255, 215, 0, 0.3); /* subtle gold border */
    border-radius: 8px;
    width: 100%;
    padding: 12px;
    font-family: inherit;
    font-size: 14px;
    appearance: none; /* removes default arrow styling */
    cursor: pointer;
    transition: all 0.3s ease;
}

/* hover effect */
#dispute-reason-select:hover {
    border-color: #ffd700;
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.3);
}

/* focus effect */
#dispute-reason-select:focus {
    outline: none;
    border-color: #ffd700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
}

/* dropdown options */
#dispute-reason-select option {
    background-color: #000; /* keep dropdown black */
    color: #d1d5db; /* soft gray text inside dropdown */
}


#dispute-description {
    background-color: #000;
    color: #888888;
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 8px;
    width: 100%;
    padding: 12px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    transition: all 0.3s ease;
}

/* placeholder text color */
#dispute-description::placeholder {
    color: #848e9c; /* subtle gray for contrast */
    opacity: 0.8;
}

/* hover effect */
#dispute-description:hover {
    border-color: #ffd700;
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.3);
}

/* focus effect */
#dispute-description:focus {
    outline: none;
    border-color: #ffd700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
}




/* Rating */
.rating-stars {
    color: var(--primary);
    font-size: 14px;
}

.rating-value {
    font-weight: 600;
    margin-left: 6px;
    color: var(--text-primary);
}

.hidden {
    display: none !important;
}

/* Tablet Styles */
@media (min-width: 768px) {
    .container {
        padding: 20px;
    }
    
    .header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 24px;
    }
    
    .header h1 {
        margin-bottom: 0;
    }
    
    .header-actions {
        width: auto;
        flex: 0 0 auto;
    }
    
    .header-actions button {
        flex: 0 1 auto;
        min-width: 120px;
    }
    
    .filters {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .trade-item {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 16px;
    }
    
    .trade-info {
        flex: 1;
    }
    
    .trade-details {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .trade-status {
        flex-direction: row;
        align-items: center;
        gap: 12px;
        width: auto;
    }
    
    .trade-actions {
        width: auto;
    }
    
    .trade-actions button {
        flex: 0 1 auto;
        min-width: 100px;
    }
    
    .modal-footer button {
        flex: 0 1 auto;
        min-width: 120px;
    }
    
    .action-buttons {
        flex-direction: row;
    }
    
    .action-buttons button {
        flex: 0 1 auto;
        min-width: 120px;
    }
}

/* Desktop Styles */
@media (min-width: 1024px) {
    .filters {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .trade-details {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .detail-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}