body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #101114;
    color: #eee;
}

.topbar {
    background: #181a20;
    padding: 15px 25px;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
}

.topbar a {
    color: #fff;
    text-decoration: none;
    margin-left: 15px;
}

.container {
    padding: 20px;
}

.article-grid {
    display: grid;
    grid-template-columns: 180px 1fr 190px 190px;
    gap: 20px;
    background: #181a20;
    border: 1px solid #2d3038;
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 12px;
    align-items: start;
}

.source-col {
    color: #7ee787;
    font-weight: bold;
    font-size: 14px;
}

.title-col {
    min-width: 0;
}

.title-col a {
    color: #8ab4ff;
    text-decoration: none;
    font-size: 18px;
    font-weight: bold;
}

.url {
    margin-top: 8px;
    max-width: 100%;
}

.url a {
    display: block;
    color: #888;
    font-size: 12px;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.url a:hover {
    color: #aaa;
    text-decoration: underline;
}

.summary {
    margin-top: 12px;
    color: #ccc;
    font-size: 14px;
    line-height: 1.5;
}

.date-col {
    font-size: 13px;
    color: #aaa;
    text-align: right;
}

.feed-card,
.add-box {
    background: #181a20;
    border: 1px solid #2d3038;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 12px;
}

input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px;
    margin: 6px 0 10px;
    border-radius: 8px;
    border: 1px solid #444;
    background: #0c0d10;
    color: #fff;
}

button {
    padding: 9px 14px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    background: #2d6cdf;
    color: #fff;
}

.delete {
    background: #b23b3b;
}

.flash {
    background: #263d26;
    border: 1px solid #3d663d;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 12px;
}

@media (max-width: 900px) {
    .article-grid {
        grid-template-columns: 1fr;
    }

    .date-col {
        text-align: left;
    }

    .topbar {
        flex-direction: column;
        gap: 10px;
    }

    .topbar a {
        margin-left: 0;
        margin-right: 15px;
    }
}

.analysis-grid {
    display: grid;
    grid-template-columns: 220px 1fr 220px;
    gap: 20px;
    background: #181a20;
    border: 1px solid #2d3038;
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 12px;
    align-items: start;
}

.score-col {
    font-size: 13px;
    color: #ddd;
    text-align: right;
}

.ticker {
    display: inline-block;
    margin-top: 8px;
    color: #fff;
    background: #2d6cdf;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 12px;
}

.reason {
    margin-top: 12px;
    color: #ccc;
    font-size: 14px;
    line-height: 1.5;
}

.sentiment-positive {
    border-left: 5px solid #2ecc71;
}

.sentiment-negative {
    border-left: 5px solid #e74c3c;
}

.sentiment-neutral {
    border-left: 5px solid #999;
}

.sentiment-unclear {
    border-left: 5px solid #f1c40f;
}

textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 10px;
    margin: 6px 0 10px;
    border-radius: 8px;
    border: 1px solid #444;
    background: #0c0d10;
    color: #fff;
    font-family: Arial, sans-serif;
}

input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

@media (max-width: 900px) {
    .analysis-grid {
        grid-template-columns: 1fr;
    }

    .score-col {
        text-align: left;
    }
}

.article-id {
    margin-top: 8px;
    color: #777;
    font-size: 12px;
}

.ai-col {
    font-size: 13px;
    color: #ddd;
    text-align: right;
}

.ai-line {
    margin-top: 5px;
}

.ai-time {
    margin-top: 12px;
    color: #888;
    font-size: 11px;
}

.unprocessed-badge {
    display: inline-block;
    background: #333842;
    color: #bbb;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
}

.sentiment-positive {
    border-left: 5px solid #2ecc71;
}

.sentiment-negative {
    border-left: 5px solid #e74c3c;
}

.sentiment-neutral {
    border-left: 5px solid #999;
}

.sentiment-unclear {
    border-left: 5px solid #f1c40f;
}

.sentiment-unprocessed {
    border-left: 5px solid #555;
}

.table-wrap {
    overflow-x: auto;
    background: #181a20;
    border: 1px solid #2d3038;
    border-radius: 12px;
    padding: 10px;
}

.feeds-table {
    width: 100%;
    border-collapse: collapse;
}

.feeds-table th,
.feeds-table td {
    padding: 8px;
    border-bottom: 1px solid #2d3038;
    vertical-align: middle;
}

.feeds-table th {
    text-align: left;
    color: #aaa;
    font-size: 13px;
}

.feeds-table input {
    margin: 0;
}

.actions-cell {
    width: 160px;
    white-space: nowrap;
}

.inline-form {
    display: inline-block;
    margin-left: 6px;
}

.status-good {
    color: #2ecc71;
    font-weight: bold;
}

.status-muted {
    color: #aaa;
}

.checkbox-label {
    display: block;
    margin: 10px 0;
}

.ai-control-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #181a20;
    border: 1px solid #2d3038;
    border-radius: 12px;
    padding: 12px 15px;
    margin-bottom: 16px;
}

.ai-stop-time {
    color: #aaa;
    font-size: 13px;
}

@media (max-width: 700px) {
    .ai-control-box {
        flex-direction: column;
        align-items: flex-start;
    }
}

.strong-positive {
    background: linear-gradient(135deg, #143d24, #102b1b);
    border-color: #2ecc71;
    box-shadow: 0 0 14px rgba(46, 204, 113, 0.25);
}

.strong-positive .source-col,
.strong-positive .reason,
.strong-positive .summary,
.strong-positive .ai-col {
    color: #eafff0;
}

.strong-positive .ticker {
    background: #2ecc71;
    color: #07140b;
    font-weight: bold;
}

.auto-refresh-note {
    color: #888;
    font-size: 12px;
    margin-bottom: 12px;
}