/* ============================================================
   GLOBAL / RESET
   ============================================================ */

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    background-color: #121212;
    color: #e0e0e0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    overflow: hidden;
}

/* ============================================================
   LAYOUT
   ============================================================ */

.layout {
    display: flex;
    height: 100vh;
    width: 100%;
    min-height: 0;
}

/* ============================================================
   SIDEBAR (FILTER PANEL)
   ============================================================ */

.sidebar {
    width: 200px;
    padding: 16px;
    background-color: #121212;
    border-right: 1px solid #2a2a2a;
    overflow-y: auto;    /* Enable vertical scroll */
    overflow-x: hidden;
    overscroll-behavior: contain;
}

.sidebar h3 {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
}

/* ============================================================
   FILTER CONTROLS
   ============================================================ */

.filter-group {
    margin-bottom: 14px;
}

.filter-group label {
    display: block;
    margin-bottom: 4px;
    font-size: 13px;
    font-weight: 600;
    color: #cfcfcf;
}

.filter-group select {
    width: 100%;
    padding: 6px 8px;
    font-size: 14px;

    background-color: #1c1c1c;
    color: #e0e0e0;
    border: 1px solid #333;
    border-radius: 4px;
}

.filter-group select:focus {
    outline: none;
    border-color: #4c8bf5;
}

/* ============================================================
   STATUS TEXT
   ============================================================ */

.status {
    font-size: 10px;
    color: #a0a0a0;
    font-style: italic;
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */

.content {
    flex: 1;
    padding: 12px;
    overflow: auto;
    background-color: #121212;
    overscroll-behavior: contain;
    min-height: 0;
}

/* ============================================================
   TABLE
   ============================================================ */

#stratTable {
    width: 100%;
    border-collapse: collapse;
}

#stratTable th,
#stratTable td {
    padding: 2px 1px;
    text-align: center;
    border-bottom: 1px solid #2a2a2a;
}

#stratTable th {
    position: sticky;
    top: 0;
    z-index: 1;

    background-color: #121212;
    color: #ffffff;
    font-weight: 600;
    font-size: 14px;
}

#stratTable td {
    font-size: 13px;
}

/* ============================================================
   TABLE ROW STATES
   ============================================================ */

#stratTable tbody tr:hover {
    background-color: #1a1a1a;
}

/* ============================================================
   LINKS
   ============================================================ */

.ticker-link {
    color: #4c8bf5;
    text-decoration: none;
}

.ticker-link:hover {
    text-decoration: underline;
}

/* ============================================================
   SCROLLBARS (WebKit)
   ============================================================ */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #121212;
}

::-webkit-scrollbar-thumb {
    background: #2a2a2a;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #676767;
}

/* Text & number inputs only */
.filter-group input:not([type="checkbox"]):not([type="radio"]) {
    width: 100%;
    padding: 6px 8px;
    margin-bottom: 6px;
    font-size: 14px;

    background-color: #1c1c1c;
    color: #e0e0e0;
    border: 1px solid #333;
    border-radius: 4px;
}


.filter-group input:focus {
    outline: none;
    border-color: #4c8bf5;
}

#copyTickersBtn {
    width: 100%;
    padding: 8px;
    font-size: 14px;
    font-weight: 600;

    background-color: #1c1c1c;
    color: #e0e0e0;
    border: 1px solid #333;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 6px;
}

#copyTickersBtn:hover {
    background-color: #2a2a2a;
}

#copyTickersBtn:active {
    background-color: #333;
}

#resetFiltersBtn {
    width: 100%;
    padding: 8px;
    font-size: 14px;
    font-weight: 600;

    background-color: #1c1c1c;
    color: #e0e0e0;
    border: 1px solid #333;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 6px;
}

#resetFiltersBtn:hover {
    background-color: #2a2a2a;
}

#resetFiltersBtn:active {
    background-color: #333;
}

#exportCsvBtn {
    width: 100%;
    padding: 8px;
    font-size: 14px;
    font-weight: 600;

    background-color: #1c1c1c;
    color: #e0e0e0;
    border: 1px solid #333;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 6px;
}

#exportCsvBtn:hover {
    background-color: #2a2a2a;
}

#exportCsvBtn:active {
    background-color: #333;
}

#stratTable {
    font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.strat-1 { background-color: #00a000 !important; color: #fff; }  /* light Green */
.strat-2 { background-color: #006600 !important; color: #fff; }  /* Dark Green */
.strat-3 { background-color: #666600 !important; color: #fff; }  /* Dark Yellow */
.strat-4 { background-color: #ffcc66 !important; color: #fff; }  /* Dark Orange */
.strat-5 { background-color: #a00000 !important; color: #fff; }  /* light Red */
.strat-6 { background-color: #660000 !important; color: #fff; }  /* Dark Red */

.mfi-1 { background-color: #223366 !important; color: #fff; }
.mfi-2 { background-color: #225577 !important; color: #fff; }
.mfi-3 { background-color: #444 !important; color: #fff; }
.mfi-4 { background-color: #665511 !important; color: #fff; }
.mfi-5 { background-color: #662222 !important; color: #fff; }

.atr-1 { background-color: #006600 !important; color: #fff; }  /* Dark Green */
.atr-2 { background-color: #b38019 !important; color: #fff; }  /* Dark Orange */
.atr-3 { background-color: #a00000 !important; color: #fff; }  /* light Red */

#login {
    position: fixed;
    inset: 0;
    background-color: #121212;
    z-index: 1000;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.scan-time {
    font-size: 10px;          /* smaller than table / status */
    color: #9a9a9a;           /* subtle */
    font-style: italic;
}

.tf-toggle {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    /*margin-bottom: 4px; /* matches filter-group spacing */
}

.tf-toggle-label {
    font-size: 13px;
    font-weight: 600;
    color: #cfcfcf;
    cursor: pointer;
    white-space: nowrap;
}

.tf-toggle input[type="checkbox"] {
    /*flex: 0 0 auto;*/
    cursor: pointer;
}

label {
    display: block;      /* Ensures the label takes up its own line */
    margin-top: 15px;    /* Adjust this number (20px, 30px, etc.) for more space */
    margin-bottom: 0px; /* Optional: adds a little gap below the label too */
    font-weight: bold;
}
