* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.header h1 {
    font-size: 32px;
    margin-bottom: 10px;
}

.header p {
    opacity: 0.9;
    font-size: 16px;
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    padding: 24px 30px;
    background: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.stat-card {
    background: #fff;
    padding: 18px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.04);
    text-align: center;
}

.stat-number {
    font-size: 32px;
    font-weight: 700;
    color: #1d9bf0;
    margin-bottom: 4px;
}

.stat-label {
    color: #536471;
    font-size: 13px;
}

.tabs {
    display: flex;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    padding: 0 30px;
    background: white;
    position: relative;
    z-index: 10;
    -webkit-overflow-scrolling: touch;
}

.tab {
    padding: 15px 30px;
    cursor: pointer;
    border: none;
    background: none;
    font-size: 15px;
    color: #536471;
    transition: color 0.15s ease, border-color 0.15s ease;
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: rgba(29, 155, 240, 0.2);
    touch-action: manipulation;
}

.tab:hover {
    color: #1d9bf0;
    background: rgba(29, 155, 240, 0.04);
}

.tab.active {
    color: #1d9bf0;
    border-bottom-color: #1d9bf0;
    font-weight: 700;
}

.tab-content {
    display: none;
    padding: 30px;
}

.tab-content.active {
    display: block;
}

.tweet-list {
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

.tweet-card {
    background: #fff;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    transition: background 0.15s ease, opacity 0.3s ease-in-out;
}

.tweet-card:hover {
    background: #f7f9fa;
}

.tweet-card:last-child {
    border-bottom: none;
}

.tweet-card.success {
    border-left: 3px solid #00ba7c;
}

.tweet-card.failed {
    border-left: 3px solid #f4212e;
    background: #fffbfb;
}

.tweet-card.pending {
    border-left: 3px solid #ffad1f;
    background: #fffdf5;
}

.tweet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.tweet-status {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
}

.status-success {
    background: #e8f5e9;
    color: #00ba7c;
}

.status-failed {
    background: #feecef;
    color: #f4212e;
}

.status-pending {
    background: #fef9e7;
    color: #f59e0b;
}

.tweet-text {
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 12px;
    color: #0f1419;
    word-break: break-word;
}

.tweet-meta {
    display: flex;
    gap: 14px;
    font-size: 13px;
    color: #536471;
    flex-wrap: wrap;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.03);
}

/* ── Comment layout (target tweet + reply) ── */

.tweet-comment-layout {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 12px;
}

.tweet-comment-body {
    margin-top: 0;
}

/* Quoted original tweet — styled like Twitter's quote-tweet embed */
.comment-target-card {
    margin: 8px 0 0;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    cursor: default;
    transition: background 0.15s ease;
}

.tweet-card:hover .comment-target-card {
    background: #f0f3f5;
}

.comment-target-card.compact {
    padding: 10px 12px;
    border-radius: 10px;
}

.comment-target-label {
    display: none;
}

.comment-target-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.comment-target-author-name {
    font-size: 13px;
    font-weight: 700;
    color: #0f1419;
}

.comment-target-author-handle {
    font-size: 13px;
    color: #536471;
}

.comment-target-summary {
    color: #0f1419;
    font-size: 14px;
    line-height: 1.6;
    word-break: break-word;
}

.comment-target-card .expandable-text-full {
    color: #0f1419;
}

.comment-target-card.compact .comment-target-summary {
    font-size: 13px;
}

.comment-target-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    margin-top: 6px;
}

.comment-target-link {
    font-size: 12px;
    color: #1d9bf0;
    text-decoration: none;
    font-weight: 500;
}

.comment-target-link:hover {
    text-decoration: underline;
}

.comment-target-link.comment-link {
    color: #00ba7c;
}

.comment-target-link.comment-link:hover {
    color: #00956a;
}

/* Comment body — the user's reply */
.comment-body-card {
    margin: 0;
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: none;
}

.comment-body-card.compact {
    padding: 0;
}

.comment-body-label {
    display: none;
}

.comment-body-tag {
    display: none;
}

.comment-body-text {
    font-size: 15px;
    line-height: 1.7;
    color: #0f1419;
    white-space: pre-wrap;
    word-break: break-word;
}

.comment-body-card .expandable-text-full {
    color: #0f1419;
}

.expandable-text-full {
    margin-top: 6px;
    font-size: 14px;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
}

.expandable-text-collapsed {
    word-break: break-word;
}

.expandable-text-toggle {
    margin-top: 8px;
    padding: 0;
    border: none;
    background: transparent;
    color: #1d9bf0;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

.expandable-text-toggle:hover {
    text-decoration: underline;
}

.comment-body-card.compact .comment-body-text {
    font-size: 13px;
}

.engagement-event-list {
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

.engagement-event-card {
    background: #fff;
    padding: 18px 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    transition: background 0.15s ease;
}

.engagement-event-card:hover {
    background: #f7f9fa;
}

.engagement-event-card:last-child {
    border-bottom: none;
}

.engagement-event-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.engagement-event-header span {
    color: #0f1419;
}

.engagement-event-header span:last-child {
    color: #536471 !important;
    font-size: 13px !important;
}

.engagement-event-desc {
    margin-top: 6px;
    font-size: 14px;
    color: #536471;
    line-height: 1.5;
}

.engagement-event-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

/* ── Shared Utility Classes ── */

/* Performance / engagement stats row (tweet list, hot content, timeline) */
.perf-stats-row {
    margin-top: 12px;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
    font-size: 13px;
    color: #536471;
}

.perf-stats-row span {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 13px;
    color: #536471;
}

.perf-stats-row .perf-score {
    margin-left: auto;
    font-weight: 700;
    color: #f4212e;
}

/* RAG indicator + sources wrapper */
.rag-indicator {
    margin-top: 12px;
    font-size: 13px;
    color: #536471;
    position: relative;
}

.rag-indicator-row {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.rag-badge {
    background: #e8f5fd;
    color: #1d9bf0;
    padding: 2px 8px;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 12px;
}

.rag-sources {
    font-size: 12px;
    color: #536471;
}

/* Generation chain detail button */
.gen-chain-btn {
    padding: 3px 10px;
    font-size: 11px;
    background: #e8f5fd;
    color: #1d9bf0;
    border: 1px solid #cce4f7;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.gen-chain-btn:hover {
    background: #d4edfa;
}

.gen-chain-btn.abs {
    position: absolute;
    top: 2px;
    right: 0;
}

/* AI prompt box in tweet cards */
.ai-prompt-box {
    font-size: 12px;
    color: #536471;
    margin: 12px 0;
    padding: 10px 14px;
    background: #f7f9fa;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.04);
    word-wrap: break-word;
    line-height: 1.6;
}

/* Lightweight source / action text link (reused across timeline, hot content, tweet list) */
.source-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #1d9bf0;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
}

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

.timeline-action-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #1d9bf0;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    margin-top: 10px;
}

.timeline-action-link:hover {
    text-decoration: underline;
}

/* Unfollow / error reason box in timeline */
.timeline-reason-box {
    margin-top: 6px;
    padding: 8px 12px;
    background: #feecef;
    border-left: 3px solid #f4212e;
    border-radius: 4px;
    font-size: 13px;
    color: #d32f2f;
}

/* Tweet card action icon buttons (delete / republish) */
.tweet-action-icon {
    position: absolute;
    top: 12px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 15px;
    color: #b0b8c1;
    transition: color 0.2s, background 0.2s;
    padding: 6px;
    border-radius: 50%;
    line-height: 1;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tweet-action-icon:hover {
    color: #f4212e;
    background: rgba(244, 33, 46, 0.1);
}

.tweet-action-icon.republish:hover {
    color: #00ba7c;
    background: rgba(0, 186, 124, 0.1);
}

/* Error message box in tweet card */
.error-message-box {
    margin-top: 12px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #fff5f5 0%, #ffe8e8 100%);
    border: 1px solid #ffcccc;
    border-left: 4px solid #dc3545;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.1);
}

.error-message-box .error-header {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.error-message-box .error-icon {
    font-size: 20px;
    margin-right: 8px;
}

.error-message-box .error-title {
    color: #dc3545;
    font-size: 14px;
    font-weight: bold;
}

.error-message-box .error-code {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 8px;
    background: #dc3545;
    color: white;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
}

.error-message-box .error-body {
    color: #721c24;
    font-size: 13px;
    line-height: 1.6;
    padding-left: 28px;
    word-break: break-word;
}

/* RAG doc title/description in document list */
.rag-doc-title {
    font-size: 12px;
    color: #536471;
    margin: 8px 0;
    padding: 8px;
    background: #f7f9fa;
    border-radius: 6px;
}

.rag-doc-desc {
    font-size: 13px;
    color: #536471;
    margin: 8px 0;
}

.rag-search-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 14px 16px;
    background: #ffffff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.rag-search-input-wrap {
    flex: 1 1 320px;
}

.rag-search-input-wrap input,
.rag-search-toolbar select {
    width: 100%;
    min-height: 40px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: #ffffff;
    color: #111827;
    padding: 0 14px;
    font-size: 14px;
    outline: none;
}

.rag-search-toolbar select {
    width: auto;
    min-width: 92px;
}

.rag-search-input-wrap input:focus,
.rag-search-toolbar select:focus {
    border-color: #1d9bf0;
    box-shadow: 0 0 0 3px rgba(29, 155, 240, 0.12);
}

.rag-search-btn,
.rag-search-secondary {
    min-height: 40px;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    padding: 0 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.rag-search-btn {
    background: #1d9bf0;
    color: #ffffff;
    border-color: #1d9bf0;
}

.rag-search-btn:hover:not(:disabled) {
    background: #1a8cd8;
    border-color: #1a8cd8;
}

.rag-search-btn:disabled,
.rag-search-secondary:disabled {
    cursor: not-allowed;
    opacity: 0.55;
    box-shadow: none;
}

.rag-search-secondary {
    background: #f8fafc;
    color: #334155;
}

.rag-search-secondary:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}

.rag-search-status {
    margin-left: auto;
    font-size: 12px;
    color: #64748b;
}

.rag-search-summary {
    padding: 14px 16px;
    background: #f7f9fa;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.rag-search-summary-main {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    color: #0f172a;
    font-size: 14px;
}

.rag-search-chip-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.rag-search-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    color: #0f1419;
    font-size: 12px;
    font-weight: 600;
}

.rag-search-result-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.rag-result-card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    padding: 16px;
}

.rag-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.rag-result-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 30px;
    border-radius: 999px;
    background: #e8f5fd;
    color: #1d9bf0;
    font-size: 12px;
    font-weight: 700;
}

.rag-result-source {
    font-size: 13px;
    color: #0f172a;
    font-weight: 600;
}

.rag-result-score-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.rag-result-score {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #475569;
    font-size: 12px;
    font-weight: 600;
}

.rag-result-actions {
    margin-top: 12px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.rag-result-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: #334155;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.rag-result-action:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.04);
}

.pagination button {
    padding: 8px 16px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: #fff;
    color: #0f1419;
    border-radius: 9999px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.15s ease, color 0.15s ease;
}

.pagination button:hover:not(:disabled) {
    background: #f7f9fa;
    color: #1d9bf0;
}

.pagination button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pagination .current-page {
    padding: 8px 16px;
    color: #536471;
    font-size: 13px;
}

.pagination.modern {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 20px;
    padding-top: 16px;
}

.pagination.modern button {
    padding: 8px 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: #fff;
    color: #0f1419;
    border-radius: 9999px;
    cursor: pointer;
    min-width: 40px;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.15s ease, color 0.15s ease;
}

.pagination.modern button:hover:not(:disabled) {
    background: rgba(29, 155, 240, 0.08);
    color: #1d9bf0;
    border-color: rgba(29, 155, 240, 0.2);
}

.pagination.modern button.current-page {
    background: #1d9bf0;
    color: white;
    border-color: #1d9bf0;
    font-weight: 700;
}

.pagination.modern .ellipsis {
    color: #536471;
    font-size: 18px;
    padding: 0 4px;
}

.log-entry {
    padding: 12px;
    background: #f7f9fa;
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 14px;
}

.log-time {
    color: #536471;
    font-size: 12px;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #536471;
}

.empty-state {
    text-align: center;
    padding: 60px;
    color: #536471;
}

.empty-state svg {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.auth-status {
    position: absolute;
    top: 30px;
    right: 30px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.auth-status.authorized {
    background: #d4edda;
    color: #155724;
}

.auth-status.unauthorized {
    background: #f8d7da;
    color: #721c24;
}

.auth-status.unauthorized:hover {
    background: #f5c6cb;
    transform: scale(1.05);
}

/* High-contrast status badge used in the header (e.g. RAG status) */
.status-badge {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.95);
    color: #111827; /* near-black for best contrast */
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    margin-left: 6px;
}

/* A slightly muted variant for loading/secondary states */
.status-badge.muted {
    background: rgba(255, 255, 255, 0.88);
    color: #374151;
    font-weight: 600;
}

/* Variant when RAG is running */
.status-badge.running {
    background: #d4edda; /* light green */
    color: #155724; /* dark green */
    box-shadow: none;
}

/* Variant for error/unavailable state */
.status-badge.error {
    background: #f8d7da; /* light red */
    color: #721c24; /* dark red */
    box-shadow: none;
}

.auth-button {
    display: inline-block;
    padding: 10px 20px;
    background: white;
    color: #667eea;
    border: 2px solid white;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 15px;
}

.auth-button:hover {
    background: transparent;
    color: white;
    border-color: white;
}

.auth-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.post-now-button {
    position: absolute;
    top: 30px;
    right: 200px;
    padding: 10px 20px;
    background: #00ba7c;
    color: white;
    border: none;
    border-radius: 9999px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease;
}

.post-now-button:hover {
    background: #00956a;
}

.post-now-button:disabled {
    background: #536471;
    cursor: not-allowed;
}

#updateButton {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

#updateButton:hover {
    background: linear-gradient(135deg, #5568d3 0%, #653a8a 100%) !important;
}

.update-system-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    transition: all 0.3s;
    z-index: 999;
    display: none;
}

.update-system-button:hover {
    background: linear-gradient(135deg, #5568d3 0%, #653a8a 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.5);
}

.update-system-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.next-post-hint {
    position: absolute;
    top: 75px;
    right: 200px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.85);
    text-align: center;
    width: 160px;
}

/* Today engagement badge */
.today-engagement {
    font-size: 11px;
    font-weight: 500;
    padding: 1px 6px;
    border-radius: 8px;
    background: linear-gradient(135deg, #ff6b35, #f7c948);
    color: #fff;
    margin-left: 6px;
    vertical-align: middle;
    display: none;
    letter-spacing: 0.3px;
}

/* WS status indicator dot */
.ws-status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-left: 4px;
    vertical-align: middle;
    transition: background 0.3s;
}

.ws-status-dot.connected {
    background: #2ecc40;
    box-shadow: 0 0 4px rgba(46, 204, 64, 0.6);
}

.ws-status-dot.disconnected {
    background: #aaa;
}


/* 移动端响应式优化 */
@media screen and (max-width: 768px) {
    body {
        padding: 10px;
    }

    .container {
        border-radius: 12px;
    }

    .header {
        padding: 20px 15px;
        position: relative;
    }

    .header h1 {
        font-size: 22px;
        margin-bottom: 8px;
    }

    .header p {
        font-size: 13px;
    }

    /* 顶部按钮容器 */
    .header-actions {
        flex-direction: column !important;
        width: 100%;
        gap: 8px !important;
    }

    .auth-status {
        position: static !important;
        display: block !important;
        width: auto;
        min-width: 0;
        max-width: 100%;
        text-align: center;
        margin: 0 !important;
        font-size: 11px !important;
        padding: 4px 8px !important;
        border-radius: 10px !important;
        background: #f3f6fa !important;
        color: #555 !important;
        box-shadow: none !important;
        line-height: 1.2;
        font-weight: 500;
    }

    .auth-status.authorized {
        background: #eaf7ea !important;
        color: #3a7a3a !important;
    }

    .auth-status.unauthorized {
        background: #fbeaea !important;
        color: #b94a48 !important;
    }

    .post-now-button {
        position: static !important;
        display: block !important;
        width: 100%;
        margin: 0 !important;
        padding: 10px 15px;
        font-size: 14px;
        right: auto !important;
    }

    .next-post-hint {
        position: static !important;
        width: 100%;
        margin: 8px 0 15px 0 !important;
        font-size: 11px;
        text-align: center;
        right: auto !important;
    }

    /* 模式切换按钮 */
    .header > div[style*="display: flex"] {
        font-size: 12px !important;
    }

    .header > div button {
        font-size: 11px !important;
        padding: 4px 10px !important;
    }

    /* 统计卡片 */
    .stats {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between;
        align-items: stretch;
        gap: 6px !important;
        padding: 10px 8px !important;
        background: #fff;
    }

    .stat-card {
        flex: 1 1 0;
        min-width: 0;
        padding: 8px 4px !important;
        margin: 0 !important;
        border-radius: 8px;
        background: white;
        text-align: center;
    }

    .stat-number {
        font-size: 18px !important;
        font-weight: 700;
        color: #1d9bf0;
        margin-bottom: 2px;
        line-height: 1.1;
    }

    .stat-label {
        color: #536471;
        font-size: 10px !important;
        line-height: 1.1;
    }

    /* 标签页 */
    .tabs {
        padding: 0 10px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        flex-wrap: nowrap;
    }

    .tabs::-webkit-scrollbar {
        display: none;
    }

    .tab {
        padding: 14px 16px; /* 增大点击区域 */
        font-size: 14px; /* 增大字体 */
        white-space: nowrap;
        flex-shrink: 0;
        min-width: auto;
        min-height: 44px; /* iOS 推荐的最小触摸尺寸 */
        display: flex;
        align-items: center;
        justify-content: center;
        touch-action: manipulation; /* 优化触摸响应 */
        -webkit-tap-highlight-color: rgba(29, 155, 240, 0.2);
    }

    /* 内容区域 */
    .tab-content {
        padding: 20px 15px;
    }

    /* 推文卡片 */
    .tweet-card {
        padding: 16px 18px;
    }

    .tweet-text {
        font-size: 14px;
    }

    .tweet-meta {
        font-size: 11px;
        gap: 8px;
    }

    .tweet-meta span {
        white-space: nowrap;
    }

    /* 过滤按钮 */
    .filter-buttons {
        flex-wrap: wrap;
        gap: 8px;
        margin-bottom: 15px;
    }

    .filter-buttons button {
        padding: 8px 15px;
        font-size: 13px;
    }

    /* 分页 */
    .pagination {
        flex-wrap: wrap;
        gap: 5px;
        padding: 15px 10px;
    }

    .pagination button {
        padding: 6px 12px;
        font-size: 13px;
    }

    .pagination .current-page {
        padding: 6px 12px;
        font-size: 13px;
    }

    /* 日志条目 */
    .log-entry {
        padding: 10px;
        font-size: 13px;
    }

    .log-time {
        font-size: 11px;
    }

    /* 更新按钮 */
    .update-system-button {
        bottom: 15px;
        right: 15px;
        padding: 10px 16px;
        font-size: 13px;
    }


    /* 空状态 */
    .empty-state {
        padding: 40px 20px;
    }

    .empty-state svg {
        width: 60px;
        height: 60px;
    }

    /* 加载状态 */
    .loading {
        padding: 30px 20px;
    }

    /* 模态框优化 */
    #modeSwitchModal > div {
        width: calc(100% - 30px) !important;
        padding: 20px !important;
        max-height: 90vh;
        overflow-y: auto;
    }

    #modeSwitchModal h2 {
        font-size: 18px;
    }

    #modeSwitchModal label {
        padding: 12px !important;
        margin-bottom: 12px !important;
    }

    #modeSwitchModal label strong {
        font-size: 14px;
    }

    #modeSwitchModal label span {
        font-size: 12px !important;
    }

    #modeSwitchModal button {
        width: 100%;
        margin-top: 10px;
        padding: 10px !important;
    }
}

/* 小屏幕手机优化 */
@media screen and (max-width: 480px) {
    #ragResourceMonitor {
        left: 10px !important;
        right: 10px !important;
        bottom: 76px !important;
        min-width: unset !important;
        max-width: unset !important;
    }

    #floatAdminControls {
        right: 10px !important;
        bottom: 6px !important;
    }

    .header h1 {
        font-size: 20px;
    }

    .stats {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 15px 10px;
    }

    .stat-card {
        padding: 12px;
    }

    .stat-number {
        font-size: 24px;
    }

    .tab {
        padding: 12px 14px; /* 保持足够的点击区域 */
        font-size: 13px;
        min-height: 44px; /* 保持最小触摸尺寸 */
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .tab-content {
        padding: 15px 10px;
    }

    .tweet-card {
        padding: 14px 16px;
    }

    .tweet-text {
        font-size: 14px;
    }

    .post-now-button {
        width: 100%;
        margin: 10px 0 5px 0;
    }
}

/* 横屏平板优化 */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    .container {
        max-width: 100%;
    }

    .stats {
        grid-template-columns: repeat(4, 1fr);
        gap: 15px;
    }

    .tab {
        padding: 12px 20px;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}


.stat-number, .stat-label, .tweet-card, .log-entry {
    transition: opacity 0.3s ease;
}

/* Floating admin FAB and actions */
.fab {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .18s ease;
    pointer-events: auto;
}

.fab:active {
    transform: scale(.98);
}

.fab-actions {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 10px;
    transform-origin: bottom right;
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px) scale(.98);
}

.fab-actions.show {
    display: flex;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.fab-action-btn {
    min-width: 160px;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.04);
    cursor: pointer;
    background: #fff;
    color: #0f1419;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    transition: background 0.15s ease;
}

.fab-action-btn:hover {
    background: #f7f9fa;
}

.fab-action-btn.warn {
    background: #fff3cd;
    color: #856404;
}

.fab-action-btn.suggest {
    background: #f0f0f0;
    color: #333;
}

.fab-action-btn.hot-content {
    background: #fff;
    color: #0f1419;
}

.fab-action-btn.update {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

/* Highlight for located RAG doc */
.rag-highlight {
    box-shadow: 0 18px 40px rgba(102, 126, 234, 0.28) !important;
    transform: translateY(-6px) !important;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
    border-left-color: #3b82f6 !important;
}

/* Daily Stats Toggle Button (hidden on desktop, shown on mobile) */
.daily-stats-toggle {
    display: none;
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 999;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0.3);
}

/* Floating Daily Statistics Panel */
.daily-stats-float {
    position: fixed;
    top: 20px;
    left: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 10px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 999;
    width: min(276px, calc(100vw - 24px));
    min-width: 228px;
    max-width: 276px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    overflow-x: hidden;
    animation: slideInFromLeft 0.5s ease;
    scrollbar-width: none;
    box-sizing: border-box;
}

.daily-stats-float::-webkit-scrollbar {
    width: 6px;
    background: transparent;
}

.daily-stats-float::-webkit-scrollbar-track {
    background: transparent;
}

.daily-stats-float::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 3px;
    transition: background 0.3s;
}

.daily-stats-float:hover {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.daily-stats-float:hover::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
}

.daily-stats-float:hover::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

@keyframes slideInFromLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.daily-stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 7px;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.daily-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
}

.daily-stats-title {
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.daily-stats-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: background 0.2s;
    flex-shrink: 0;
}

.daily-stats-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.daily-stats-item {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 3px;
    min-height: 54px;
    padding: 7px 8px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
}

.daily-stats-item-secondary {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.daily-stats-item-primary {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.18);
}

.daily-stats-label {
    font-size: 10px;
    line-height: 1.25;
    opacity: 0.88;
    display: flex;
    align-items: center;
    gap: 4px;
}

.daily-stats-value {
    font-size: 17px;
    font-weight: bold;
    min-width: 0;
    text-align: left;
    line-height: 1;
}

.daily-stats-item-secondary .daily-stats-value {
    font-size: 14px;
    opacity: 0.92;
}

.daily-stats-item-primary .daily-stats-value {
    font-size: 19px;
}

.daily-stats-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    font-size: 10px;
    opacity: 0.8;
    margin-top: 7px;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.daily-stats-mini {
    font-size: 9px;
    opacity: 0.92;
    white-space: nowrap;
}

.daily-stats-mini span {
    font-weight: 700;
    margin-left: 4px;
}

.daily-stats-date {
    text-align: right;
    font-size: 9px;
    opacity: 0.8;
    white-space: nowrap;
}


/* Scheduled Tasks Styles */
.daily-stats-separator {
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
    margin: 10px 0;
}

.daily-stats-section-title {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    opacity: 0.95;
    display: flex;
    align-items: center;
    gap: 5px;
}

.scheduled-tasks-list {
    margin-top: 6px;
}

.scheduled-task-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 10px;
    border-radius: 8px;
    margin-bottom: 6px;
    overflow: hidden;
    position: relative;
}

.scheduled-task-item:last-child {
    margin-bottom: 0;
}

/* 第1行：任务名 + 状态 + 加速按钮 */
.scheduled-task-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 5px;
}

.scheduled-task-name {
    font-weight: 600;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.95);
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.task-status-badge {
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 500;
    white-space: nowrap;
    line-height: 1.2;
    flex-shrink: 0;
}

.task-accelerate-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.9);
    padding: 0;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s ease;
    line-height: 1;
    flex-shrink: 0;
}

.task-accelerate-btn:hover {
    color: #ffd700;
    transform: scale(1.15);
    filter: drop-shadow(0 0 4px rgba(255, 215, 0, 0.6));
}

.task-accelerate-btn:active {
    transform: scale(1.05);
}

.task-accelerate-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    filter: none;
}

/* 第2行：间隔 + 倒计时 + 时间 */
.scheduled-task-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 10px;
    opacity: 0.9;
    gap: 8px;
}

.scheduled-task-interval {
    color: rgba(255, 255, 255, 0.75);
    white-space: nowrap;
    flex-shrink: 0;
}

.scheduled-task-next {
    color: rgba(255, 255, 255, 0.95);
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
    flex: 1;
    text-align: center;
}

.scheduled-task-time {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.85);
    font-family: 'Monaco', 'Consolas', monospace;
    letter-spacing: 0.3px;
    white-space: nowrap;
    flex-shrink: 0;
}

.task-status-waiting {
    background: rgba(156, 39, 176, 0.2);
    color: #9c27b0;
    border: 1px solid rgba(156, 39, 176, 0.3);
    animation: pulse 1.5s ease-in-out infinite;
}

.task-status-running {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.3);
    animation: pulse 1.5s ease-in-out infinite;
}

.task-status-success {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.task-status-failed {
    background: rgba(244, 67, 54, 0.2);
    color: #f44336;
    border: 1px solid rgba(244, 67, 54, 0.3);
}

.task-status-idle {
    background: rgba(158, 158, 158, 0.2);
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(158, 158, 158, 0.3);
}

/* Task status message styles */
.task-status-message {
    margin-top: 6px;
    padding: 6px 10px;
    font-size: 11px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
    border-left: 3px solid rgba(255, 255, 255, 0.3);
    line-height: 1.4;
}

.task-status-message-success {
    background: rgba(76, 175, 80, 0.15);
    border-left-color: #4caf50;
    color: rgba(255, 255, 255, 0.95);
}

.task-status-message-error {
    background: rgba(244, 67, 54, 0.15);
    border-left-color: #f44336;
    color: rgba(255, 255, 255, 0.95);
}


.scheduled-task-item.task-running {
    border-left: 3px solid #ffc107;
    background: rgba(255, 193, 7, 0.05);
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

.scheduled-task-loading {
    text-align: center;
    padding: 8px;
    opacity: 0.8;
    font-size: 11px;
}

/* 移动端适配 - 平板 */
@media (max-width: 768px) {
    .daily-stats-toggle {
        display: block;
    }

    .daily-stats-float {
        display: none;
        top: 10px;
        left: 10px;
        right: auto;
        width: min(246px, calc(100vw - 20px));
        min-width: 0;
        max-width: 246px;
        max-height: 65vh;
        padding: 9px;
    }

    .daily-stats-grid {
        gap: 5px;
    }

    .daily-stats-item {
        min-height: 52px;
        padding: 7px;
    }

    .daily-stats-title {
        font-size: 13px;
        gap: 4px;
    }

    .daily-stats-label {
        font-size: 10px;
        gap: 3px;
        line-height: 1.2;
    }

    .daily-stats-value {
        font-size: 15px;
        min-width: 0;
    }

    .daily-stats-item-secondary .daily-stats-value {
        font-size: 13px;
    }

    .daily-stats-item-primary .daily-stats-value {
        font-size: 16px;
    }

    .daily-stats-meta,
    .daily-stats-mini,
    .daily-stats-date {
        font-size: 9px;
    }

    .scheduled-task-item {
        padding: 6px 8px;
        margin-bottom: 4px;
    }

    .scheduled-task-header {
        margin-bottom: 4px;
        gap: 5px;
    }

    .scheduled-task-name {
        font-size: 12px;
    }

    .task-status-badge {
        font-size: 8px;
        padding: 2px 5px;
    }

    .task-accelerate-btn {
        font-size: 14px;
        touch-action: manipulation;
    }

    .scheduled-task-info {
        font-size: 9px;
        gap: 6px;
    }

    .scheduled-task-interval,
    .scheduled-task-next,
    .scheduled-task-time {
        font-size: 9px;
    }

}

/* 移动端适配 - 手机 */
@media (max-width: 480px) {
    .daily-stats-toggle {
        top: 8px;
        left: 8px;
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .daily-stats-float {
        display: none;
        top: 8px;
        left: 8px;
        right: auto;
        width: min(206px, calc(100vw - 16px));
        max-width: 206px;
        padding: 7px;
        max-height: 60vh;
        min-width: auto;
        font-size: 11px;
    }

    .daily-stats-title {
        font-size: 13px;
        gap: 4px;
    }

    .daily-stats-close {
        width: 28px;
        height: 28px;
        font-size: 16px;
        touch-action: manipulation;
    }

    .daily-stats-label {
        font-size: 10px;
        gap: 3px;
        line-height: 1.2;
    }

    .daily-stats-value {
        font-size: 14px;
        min-width: 0;
    }

    .daily-stats-item {
        min-height: 48px;
        padding: 6px;
    }

    .daily-stats-item-secondary .daily-stats-value {
        font-size: 12px;
    }

    .daily-stats-item-primary .daily-stats-value {
        font-size: 15px;
    }

    .daily-stats-meta,
    .daily-stats-mini,
    .daily-stats-date {
        font-size: 9px;
    }

    .daily-stats-section-title {
        font-size: 12px;
        margin-bottom: 5px;
    }

    .scheduled-task-item {
        padding: 6px 7px;
        margin-bottom: 4px;
    }

    .scheduled-task-header {
        margin-bottom: 4px;
        gap: 4px;
    }

    .scheduled-task-name {
        font-size: 11px;
    }

    .task-status-badge {
        font-size: 8px;
        padding: 2px 4px;
    }

    .task-accelerate-btn {
        font-size: 13px;
        touch-action: manipulation;
    }

    .scheduled-task-info {
        font-size: 9px;
        gap: 5px;
    }

    .scheduled-task-interval {
        font-size: 9px;
    }

    .scheduled-task-next {
        font-size: 9px;
    }

    .scheduled-task-time {
        font-size: 8px;
    }


    .container {
        padding-top: 10px;
    }

    .tab {
        padding: 12px 16px;
        font-size: 13px;
        white-space: nowrap;
        touch-action: manipulation;
    }
}

/* Timeline Styles */
.timeline-container {
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

.timeline-event {
    display: flex;
    gap: 14px;
    padding: 18px 24px;
    background: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    transition: background 0.15s ease;
}

.timeline-event:last-child {
    border-bottom: none;
}

.timeline-event:hover {
    background: #f7f9fa;
}

.timeline-icon {
    font-size: 20px;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f7f9fa;
    border-radius: 50%;
}

.timeline-content {
    flex: 1;
    min-width: 0;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 6px;
    gap: 10px;
}

.timeline-title {
    font-weight: 600;
    font-size: 15px;
    color: #0f1419;
}

.timeline-time {
    font-size: 13px;
    color: #536471;
    white-space: nowrap;
}

.timeline-description {
    font-size: 14px;
    color: #536471;
    margin: 6px 0;
    line-height: 1.6;
}

.timeline-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.timeline-comment-heat {
    margin-top: 6px;
    font-size: 13px;
    color: #536471;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.timeline-badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 9999px;
    font-weight: 500;
}

.timeline-badge.event-type-post {
    background: #e8f5fd;
    color: #1d9bf0;
}

.timeline-badge.event-type-follow {
    background: #f3e8fd;
    color: #7856ff;
}

.timeline-badge.event-type-unfollow {
    background: #feecef;
    color: #f4212e;
}

.timeline-badge.event-type-comment {
    background: #fff4e6;
    color: #f59e0b;
}

.timeline-badge.event-type-system {
    background: #f7f9fa;
    color: #536471;
}

.timeline-badge.event-type-error {
    background: #feecef;
    color: #f4212e;
}

.timeline-badge.event-type-like {
    background: #feecef;
    color: #f4212e;
}

.timeline-badge.event-category-content {
    background: #e6f9f0;
    color: #00ba7c;
}

.timeline-badge.event-category-engagement {
    background: #feecef;
    color: #f4212e;
}

.timeline-badge.event-category-automation {
    background: #e8f5fd;
    color: #1d9bf0;
}

.timeline-badge.event-category-system {
    background: #f7f9fa;
    color: #536471;
}

.timeline-details {
    font-size: 12px;
    color: #1d9bf0;
    cursor: pointer;
    text-decoration: none;
}

.timeline-details:hover {
    text-decoration: underline;
}

.timeline-filters {
    margin-bottom: 16px;
    padding: 14px 16px;
    background: #f7f9fa;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.no-data {
    text-align: center;
    padding: 40px 20px;
    color: #536471;
    font-size: 15px;
}

@media (max-width: 768px) {
    .timeline-event {
        padding: 14px 16px;
        gap: 10px;
    }

    .timeline-header {
        flex-direction: column;
        gap: 2px;
    }

    .timeline-time {
        align-self: flex-start;
    }

    .engagement-event-card {
        padding: 14px 16px;
    }
}

/* ========================================
   Spinner Loading Animation
   ======================================== */

.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Spinner for light backgrounds */
.spinner.dark {
    border-color: rgba(0, 0, 0, 0.1);
    border-top-color: #1d9bf0;
}

/* Button loading state */
button:disabled {
    cursor: not-allowed !important;
    opacity: 0.7 !important;
}

