/* TradingShadow Custom Styles */

/* Dark theme customization */
body {
    background: linear-gradient(135deg, #2d3748 0%, #4a5568 25%, #2d3748 50%, #1a202c 100%);
    color: #e2e8f0;
    font-family: 'Inter', 'Roboto', sans-serif;
    min-height: 100vh;
    font-weight: 400;
}

.bg-darker {
    background: rgba(26, 32, 44, 0.95);
    backdrop-filter: blur(20px);
}

/* Sidebar styling */
.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    padding: 0;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.3);
    background: rgba(26, 32, 44, 0.9);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(99, 102, 241, 0.2);
}

.sidebar-header {
    background: rgba(45, 55, 72, 0.8);
    border-bottom: 1px solid rgba(99, 102, 241, 0.2);
    padding: 1.5rem 1rem !important;
    min-height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Logo styling */
.logo-image {
    filter: brightness(1.1) contrast(1.1);
    transition: all 0.3s ease;
    cursor: pointer;
    width: 100% !important;
    height: auto !important;
    max-width: 90% !important;
    max-height: 110px !important;
    min-height: 70px !important;
    object-fit: contain;
    padding: 0.5rem;
}

.logo-image:hover {
    filter: brightness(1.2) contrast(1.2);
    transform: scale(1.03);
}

/* Responsive logo sizing */
@media (max-width: 768px) {
    .logo-image {
        max-height: 50px;
        max-width: 85%;
    }
}

@media (min-width: 769px) and (max-width: 1199px) {
    .logo-image {
        max-height: 100px !important;
        max-width: 88% !important;
    }
}

@media (min-width: 1200px) {
    .logo-image {
        max-height: 120px !important;
        max-width: 90% !important;
    }
}

.sidebar-nav {
    margin-top: 0;
    height: calc(100vh - 100px);
    display: flex;
    flex-direction: column;
}

.sidebar .nav-link {
    color: #cbd5e0;
    padding: 1rem 1.5rem;
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
    font-weight: 500;
}

.sidebar .nav-link:hover {
    color: #e2e8f0;
    background: rgba(99, 102, 241, 0.1);
    border-left-color: rgba(99, 102, 241, 0.6);
}

.sidebar .nav-link.active {
    color: #6366f1;
    background: rgba(99, 102, 241, 0.15);
    border-left-color: #6366f1;
}

.sidebar .nav-link i {
    margin-right: 0.75rem;
    width: 20px;
}

/* Main content positioning */
main {
    margin-left: 16.67%; /* col-md-2 width */
}

@media (max-width: 767.98px) {
    main {
        margin-left: 0;
    }
}

/* Card styling */
.card {
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(20px);
    background: rgba(45, 55, 72, 0.6) !important;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.3);
    border: 1px solid rgba(99, 102, 241, 0.4);
}

/* Value flashing animation for PnL numbers */
@keyframes flash-green {
    0% { color: #10b981; }
    50% { color: #34d399; }
    100% { color: #10b981; }
}

@keyframes flash-red {
    0% { color: #ef4444; }
    50% { color: #f87171; }
    100% { color: #ef4444; }
}

.flash-value.text-success {
    animation: flash-green 1.5s infinite;
    color: #10b981 !important;
}

.flash-value.text-danger {
    animation: flash-red 1.5s infinite;
    color: #ef4444 !important;
}

/* Form styling */
.form-control {
    background-color: rgba(45, 55, 72, 0.8) !important;
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: #e2e8f0 !important;
    border-radius: 0.5rem;
}

.form-control:focus {
    background-color: rgba(45, 55, 72, 0.9) !important;
    border-color: #6366f1;
    box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.25);
}

/* Button ripple effect */
.btn {
    position: relative;
    overflow: hidden;
    transform: translate3d(0, 0, 0);
}

.btn::after {
    content: "";
    display: block;
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, #fff 10%, transparent 10.01%);
    background-repeat: no-repeat;
    background-position: 50%;
    transform: scale(10, 10);
    opacity: 0;
    transition: transform 0.5s, opacity 0.5s;
}

.btn:active::after {
    transform: scale(0, 0);
    opacity: 0.3;
    transition: 0s;
}

/* Table styling */
.table {
    margin-bottom: 0;
}

.table-dark {
    background-color: transparent;
    color: #e2e8f0;
}

.table-dark thead th {
    border-bottom: 2px solid rgba(99, 102, 241, 0.15);
    border-top: none;
    font-weight: 600;
    text-transform: none;
    font-size: 0.8125rem;
    letter-spacing: 0.01em;
    color: #94a3b8;
}

.table-dark td, .table-dark th {
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding: 1rem;
}

.table-hover tbody tr:hover {
    background-color: rgba(99, 102, 241, 0.06);
}

/* Badge styling */
.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
    border-radius: 0.25rem;
}

/* Letter spacing for OTP input */
.letter-spacing-2 {
    letter-spacing: 0.2rem;
}

/* Glass morphism card for auth pages */
.glass-card {
    background: rgba(45, 55, 72, 0.25);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 1rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.glass-input {
    background: rgba(45, 55, 72, 0.4) !important;
    border: 1px solid rgba(99, 102, 241, 0.3) !important;
    color: #e2e8f0 !important;
    border-radius: 0.5rem !important;
    transition: all 0.3s ease;
}

.glass-input:focus {
    background: rgba(45, 55, 72, 0.6) !important;
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.25) !important;
    color: #f8fafc !important;
}

.glass-input::placeholder {
    color: #a0aec0 !important;
}

.btn-glass {
    background: linear-gradient(135deg, #6366f1, #8b5cf6) !important;
    border: none !important;
    border-radius: 0.5rem !important;
    padding: 0.75rem 1.5rem !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
    text-transform: none !important;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3) !important;
}

.btn-glass:hover {
    background: linear-gradient(135deg, #5855eb, #7c3aed) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4) !important;
}

.btn-glass:active {
    transform: translateY(0) !important;
}

.text-white-75 {
    color: rgba(248, 250, 252, 0.75) !important;
}

/* Auth page specific styling */
.min-vh-100 {
    min-height: 100vh !important;
}

/* Form check styling for dark theme */
.form-check-input {
    background-color: rgba(45, 55, 72, 0.4) !important;
    border: 1px solid rgba(99, 102, 241, 0.3) !important;
}

.form-check-input:checked {
    background-color: #6366f1 !important;
    border-color: #6366f1 !important;
}

.form-check-input:focus {
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.25) !important;
}

/* Fade in animation for dashboard cards */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.card {
    animation: fadeIn 0.5s ease-out;
}

/* Page transitions */
.content-wrapper {
    animation: fadeIn 0.3s;
}

/* Modern button styling to match reference design */
.btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
    background: linear-gradient(135deg, #5b21b6 0%, #7c3aed 100%);
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    border-radius: 0.5rem;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border: none;
    border-radius: 0.5rem;
}

/* Enhanced badge styling */
.badge {
    font-weight: 600;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
}

.badge.bg-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
}

.badge.bg-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
}

.badge.bg-info {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%) !important;
}

.badge.bg-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
}

/* Enhanced table styling - Modern, Clean Design */
.table-dark {
    background: transparent !important;
    border-radius: 0.75rem;
    overflow: hidden;
    --bs-table-bg: transparent !important;
}

.table-dark thead th {
    background: rgba(26, 32, 44, 0.4) !important;
    border-bottom: 2px solid rgba(99, 102, 241, 0.15);
    border-top: none;
    color: #94a3b8;
    font-weight: 600;
    text-transform: none;
    font-size: 0.8125rem;
    letter-spacing: 0.01em;
    padding: 0.875rem 1rem;
    vertical-align: middle;
    white-space: nowrap;
}

.table-dark thead th:first-child {
    padding-left: 1.5rem;
}

.table-dark thead th:last-child {
    padding-right: 1.5rem;
}

.table-dark tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    background: transparent !important;
    --bs-table-bg: transparent !important;
    transition: all 0.15s ease;
}

.table-dark tbody tr:hover {
    background: rgba(99, 102, 241, 0.06) !important;
    --bs-table-hover-bg: rgba(99, 102, 241, 0.06) !important;
}

.table-dark tbody td {
    background: transparent !important;
    padding: 1rem;
    vertical-align: middle;
    font-size: 0.875rem;
    color: #e2e8f0;
}

.table-dark tbody td:first-child {
    padding-left: 1.5rem;
}

.table-dark tbody td:last-child {
    padding-right: 1.5rem;
}

/* Sortable column headers */
.table-dark thead th.sortable {
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
}

.table-dark thead th.sortable:hover {
    background: rgba(99, 102, 241, 0.12) !important;
    color: #cbd5e0;
}

.table-dark thead th.sortable i {
    opacity: 0.4;
    transition: opacity 0.2s ease;
    font-size: 0.75rem;
}

.table-dark thead th.sortable:hover i {
    opacity: 1;
}

/* Better badge styling in tables */
.table-dark .badge {
    font-weight: 500;
    font-size: 0.75rem;
    padding: 0.35em 0.65em;
    letter-spacing: 0.02em;
    border-radius: 0.375rem;
}

/* Improved table striping */
.table-striped tbody tr:nth-of-type(odd) {
    background: rgba(255, 255, 255, 0.02) !important;
}

.table-striped tbody tr:nth-of-type(even) {
    background: transparent !important;
}

.table-striped tbody tr:hover {
    background: rgba(99, 102, 241, 0.06) !important;
}

/* Better interactive row styling */
.table-row-interactive {
    transition: all 0.15s ease;
}

.table-row-interactive:hover {
    transform: translateX(2px);
    box-shadow: inset 3px 0 0 rgba(99, 102, 241, 0.6);
}

/* Typography enhancements */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: #f7fafc;
}

.text-muted {
    color: #a0aec0 !important;
}

/* Card header styling - Modern & Clean */
.card-header {
    background: rgba(26, 32, 44, 0.4) !important;
    border-bottom: 2px solid rgba(99, 102, 241, 0.15) !important;
    padding: 1rem 1.5rem !important;
}

/* Enhanced header/title styling for better visibility */
.card-title {
    font-size: 1rem !important;
    font-weight: 600 !important;
    color: #e2e8f0 !important;
    text-transform: none;
    letter-spacing: 0.01em;
    margin-bottom: 0.75rem !important;
    border-left: 4px solid #6366f1;
    padding-left: 0.75rem;
}

/* Card body title variations */
.card-body h5.card-title {
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    color: #94a3b8 !important;
    text-transform: none;
    letter-spacing: 0.02em;
    margin-bottom: 0.5rem !important;
}

/* Card header titles - most prominent */
.card-header .card-title {
    font-size: 1.125rem !important;
    font-weight: 600 !important;
    color: #f1f5f9 !important;
    margin-bottom: 0 !important;
    border-left: none;
    padding-left: 0;
    text-shadow: none;
}

/* Section headers */
h5.card-title {
    position: relative;
}

h5.card-title::before {
    content: '';
    position: absolute;
    left: -0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 2px;
}

/* Playful Micro-interactions */

/* Number counter animation */
@keyframes countUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.metric-value {
    animation: countUp 0.8s ease-out;
    transition: all 0.3s ease;
}

.metric-value:hover {
    transform: scale(1.05);
    text-shadow: 0 0 20px rgba(99, 102, 241, 0.6);
}

/* Floating animation for profit/loss indicators */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.profit-indicator {
    animation: float 3s ease-in-out infinite;
}

/* Pulse animation for important metrics */
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(99, 102, 241, 0); }
    100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
}

.pulse-animation {
    animation: pulse 2s infinite;
}

/* Shake animation for alerts */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.shake-animation {
    animation: shake 0.5s ease-in-out;
}

/* Loading shimmer effect */
@keyframes shimmer {
    0% { background-position: -468px 0; }
    100% { background-position: 468px 0; }
}

.shimmer {
    background: linear-gradient(90deg, rgba(45, 55, 72, 0.6) 0%, rgba(99, 102, 241, 0.3) 50%, rgba(45, 55, 72, 0.6) 100%);
    background-size: 400% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
}

/* Interactive button effects */
.btn-interactive {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-interactive::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-interactive:active::before {
    width: 300px;
    height: 300px;
}

/* Hover effects for cards */
.card-interactive {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card-interactive:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.4);
}

/* Icon bounce animation */
@keyframes iconBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.icon-interactive:hover {
    animation: iconBounce 0.6s ease-in-out;
    color: #6366f1;
}

/* Progress bar animations */
@keyframes progressGlow {
    0%, 100% { box-shadow: 0 0 5px rgba(99, 102, 241, 0.5); }
    50% { box-shadow: 0 0 20px rgba(99, 102, 241, 0.8), 0 0 30px rgba(99, 102, 241, 0.6); }
}

.progress-animated {
    animation: progressGlow 2s ease-in-out infinite;
}

/* Table row hover with slide effect */
.table-row-interactive {
    transition: background-color 0.3s ease;
}

.table-row-interactive:hover {
    background-color: rgba(99, 102, 241, 0.15) !important;
}

/* Status indicator pulsing */
@keyframes statusPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
}

.status-indicator {
    animation: statusPulse 2s ease-in-out infinite;
}

/* Chart container hover effects */
.chart-container {
    transition: all 0.3s ease;
}

.chart-container:hover {
    transform: scale(1.02);
    filter: brightness(1.1);
}

/* Loading dots animation */
@keyframes loadingDots {
    0%, 80%, 100% { opacity: 0; }
    40% { opacity: 1; }
}

.loading-dots span {
    animation: loadingDots 1.4s ease-in-out infinite;
}

.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }

/* Success celebration animation */
@keyframes celebrate {
    0% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.1) rotate(-5deg); }
    50% { transform: scale(1.2) rotate(5deg); }
    75% { transform: scale(1.1) rotate(-2deg); }
    100% { transform: scale(1) rotate(0deg); }
}

.celebrate-animation {
    animation: celebrate 0.6s ease-in-out;
}

/* Smooth focus states */
.focus-glow:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.5);
    border-color: #6366f1;
}

/* Time filter buttons styling */
.btn-group .btn-outline-primary {
    background: rgba(45, 55, 72, 0.6);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: #cbd5e0;
    font-weight: 500;
    font-size: 0.75rem;
    padding: 0.5rem 0.75rem;
    transition: all 0.3s ease;
}

.btn-group .btn-outline-primary:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.6);
    color: #e2e8f0;
    transform: translateY(-1px);
}

.btn-group .btn-check:checked + .btn-outline-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-color: #6366f1;
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-group .btn-check:checked + .btn-outline-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

/* Portfolio header styling */
.metric-value {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.profit-indicator {
    font-size: 0.75rem;
    padding: 0.35rem 0.6rem;
    border-radius: 0.5rem;
    font-weight: 600;
}

/* Enhanced card animations */
.card-interactive:hover .profit-indicator {
    animation: float 2s ease-in-out infinite;
}

/* Compact Trading History Table Styles - Modern & Readable */
.trading-history-compact {
    font-size: 0.8125rem !important;
}

.trading-history-compact .table {
    table-layout: auto !important;
    width: 100% !important;
}

.trading-history-compact .table-dark thead th {
    padding: 0.75rem 0.875rem !important;
    font-size: 0.75rem !important;
    line-height: 1.4 !important;
    vertical-align: middle !important;
    background: rgba(26, 32, 44, 0.4) !important;
    font-weight: 600;
    color: #94a3b8;
    border-bottom: 2px solid rgba(99, 102, 241, 0.15);
}

.trading-history-compact .table-dark tbody td {
    padding: 0.875rem !important;
    font-size: 0.8125rem !important;
    line-height: 1.5 !important;
    white-space: nowrap;
    vertical-align: middle !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    color: #e2e8f0;
}

.trading-history-compact .table-dark tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: all 0.15s ease;
}

.trading-history-compact .table-dark tbody tr:hover {
    background: rgba(99, 102, 241, 0.06) !important;
    transform: translateX(2px);
    box-shadow: inset 3px 0 0 rgba(99, 102, 241, 0.6);
}

.trading-history-compact .badge {
    font-size: 0.6875rem !important;
    padding: 0.3rem 0.5rem !important;
    font-weight: 500;
    border-radius: 0.375rem;
}

/* Make table horizontally scrollable if needed */
.trading-history-wrapper {
    overflow-x: auto;
    margin: -1rem;
    padding: 1rem;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

.trading-history-wrapper::-webkit-scrollbar {
    height: 8px;
}

.trading-history-wrapper::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.trading-history-wrapper::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.6);
    border-radius: 4px;
}

.trading-history-wrapper::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.8);
}

/* Compact button sizes for trading history */
.trading-history-compact .btn-sm {
    padding: 0.2rem 0.4rem !important;
    font-size: 0.65rem !important;
}

/* Responsive adjustments for very small text */
@media (max-width: 1200px) {
    .trading-history-compact {
        font-size: 0.7rem !important;
    }
    
    .trading-history-compact .table-dark thead th {
        font-size: 0.6rem !important;
        padding: 0.3rem 0.4rem !important;
    }
    
    .trading-history-compact .table-dark tbody td {
        font-size: 0.65rem !important;
        padding: 0.3rem 0.4rem !important;
    }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .trading-history-compact {
        font-size: 0.65rem !important;
    }
    
    .trading-history-compact .table-dark thead th {
        font-size: 0.55rem !important;
        padding: 0.25rem 0.3rem !important;
        white-space: nowrap !important;
    }
    
    .trading-history-compact .table-dark tbody td {
        font-size: 0.6rem !important;
        padding: 0.25rem 0.3rem !important;
    }
    
    .trading-history-compact .badge {
        font-size: 0.5rem !important;
        padding: 0.15rem 0.3rem !important;
    }
    
    /* Hide columns after 4th on mobile */
    .trading-history-compact thead th:nth-child(n+5),
    .trading-history-compact tbody td:nth-child(n+5):not(.mobile-expand-cell) {
        display: none;
    }
    
    /* Show expand button column */
    .trading-history-compact thead th:first-child,
    .trading-history-compact tbody td:first-child {
        width: 40px !important;
        min-width: 40px !important;
    }
    
    /* Mobile expand button */
    .mobile-expand-btn {
        background: rgba(99, 102, 241, 0.8);
        border: none;
        color: white;
        padding: 0.25rem 0.5rem;
        border-radius: 0.25rem;
        font-size: 0.7rem;
        cursor: pointer;
        transition: all 0.3s ease;
        width: 100%;
    }
    
    .mobile-expand-btn:hover {
        background: rgba(99, 102, 241, 1);
    }
    
    .mobile-expand-btn.expanded {
        background: rgba(231, 76, 60, 0.8);
    }
    
    .mobile-expand-btn.expanded:hover {
        background: rgba(231, 76, 60, 1);
    }
    
    /* Expanded row details */
    .mobile-details-row {
        display: none;
        background: rgba(99, 102, 241, 0.1) !important;
    }
    
    .mobile-details-row.show {
        display: table-row;
    }
    
    .mobile-details-row td {
        padding: 1rem !important;
    }
    
    .mobile-details-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .mobile-detail-item {
        display: flex;
        flex-direction: column;
    }
    
    .mobile-detail-label {
        font-size: 0.55rem;
        color: rgba(255, 255, 255, 0.6);
        text-transform: uppercase;
        margin-bottom: 0.25rem;
        font-weight: 600;
    }
    
    .mobile-detail-value {
        font-size: 0.65rem;
        color: white;
    }
    
    /* Make wrapper less obvious on mobile since we have expand buttons */
    .trading-history-wrapper {
        border: none;
    }
    
    .trading-history-wrapper::after {
        display: none;
    }
}

/* Very small mobile devices */
@media (max-width: 480px) {
    .trading-history-compact .table-dark thead th,
    .trading-history-compact .table-dark tbody td {
        font-size: 0.5rem !important;
        padding: 0.2rem 0.25rem !important;
    }
    
    .trading-history-compact .badge {
        font-size: 0.45rem !important;
        padding: 0.1rem 0.25rem !important;
    }
    
    .mobile-details-grid {
        grid-template-columns: 1fr;
    }
}

/* New Trade Badge Styling */
.new-badge {
    font-size: 0.6rem !important;
    font-weight: 700 !important;
    padding: 0.25rem 0.5rem !important;
    border-radius: 0.25rem !important;
    letter-spacing: 0.05em;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

/* Pulse animation for new badge */
@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 20px rgba(99, 102, 241, 0.8);
        transform: scale(1.05);
    }
}

.pulse-badge {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* Table row fade-in animation */
@keyframes fadeInRow {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.table-row-fade-in {
    animation: fadeInRow 0.5s ease-out;
}

/* Tab Navigation Styling */
.nav-tabs-dark {
    border-bottom: 2px solid rgba(99, 102, 241, 0.3);
}

.nav-tabs-dark .nav-link {
    color: #cbd5e0;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
}

.nav-tabs-dark .nav-link:hover {
    color: #e2e8f0;
    border-bottom-color: rgba(99, 102, 241, 0.5);
    background: rgba(99, 102, 241, 0.05);
}

.nav-tabs-dark .nav-link.active {
    color: #6366f1;
    background: rgba(99, 102, 241, 0.1);
    border-bottom-color: #6366f1;
    font-weight: 600;
}

/* Position Summary Specific Styles */
#positionSummaryTable tbody tr {
    transition: all 0.2s ease;
}

#positionSummaryTable tbody tr:hover {
    background: rgba(99, 102, 241, 0.15) !important;
    transform: translateX(3px);
}

.position-pnl-positive {
    color: #10b981;
    font-weight: 600;
}

.position-pnl-negative {
    color: #ef4444;
    font-weight: 600;
}

.position-pnl-neutral {
    color: #94a3b8;
}

/* Table text and value styling improvements */
.table-dark .text-muted,
.table-dark small.text-muted {
    color: #94a3b8 !important;
    font-size: 0.8125rem;
}

.table-dark .fw-bold {
    font-weight: 600 !important;
    color: #f1f5f9;
}

.table-dark .text-success {
    color: #10b981 !important;
}

.table-dark .text-danger {
    color: #ef4444 !important;
}

.table-dark .text-warning {
    color: #f59e0b !important;
}

.table-dark .text-info {
    color: #06b6d4 !important;
}

.table-dark .font-monospace {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.8125rem;
    letter-spacing: 0.02em;
}

/* Improved pagination styling */
.pagination .page-link {
    background: rgba(45, 55, 72, 0.6);
    border: 1px solid rgba(99, 102, 241, 0.2);
    color: #cbd5e0;
    padding: 0.5rem 0.875rem;
    transition: all 0.2s ease;
}

.pagination .page-link:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.4);
    color: #e2e8f0;
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-color: #6366f1;
    color: #fff;
    font-weight: 600;
}

.pagination .page-item.disabled .page-link {
    background: rgba(45, 55, 72, 0.3);
    border-color: rgba(99, 102, 241, 0.1);
    color: #64748b;
}

/* Card footer styling for pagination */
.card-footer {
    background: rgba(26, 32, 44, 0.4) !important;
    border-top: 2px solid rgba(99, 102, 241, 0.15) !important;
    padding: 1rem 1.5rem;
}

/* Enhanced table body styling for better data display */
.table tbody {
    font-variant-numeric: tabular-nums;
}

/* Better spacing for table cards */
.card-body.p-0 .table {
    margin-bottom: 0;
}

.card-body.p-0 .table thead th:first-child,
.card-body.p-0 .table tbody td:first-child {
    padding-left: 1.5rem;
}

.card-body.p-0 .table thead th:last-child,
.card-body.p-0 .table tbody td:last-child {
    padding-right: 1.5rem;
}

/* Empty state styling */
.table tbody tr td[colspan] {
    padding: 2rem !important;
    text-align: center;
    color: #94a3b8;
    font-size: 0.875rem;
}

/* Dropdown menu improvements */
.dropdown-menu-dark {
    background: rgba(26, 32, 44, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 0.5rem;
    padding: 0.5rem;
}

.dropdown-menu-dark .dropdown-item {
    border-radius: 0.375rem;
    padding: 0.5rem 0.875rem;
    transition: all 0.15s ease;
    color: #cbd5e0;
}

.dropdown-menu-dark .dropdown-item:hover {
    background: rgba(99, 102, 241, 0.15);
    color: #e2e8f0;
}

/* Better filter section styling */
.card.bg-dark {
    background: rgba(26, 32, 44, 0.6) !important;
}

/* Improved action buttons in tables */
.table .btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    border-radius: 0.375rem;
}

