/* static/css/style.css */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap');

/* Dark theme (default) */
:root {
    --primary-color: #0a7cff;
    --secondary-color: #0ab48a;
    --bg-color: #1a1a1a;
    --text-color: #f0f0f0;
    --card-bg: #2c2c2c;
    --border-color: #444;
    --input-bg: #333;
    --table-accent: #2c2c2c;
    --alert-info-bg: #1c3e5e;
    --alert-info-text: #cce5ff;
    --alert-danger-bg: #5c2121;
    --alert-danger-text: #f8d7da;
}

/* Light theme */
[data-theme="light"] {
    --primary-color: #0a7cff;
    --secondary-color: #0ab48a;
    --bg-color: #f8f9fa;
    --text-color: #1a1a1a;
    --card-bg: #ffffff;
    --border-color: #cfd4da;
    --input-bg: #ffffff;
    --table-accent: #e9ecef;
    --alert-info-bg: #d1ecf1;
    --alert-info-text: #0c5460;
    --alert-danger-bg: #f8d7da;
    --alert-danger-text: #721c24;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    animation: fadeIn 0.6s ease-out;
}

/* Chart Styles - Desktop full height for better visibility */
#capitalChart {
    min-height: 500px;
}

#stackedAreaChart,
#dragAnalysisChart {
    min-height: 400px;
}

/* Themed navbar */
.themed-navbar {
    background: linear-gradient(135deg, #2c3e50 0%, #1a252f 100%);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
    animation: slideDown 0.5s ease-out;
}

[data-theme="light"] .themed-navbar {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.themed-navbar .navbar-brand {
    color: #fff;
    font-weight: 700;
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

.themed-navbar .navbar-brand:hover {
    color: #667eea;
}

.themed-navbar .navbar-text {
    color: rgba(255, 255, 255, 0.9);
}

[data-theme="light"] .themed-navbar .navbar-brand {
    color: #2c3e50;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-theme="light"] .themed-navbar .navbar-brand:hover {
    background: linear-gradient(135deg, #5568d3, #6a3f8f);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-theme="light"] .themed-navbar .navbar-text {
    color: #495057;
}

/* Mobile navbar toggler */
.themed-navbar .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.3);
    padding: 0.25rem 0.5rem;
}

.themed-navbar .navbar-toggler:focus {
    box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.25);
}

.themed-navbar .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

[data-theme="light"] .themed-navbar .navbar-toggler {
    border-color: rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .themed-navbar .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%280, 0, 0, 0.6%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.themed-navbar .btn-outline-light {
    color: #f8f9fa;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 0.5rem 1.25rem;
    font-weight: 500;
    transition: all 0.3s ease;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.themed-navbar .btn-outline-light:hover {
    color: #fff;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    transform: translateY(-1px);
}

[data-theme="light"] .themed-navbar .btn-outline-light {
    color: #495057;
    border: 1px solid rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .themed-navbar .btn-outline-light:hover {
    color: #fff;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    transform: translateY(-1px);
}

/* Theme toggle button */
#theme-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 0.5rem 1.25rem;
    transition: all 0.3s ease;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#theme-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

[data-theme="light"] #theme-toggle {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #495057;
}

[data-theme="light"] #theme-toggle:hover {
    background: rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.15);
}

/* Navbar profile picture */
.themed-navbar img.rounded-circle {
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.themed-navbar img.rounded-circle:hover {
    border-color: #667eea;
    box-shadow: 0 0 12px rgba(102, 126, 234, 0.5);
    transform: scale(1.05);
}

[data-theme="light"] .themed-navbar img.rounded-circle {
    border: 2px solid rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .themed-navbar img.rounded-circle:hover {
    border-color: #667eea;
    box-shadow: 0 0 12px rgba(102, 126, 234, 0.3);
}

/* Navbar alignment fixes */
.themed-navbar .navbar-nav {
    align-items: center;
}

.themed-navbar .nav-item {
    display: flex;
    align-items: center;
}

/* Navbar links (Pricing, Billing) */
.themed-navbar .nav-link {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.themed-navbar .nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .themed-navbar .nav-link {
    color: #495057;
}

[data-theme="light"] .themed-navbar .nav-link:hover {
    color: #2c3e50;
    background: rgba(0, 0, 0, 0.05);
}

/* Themed hero section */
.themed-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: none;
    animation: fadeIn 0.8s ease-out;
}

.themed-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.themed-hero * {
    position: relative;
    z-index: 1;
}

[data-theme="light"] .themed-hero {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .themed-hero::before {
    background:
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.15) 0%, transparent 50%);
}

.themed-hero h1,
.themed-hero p {
    color: #fff !important;
}

.themed-hero .fas {
    animation: float 3s ease-in-out infinite;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    color: var(--text-color);
}

p {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
}

.display-4 {
    font-weight: 700;
}

.fs-4 {
    font-weight: 400;
}

.list-group-item {
    background-color: var(--card-bg);
    border-color: var(--border-color);
    transition: all 0.3s ease;
    padding: 0.875rem 1.25rem;
}

.list-group-item:hover {
    background-color: var(--input-bg);
    transform: translateX(5px);
}

.list-group-item strong {
    color: var(--primary-color);
}

.alert-info {
    background: linear-gradient(135deg, var(--alert-info-bg) 0%, var(--alert-info-bg) 100%);
    color: var(--alert-info-text);
    border: none;
    border-left: 4px solid #0a7cff;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .alert-info {
    border-left-color: #4facfe;
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
    --bs-table-accent-bg: var(--table-accent);
}

.card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    margin-bottom: 1.5rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .card:hover {
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1);
}

.card-body {
    padding: 1.5rem;
}

.card-header {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border-bottom: 2px solid var(--border-color);
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    color: var(--text-color);
}

[data-theme="light"] .card-header {
    background: linear-gradient(135deg, rgba(79, 172, 254, 0.08), rgba(0, 242, 254, 0.08));
}

.card-header h2,
.card-header h4,
.card-header h5 {
    color: var(--text-color);
    margin-bottom: 0;
}

.nav-tabs {
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 0;
}

.nav-tabs .nav-link {
    color: var(--text-color);
    border: none;
    border-radius: 0;
    padding: 1rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    background: transparent;
}

.nav-tabs .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-tabs .nav-link:hover {
    color: var(--primary-color);
    background: rgba(102, 126, 234, 0.05);
}

.nav-tabs .nav-link.active {
    color: var(--primary-color);
    background: var(--card-bg);
    font-weight: 600;
}

.nav-tabs .nav-link.active::after {
    width: 100%;
}

[data-theme="light"] .nav-tabs .nav-link::after {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
}

.tab-content {
    background: var(--card-bg);
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5568d3, #6a3f8f 100%);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
    transform: translateY(-2px);
}

[data-theme="light"] .btn-primary {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.4);
}

[data-theme="light"] .btn-primary:hover {
    background: linear-gradient(135deg, #3d96e8, #00d9e5 100%);
    box-shadow: 0 6px 20px rgba(79, 172, 254, 0.5);
}

.btn-success {
    background: linear-gradient(135deg, #0ab48a 0%, #08a075 100%);
    border: none;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(10, 180, 138, 0.4);
}

.btn-success:hover {
    background: linear-gradient(135deg, #08a075, #069064 100%);
    box-shadow: 0 6px 20px rgba(10, 180, 138, 0.5);
    transform: translateY(-2px);
}

.form-control, .form-select {
    background-color: var(--input-bg);
    color: var(--text-color);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 0.625rem 0.875rem;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    background-color: var(--input-bg);
    color: var(--text-color);
    border-color: #667eea;
    box-shadow: 0 0 0 0.25rem rgba(102, 126, 234, 0.15);
    transform: translateY(-1px);
}

[data-theme="light"] .form-control:focus,
[data-theme="light"] .form-select:focus {
    border-color: #4facfe;
    box-shadow: 0 0 0 0.25rem rgba(79, 172, 254, 0.15);
}

/* Form switches - Dark theme friendly */
.form-check-input {
    background-color: var(--input-bg);
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.form-check-input:checked {
    background-color: #667eea;
    border-color: #667eea;
}

.form-check-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.25rem rgba(102, 126, 234, 0.15);
}

[data-theme="light"] .form-check-input:checked {
    background-color: #4facfe;
    border-color: #4facfe;
}

[data-theme="light"] .form-check-input:focus {
    border-color: #4facfe;
    box-shadow: 0 0 0 0.25rem rgba(79, 172, 254, 0.15);
}

.form-check-label {
    color: var(--text-color);
}

/* Taxation and Withdrawals Summary Cards - Dark theme friendly */
#taxation-withdrawals-summary-row .card {
    background-color: var(--card-bg);
}

#taxation-withdrawals-summary-row .card-title {
    color: var(--text-color);
}

#taxation-withdrawals-summary-row .card-subtitle {
    color: var(--text-color);
    opacity: 0.7;
}

#taxation-withdrawals-summary-row small {
    color: var(--text-color);
    opacity: 0.6;
}

.table > tbody > tr {
    background-color: var(--card-bg);
    color: var(--text-color);
    transition: all 0.3s ease;
}

.table > tbody > tr:hover {
    background-color: var(--input-bg);
    transform: scale(1.01);
}

.table-bordered {
    border-color: var(--border-color);
}

.table thead th {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15), rgba(118, 75, 162, 0.15));
    color: var(--text-color);
    font-weight: 600;
    border-bottom: 2px solid var(--border-color);
}

[data-theme="light"] .table thead th {
    background: linear-gradient(135deg, rgba(79, 172, 254, 0.1), rgba(0, 242, 254, 0.1));
}


.alert-danger {
    background: linear-gradient(135deg, var(--alert-danger-bg) 0%, var(--alert-danger-bg) 100%);
    color: var(--alert-danger-text);
    border: none;
    border-left: 4px solid #dc3545;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.summary-card .card-body .card-text,
.summary-card .card-body .list-group-item {
    color: var(--text-color);
}

.summary-card {
    background-color: var(--card-bg);
}

.form-label {
    color: var(--text-color);
    font-weight: bold;
    margin-bottom: 0.5rem; /* Consistent spacing below labels */
}

.description-list dt,
.description-list dd {
    color: var(--text-color);
    margin-bottom: 0.5rem; /* Consistent spacing for description list items */
}

.form-floating > label {
    color: var(--text-color);
}

#latest_picks_results thead th {
    background-color: var(--input-bg);
    color: var(--text-color);
}

#picks_list tr {
    background-color: var(--card-bg) !important;
    color: var(--text-color) !important;
}

.card-header small {
    color: var(--text-color) !important;
}

/* Dark theme - BUY rows (green with white text) */
.table-dark-theme tbody tr.table-success td {
    background-color: #198754 !important; /* Dark green */
    color: #fff !important;
}

/* Dark theme - SELL rows (red with white text) */
.table-dark-theme tbody tr.table-danger td {
    background-color: #dc3545 !important; /* Dark red */
    color: #fff !important;
}

/* Light theme - BUY rows (light green with dark text) */
[data-theme="light"] .table-dark-theme tbody tr.table-success td {
    background-color: #d1e7dd !important; /* Light green */
    color: #0a3622 !important;
}

/* Light theme - SELL rows (light red with dark text) */
[data-theme="light"] .table-dark-theme tbody tr.table-danger td {
    background-color: #f8d7da !important; /* Light red */
    color: #58151c !important;
}

/* Hover effects for table-success and table-danger */
.table-dark-theme tbody tr.table-success:hover td {
    background-color: #1e6f50 !important;
}

.table-dark-theme tbody tr.table-danger:hover td {
    background-color: #b02a37 !important;
}

[data-theme="light"] .table-dark-theme tbody tr.table-success:hover td {
    background-color: #badbcc !important;
}

[data-theme="light"] .table-dark-theme tbody tr.table-danger:hover td {
    background-color: #f1aeb5 !important;
}

.timeline-event-card .card-title {
    color: var(--text-color);
}

.timeline-event-card .list-group-item {
    color: var(--text-color);
}

.timeline-event-card .table td {
    color: var(--text-color);
}

.timeline-event-card .table th {
    color: var(--text-color);
    background-color: var(--input-bg);
}

.progress {
    background-color: var(--card-bg);
    border-radius: 10px;
    height: 28px;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1);
}

.progress-bar {
    border-radius: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    font-weight: 600;
}

[data-theme="light"] .progress-bar {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.spinner-border {
    border-width: 3px;
}

footer {
    margin-top: 4rem;
    padding: 2rem 0;
    border-top: 2px solid var(--border-color);
}

footer p {
    color: var(--text-color) !important;
    font-size: 0.9rem;
}

/* Modern Login Page Styles */
.login-container {
    min-height: 100vh;
    width: 100%;
    overflow: hidden;
}

.login-container .container-fluid {
    height: 100vh;
}

/* Left Panel - Marketing Side */
.login-left-panel {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 3rem;
    position: relative;
}

.login-left-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

[data-theme="light"] .login-left-panel {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    position: relative;
}

[data-theme="light"] .login-left-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.login-content-wrapper {
    max-width: 500px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.login-brand-icon {
    color: rgba(255, 255, 255, 0.9);
    animation: float 3s ease-in-out infinite;
}

[data-theme="light"] .login-brand-icon {
    color: #1a1a1a;
}

.login-brand-title {
    color: #fff;
    margin-bottom: 1rem;
    font-size: 3rem;
}

[data-theme="light"] .login-brand-title {
    color: #1a1a1a;
}

.login-brand-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.25rem;
}

[data-theme="light"] .login-brand-subtitle {
    color: #2c3e50;
}

.login-features {
    margin-top: 3rem;
}

.login-feature-row {
    display: flex;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.login-feature-row:hover {
    transform: translateX(10px);
    background: rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .login-feature-row {
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

[data-theme="light"] .login-feature-row:hover {
    background: rgba(255, 255, 255, 0.45);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.login-feature-icon-wrapper {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1.25rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .login-feature-icon-wrapper {
    background: rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.login-feature-icon-wrapper i {
    color: #fff;
}

[data-theme="light"] .login-feature-icon-wrapper i {
    color: #1a1a1a;
}

.login-feature-content {
    flex: 1;
}

.login-feature-content h5 {
    color: #fff;
    font-weight: 600;
    font-size: 1.1rem;
}

[data-theme="light"] .login-feature-content h5 {
    color: #1a1a1a;
}

.login-feature-content p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
    line-height: 1.5;
}

[data-theme="light"] .login-feature-content p {
    color: #2c3e50;
}

/* Right Panel - Login Card */
.login-right-panel {
    background: linear-gradient(135deg, #1a1a1a 0%, #0f0f0f 100%);
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

[data-theme="light"] .login-right-panel {
    background: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
}

.login-card-wrapper {
    width: 100%;
    max-width: 450px;
}

.login-card {
    background: rgba(44, 44, 44, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 3rem 2.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

[data-theme="light"] .login-card {
    background: #ffffff;
    backdrop-filter: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    border: none;
}

.login-card-title {
    color: var(--text-color);
    font-weight: 700;
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.login-card-subtitle {
    color: var(--text-color);
    font-size: 0.95rem;
}

[data-theme="light"] .login-card-subtitle {
    color: #6c757d;
}

[data-theme="dark"] .login-card-subtitle {
    color: #9ca3af;
}

.login-divider {
    position: relative;
    text-align: center;
    margin: 2rem 0;
}

.login-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--border-color), transparent);
}

.login-divider-text {
    position: relative;
    background: rgba(44, 44, 44, 0.9);
    padding: 0 1rem;
    color: #8e9aaf;
    font-size: 0.875rem;
    font-weight: 500;
}

[data-theme="light"] .login-divider-text {
    background: #ffffff;
    color: #495057;
}

/* Google Button */
.btn-google {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-google:hover {
    background: linear-gradient(135deg, #5568d3, #6a3f8f 100%);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
    transform: translateY(-2px);
    color: #fff;
}

[data-theme="light"] .btn-google {
    background: linear-gradient(to right, #4285f4, #34a853);
    color: #fff;
    border: none;
    font-weight: 600;
}

[data-theme="light"] .btn-google:hover {
    background: linear-gradient(to right, #3367d6, #2d8e47);
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.3);
    color: #fff;
}

/* Mobile Features */
.login-mobile-features-title {
    color: var(--text-color);
    font-weight: 600;
}

.login-mobile-feature {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
    color: var(--text-color);
    font-size: 0.9rem;
}

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

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Responsive */
@media (max-width: 991px) {
    .login-container .container-fluid {
        height: auto;
        min-height: 100vh;
    }

    .login-right-panel {
        padding: 2rem 1rem;
    }

    .login-card {
        padding: 2rem 1.5rem;
    }
}

/* Pull-to-Refresh Indicator */
.pull-to-refresh-indicator {
    position: absolute;
    top: -80px;
    left: 0;
    right: 0;
    height: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: var(--text-color);
    z-index: 100;
}

.pull-to-refresh-spinner {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.pull-to-refresh-spinner i {
    font-size: 24px;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.pull-to-refresh-text {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-color);
    opacity: 0.8;
}

.pull-to-refresh-indicator.ready .pull-to-refresh-text {
    color: var(--primary-color);
    opacity: 1;
}

.pull-to-refresh-indicator.refreshing {
    opacity: 1 !important;
}

/* Make containers relative for pull-to-refresh */
#saved-simulations-list,
#latest_picks_results .card-body,
.pull-to-refresh-container {
    position: relative;
}

/* Mobile Dashboard (hidden on desktop) */
.mobile-dashboard {
    display: none;
}

/* Mobile Bottom Navigation (hidden on desktop) */
.mobile-bottom-nav {
    display: none;
}

@media (max-width: 768px) {
    /* Saved Simulations: mobile-friendly list items */
    #saved-simulations-list .list-group-item {
        display: flex !important;
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        padding: 1rem;
        border-radius: 12px !important;
        margin-bottom: 0.75rem;
        border: 1px solid rgba(0, 0, 0, 0.08) !important;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    }

    [data-theme="dark"] #saved-simulations-list .list-group-item {
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    }

    #saved-simulations-list .list-group-item h6 {
        font-size: 1rem;
        margin-bottom: 0.25rem;
    }

    #saved-simulations-list .list-group-item small {
        font-size: 0.8rem;
    }

    #saved-simulations-list .list-group-item .btn-group {
        width: 100%;
        display: flex;
        gap: 0.5rem;
        justify-content: space-between;
    }

    #saved-simulations-list .list-group-item .btn-group .btn {
        flex: 1 1 50%;
        font-size: 0.95rem;
        padding: 0.75rem 1rem;
        border-radius: 10px;
        font-weight: 500;
    }

    /* Library Page: Mobile Tabbed Interface */
    .library-subtabs {
        background: rgba(0, 0, 0, 0.02);
        border-radius: 12px;
        padding: 0.5rem;
        margin-bottom: 1.5rem !important;
    }

    [data-theme="dark"] .library-subtabs {
        background: rgba(255, 255, 255, 0.05);
    }

    .library-subtabs .nav-link {
        border-radius: 10px;
        padding: 0.75rem 0.5rem;
        color: var(--text-muted);
        border: none;
        background: transparent;
        transition: all 0.3s ease;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    .library-subtabs .nav-link i {
        font-size: 1.25rem;
        opacity: 0.7;
        transition: all 0.3s ease;
        margin-bottom: 0.25rem;
    }

    .library-subtabs .nav-link small {
        font-size: 0.7rem;
        font-weight: 500;
        line-height: 1;
    }

    .library-subtabs .nav-link.active {
        background: var(--bs-primary);
        color: white !important;
        box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
    }

    .library-subtabs .nav-link.active i {
        opacity: 1;
    }

    /* Mobile tab content */
    .library-mobile-tabs .tab-content {
        animation: fadeIn 0.3s ease-out;
    }

    /* Library mobile tabs - better padding for titles and content */
    .library-mobile-tabs .tab-pane {
        padding: 0 1rem;
    }

    /* Ensure h5 titles in Library tabs have proper spacing */
    .library-mobile-tabs h5 {
        padding-left: 0.25rem;
        padding-right: 0.25rem;
    }

    /* Desktop card headers in Library - increase horizontal padding */
    .library-desktop-layout .card-header {
        padding: 0.75rem 1.25rem;
    }

    /* Free user library card headers */
    .library-free-user .card-header {
        padding: 0.75rem 1.25rem;
    }

    /* Compact info alerts on mobile */
    .alert-sm {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
        margin-bottom: 1rem;
        border-radius: 12px;
        border: none;
    }

    /* Mobile settings cards (Alert Preferences) */
    #mobile-settings .card {
        border-radius: 16px;
        border: none;
        background: var(--bs-body-bg);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
        margin-bottom: 1rem;
    }

    [data-theme="dark"] #mobile-settings .card {
        background: rgba(255, 255, 255, 0.03);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }

    #mobile-settings .card-body {
        padding: 1.25rem;
    }

    #mobile-settings .form-check-label {
        font-size: 0.95rem;
        font-weight: 500;
    }

    #mobile-settings small {
        opacity: 0.7;
    }

    /* Mobile strategies list - Clean card design */
    #strategiesListMobile .card {
        margin-bottom: 1rem;
        border-radius: 16px;
        border: none;
        background: var(--bs-body-bg);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }

    [data-theme="dark"] #strategiesListMobile .card {
        background: rgba(255, 255, 255, 0.03);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }

    #strategiesListMobile .card:active {
        transform: scale(0.98);
    }

    #strategiesListMobile .card-body {
        padding: 1rem;
    }

    #strategiesListMobile .card h6 {
        font-size: 1.05rem;
        margin-bottom: 0.5rem;
        font-weight: 600;
    }

    #strategiesListMobile .card small {
        font-size: 0.85rem;
        opacity: 0.8;
    }

    #strategiesListMobile .card .btn-group {
        margin-top: 0.75rem;
        width: 100%;
    }

    /* Edit/Delete buttons in top btn-group - equal width */
    #strategiesListMobile .card .btn-group-sm .btn {
        flex: 1 1 0;
        min-width: 0;
    }

    #strategiesListMobile .card .btn-group .btn {
        font-size: 0.85rem;
        padding: 0.5rem 0.75rem;
        border-radius: 10px;
        font-weight: 500;
    }

    /* Fix toggle + button overflow on mobile - Strategy cards */
    #strategiesListMobile .card .d-flex.justify-content-between:last-child {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.75rem !important;
    }

    /* Toggle switch and Run Backtest button - same width when stacked */
    #strategiesListMobile .card .form-check.form-switch {
        padding-left: 2.5em !important;
        width: 100% !important;
        margin-bottom: 0 !important;
        flex: 0 0 auto;
    }

    #strategiesListMobile .card .form-check-label {
        font-size: 0.85rem !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    #strategiesListMobile .card .run-backtest-btn {
        font-size: 0.85rem !important;
        padding: 0.6rem 1rem !important;
        width: 100% !important;
        margin: 0 !important;
        flex: 0 0 auto;
    }

    /* Fix alert card overflow on mobile */
    #mobile-settings .card {
        overflow: hidden;
    }

    #mobile-settings .card-body {
        padding: 1rem !important;
    }

    #mobile-settings .form-check.form-switch {
        padding-left: 2.5em !important;
        margin-bottom: 0.5rem !important;
    }

    #mobile-settings .form-check-label {
        font-size: 0.9rem !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        display: inline-block;
        max-width: calc(100% - 3em);
    }

    /* Mobile saved simulations list - Clean card design */
    #saved-simulations-list-mobile .list-group-item {
        border-radius: 16px !important;
        margin-bottom: 1rem;
        padding: 1.25rem;
        border: none !important;
        background: var(--bs-body-bg) !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }

    [data-theme="dark"] #saved-simulations-list-mobile .list-group-item {
        background: rgba(255, 255, 255, 0.03) !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }

    #saved-simulations-list-mobile .list-group-item:active {
        transform: scale(0.98);
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    }

    #saved-simulations-list-mobile .list-group-item h6 {
        font-size: 1.05rem;
        margin-bottom: 0.5rem;
        font-weight: 600;
    }

    #saved-simulations-list-mobile .list-group-item small {
        font-size: 0.85rem;
        opacity: 0.7;
    }

    #saved-simulations-list-mobile .list-group-item .btn-group {
        width: 100%;
        gap: 0.5rem;
        margin-top: 1rem;
        display: flex;
    }

    #saved-simulations-list-mobile .list-group-item .btn-group .btn {
        flex: 1;
        font-size: 0.9rem;
        padding: 0.7rem;
        border-radius: 12px;
        font-weight: 600;
        border: none;
    }

    /* Desktop strategies list - keep existing compact styles */
    #strategiesList .card {
        margin-bottom: 0.75rem !important;
    }

    #strategiesList .card-body {
        padding: 0.75rem !important;
    }

    /* Fix toggle + button overflow on desktop small screens */
    #strategiesList .card .d-flex.justify-content-between.align-items-center:last-child {
        flex-wrap: wrap !important;
        gap: 0.5rem !important;
    }

    #strategiesList .card .form-check.form-switch {
        flex: 1 1 auto;
        min-width: 150px;
        max-width: 100%;
        margin-bottom: 0 !important;
    }

    #strategiesList .card .form-check-label {
        font-size: 0.75rem !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    #strategiesList .card .run-backtest-btn {
        font-size: 0.75rem !important;
        padding: 0.35rem 0.5rem !important;
        white-space: nowrap !important;
        flex-shrink: 0 !important;
    }

    /* Saved Simulations card header on mobile */
    .card-header h5 {
        font-size: 1.1rem;
    }

    .card-header .btn-sm {
        padding: 0.35rem 0.6rem;
        font-size: 0.85rem;
    }

    /* Library: Column reordering - add visual separation */
    .order-2.order-lg-1 {
        margin-top: 1rem;
    }

    /* Library: Cards on mobile have better shadows and spacing */
    #saved-simulations-tab-pane .card {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
        border-radius: 12px;
    }

    [data-theme="dark"] #saved-simulations-tab-pane .card {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }

    /* Reduce vertical spacing in Library tab on mobile */
    #saved-simulations-tab-pane {
        padding: 0.75rem !important;
    }

    /* Empty states on mobile */
    #saved-simulations-list .text-center {
        padding: 2rem 1rem !important;
    }

    #saved-simulations-list .text-center i.fa-inbox {
        font-size: 2.5rem !important;
    }

    #strategiesList .text-center {
        padding: 2rem 1rem !important;
    }

    #strategiesList .text-center i.fa-chart-line {
        font-size: 2.5rem !important;
    }
}

/* PWA Install Banner */
.pwa-install-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    border-top: 1px solid #dee2e6;
    padding: 1rem 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1050;
    animation: slideUp 0.3s ease-out;
    backdrop-filter: blur(10px);
}

[data-theme="dark"] .pwa-install-banner {
    background: rgba(33, 37, 41, 0.98);
    border-top-color: #495057;
}

/* Explicit text colors for better contrast */
.pwa-install-banner strong {
    font-size: 1rem;
    color: #1a1a1a;
}

[data-theme="dark"] .pwa-install-banner strong {
    color: #f0f0f0;
}

.pwa-install-banner small {
    font-size: 0.875rem;
    color: #6c757d;
}

[data-theme="dark"] .pwa-install-banner small {
    color: #adb5bd;
}

.pwa-install-banner .text-primary {
    color: var(--primary-color) !important;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Hide banner when PWA is installed */
body.pwa-installed .pwa-install-banner {
    display: none !important;
}

/* Adjust for mobile bottom nav */
@media (max-width: 768px) {
    .pwa-install-banner {
        bottom: calc(90px + env(safe-area-inset-bottom, 0px));
    }

    /* Mobile Dashboard Styles */
