/* Styles for Selling Management Page */

.sales-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, rgba(65, 105, 225, 0.3), rgba(138, 43, 226, 0.3));
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.stat-value {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 5px;
    color: #fff;
}

.stat-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

/* Selling Tabs */
.selling-tabs {
    margin-top: 20px;
}

.nav-tabs {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.nav-tabs .nav-item {
    margin-bottom: -1px;
}

.nav-tabs .nav-link {
    padding: 12px 20px;
    border: none;
    border-bottom: 3px solid transparent;
    background-color: transparent;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-tabs .nav-link:hover {
    color: #fff;
}

.nav-tabs .nav-link.active {
    color: #fff;
    border-bottom: 3px solid #FFA500;
    background-color: transparent;
}

.nav-tabs .badge {
    margin-left: 5px;
    background-color: rgba(0, 0, 0, 0.3);
    color: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    padding: 3px 8px;
    font-size: 12px;
    font-weight: normal;
}

/* Listings Filter */
.listings-filter {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.search-filter {
    position: relative;
    flex: 1;
    min-width: 250px;
}

.search-filter input {
    width: 100%;
    padding: 12px 15px 12px 40px;
    border-radius: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
    color: #fff;
    font-size: 14px;
}

.search-filter i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.5);
}

.filter-options {
    display: flex;
    gap: 10px;
}

.filter-select {
    padding: 10px 15px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
    color: #fff;
    font-size: 14px;
    min-width: 160px;
}

/* Listings Table */
.listings-table-container {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow-x: auto;
    margin-bottom: 30px;
}

.listings-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    color: #fff;
}

.listings-table th {
    text-align: left;
    padding: 15px 10px;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    font-size: 12px;
}

.listings-table td {
    padding: 15px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 14px;
    vertical-align: middle;
}

.listings-table tbody tr {
    transition: background 0.3s ease;
}

.listings-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.card-image {
    width: 40px;
    height: 40px;
    border-radius: 5px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-info {
    display: flex;
    flex-direction: column;
}

.card-name {
    font-weight: 500;
    margin-bottom: 5px;
}

.foil-badge {
    display: inline-block;
    background: linear-gradient(135deg, #ffd700, #f8a100);
    color: #000;
    border-radius: 3px;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 600;
    margin-right: 5px;
}

.listing-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.action-icon {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    color: #fff;
    transition: all 0.2s ease;
}

.action-icon:hover {
    transform: scale(1.1);
}

.edit-icon:hover {
    color: #4e95ff;
}

.delete-icon:hover {
    color: #ff5252;
}

/* Empty Listings State */
.empty-listings td {
    padding: 50px 20px;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: rgba(255, 255, 255, 0.7);
}

.empty-state i {
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.4);
}

.empty-state p {
    margin-bottom: 10px;
    font-size: 18px;
}

.empty-subtext {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 20px;
}

/* Sale Cards */
.sale-card {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sale-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.sale-header {
    display: flex;
    justify-content: space-between;
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sale-id {
    font-weight: 600;
    color: #fff;
}

.sale-date {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}

.sale-body {
    padding: 20px;
    display: flex;
    gap: 20px;
}

.sale-card-image {
    width: 100px;
    height: 140px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.sale-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sale-details {
    flex: 1;
}

.sale-card-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
}

.sale-card-set {
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 10px;
}

.sale-info {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.sale-condition,
.sale-language {
    background: rgba(0, 0, 0, 0.2);
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
}

.sale-price {
    font-size: 24px;
    font-weight: 600;
    color: #4e95ff;
}

.buyer-info {
    width: 200px;
    padding-left: 20px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.buyer-name,
.buyer-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.8);
}

.buyer-rating i {
    color: #ffd700;
}

.message-buyer {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #4e95ff;
    font-size: 14px;
}

.message-buyer:hover {
    text-decoration: underline;
}

.sale-footer {
    padding: 15px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 14px;
}

.status-badge.pending {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
}

.status-badge.completed {
    background: rgba(40, 167, 69, 0.2);
    color: #28a745;
}

.status-badge.cancelled {
    background: rgba(220, 53, 69, 0.2);
    color: #dc3545;
}

.sale-actions {
    display: flex;
    gap: 10px;
}

.btn-primary {
    padding: 8px 15px;
    background: linear-gradient(135deg, #FFA500, #feb47b);
    border: none;
    border-radius: 20px;
    color: white;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary {
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    color: white;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 126, 95, 0.4);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Multi-step Form */
.form-steps {
    position: relative;
}

.form-step {
    display: none;
    animation: fadeIn 0.3s;
}

.form-step.active {
    display: block;
}

.form-step h6 {
    margin-bottom: 20px;
    font-weight: 600;
    color: #FFA500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.step-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Expired Actions */
.expired-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

/* Media Queries */
@media (max-width: 992px) {
    .sale-body {
        flex-direction: column;
    }
    
    .buyer-info {
        width: 100%;
        padding-left: 0;
        padding-top: 15px;
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

@media (max-width: 768px) {
    .listings-filter {
        flex-direction: column;
        align-items: stretch;
    }
    
    .sale-header {
        flex-direction: column;
        gap: 5px;
    }
    
    .sale-footer {
        flex-direction: column;
        align-items: stretch;
    }
    
    .sale-actions {
        flex-direction: column;
    }
    
    .btn-primary, .btn-secondary {
        width: 100%;
        justify-content: center;
    }
}
