/* Base theme and shared components */
:root {
    --primary-color: #3b82f6;
    --secondary-color: #6b7280;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --dark-bg: #111827;
    --card-bg: #1f2937;
    --text-primary: #f9fafb;
    --text-secondary: #9ca3af;
    --border-color: #374151;
    --hover-bg: #374151;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.6;
}

a {
    color: inherit;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.navbar {
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand a {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.main-content {
    min-height: calc(100vh - 120px);
    padding: 2rem 0;
}

.footer {
    padding: 1.5rem 0;
    border-top: 1px solid var(--border-color);
    background: var(--card-bg);
    margin-top: 3rem;
}

.footer p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-align: center;
}

/* Page header */
.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

/* Hero & stats */
.hero {
    text-align: center;
    padding: 3rem 0;
    margin-bottom: 2rem;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.section {
    margin-bottom: 3rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section h2 {
    font-size: 1.5rem;
}

/* Channel cards on dashboard */
.channels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.channel-card {
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.channel-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
}

.channel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.channel-username {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.channel-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Action tiles */
.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.action-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease;
    text-align: center;
}

.action-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary-color);
}

.action-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.action-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.action-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    color: #fff;
    background: var(--secondary-color);
}

.btn-primary {
    background-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #2563eb;
}

.btn-secondary {
    background-color: var(--secondary-color);
}

.btn-secondary:hover {
    background-color: #4b5563;
}

.btn-success {
    background-color: var(--success-color);
}

.btn-danger {
    background-color: var(--danger-color);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

.btn-group {
    display: flex;
    gap: 0.5rem;
}

.link-button {
    border: none;
    background: rgba(59, 130, 246, 0.12);
    color: var(--primary-color);
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
    text-decoration: none;
}

.link-button:hover {
    background: rgba(59, 130, 246, 0.2);
    color: var(--text-primary);
}

.link-button:active {
    transform: translateY(1px);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
}

.badge-success {
    background-color: var(--success-color);
    color: #fff;
}

.badge-danger {
    background-color: var(--danger-color);
    color: #fff;
}

.badge-warning {
    background-color: var(--warning-color);
    color: #fff;
}

.badge-info {
    background-color: var(--info-color);
    color: #fff;
}

.badge-secondary {
    background-color: var(--secondary-color);
    color: #fff;
}

/* Filters & inputs */
.filter-group {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.filter-select,
.search-input,
.form-control {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 8px;
    padding: 0.35rem 1rem;
    font-size: 0.95rem;
    width: 100%;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-input {
    flex: 1;
}

/* Date inputs specific styling */
input[type="date"].form-control {
    min-width: 130px;
    cursor: pointer;
    padding: 0.35rem 0.8rem;

}

input[type="date"].form-control::-webkit-calendar-picker-indicator {
    filter: invert(0.7);
    cursor: pointer;
}

.filter-select:focus,
.form-control:focus,
.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.form-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Tables */
.table-container {
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow-x: auto;
    overflow-y: visible;
    position: relative;
}

.table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.table th,
.table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
}

.table th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.insights-table td.channel-name {
    position: sticky;
    left: 0;
    z-index: 5;
    background: var(--card-bg);
    box-shadow: 3px 0 12px rgba(0, 0, 0, 0.35);
}

.insights-table thead th:first-child {
    position: sticky;
    left: 0;
    z-index: 4;
    box-shadow:
        inset 0 -1px 0 var(--border-color),
        3px 0 10px rgba(0, 0, 0, 0.35);
}

.insights-sticky-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 40;
    display: none;
    pointer-events: none;
    border-radius: 10px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

.insights-sticky-header.visible {
    display: block;
}

.insights-sticky-header table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    pointer-events: auto;
}

.insights-sticky-header th {
    padding: 1rem;
    text-transform: uppercase;
    font-size: 0.85rem;
    color: var(--text-secondary);
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.insights-sticky-header th:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    box-shadow:
        inset 0 -1px 0 var(--border-color),
        3px 0 10px rgba(0, 0, 0, 0.35);
}

.table tbody tr:hover {
    background: var(--hover-bg);
}

.link {
    color: var(--primary-color);
    text-decoration: none;
}

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

.text-muted {
    color: var(--text-secondary);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 200;
    justify-content: center;
    align-items: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    width: 100%;
    max-width: 520px;
}

.post-modal .post-modal-content {
    max-width: 900px;
    width: 90%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.modal-body {
    margin-top: 1rem;
}

.post-modal .post-modal-body {
    flex: 1;
    overflow-y: auto;
    margin-top: 0.5rem;
    padding-right: 0.5rem;
}

.close {
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--text-secondary);
    background: none;
    border: none;
    padding: 0;
    line-height: 1;
    transition: color 0.2s ease;
}

.close:hover {
    color: var(--text-primary);
}

/* Modern icon button for modal close */
.close.icon-button {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border-radius: 50%;
    border: 1px solid rgba(239, 68, 68, 0.3);
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.close.icon-button:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.5);
    color: #dc2626;
    transform: scale(1.05);
}

.close.icon-button:active {
    transform: scale(0.95);
}

.close.icon-button svg {
    width: 20px;
    height: 20px;
    stroke-width: 2.5;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

/* Breadcrumb */
.breadcrumb {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* Notifications */
.notification {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 1000;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.notification.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.notification-success {
    border-color: rgba(16, 185, 129, 0.6);
}

.notification-error {
    border-color: rgba(239, 68, 68, 0.7);
}

.notification-warning {
    border-color: rgba(245, 158, 11, 0.7);
}

.notification-info {
    border-color: rgba(59, 130, 246, 0.7);
}

.insight-hit {
    color: var(--success-color);
    font-weight: 600;
}

.insight-hit small {
    display: block;
    font-weight: 400;
}

.insight-hit a {
    color: var(--text-primary);
    text-decoration: underline;
    font-size: 0.85rem;
}

.insights-matrix .insight-cell {
    cursor: pointer;
}

.modal-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.modal-item:last-child {
    border-bottom: none;
}

.modal-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.modal-item-tags {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.modal-message-details {
    display: none;
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: var(--hover-bg);
    border-radius: 8px;
}

.modal-message-details.visible {
    display: block;
}

.insight-message-html {
    line-height: 1.6;
}

.insight-message-text {
    background: rgba(0, 0, 0, 0.2);
    padding: 0.75rem;
    border-radius: 8px;
    white-space: pre-wrap;
}

.insight-media-grid {
    margin-top: 0.75rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.insight-media-item img,
.insight-media-item video {
    width: 100%;
    border-radius: 8px;
}

.insight-media-item audio {
    width: 100%;
}

.insight-empty {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.insights-date-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    text-align: center;
}

.date-head-label {
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    color: var(--text-primary);
}

.daily-count-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.75rem;
    border-radius: 999px;
    background: linear-gradient(140deg, rgba(59, 130, 246, 0.35), rgba(16, 185, 129, 0.2));
    border: 1px solid rgba(59, 130, 246, 0.4);
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.35);
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.35px;
}

.daily-count-pill .pill-value {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.daily-count-pill .pill-caption {
    font-weight: 600;
    font-size: 0.68rem;
    color: var(--text-secondary);
}

.insight-filter-panel {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.02);
    margin-top: 8px;
}

.insight-filter-panel .filter-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
}

.insight-filter-panel .filter-column {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.insight-filter-panel .filter-divider {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 12px 0;
}

.category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.category-option {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    font-size: 14px;
    color: var(--text-primary);
}

.insight-badge-unique {
    background: var(--primary-color);
    color: #fff;
}

.insight-badge-duplicate {
    background: #eab308;
    color: #1f2937;
}

.insight-badge-nomedia {
    background: #974225;
    color: #fff;
}

.dup-count {
    font-weight: 700;
    margin-left: 4px;
}

.duplicate-list {
    margin-top: 0.35rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.category-option .category-option-label {
    font-weight: 600;
}

.category-option.selected {
    background: rgba(59, 130, 246, 0.16);
    border-color: var(--primary-color);
    color: var(--text-primary);
}

.category-summary {
    margin-top: 8px;
}

.category-summary .category-summary-block {
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed var(--border-color);
    padding: 8px 10px;
    border-radius: 10px;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.category-summary .category-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 10px;
    background: rgba(59, 130, 246, 0.12);
    color: var(--text-primary);
    font-size: 12px;
}

.category-summary .category-chip.exclude {
    background: rgba(244, 63, 94, 0.14);
}

.channel-name-content {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.channel-name-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.channel-title-link,
.channel-title-text {
    font-weight: 600;
    font-size: 1rem;
}

/* Insights filters */
.insights-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--card-bg);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    margin-bottom: 10px;
}

.insights-toolbar.compact-row {
    align-items: center;
    padding-top: 6px;
    padding-bottom: 6px;
}

.filter-block {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 200px;
}

.filter-block.compact {
    min-width: 180px;
    gap: 4px;
}

.filter-block-grow {
    flex: 1 1 260px;
}

.filter-block label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
}

.filter-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-left: auto;
}

.inline-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.insight-filter-panel {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.02);
    margin-top: 8px;
}

.insight-filter-panel .filter-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
}

.insight-filter-panel .filter-column {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.insight-filter-panel .filter-divider {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 12px 0;
}

.category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.category-option {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    font-size: 14px;
}

.category-option .category-option-label {
    font-weight: 600;
}

.category-option.selected {
    background: rgba(59, 130, 246, 0.16);
    border-color: var(--primary-color);
    color: var(--text-primary);
}

.category-summary {
    margin-top: 8px;
}

.category-summary .category-summary-block {
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed var(--border-color);
    padding: 8px 10px;
    border-radius: 10px;
    margin-bottom: 6px;
}

.category-summary .category-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 10px;
    background: rgba(59, 130, 246, 0.12);
    color: var(--text-primary);
    font-size: 12px;
}

.category-summary .category-chip.exclude {
    background: rgba(244, 63, 94, 0.14);
}

.channel-title-link {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.channel-title-link:hover {
    color: var(--primary-color);
}

.channel-total-meta {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--text-secondary);
    flex-wrap: wrap;
}

.channel-total-label {
    font-weight: 600;
}

.channel-total-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3rem;
    padding: 0.2rem 0.75rem;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.25);
    border: 1px solid rgba(59, 130, 246, 0.45);
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.4px;
    color: var(--text-primary);
    box-shadow: 0 3px 12px rgba(15, 23, 42, 0.4);
}

.modal-footer-spread {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.modal-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-nav[hidden] {
    display: none;
}

.modal-nav-status {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.modal-pagination-btn:disabled,
.modal-nav button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.insight-modal-empty {
    text-align: center;
    padding: 1rem 0;
    color: var(--text-muted);
}

.post-modal-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.5rem 1rem;
    margin-bottom: 0.75rem;
}

.meta-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.meta-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Telegram link button in post modal */
.telegram-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
    background: linear-gradient(135deg, #2AABEE, #229ED9);
    color: white;
    border: none;
    box-shadow: 0 2px 6px rgba(42, 171, 238, 0.3);
}

.telegram-link-btn:hover {
    background: linear-gradient(135deg, #229ED9, #1E88C7);
    box-shadow: 0 4px 12px rgba(42, 171, 238, 0.4);
    transform: translateY(-1px);
    color: white;
}

.telegram-link-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(42, 171, 238, 0.3);
}

.telegram-link-btn svg {
    flex-shrink: 0;
}

.decision-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.35px;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    background: linear-gradient(135deg, #1c2435, #101827);
    color: #e5e7eb;
    align-self: flex-start;
    cursor: default;
}

.decision-badge[title] {
    cursor: help;
}

.decision-badge.decision-ai {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.15), rgba(59, 130, 246, 0.08));
    color: #ccecff;
    border-color: rgba(56, 189, 248, 0.35);
}

.decision-badge.decision-rule {
    background: linear-gradient(135deg, rgba(167, 139, 250, 0.16), rgba(99, 102, 241, 0.08));
    color: #e4ddff;
    border-color: rgba(167, 139, 250, 0.35);
}

.insights-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.insights-pagination label {
    margin-right: 0.5rem;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pagination-status {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    .nav-menu {
        gap: 1rem;
        font-size: 0.9rem;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .actions-grid,
    .channels-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}
