/* Sleek selector styles */
label {
    font-weight: 500;
    color: #f8d47c;
    margin-right: 6px;
    letter-spacing: 0.5px;
}

select {
    background: #23272a;
    color: #f8d47c;
    border: 1.5px solid #444;
    border-radius: 6px;
    padding: 8px 28px 8px 12px;
    font-size: 1em;
    outline: none;
    box-shadow: 0 2px 8px #0004;
    transition: border 0.2s, box-shadow 0.2s;
    appearance: none;
    cursor: pointer;
    width: 100%;
    font-family: inherit;
}

.select-wrap {
    position: relative;
    min-width: 160px;
    max-width: 300px;
    flex: 1;
}

.select-wrap::after {
    content: '▼';
    font-size: 0.8em;
    color: #f8d47c;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

select:focus {
    border-color: #f8d47c;
    box-shadow: 0 0 0 2px #f8d47c44;
}

select option {
    background: #23272a;
    color: #e0e0e0;
}

.selector-bar {
    display: flex;
    align-items: center;
    gap: 1.5em;
    margin-bottom: 1.5em;
    justify-content: center;
}
#main-logo {
    display: block;
    margin: 0 auto 20px auto;
}

#left-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 60px;
    height: 100vh;
    background: #2c2f33;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 0;
    box-shadow: 2px 0 5px rgba(0,0,0,0.3);
    z-index: 100;
}

#left-menu #main-logo {
    max-width: 40px;
    height: auto;
    border-radius: 8px;
    cursor: pointer;
    margin-bottom: 20px;
}

.menu-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex-grow: 1;
}

.menu-items a, .menu-footer a {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    color: #8e9297;
    text-decoration: none;
    padding: 10px;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
}

.menu-items a svg, .menu-footer a svg {
    stroke: #8e9297;
    transition: stroke 0.2s;
}

.menu-items a:hover svg, .menu-footer a:hover svg {
    stroke: #f8d47c;
}

.menu-items a.active svg, .menu-footer a.active svg {
    stroke: #f8d47c;
}

.menu-items a:hover, .menu-footer a:hover {
    background: #40444b;
    color: #f8d47c;
}

.menu-footer {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#main-content {
    margin-left: 60px;
    padding: 20px;
}

html {
    overflow-y: scroll;
}
body {
    font-family: Arial, sans-serif;
    background: #181a1b;
    color: #e0e0e0;
    margin: 0;
    padding: 0;
}
h1 {
    color: #fff;
}
.stock-block {
    background: #23272a;
    border-radius: 8px;
    box-shadow: 0 2px 8px #0008;
    margin-bottom: 24px;
    padding: 16px;
}
.stock-title {
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 8px;
    color: #f8d47c;
}
table {
    border-collapse: collapse;
    width: 100%;
    margin-bottom: 12px;
    background: #23272a;
    table-layout: fixed;
}
th, td {
    border: 1px solid #444;
    padding: 6px 10px;
    text-align: left;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}
th {
    background: #2c2f34;
    color: #f8d47c;
}
tr:nth-child(even) td {
    background: #202225;
}
tr:nth-child(odd) td {
    background: #23272a;
}
a { color: #7ec7ff; }

/* Sign-based coloring used only for today vs yesterday comparisons */
.pos { color: #4caf50; }
.neg { color: #e57373; }
.neutral { color: inherit; }

/* Global responsive defaults */
* {
    box-sizing: border-box;
}

img, svg, video, canvas {
    max-width: 100%;
    height: auto;
}

/* Selector bar: responsive layout */
.selector-bar {
    flex-wrap: wrap;
}
.selector-bar label {
    margin-right: 8px;
}
.selector-bar select {
    margin-right: 12px;
}

/* Tables: make scrollable on small screens */
.table-wrap {
    width: 100%;
    overflow-x: hidden;
}
/* Removed min-width to prevent horizontal scroll */

/* Compact key/value tables (nested data) */
.kv-table {
    width: 100%;
    table-layout: fixed;
}
.kv-table td:first-child {
    width: 44%;
}
.kv-table td:last-child {
    width: 56%;
}

/* Make nested event details more compact */
.event-details .kv-table {
    font-size: 0.95em;
}

/* Mobile adjustments */
@media (max-width: 640px) {
    body {
        padding: 12px;
        font-size: 15px;
    }
    h1 {
        font-size: 1.35rem;
        margin: 0 0 12px 0;
    }
    .selector-bar {
        gap: 0.75em;
    }
    label {
        font-size: 0.95em;
    }
    select {
        width: 100%;
        min-width: 0;
        font-size: 1em;
    }
    .stock-block {
        padding: 12px;
        margin-bottom: 16px;
    }
    table {
        font-size: 0.95em;
    }
    th, td {
        padding: 6px 8px;
    }
}

/* Compact Calendar Events */
.events-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.event-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: center;
    background: #23272a;
    border: 1px solid #444;
    border-radius: 6px;
    padding: 8px 10px;
}
.event-key {
    color: #f8d47c;
    font-weight: 600;
    overflow-wrap: anywhere;
}
.event-val {
    color: #e0e0e0;
    text-align: right;
    overflow-wrap: anywhere;
}
.event-item {
    background: #23272a;
    border: 1px solid #444;
    border-radius: 6px;
    padding: 6px 10px;
}
.event-item > summary {
    cursor: pointer;
    list-style: none;
    color: #f8d47c;
    font-weight: 600;
}
.event-item > summary::-webkit-details-marker {
    display: none;
}
.event-details {
    margin-top: 6px;
}
