/* =====================================================
   HEADER WITH DOMAIN NAME AND EMOJI
===================================================== */
.site-header {
    width: 100%;
    background: #111827;
    padding: 15px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    box-sizing: border-box;
    flex-wrap: wrap;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.site-header .domain-name {
    font-size: 24px;
    font-weight: bold;
    color: white;
    white-space: nowrap;
}

/* Responsive */
@media screen and (max-width: 768px) {
    .site-header {
        flex-direction: column;
        gap: 5px;
        padding: 10px 15px;
    }
    .site-header .domain-name {
        font-size: 20px;
    }
}

@media screen and (max-width: 480px) {
    .site-header .domain-name {
        font-size: 18px;
        text-align: center;
    }
}

/* =====================================================
   GLOBAL
===================================================== */

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #0f172a;
    color: white;
}

/* =====================================================
   LOGIN PAGE (wrap login page body with class="login-page")
===================================================== */

.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    text-align: center;
}

/* Login Form */
.login-page form {
    background: #1e293b;
    padding: 30px 25px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 350px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.login-page form h2 {
    margin-bottom: 20px;
    font-size: 24px;
    color: #f1f5f9;
}

.login-page form input[type="text"],
.login-page form input[type="password"] {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border-radius: 6px;
    border: none;
    font-size: 16px;
    background: #0f172a;
    color: white;
}

.login-page form input::placeholder {
    color: #cbd5e1;
}

.login-page form label {
    font-size: 14px;
    margin: 10px 0;
    align-self: flex-start;
    color: #e2e8f0;
}

.login-page form button {
    width: 100%;
    padding: 12px 0;
    margin-top: 15px;
    background: #22c55e;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: background 0.3s;
}

.login-page form button:hover {
    background: #16a34a;
}

/* =====================================================
   DASHBOARD MENU
===================================================== */

.menu {
    padding: 15px 10px;
    background: #111827;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.menu button {
    background: #1e293b;
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.3s;
    font-size: 13px;
}

.menu button:hover { background: #3b82f6; }

.menu button.active {
    background-color: #22c55e;
    color: black;
}

/* =====================================================
   HEADER
===================================================== */

.header {
    margin: 25px 0;
    text-align: center;
}

.header h1 {
    margin: 0 0 5px 0;
    font-size: 28px;
}

.header h3 {
    margin: 0;
    font-weight: normal;
    color: #94a3b8;
}

/* =====================================================
   STATS
===================================================== */

.stats {
    margin: 20px auto;
    width: 85%;
    display: flex;
    justify-content: space-around;
    gap: 20px;
    flex-wrap: wrap;
}

.card {
    background: #1e293b;
    padding: 18px;
    border-radius: 10px;
    width: 250px;
    font-size: 16px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    text-align: center;
}

/* ===== PNL CARD ===== */

.pnl-card {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border-radius: 16px;
    padding: 25px 40px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0,0,0,0.4);
    min-width: 260px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pnl-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.6);
}

.pnl-title {
    font-size: 14px;
    color: #94a3b8;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.pnl-value {
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 8px;
}

/* Profit */
.pnl-value.profit {
    color: #22c55e;
    text-shadow: 0 0 10px rgba(34,197,94,0.5);
}

/* Loss */
.pnl-value.loss {
    color: #ef4444;
    text-shadow: 0 0 10px rgba(239,68,68,0.5);
}

/* Status text */
.pnl-status {
    font-size: 13px;
    color: #64748b;
}

/* Responsive */
@media (max-width: 600px) {
    .pnl-card {
        width: 90%;
        padding: 20px;
    }

    .pnl-value {
        font-size: 28px;
    }
}

/* =====================================================
   TABLE
===================================================== */

.table-wrapper {
    width: 95%;
    margin: 0 auto 40px auto;
    overflow-x: auto;
}

table {
    border-collapse: collapse;
    width: 100%;
    min-width: 1000px;
}

th, td {
    padding: 8px;
    border: 1px solid #334155;
    font-size: 13px;
    text-align: center;
}

th {
    background: #1e293b;
}

tr:nth-child(even) {
    background: #1e293b;
}

.buy { color: #22c55e; font-weight: bold; }
.open { color: #facc15; font-weight: bold; }
.closed { color: #94a3b8; }
.profit { color: #22c55e; font-weight: bold; }
.loss { color: #ef4444; font-weight: bold; }

/* =====================================================
   INPUTS & BUTTONS
===================================================== */

input {
    width: 60px;
    padding: 3px;
    border-radius: 4px;
    border: 1px solid #334155;
    background: #1e293b;
    color: white;
    font-size: 12px;
}

button {
    padding: 5px 10px;
    border: none;
    border-radius: 5px;
    background-color: #3b82f6;
    color: white;
    cursor: pointer;
    font-size: 12px;
}

button:hover { background-color: #2563eb; }

/* =====================================================
   MOBILE
===================================================== */

@media screen and (max-width: 768px) {

    .header h1 { font-size: 22px; }
    .header h3 { font-size: 14px; }

    .stats {
        flex-direction: column;
        align-items: center;
    }

    .card { width: 90%; }

    table { min-width: 900px; }

    th, td {
        font-size: 11px;
        padding: 6px;
    }

    input { width: 50px; }

    .menu button {
        font-size: 11px;
        padding: 6px 10px;
    }
}

@media screen and (max-width: 480px) {

    .login-page form {
        width: 90%;
        padding: 20px;
    }

    .login-page form input {
        font-size: 14px;
    }

    .login-page form button {
        font-size: 14px;
    }

    .login-page form h2 {
        font-size: 20px;
    }
}
/* =====================================================
   ANALYTICS PAGE
===================================================== */
/* =====================================================
   ANALYTICS PAGE
===================================================== */

/* Chart Container */
.chart-wrapper {
    width: 90%;
    max-width: 1000px;
    height: 350px;
    margin: 30px auto;
}

.chart-wrapper canvas {
    width: 100% !important;
    height: 100% !important;
}

/* Dropdown Filters */
.dropdown {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
}

.dropdown label {
    font-weight: bold;
    color: #f1f5f9;
    min-width: 80px;
    text-align: right;
}

.dropdown select {
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #334155;
    background: #1e293b;
    color: white;
    font-size: 14px;
    min-width: 150px;
    max-width: 250px;
}

/* Table Wrapper */
.table-wrapper {
    width: 85%;
    margin: 0 auto 40px auto;
    overflow-x: auto;
}
.table-wrapper-analy {
    width: 65%;
    margin: 0 auto 40px auto;
    overflow-x: auto;
}

/* Tables */
table {
    border-collapse: collapse;
    width: 100%;
    min-width: 600px;
}

th, td {
    border: 1px solid #334155;
    padding: 8px;
    font-size: 13px;
    text-align: center;
}

th {
    background: #1e293b;
}

tr:nth-child(even) {
    background: #1e293b;
}

/* Status Colors */
.buy { color: #22c55e; font-weight: bold; }
.open { color: #facc15; font-weight: bold; }
.closed { color: #94a3b8; }
.profit { color: #22c55e; font-weight: bold; }
.loss { color: #ef4444; font-weight: bold; }

/* =====================================================
   Responsive Adjustments
===================================================== */
@media screen and (max-width: 768px) {

    .chart-wrapper {
        height: 250px;
    }

    table {
        min-width: 500px;
    }

    th, td {
        font-size: 11px;
        padding: 6px;
    }

    .dropdown {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .dropdown label {
        text-align: left;
        min-width: auto;
    }

    .dropdown select {
        width: 100%;
        max-width: 100%;
        font-size: 12px;
    }
}

@media screen and (max-width: 480px) {

    .chart-wrapper {
        height: 200px;
    }

    table {
        min-width: 100%;
    }

    th, td {
        font-size: 10px;
        padding: 4px;
    }

    .dropdown select {
        font-size: 12px;
    }
}
/* =====================================================
   MONTHLY ANALYTICS
===================================================== */

.dropdown {
    margin: 20px 0;
    text-align: center;
}

.dropdown label {
    margin-right: 10px;
    font-weight: bold;
}

.dropdown select {
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid #334155;
    background: #1e293b;
    color: white;
    font-size: 14px;
}

/* Ensure table scrolls on mobile */
table {
    width: 100%;
    min-width: 600px;
}

@media screen and (max-width: 768px) {

    table {
        min-width: 500px;
    }

    th, td {
        font-size: 11px;
        padding: 6px;
    }

    .dropdown select {
        font-size: 12px;
    }
}

/* ===== Executed Page Specific Styles ===== */
/* ================================
   InTradingHub - Executed Page CSS
   Scoped to avoid breaking other pages
================================ */

/* Page Title */
.executed-title {
    text-align: center;
    margin: 25px 0;
    font-size: 26px;
}

/* Table Wrapper */
.executed-table-wrapper {
    width: 100%;
    overflow-x: auto;
    padding: 0 15px 40px;
    box-sizing: border-box;
}

/* Table */
.executed-table {
    width: 100%;
    min-width: 900px;
    border-collapse: collapse;
    background: #1e293b;
    border-radius: 8px;
    overflow: hidden;
}

.executed-table th,
.executed-table td {
    padding: 10px;
    border: 1px solid #334155;
    text-align: center;
    font-size: 14px;
}

.executed-table th {
    background: #111827;
    position: sticky;
    top: 0;
    z-index: 2;
}

.executed-table tr:nth-child(even) {
    background: #1e293b;
}

/* Inputs */
.executed-table input {
    width: 80px;
    padding: 5px;
    background: #0f172a;
    border: 1px solid #334155;
    color: white;
    border-radius: 4px;
    text-align: center;
}

/* Status Colors */
.profit { color: #22c55e; font-weight: bold; }
.loss { color: #ef4444; font-weight: bold; }
.open { color: #facc15; font-weight: bold; }
.closed { color: #94a3b8; }

/* Buttons */
.executed-btn {
    padding: 6px 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}

.executed-update {
    background: #22c55e;
    color: black;
}

.executed-close {
    background: #ef4444;
    color: white;
}

.executed-btn:hover {
    opacity: 0.85;
}

/* Responsive */
@media (max-width: 768px) {

    .executed-title {
        font-size: 20px;
    }

    .executed-table th,
    .executed-table td {
        font-size: 12px;
        padding: 6px;
    }

    .executed-table input {
        width: 65px;
    }
}
/* ==================================
   InTradingHub - Add Trade Page CSS
   Scoped to prevent global conflicts
================================== */

/* Page Title */
.addtrade-title {
    margin-top: 30px;
    text-align: center;
}

/* Main Container */
.addtrade-container {
    margin: 30px auto;
    width: 320px;
    background: #1e293b;
    padding: 25px;
    border-radius: 10px;
    box-sizing: border-box;
}

/* Inputs & Selects */
.addtrade-container input,
.addtrade-container select {
    width: 100%;
    padding: 10px;
    margin: 8px 0;
    border-radius: 6px;
    border: 1px solid #334155;
    background: #0f172a;
    color: white;
    box-sizing: border-box;
}

/* Button */
.addtrade-btn {
    width: 100%;
    padding: 10px;
    margin-top: 10px;
    border-radius: 6px;
    border: none;
    background: #22c55e;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.addtrade-btn:hover {
    background: #16a34a;
}

/* Info Text */
.addtrade-info {
    margin-top: 10px;
    font-size: 14px;
}

/* Error Message */
.addtrade-error {
    color: #ef4444;
    font-size: 13px;
    margin-top: 5px;
}

/* Mobile */
@media (max-width: 480px) {

    .addtrade-container {
        width: 90%;
        padding: 20px;
    }
}

/* =========================================
   InTradingHub - Scanner Settings CSS
   Scoped for safety, responsive
========================================= */

/* Body / Title */
body {
    font-family: Arial;
    background: #0f172a;
    color: white;
    text-align: center;
    margin: 0;
    padding: 0;
}
h1 {
    margin-top: 20px;
}

/* Menu */
.menu {
    margin: 15px;
    text-align: center;
}
.menu button {
    background: #1e293b;
    color: white;
    border: none;
    padding: 10px 20px;
    margin: 0 5px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.3s;
}
.menu button:hover {
    background: #3b82f6;
}
.menu button.active {
    background-color: #22c55e;
    color: black;
}

/* Scanner Box */
.scanner-box {
    margin: 30px auto;
    width: 700px;
    max-width: 95%;
    background: linear-gradient(145deg, #1e293b, #162033);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.4);
    text-align: left;
    transition: 0.3s;
}
.scanner-box h3 {
    margin-bottom: 20px;
    font-size: 20px;
    border-bottom: 1px solid #334155;
    padding-bottom: 10px;
}

/* Toggle Switch */
.toggle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 15px 0;
    font-size: 15px;
}
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}
.switch input { display: none; }
.slider {
    position: absolute;
    cursor: pointer;
    background-color: #475569;
    border-radius: 24px;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    transition: 0.4s;
}
.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: 0.4s;
}
input:checked + .slider {
    background-color: #22c55e;
}
input:checked + .slider:before {
    transform: translateX(26px);
}

/* Inputs & Selects */
input, select {
    /*width: 80px;*/
    padding: 5px;
    border-radius: 4px;
    border: 1px solid #334155;
    background: #1e293b;
    color: white;
}

/* Static Symbols Textarea */
#staticSymbols {
    width: 100%;
    padding: 10px;
    margin-top: 8px;
    border-radius: 8px;
    border: 1px solid #334155;
    background: #0f172a;
    color: white;
    resize: none;
    font-size: 14px;
}

/* Buttons */
.scanner-buttons {
    margin-top: 20px;
    display: flex;
    gap: 15px;
}
.scanner-buttons button {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}
.save-btn {
    background-color: #3b82f6;
    color: white;
}
.save-btn:hover {
    background-color: #2563eb;
}
.scan-btn {
    background-color: #22c55e;
    color: white;
}
.scan-btn:hover {
    background-color: #16a34a;
}

/* Config Status Box */
#configStatus {
    margin-top: 15px;
    font-size: 14px;
    padding: 8px;
    border-radius: 6px;
    background: #111827;
    text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
    .scanner-box {
        width: 95%;
        padding: 20px;
    }
    .toggle-row {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ===============================
   Global Menu CSS
=============================== */

.menu {
    margin: 15px;
    text-align: center;
}
.menu button {
    background: #1e293b;
    color: white;
    border: none;
    padding: 10px 20px;
    margin: 0 5px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.3s;
}
.menu button:hover {
    background: #3b82f6;
}
.menu button.active {
    background-color: #22c55e;
    color: black;
}
/* ===============================
   MENU DROPDOWN (FIXED)
=============================== */

.menu-dropdown {
    position: relative;
    display: inline-block;
}

/* Main dropdown button */
.menu-dropdown > .dropdown-btn {
    background: #1e293b;
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: 13px;
}

.menu-dropdown > .dropdown-btn:hover {
    background: #3b82f6;
}

/* Dropdown panel */
.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;          /* IMPORTANT: no gap */
    left: 0;
    background: #111827;
    min-width: 204px;
    border-radius: 6px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
    z-index: 9999;
    padding: 6px 0;
}

/* Dropdown items */
.dropdown-content button {
    width: 100%;
    background: transparent;
    border: none;
    padding: 10px 15px;
    text-align: left;
    color: white;
    cursor: pointer;
    font-size: 13px;
}

.dropdown-content button:hover {
    background: #1e293b;
}

/* ✅ KEY FIX: keep dropdown visible when hovering either */
.menu-dropdown:hover .dropdown-content,
.menu-dropdown:focus-within .dropdown-content {
    display: block;
}

/* Mobile behavior */
@media screen and (max-width: 768px) {
    .dropdown-content {
        position: static;
        box-shadow: none;
        border-radius: 0;
    }
}
button#loadMonthBtn {
    padding: 11px 36px;
    border: none;
    border-radius: 6px;
    background-color: #3b82f6; /* base blue */
    color: white;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: background-color 0.3s, transform 0.1s, box-shadow 0.2s;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

button#loadMonthBtn:hover {
    background-color: #2563eb; /* darker blue */
    box-shadow: 0 6px 12px rgba(0,0,0,0.4);
}

button#loadMonthBtn:active {
    transform: translateY(2px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.executed-table tbody tr:hover{
background:#2b3544;
transition:0.2s;
}

/* Filter container styling */
.filter-container {
   /* display: flex;/*
    flex-wrap: wrap;        /* Allow wrapping on smaller screens */
    gap: 10px;              /* Space between elements */
    margin-bottom: 15px;
    align-items: center;
}

.filter-container label {
    margin-right: 5px;
    white-space: nowrap;    /* Keep label and select/input together */
}

.filter-container select {
    padding: 5px 8px;
    border-radius: 4px;
    border: 1px solid #ccc;
    min-width: 120px;
    
    
}

/* Mobile responsiveness */
@media (max-width: 600px) {
    .filter-container {
        flex-direction: column; /* Stack filters vertically */
        align-items: flex-start;
    }

    .filter-container label, 
    .filter-container select {
        width: 100%;          /* Full width for small screens */
        margin-right: 0;
        margin-bottom: 5px;
    }
}
.trading-reminder {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;

    background: linear-gradient(90deg, #0f2027, #203a43, #2c5364);
    color: #ffffff;

    padding: 12px 20px;
    margin: 10px auto 20px;
    border-radius: 8px;

    font-size: 19px;
    font-weight: 500;

    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.trading-reminder span {
    opacity: 0.9;
    transition: 0.2s;
}

.trading-reminder span:hover {
    opacity: 1;
    transform: scale(1.05);
}

.trading-reminder .highlight {
    color: #00ffcc;
    font-weight: bold;
}
.trading-reminder-container {
    overflow: hidden;
    background: linear-gradient(90deg, #0f2027, #203a43, #2c5364);
    border-radius: 8px;
    margin: 10px auto 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.trading-reminder-track {
    display: flex;
    gap: 40px;
    white-space: nowrap;
    padding: 12px 0;
    color: #ffffff;
    font-size: 19px;
    font-weight: 500;

    animation: scrollTicker 25s linear infinite;
}

.trading-reminder-track span {
    opacity: 0.9;
}

.trading-reminder-track .highlight {
    color: #00ffcc;
    font-weight: bold;
}

@keyframes scrollTicker {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* 🚨 ALERT STATE */
.trading-reminder-container.alert {
    background: linear-gradient(90deg, #3a0000, #7a0000);
    box-shadow: 0 0 15px rgba(255,0,0,0.6);
}

.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;

    background: rgba(0, 0, 0, 0.7);
}

.modal-content {
    background: #111;
    color: #fff;
    margin: 5% auto;
    padding: 20px;
    width: 90%;
    max-width: 600px;

    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0,255,150,0.3);

    max-height: 80vh;
    overflow-y: auto;
}

.modal-body h3 {
    color: #00ffcc;
    margin-top: 15px;
}

.modal-body p {
    font-size: 14px;
    margin: 5px 0;
    opacity: 0.9;
}

.close-btn {
    float: right;
    font-size: 22px;
    cursor: pointer;
    color: #aaa;
}

.close-btn:hover {
    color: #fff;
}
.modal-content {
    transform: scale(0.9);
    transition: 0.2s ease;
}
/* 🚨 Danger row */
.trade-warning {
    background: rgba(255, 0, 0, 0.25) !important;
    animation: pulseRed 0.8s infinite;
    border-left: 5px solid red;
}

@keyframes pulseRed {
    0% { background: rgba(255,0,0,0.25); }
    50% { background: rgba(255,0,0,0.55); }
    100% { background: rgba(255,0,0,0.25); }
}
.trading-reminder-track { cursor: pointer; }

.market-status {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 19px;
    font-weight: bold;
}

/* Open = Green */
.market-open {
    color: #22c55e;
}

/* Closed = Red */
.market-closed {
    color: #ef4444;
}