/* Admin Interface Enhancements */

/* Global Variables */
:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --success-gradient: linear-gradient(45deg, #28a745, #20c997);
    --warning-gradient: linear-gradient(45deg, #ffc107, #fd7e14);
    --info-gradient: linear-gradient(45deg, #17a2b8, #6f42c1);
    --card-shadow: 0 2px 4px rgba(0,0,0,0.1);
    --card-shadow-hover: 0 4px 8px rgba(0,0,0,0.15);
    --border-radius: 0.75rem;
    --transition: all 0.2s ease-in-out;
}

/* Enhanced Headers */
.admin-header, .trading-opportunities-header, .opportunity-header {
    background: var(--primary-gradient);
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
    border-radius: 0.5rem;
}

.admin-header h1, .trading-opportunities-header h1, .opportunity-header h1 {
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.admin-header p, .trading-opportunities-header p, .opportunity-header p {
    opacity: 0.85;
    margin-bottom: 0;
}

/* Enhanced Cards */
.stats-card, .detail-card, .filter-card, .trading-table {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    position: relative;
    overflow: hidden;
}

.stats-card:hover, .detail-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.stats-card .card-body, .detail-card .card-body {
    padding: 2rem 1.5rem;
    position: relative;
}

.stats-card .card-header, .detail-card .card-header, .filter-card .card-header {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: none;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    font-weight: 600;
    padding: 1.25rem 1.5rem;
}

/* Enhanced Statistics Cards */
.stats-card {
    height: 100%;
    min-height: 140px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

.stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stats-card:hover::before {
    opacity: 1;
}

.stats-icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    position: relative;
    overflow: hidden;
}

.stats-icon-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: inherit;
    opacity: 0.1;
    border-radius: 50%;
}

.stats-icon-wrapper.primary { background: linear-gradient(135deg, #007bff, #0056b3); }
.stats-icon-wrapper.success { background: linear-gradient(135deg, #28a745, #1e7e34); }
.stats-icon-wrapper.warning { background: linear-gradient(135deg, #ffc107, #e0a800); }
.stats-icon-wrapper.info { background: linear-gradient(135deg, #17a2b8, #117a8b); }
.stats-icon-wrapper.secondary { background: linear-gradient(135deg, #6c757d, #545b62); }
.stats-icon-wrapper.dark { background: linear-gradient(135deg, #343a40, #23272b); }

/* Statistics Numbers */
.stats-number {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
}

/* Enhanced Status Badges */
.notification-status, .profit-badge {
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.profit-badge {
    font-size: 0.9rem;
    padding: 0.6rem 1.2rem;
    min-width: 80px;
    justify-content: center;
    text-align: center;
}

.profit-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.profit-badge:hover::before {
    left: 100%;
}

.status-sent, .profit-high {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.status-pending, .profit-medium {
    background: linear-gradient(135deg, #ffc107, #fd7e14);
    color: #212529;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
}

.status-failed {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.status-processing {
    background: linear-gradient(135deg, #17a2b8, #138496);
    color: white;
    box-shadow: 0 4px 15px rgba(23, 162, 184, 0.3);
}

.profit-low {
    background: linear-gradient(135deg, #6f42c1, #5a32a3);
    color: white;
    box-shadow: 0 4px 15px rgba(111, 66, 193, 0.3);
}

/* Enhanced Filter Section */
.filter-card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    margin-bottom: 2rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

.filter-card .card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    padding: 1.25rem 1.5rem;
}

.filter-card .card-body {
    padding: 2rem 1.5rem;
}

.filter-form .form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-form .form-control, .filter-form .form-select {
    border: 2px solid #e9ecef;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
}

.filter-form .form-control:focus, .filter-form .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    transform: translateY(-1px);
}

.filter-form .input-group-text {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 2px solid #e9ecef;
    border-right: none;
    color: #6c757d;
    font-weight: 600;
}

.filter-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    justify-content: flex-end;
    height: 100%;
}

.filter-actions .btn {
    border-radius: 0.5rem;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.875rem;
}

.filter-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Enhanced Tables */
.notification-table, .trading-table {
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.notification-table thead th, .trading-table thead th {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: none;
    font-weight: 700;
    color: #495057;
    padding: 1.25rem 1rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
}

.trading-table thead th::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 1rem;
    right: 1rem;
    height: 2px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    opacity: 0.3;
}

.notification-table tbody tr, .trading-table tbody tr {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.trading-table tbody tr:nth-child(even) {
    background-color: rgba(248, 249, 250, 0.5);
}

.notification-table tbody tr:hover, .trading-table tbody tr:hover {
    background-color: rgba(102, 126, 234, 0.08);
    transform: scale(1.01);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}

.trading-table tbody td {
    padding: 1.25rem 1rem;
    vertical-align: middle;
    border: none;
}

/* Enhanced Item Display */
.item-display {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.item-icon-wrapper {
    width: 40px;
    height: 40px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    flex-shrink: 0;
}

.item-details {
    flex: 1;
    min-width: 0;
}

.item-name {
    font-weight: 700;
    color: #2c3e50;
    font-size: 1rem;
    line-height: 1.3;
    margin-bottom: 0.25rem;
}

.item-category-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    color: #1565c0;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
}

/* Enhanced Price Display */
.price-display {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.price-display .currency-icon {
    opacity: 0.7;
    font-size: 0.9rem;
}

.market-price {
    color: #17a2b8;
    background: linear-gradient(135deg, rgba(23, 162, 184, 0.1), rgba(23, 162, 184, 0.05));
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    border-left: 3px solid #17a2b8;
}

.buyer-price {
    color: #28a745;
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.1), rgba(40, 167, 69, 0.05));
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    border-left: 3px solid #28a745;
}

.profit-display {
    color: #155724;
    background: linear-gradient(135deg, rgba(21, 87, 36, 0.1), rgba(21, 87, 36, 0.05));
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    border-left: 3px solid #155724;
    font-weight: 800;
}

/* Bot Status Indicator */
.bot-status {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-weight: 600;
    font-size: 0.875rem;
}

.bot-status.online {
    background: #d4edda;
    color: #155724;
}

.bot-status.offline {
    background: #f8d7da;
    color: #721c24;
}

/* Enhanced Buttons */
.action-btn, .btn-action {
    border-radius: 0.375rem;
    font-weight: 500;
    transition: var(--transition);
    border: none;
    padding: 0.5rem 1rem;
}

.action-btn:hover, .btn-action:hover {
    transform: translateY(-1px);
}

/* Price Display */
.price-display {
    font-family: 'Courier New', monospace;
    font-weight: 600;
}

.item-name {
    font-weight: 600;
    color: #2c3e50;
}

/* Profit Highlights */
.profit-highlight {
    background: var(--success-gradient);
    color: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    text-align: center;
}

.price-comparison {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 0.5rem;
    padding: 1rem;
}

/* Buyer and Market Info */
.buyer-info {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    border-radius: 0.5rem;
    padding: 1.5rem;
}

.market-stats {
    background: linear-gradient(135deg, #fff3e0, #ffe0b2);
    border-radius: 0.5rem;
    padding: 1.5rem;
}

/* Trading Steps */
.trade-step {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
    transition: border-color 0.2s ease;
}

.trade-step:hover {
    border-color: #007bff;
}

.step-number {
    background: #007bff;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 1rem;
    flex-shrink: 0;
}

/* Enhanced Empty States */
.empty-state {
    padding: 4rem 2rem;
    text-align: center;
    color: #6c757d;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: var(--border-radius);
    border: 2px dashed #dee2e6;
    margin: 2rem 0;
    position: relative;
    overflow: hidden;
}

.empty-state::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.05), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, #e9ecef, #dee2e6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.empty-state-icon i {
    font-size: 2.5rem;
    color: #adb5bd;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.empty-state h5 {
    color: #495057;
    font-weight: 700;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.empty-state p {
    color: #6c757d;
    margin-bottom: 1.5rem;
    font-size: 1rem;
    line-height: 1.6;
}

.empty-state-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.empty-state-actions .btn {
    border-radius: 2rem;
    padding: 0.75rem 2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.empty-state-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Enhanced Loading States */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: var(--border-radius);
    margin: 2rem 0;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(102, 126, 234, 0.1);
    border-radius: 50%;
    border-top-color: #667eea;
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 1rem;
}

.loading-text {
    color: #6c757d;
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
}

.loading-dots::after {
    content: '';
    animation: dots 1.5s steps(5, end) infinite;
}

@keyframes dots {
    0%, 20% { content: ''; }
    40% { content: '.'; }
    60% { content: '..'; }
    80%, 100% { content: '...'; }
}

/* Market Overview Components - Adapted from index.html */
.market-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.market-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.market-grid-5 {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
}

.market-card {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.market-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.market-card.clickable {
    cursor: pointer;
}

.market-card.clickable:hover {
    transform: translateY(-2px) scale(1.02);
}

/* Gradient Cards - Matching index.html color scheme */
.gradient-card {
    color: white;
    position: relative;
    overflow: hidden;
}

.gradient-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: inherit;
    opacity: 0.1;
    z-index: 0;
}

.gradient-card > * {
    position: relative;
    z-index: 1;
}

.gradient-blue {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.gradient-green {
    background: linear-gradient(135deg, #10b981, #059669);
}

.gradient-purple {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.gradient-orange {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.gradient-red {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

/* Market Typography */
.market-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.market-subtitle {
    font-size: 1.125rem;
    color: #6b7280;
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title.red { color: #dc2626; }
.section-title.green { color: #059669; }
.section-title.blue { color: #2563eb; }
.section-title.purple { color: #7c3aed; }
.section-title.orange { color: #d97706; }

/* Market List Items */
.market-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.market-list-item:hover {
    background-color: #f9fafb;
    transform: translateX(4px);
}

.market-list-item:last-child {
    margin-bottom: 0;
}

.item-info {
    flex: 1;
}

.item-name {
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.25rem;
}

.item-subtitle {
    font-size: 0.875rem;
    color: #6b7280;
}

.item-value {
    text-align: right;
    font-weight: 700;
}

.item-value.positive {
    color: #059669;
}

.item-value.negative {
    color: #dc2626;
}

.item-value.neutral {
    color: #2563eb;
}

.item-value.purple {
    color: #7c3aed;
}

/* Chart Containers */
.chart-wrapper {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    padding: 1.5rem;
}

.chart-header {
    margin-bottom: 1rem;
}

.chart-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #374151;
}

.chart-container {
    position: relative;
    height: 300px;
}

.chart-container.small {
    height: 200px;
}

.chart-container.large {
    height: 400px;
}

/* Enhanced Responsive Design */
@media (max-width: 1200px) {
    .market-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .market-grid-5 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .market-grid-2 {
        grid-template-columns: 1fr;
    }

    .market-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .market-grid-5 {
        grid-template-columns: repeat(2, 1fr);
    }

    .market-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .market-grid-4,
    .market-grid-5 {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .market-title {
        font-size: 1.75rem;
    }

    .chart-wrapper {
        padding: 1rem;
    }

    .chart-container {
        height: 250px;
    }
}

/* Enhanced Responsive Design */
@media (max-width: 1200px) {
    .stats-number {
        font-size: 2.2rem;
    }

    .trading-table tbody td {
        padding: 1rem 0.75rem;
    }

    .item-display {
        gap: 0.5rem;
    }

    .item-icon-wrapper {
        width: 35px;
        height: 35px;
    }
}

@media (max-width: 992px) {
    .filter-form .row {
        gap: 1rem 0;
    }

    .filter-actions {
        margin-top: 1rem;
    }

    .stats-icon-wrapper {
        width: 50px;
        height: 50px;
    }

    .profit-badge {
        font-size: 0.8rem;
        padding: 0.5rem 1rem;
    }
}

@media (max-width: 768px) {
    .admin-header, .trading-opportunities-header, .opportunity-header {
        padding: 1.5rem 0;
        margin-bottom: 1.5rem;
    }

    .stats-number {
        font-size: 1.8rem;
    }

    .stats-card .card-body {
        padding: 1.5rem 1rem;
    }

    .stats-icon-wrapper {
        width: 45px;
        height: 45px;
        margin-bottom: 0.75rem;
    }

    .action-btn, .btn-action {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .btn-group {
        display: block;
        width: 100%;
        margin-top: 0.5rem;
    }

    .trading-table {
        font-size: 0.875rem;
    }

    .trading-table tbody td {
        padding: 0.75rem 0.5rem;
    }

    .item-display {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .item-icon-wrapper {
        width: 30px;
        height: 30px;
    }

    .price-display {
        font-size: 1rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .profit-badge {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
        min-width: 60px;
    }

    .filter-card .card-body {
        padding: 1.5rem 1rem;
    }

    .filter-form .form-control, .filter-form .form-select {
        padding: 0.6rem 0.8rem;
        font-size: 0.875rem;
    }

    .empty-state {
        padding: 3rem 1.5rem;
    }

    .empty-state-icon {
        width: 60px;
        height: 60px;
    }

    .empty-state-icon i {
        font-size: 2rem;
    }

    .empty-state-actions {
        flex-direction: column;
        align-items: center;
    }

    .empty-state-actions .btn {
        width: 100%;
        max-width: 250px;
    }
}

@media (max-width: 576px) {
    .stats-card {
        min-height: 120px;
    }

    .stats-number {
        font-size: 1.6rem;
    }

    .stats-icon-wrapper {
        width: 40px;
        height: 40px;
    }

    .trading-table thead th {
        padding: 1rem 0.5rem;
        font-size: 0.75rem;
    }

    .trading-table tbody td {
        padding: 0.6rem 0.4rem;
    }

    .item-name {
        font-size: 0.9rem;
    }

    .price-display {
        font-size: 0.9rem;
    }

    .profit-badge {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
    }

    .filter-card .card-header {
        padding: 1rem;
    }

    .filter-card .card-body {
        padding: 1rem;
    }
}

/* Loading States */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Notification Animations */
.notification-fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Custom Scrollbar */
.custom-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e0 #f7fafc;
}

.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f7fafc;
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* Link Styling Overrides for Trading Pages */
/* Override Bootstrap's default blue link color */
.trading-table a.text-dark,
.market-list-item a.text-dark,
.list-group-item a.text-dark,
table a.text-dark {
    color: #343a40 !important;
}

.trading-table a.text-dark:hover,
.market-list-item a.text-dark:hover,
.list-group-item a.text-dark:hover,
table a.text-dark:hover {
    color: #1d2124 !important;
    text-decoration: none;
}

/* Ensure text-decoration-none works properly */
a.text-decoration-none {
    text-decoration: none !important;
}

a.text-decoration-none:hover {
    text-decoration: none !important;
}

/* Pagination Styles */
/* Fix for oversized pagination arrow buttons */
.pagination {
    margin-bottom: 0;
}

.pagination .page-link {
    position: relative;
    display: block;
    padding: 0.5rem 0.75rem;
    margin-left: -1px;
    line-height: 1.25;
    color: #007bff;
    background-color: #fff;
    border: 1px solid #dee2e6;
}

.pagination .page-link:hover {
    z-index: 2;
    color: #0056b3;
    text-decoration: none;
    background-color: #e9ecef;
    border-color: #dee2e6;
}

.pagination .page-link:focus {
    z-index: 3;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.pagination .page-item:first-child .page-link {
    margin-left: 0;
    border-top-left-radius: 0.25rem;
    border-bottom-left-radius: 0.25rem;
}

.pagination .page-item:last-child .page-link {
    border-top-right-radius: 0.25rem;
    border-bottom-right-radius: 0.25rem;
}

.pagination .page-item.active .page-link {
    z-index: 3;
    color: #fff;
    background-color: #007bff;
    border-color: #007bff;
}

.pagination .page-item.disabled .page-link {
    color: #6c757d;
    pointer-events: none;
    cursor: auto;
    background-color: #fff;
    border-color: #dee2e6;
}

/* Fix SVG arrow sizing in pagination */
.pagination .page-link svg {
    width: 0.8em;
    height: 0.8em;
    vertical-align: middle;
    display: inline-block;
}

/* Ensure pagination arrows don't overflow */
.pagination .page-link {
    overflow: hidden;
    max-width: 100px;
}

/* Center pagination in card footer */
.card-footer .pagination {
    justify-content: center;
    margin: 0;
}

/* Text Selection Fix */
/* Override global user-select: none from Next.js CSS */
/* Allow text selection for content areas */
table,
.table,
.card-body,
.item-name,
.player-name,
pre,
code,
.price-display,
.list-group-item,
.form-control,
textarea,
input,
p,
span,
div,
td,
th,
h1, h2, h3, h4, h5, h6,
.text-selectable {
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    user-select: text !important;
}

/* Specifically enable selection for JSON/code blocks */
pre code {
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    user-select: text !important;
    cursor: text;
}

/* Enable selection for all table content */
.table td,
.table th,
.trading-table td,
.trading-table th,
.notification-table td,
.notification-table th {
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    user-select: text !important;
}

/* Enable selection for item names and player names */
.item-name,
.player-name,
.item-display,
.price-cell,
.date-cell {
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    user-select: text !important;
}

/* Print Styles */
@media print {
    .admin-header, .trading-opportunities-header, .opportunity-header {
        background: #f8f9fa !important;
        color: #333 !important;
        -webkit-print-color-adjust: exact;
    }

    .action-btn, .btn-action {
        display: none;
    }

    .stats-card, .detail-card {
        box-shadow: none;
        border: 1px solid #dee2e6;
    }

    /* Hide pagination when printing */
    .pagination {
        display: none;
    }
}
