/* Crypto Trading Dashboard Styles */
/* Dark theme with professional trading dashboard look */

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
}

body {
    font-family: Arial, sans-serif;
    background-color: #121212;
    color: #ffffff;
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

/* Light mode theme */
body.light-mode {
    background-color: #f5f5f5;
    color: #333333;
}

nav {
    background-color: #1e1e1e;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.5);
    position: sticky;
    top: 0;
    z-index: 100;
}

body.light-mode nav {
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nav-container {
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
}

.nav-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #ffffff;
}

body.light-mode .nav-title {
    color: #333333;
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 1rem;
    margin: 0;
    padding: 0;
}

.nav-menu li a {
    color: #ffffff;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}

body.light-mode .nav-menu li a {
    color: #333333;
}

.nav-menu li a:hover, .nav-menu li a.active {
    background-color: #333333;
}

body.light-mode .nav-menu li a:hover, 
body.light-mode .nav-menu li a.active {
    background-color: #e0e0e0;
}

/* Theme toggle button */
.theme-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    color: #ffffff;
    transition: transform 0.3s;
}

body.light-mode .theme-toggle {
    color: #333333;
}

.theme-toggle:hover {
    transform: scale(1.2);
}

main {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 2rem;
    background-color: #121212;
    transition: background-color 0.3s;
}

body.light-mode main {
    background-color: #f5f5f5;
}

/* Full-width page styles */
.full-width-page {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 12px;
}

.pairs-page {
    width: 100%;
    max-width: 100%;
}

/* Page header */
.page-header {
    display: none;
}

/* Page info section */
.page-info-section {
    display: none;
}

/* Filter toolbar */
.filter-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.5rem;
    background-color: #1e1e1e;
    border-radius: 4px;
    transition: background-color 0.3s;
}

body.light-mode .filter-toolbar {
    background-color: #ffffff;
    border: 1px solid #ddd;
}

.filter-left {
    flex: 1;
}

.filter-right {
    flex: 0 0 auto;
    color: #ffffff;
}

body.light-mode .filter-right {
    color: #333333;
}

#searchInput {
    padding: 0.5rem;
    width: 100%;
    max-width: 400px;
    border: 1px solid #333;
    border-radius: 4px;
    background-color: #2a2a2a;
    color: #ffffff;
    font-size: 1rem;
    transition: background-color 0.3s, color 0.3s;
}

body.light-mode #searchInput {
    background-color: #f0f0f0;
    color: #333333;
    border: 1px solid #ccc;
}

#searchInput::placeholder {
    color: #cccccc;
}

body.light-mode #searchInput::placeholder {
    color: #999999;
}

#pairCount {
    font-size: 1rem;
}

/* Sort buttons */
.sort-buttons {
    margin-bottom: 1rem;
    text-align: center;
}

.sort-buttons button {
    background-color: #007bff;
    color: #ffffff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    margin: 0 0.5rem;
    transition: background-color 0.3s;
}

.sort-buttons button:hover {
    background-color: #0056b3;
}
/* Symbol link styling */
.symbol-link {
    color: #ffd700; /* Gold color for symbol link */
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}

.symbol-link:hover {
    color: #ffed4e; /* Brighter gold on hover */
    text-decoration: underline;
}

.symbol-link:visited {
    color: #ffd700; /* Keep gold color for visited links */
}
/* Error message */
.error-message {
    background-color: #dc3545;
    color: #ffffff;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    text-align: center;
}

/* Table wrapper */
.table-wrapper {
    width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    border-radius: 0;
    box-shadow: none;
}

.pairs-table {
    width: 100%;
    min-width: 1500px;
    border-collapse: collapse;
    background-color: #121212;
    color: #ffffff;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

body.light-mode .pairs-table {
    background-color: #ffffff;
    color: #333333;
}

.pairs-table th,
.pairs-table td {
    padding: 0.5rem;
    text-align: left;
    border: 1px solid #333;
}

body.light-mode .pairs-table th,
body.light-mode .pairs-table td {
    border: 1px solid #ddd;
}

.pairs-table th {
    background-color: #1e1e1e;
    font-weight: bold;
    position: sticky;
    top: 0;
    z-index: 1;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.3s;
}

body.light-mode .pairs-table th {
    background-color: #f0f0f0;
    color: #333333;
}

.pairs-table th:hover {
    background-color: #2a2a2a;
}

body.light-mode .pairs-table th:hover {
    background-color: #e0e0e0;
}

.pairs-table tbody tr.odd-row {
    background-color: #1a1a1a;
}

.pairs-table tbody tr.even-row {
    background-color: #121212;
}

body.light-mode .pairs-table tbody tr.odd-row {
    background-color: #f9f9f9;
}

body.light-mode .pairs-table tbody tr.even-row {
    background-color: #ffffff;
}

.pairs-table tbody tr:hover {
    background-color: #2a2a2a;
}

body.light-mode .pairs-table tbody tr:hover {
    background-color: #e8e8e8;
}

.symbol-cell {
    color: #ffd700; /* Gold color for symbol */
}

/* Hero section */
.hero {
    text-align: center;
    margin-bottom: 2rem;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #ffffff;
}

body.light-mode .hero h1 {
    color: #333333;
}

.hero p {
    font-size: 1.2rem;
    color: #cccccc;
}

body.light-mode .hero p {
    color: #666666;
}

/* Dashboard cards */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.card {
    background-color: #1e1e1e;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.5);
    text-align: center;
    transition: transform 0.3s, background-color 0.3s;
}

body.light-mode .card {
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.card:hover {
    transform: translateY(-5px);
}

.card h2 {
    margin-top: 0;
    color: #ffffff;
}

body.light-mode .card h2 {
    color: #333333;
}

.card p {
    color: #cccccc;
    margin-bottom: 1rem;
}

body.light-mode .card p {
    color: #666666;
}

.btn {
    display: inline-block;
    background-color: #007bff;
    color: #ffffff;
    padding: 0.5rem 1rem;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #0056b3;
}

/* Page content for other pages */
.page-content {
    text-align: center;
}

.page-content h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.page-content p {
    color: #cccccc;
}

body.light-mode .page-content h1 {
    color: #333333;
}

body.light-mode .page-content p {
    color: #666666;
}

/* Mobile responsive */
@media (max-width: 1366px) {
    .pairs-table {
        font-size: 0.85rem;
    }

    .pairs-table th,
    .pairs-table td {
        padding: 0.4rem;
    }
}

@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-controls {
        width: 100%;
        flex-direction: column;
    }

    .nav-menu {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }

    .dashboard-cards {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 2rem;
    }

    main {
        padding: 1rem;
    }

    .full-width-page {
        padding: 8px;
    }

    .table-wrapper {
        font-size: 0.8rem;
    }

    .pairs-table {
        font-size: 0.75rem;
        min-width: 1200px;
    }

    .pairs-table th,
    .pairs-table td {
        padding: 0.25rem;
    }

    .filter-toolbar {
        flex-direction: column;
        gap: 0.5rem;
    }

    .filter-left {
        width: 100%;
    }

    #searchInput {
        max-width: 100%;
    }

    .filter-right {
        width: 100%;
        text-align: center;
    }

    .page-info-section {
        font-size: 0.8rem;
    }

    .info-row {
        flex-direction: column;
        gap: 0.5rem;
    }
}

.auth-page {
    min-height: calc(100vh - 110px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.auth-card {
    width: 100%;
    max-width: 460px;
    background: #1a1f2c;
    border: 1px solid #2d3445;
    border-radius: 16px;
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.45);
    padding: 2rem;
}

.auth-card h1 {
    margin: 0 0 0.4rem;
    font-size: 1.8rem;
    text-align: center;
}

.auth-card p {
    margin: 0 0 1.25rem;
    color: #b3bdd2;
    text-align: center;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.form-group label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #dce4f6;
}

.form-group input {
    width: 100%;
    height: 44px;
    border-radius: 10px;
    border: 1px solid #3a445c;
    background: #111827;
    color: #f6f8ff;
    padding: 0 0.9rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus {
    border-color: #4f8cff;
    box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.2);
}

.remember-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.remember-row label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #c6d0e6;
    cursor: pointer;
}

.auth-btn {
    width: 100%;
    border: none;
    border-radius: 10px;
    padding: 0.8rem 1rem;
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    cursor: pointer;
    background: linear-gradient(135deg, #2f7bff, #1f5dd9);
    transition: transform 0.2s, box-shadow 0.2s;
}

.auth-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(47, 123, 255, 0.35);
}

.auth-link {
    margin-top: 1rem;
    text-align: center;
    color: #b3bdd2;
}

.auth-link a {
    color: #76a8ff;
    text-decoration: none;
}

.auth-link a:hover {
    text-decoration: underline;
}

.alert {
    border-radius: 10px;
    padding: 0.8rem 0.9rem;
    margin-bottom: 1rem;
    text-align: center;
    font-size: 0.95rem;
}

.alert-error {
    background: rgba(220, 53, 69, 0.2);
    border: 1px solid rgba(220, 53, 69, 0.45);
    color: #ffb7bf;
}

.alert-success {
    background: rgba(25, 135, 84, 0.2);
    border: 1px solid rgba(25, 135, 84, 0.45);
    color: #a9f0cd;
}

@media (max-width: 576px) {
    .auth-page {
        padding: 1rem;
    }

    .auth-card {
        padding: 1.4rem;
        border-radius: 14px;
    }

    .auth-card h1 {
        font-size: 1.5rem;
    }
}

.auth-page{min-height:calc(100vh - 90px);display:flex;align-items:center;justify-content:center;padding:1rem}
.auth-card{width:100%;max-width:460px;background:#1e1e1e;border:1px solid #2b2b2b;border-radius:10px;padding:1.5rem}
.auth-form{display:flex;flex-direction:column;gap:1rem}
.form-group{display:flex;flex-direction:column;gap:.4rem}
.form-group label{font-weight:600}
.form-group input{width:100%;padding:.65rem;border:1px solid #3a3a3a;border-radius:6px;background:#121212;color:#fff}
.remember-row{display:flex;align-items:center}
.auth-btn{padding:.7rem 1rem;background:#2563eb;border:none;border-radius:6px;color:#fff;cursor:pointer}
.auth-link{margin:.7rem 0 0;text-align:center}
.auth-link a{color:#93c5fd;text-decoration:none}
.alert{padding:.7rem .9rem;border-radius:6px;margin-bottom:1rem}
.alert-error{background:#7f1d1d;color:#fecaca}
.alert-success{background:#14532d;color:#bbf7d0}
@media (max-width:600px){.auth-card{padding:1rem}}

.auth-page{min-height:calc(100vh - 90px);display:flex;align-items:center;justify-content:center}.auth-card{width:min(420px,95%);background:#1e1e1e;padding:24px;border-radius:10px}.auth-form{display:flex;flex-direction:column;gap:12px}.form-group{display:flex;flex-direction:column;gap:6px}.auth-btn{padding:10px;background:#2563eb;border:0;color:#fff;border-radius:6px;cursor:pointer}.auth-link{text-align:center}.alert{padding:10px;border-radius:6px;margin-bottom:10px}.alert-error{background:#7f1d1d}.alert-success{background:#14532d}
.charts-toolbar{display:flex;gap:12px;align-items:center;flex-wrap:wrap;background:#1e1e1e;padding:10px;border-radius:6px}
.status-text{margin:8px 0;color:#cbd5e1}
.charts-grid-wrap{height:calc(100vh - 190px);display:grid;grid-template-rows:25% 25% 50%;gap:8px}
.chart-panel{background:#111;border:1px solid #333;min-height:0;position:relative}
.chart-panel canvas{display:block;width:100%;height:100%}
body.light-mode .charts-toolbar{background:#ffffff;border:1px solid #ddd}
body.light-mode .chart-panel{background:#fafafa;border:1px solid #ddd}

.pairs-table th{position:sticky;top:0;background:#1f2937;z-index:2}.pairs-table td,.pairs-table th{padding:6px 8px;white-space:nowrap}

.charts-toolbar.tv-toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;background:#111827;border:1px solid #1f2937;padding:8px 10px;border-radius:8px}
.toolbar-left{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.pair-pill{color:#e5e7eb;font-size:13px}
.timeframe-buttons{display:flex;gap:6px;flex-wrap:wrap}
.timeframe-btn{background:transparent;color:#cbd5e1;border:1px solid transparent;padding:4px 8px;border-radius:4px;font-size:12px;cursor:pointer;min-width:36px}
.timeframe-btn:hover{background:#1f2937;color:#fff}
.timeframe-btn.active{background:#2563eb;color:#fff;border-color:#3b82f6}
.timeframe-btn.disabled,.timeframe-btn:disabled{opacity:.45;cursor:not-allowed}
.toolbar-right{display:flex;align-items:center;gap:12px;color:#9ca3af;font-size:12px}
#candleDetails{font-variant-numeric:tabular-nums;color:#cbd5e1}
.status-text{margin:8px 0;color:#9ca3af}
.charts-grid-wrap{height:calc(100vh - 180px);display:grid;grid-template-rows:25% 25% 50%;gap:8px}
.chart-panel{background:#0b1020;border:1px solid #1f2937;min-height:0;position:relative;overflow:hidden}
.chart-panel canvas{display:block;width:100%;height:100%}
body.light-mode .charts-toolbar.tv-toolbar{background:#fff;border:1px solid #ddd}
body.light-mode .toolbar-right,body.light-mode .pair-pill{color:#334155}
body.light-mode .chart-panel{background:#fafafa;border:1px solid #ddd}

.rsi-panel .indicator-widget{position:absolute;top:8px;left:8px;z-index:3;display:flex;align-items:center;gap:8px;padding:4px 8px;border-radius:6px;background:rgba(11,16,32,.8);color:#c4b5fd;font-size:12px;line-height:1.2;font-variant-numeric:tabular-nums}
.indicator-settings-btn{border:0;background:transparent;color:#d1d5db;cursor:pointer;font-size:14px;line-height:1;padding:0}
.indicator-settings-btn:hover{color:#fff}
.indicator-modal[hidden]{display:none}
.indicator-modal{position:fixed;inset:0;background:rgba(2,6,23,.65);display:flex;align-items:center;justify-content:center;z-index:2000}
.indicator-modal-dialog{width:min(360px,92vw);background:#111827;border:1px solid #374151;border-radius:10px;padding:14px}
.indicator-modal-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}
.indicator-modal-header h3{margin:0;font-size:16px;color:#e5e7eb}
.indicator-modal-close{background:transparent;border:0;color:#9ca3af;font-size:16px;cursor:pointer}
.indicator-modal-form{display:flex;flex-direction:column;gap:10px}
.indicator-modal-form label{font-size:13px;color:#cbd5e1}
.indicator-modal-form input{background:#0b1020;border:1px solid #334155;border-radius:6px;color:#fff;padding:8px 10px}
.indicator-modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:4px}
.indicator-modal-actions .btn-secondary,.indicator-modal-actions .btn-primary{border:1px solid transparent;border-radius:6px;padding:7px 12px;cursor:pointer}
.indicator-modal-actions .btn-secondary{background:#1f2937;color:#e5e7eb;border-color:#374151}
.indicator-modal-actions .btn-primary{background:#2563eb;color:#fff;border-color:#3b82f6}
body.light-mode .rsi-panel .indicator-widget{background:rgba(248,250,252,.9);color:#6d28d9}
body.light-mode .indicator-settings-btn{color:#334155}
body.light-mode .indicator-modal-dialog{background:#fff;border-color:#d1d5db}
body.light-mode .indicator-modal-header h3,body.light-mode .indicator-modal-form label{color:#111827}
body.light-mode .indicator-modal-form input{background:#fff;color:#111827;border-color:#cbd5e1}

body.modal-open{overflow:hidden}
