@import url("https://fonts.googleapis.com/css2?family=Inter:wght@500;600;700&family=Roboto+Mono:wght@600;700&display=swap");

.stats-popup {
    position: fixed !important;
    z-index: 2147483647 !important;
    width: 286px !important;
    background: #203642 !important;
    border-radius: 10px !important;
    border: 1px solid rgba(93, 129, 148, 0.38) !important;
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.42) !important;
    font-family: "Inter", sans-serif;
    color: #ffffff;
    top: 50px;
    left: 50px;
    user-select: none;
    overflow: hidden;
}

.stats-header {
    background: #1a2d38 !important;
    min-height: 48px;
    padding: 0 12px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    cursor: grab;
    border-bottom: 1px solid rgba(101, 139, 160, 0.2);
}

.header-title {
    color: #e3f1fa !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    letter-spacing: 0.01em;
    text-transform: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.header-title i {
    color: #9ec1d4;
    font-size: 12px;
}

.stats-close-btn {
    width: 26px;
    height: 26px;
    border: 1px solid rgba(125, 154, 170, 0.38);
    border-radius: 6px;
    background: rgba(31, 53, 66, 0.86);
    color: #dbe8f2;
    font: 700 18px/1 "Inter", sans-serif;
    cursor: pointer;
}

.stats-close-btn:hover {
    background: rgba(39, 64, 79, 0.96);
}

.stats-body {
    padding: 10px 10px 12px;
}

.stats-filter-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.stats-filter-left {
    flex: 1;
    min-width: 0;
}

.stats-filter-label {
    color: #b9cfde !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    display: block;
    margin-bottom: 4px;
}

.stats-filter-select {
    width: 100%;
    min-height: 40px;
    border: 1px solid #4a6e82 !important;
    border-radius: 8px !important;
    background: #2c4a5f !important;
    color: #f0f9ff !important;
    font: 600 12px "Inter", sans-serif !important;
    padding: 8px 10px !important;
    outline: none !important;
    cursor: pointer;
}

.stats-refresh-btn {
    width: 36px;
    height: 36px;
    margin-top: 16px;
    border: 1px solid rgba(95, 129, 148, 0.4);
    border-radius: 8px;
    background: rgba(35, 58, 72, 0.88);
    color: #c9dcea;
    cursor: pointer;
}

.stats-refresh-btn:hover {
    background: rgba(46, 74, 92, 0.96);
}

.stats-well {
    background: #1a2d38 !important;
    border: 1px solid rgba(80, 114, 132, 0.28);
    border-radius: 8px !important;
    margin: 0 0 10px 0 !important;
}

.stats-grid-container {
    padding: 10px !important;
}

.stats-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px 16px !important;
    position: relative;
}

.stats-grid::before {
    content: "";
    position: absolute;
    left: calc(50% - 0.5px);
    top: 2px;
    bottom: 2px;
    width: 1px;
    background: rgba(151, 184, 201, 0.32);
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 40px;
}

.stat-label {
    color: #bcd2e1 !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    text-transform: none;
}

.stat-value {
    font-family: "Roboto Mono", monospace !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1.1;
}

.stats-grid .currency-tag-small {
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    font-size: 12px !important;
    margin-left: 6px;
    vertical-align: middle;
}

.stats-chart-container {
    height: 168px !important;
    border-radius: 8px;
    border: 1px solid rgba(66, 101, 120, 0.35);
    background: #16262e !important;
    position: relative;
    overflow: hidden;
    padding: 0;
}

.stats-chart-container svg {
    width: 100%;
    height: 100%;
    display: block;
}

.reset-stats-btn {
    width: 100%;
    background-color: #2f4a5d !important;
    color: #ffffff !important;
    border: none !important;
    min-height: 34px;
    border-radius: 6px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer !important;
}

.reset-stats-btn:hover {
    background-color: #3b5c74 !important;
}

#profitPath {
    stroke-width: 2.6;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

#profitFill,
#profitFillPos,
#profitFillNeg {
    opacity: 0.35;
}

#liveDot {
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.5));
}
