* {
    box-sizing: border-box;
}

html, body {
    max-width: 100%;
    overflow-x: auto;
}

body {
    margin: 0;
    background: #0e0f12;
    color: #e5e7eb;
    font-family: Arial, Helvetica, sans-serif;
}


/* HEADER */

header {
    position: relative;
    z-index: 1;
    padding: 22px 30px;
    background: #15171b;
    border-bottom: 1px solid #292c33;
}

h1 {
    margin: 0;
    font-size: 22px;
}

.subtitle {
    margin-top: 5px;
    font-size: 13px;
    color: #777d87;
}

.subtitle a {
    margin-left: 12px;
    color: lightskyblue;
    text-decoration: none;
}

.subtitle a:hover {
    text-decoration: underline;
}


/* TABLE CONTAINER */

.table-wrapper {
    position: relative;
    z-index: 20;
    width: 100%;
    max-width: 100%;
    overflow: visible;
    padding: 20px;
}


/* RATING LAYOUT */

.rating-layout {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.rating-layout table {
    flex: 1 1 auto;
}


/* ADD TICKER PANEL */

.add-ticker-panel {
    flex: 0 0 260px;
    background: #15171b;
    border: 1px solid #292c33;
    border-radius: 4px;
    padding: 16px;
}

.add-ticker-panel h2 {
    margin: 0 0 12px;
    font-size: 14px;
    color: #e5e7eb;
}

.add-ticker-panel form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.add-ticker-panel label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #7e838c;
}

.add-ticker-panel input,
.add-ticker-panel select {
    background: #0e0f12;
    border: 1px solid #292c33;
    color: #e5e7eb;
    padding: 8px 10px;
    border-radius: 4px;
    font-size: 13px;
}

.add-ticker-panel button {
    margin-top: 6px;
    background: #1f6feb;
    border: none;
    color: #fff;
    padding: 9px 12px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
}

.add-ticker-panel button:hover {
    background: #388bfd;
}

.form-message {
    margin-bottom: 12px;
    padding: 8px 10px;
    border-radius: 4px;
    font-size: 12px;
}

.form-message.error {
    background: #421f25;
    color: #e87e87;
}

.form-message.success {
    background: #173c29;
    color: #6fd195;
}


/* TABLE */

table {
    width: 100%;
    border-collapse: collapse;
    background: #15171b;
    border: 1px solid #292c33;
}

thead {
    background: #1a1c21;
}

th {
    padding: 12px 10px;
    text-align: left;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #7e838c;
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
}

th.tablesorter-header::after {
    content: ' \2195';
    opacity: .3;
}

th.tablesorter-headerAsc::after {
    content: ' \2191';
    color: #e5e7eb;
    opacity: 1;
}

th.tablesorter-headerDesc::after {
    content: ' \2193';
    color: #e5e7eb;
    opacity: 1;
}

td {
    padding: 12px 10px;
    border-bottom: 1px solid #24272d;
    vertical-align: middle;
    font-size: 13px;
}

tr:hover {
    background: #1b1e23;
}

tr:has(.info-tip.has-reason:hover) {
    position: relative;
    z-index: 50;
}


/* TITLE */

.news-title {
    width: 400px;
    min-width: 400px;
    font-weight: 500;
    line-height: 1.4;
}

a {
    color: lightskyblue;
    text-decoration: none;
}

.news-title a:hover {
    color: #a8b4c4;
    text-decoration: underline;
}


/* DATE */

.date {
    color: #777d87;
    white-space: nowrap;
    font-size: 11px;
    line-height: 1.25;
}

.date-day,
.date-time {
    display: block;
}

.date-time {
    color: #5c616b;
}


/* BADGES */

.badge {
    display: inline-block;
    padding: 4px 7px;
    border-radius: 4px;
    font-size: 10px;
    background: #252830;
    color: #aeb3bc;
    white-space: nowrap;
}

.bullish {
    background: #173c29;
    color: #6fd195;
}

.bearish {
    background: #421f25;
    color: #e87e87;
}

.neutral {
    background: #303239;
    color: #c4c7cd;
}

.uncertain {
    background: #302c3c;
    color: #b5a6e5;
}


/* SCORE */

.score {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    width: 72px;
}

.score-number {
    width: auto;
    text-align: left;
    font-size: 11px;
    line-height: 1.2;
    color: #c8ccd2;
}

.score-bar {
    width: 72px;
    height: 5px;
    background: #292c33;
    border-radius: 5px;
    overflow: hidden;
}

.score-fill {
    height: 100%;
    background: #9ba1aa;
    border-radius: 5px;
}

.not-evaluated {
    color: #555a63;
}


/* INFO TOOLTIP */

.info-tip {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.info-tip.has-reason:hover {
    z-index: 100;
}

.info-icon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1px solid #5c616b;
    color: #aeb3bc;
    font-size: 11px;
    font-style: italic;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    cursor: default;
}

.info-tip.has-reason .info-icon {
    border-color: #8f949d;
    color: #e5e7eb;
}

.info-text {
    display: none;
    position: absolute;
    right: 30px;
    top: 0px;
    width: 360px;
    padding: 10px 12px;
    background: #1f232b;
    border: 1px solid #3a3f49;
    border-radius: 6px;
    color: #c8ccd2;
    font-size: 12px;
    line-height: 1.45;
    z-index: 9999;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
}

.info-tip.has-reason:hover .info-text {
    display: block;
}


/* EVENT */

.event-type {
    font-size: 10px;
    color: #9da2ab;
}


/* PATIENT / MARKET */

.detail {
    font-size: 11px;
    color: #8e939c;
    min-width: 150px;
    max-width: 200px;
}


/* RELEVANCE */

.relevance-high .score-fill {
    background: #c8d0d8;
}

table.compact {
    min-width: 0;
    width: auto;
}
