/* OLED Midnight Black Design Theme */
:root {
    --bg-oled: #000000;
    --bg-card: #09090b;
    --bg-card-hover: #121214;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);
    
    --text-primary: #f4f4f5;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    
    --accent-blue: #3b82f6;
    --accent-blue-glow: rgba(59, 130, 246, 0.2);
    --accent-green: #10b981;
    --accent-yellow: #f59e0b;
    --accent-orange: #f97316;
    --accent-red: #ef4444;
    --accent-purple: #8b5cf6;
    
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: 'Fira Code', monospace;
    
    --transition-smooth: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body.oled-theme {
    background-color: var(--bg-oled);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.hidden {
    display: none !important;
}

/* Auth Login Overlay */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-oled);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.login-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    text-align: center;
    transition: var(--transition-smooth);
}

.login-card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 0 30px var(--accent-blue-glow);
}

.login-header {
    margin-bottom: 30px;
}

.logo-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 64px;
    height: 64px;
    border-radius: 12px;
    background-color: var(--accent-blue-glow);
    color: var(--accent-blue);
    margin-bottom: 20px;
}

.login-header h2 {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.025em;
    margin-bottom: 8px;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 14px;
}

.input-group {
    margin-bottom: 20px;
}

.input-group input {
    width: 100%;
    background-color: var(--bg-oled);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 14px 16px;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 16px;
    transition: var(--transition-smooth);
}

.input-group input:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 2px var(--accent-blue-glow);
}

.btn-primary {
    width: 100%;
    background-color: var(--text-primary);
    color: var(--bg-oled);
    border: none;
    border-radius: 8px;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-primary:hover {
    background-color: #ffffff;
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
}

.error-msg {
    color: var(--accent-red);
    font-size: 14px;
    margin-bottom: 20px;
    text-align: left;
}

/* App Container */
.app-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 24px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Navbar */
.navbar {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.navbar-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pulse-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--accent-green);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: pulse 1.8s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.brand h1 {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.brand h1 span {
    color: var(--text-secondary);
    font-weight: 400;
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
    padding: 0 14px;
    height: 32px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    text-decoration: none;
    transition: var(--transition-smooth);
}

.btn-outline:hover {
    border-color: rgba(255, 255, 255, 0.3);
    background-color: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.header-right-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-text-logout {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 6px;
    transition: var(--transition-smooth);
    text-decoration: none;
}

.btn-text-logout:hover {
    color: var(--accent-red);
    background-color: rgba(239, 68, 68, 0.1);
}

/* Bell Notifications */
.notifications-wrapper {
    position: relative;
}

.bell-button {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition-smooth);
    position: relative;
}

.bell-button:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.05);
}

.bell-button .badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background-color: var(--accent-red);
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 9999px;
    border: 2px solid var(--bg-oled);
}

.notifications-dropdown {
    position: absolute;
    top: 48px;
    right: 0;
    width: 360px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    z-index: 100;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.7);
    overflow: hidden;
}

.dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
}

.dropdown-header h3 {
    font-size: 14px;
    font-weight: 600;
}

.btn-text {
    background: none;
    border: none;
    color: var(--accent-blue);
    font-size: 12px;
    cursor: pointer;
    font-weight: 500;
}

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

.notifications-list {
    max-height: 320px;
    overflow-y: auto;
}

.notification-item {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition-smooth);
}

.notification-item:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

.notification-item.unread {
    background-color: rgba(59, 130, 246, 0.03);
}

.notif-icon {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 6px;
}

.notif-icon.error { background-color: var(--accent-red); }
.notif-icon.warning { background-color: var(--accent-yellow); }
.notif-icon.info { background-color: var(--accent-blue); }

.notif-content {
    flex-grow: 1;
}

.notif-title {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 2px;
}

.notif-msg {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.notif-time {
    font-size: 10px;
    color: var(--text-muted);
}

.empty-state {
    padding: 32px 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

/* Bento Grid */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.bento-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 18px 20px 16px 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 146px;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

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

/* Dynamic Glow Gradients */
.bento-card, .main-panel, .sidebar-card {
    position: relative;
    overflow: hidden;
}

.bento-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.6;
    transition: var(--transition-smooth);
    z-index: 1;
}

.main-panel::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 400px;
    height: 300px;
    pointer-events: none;
    opacity: 0.4;
    transition: var(--transition-smooth);
    z-index: 1;
}

.sidebar-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.4;
    transition: var(--transition-smooth);
    z-index: 1;
}

/* Card hover state */
.bento-card:hover::after, .main-panel:hover::after, .sidebar-card:hover::after {
    opacity: 0.95;
}

/* Card-specific custom gradients (smooth top-left radiation) */
.bento-card.g-purple::after {
    background: radial-gradient(circle at 0% 0%, rgba(139, 92, 246, 0.20) 0%, rgba(139, 92, 246, 0) 85%);
}
.bento-card.g-yellow::after {
    background: radial-gradient(circle at 0% 0%, rgba(245, 158, 11, 0.20) 0%, rgba(245, 158, 11, 0) 85%);
}
.bento-card.g-blue::after {
    background: radial-gradient(circle at 0% 0%, rgba(59, 130, 246, 0.20) 0%, rgba(59, 130, 246, 0) 85%);
}
.bento-card.g-green::after {
    background: radial-gradient(circle at 0% 0%, rgba(16, 185, 129, 0.20) 0%, rgba(16, 185, 129, 0) 85%);
}
.bento-card.g-red::after {
    background: radial-gradient(circle at 0% 0%, rgba(239, 68, 68, 0.20) 0%, rgba(239, 68, 68, 0) 85%);
}
.bento-card.g-orange::after {
    background: radial-gradient(circle at 0% 0%, rgba(249, 115, 22, 0.20) 0%, rgba(249, 115, 22, 0) 85%);
}

/* Sidebar & Main Panels Glow (smooth exponential falloff with absolute color transparency stops) */
.main-panel.g-slate-glow::after {
    background: radial-gradient(circle at 0% 0%, rgba(161, 161, 170, 0.12) 0%, rgba(161, 161, 170, 0.03) 30%, rgba(161, 161, 170, 0) 60%);
}
.sidebar-card.g-blue-purple-glow::after {
    background: radial-gradient(circle at 0% 0%, rgba(139, 92, 246, 0.12) 0%, rgba(139, 92, 246, 0.03) 30%, rgba(139, 92, 246, 0) 60%);
}
.sidebar-card.g-gold-glow::after {
    background: radial-gradient(circle at 0% 0%, rgba(245, 158, 11, 0.12) 0%, rgba(245, 158, 11, 0.03) 30%, rgba(245, 158, 11, 0) 60%);
}
.sidebar-card.g-blue-glow::after {
    background: radial-gradient(circle at 0% 0%, rgba(59, 130, 246, 0.14) 0%, rgba(59, 130, 246, 0.03) 30%, rgba(59, 130, 246, 0) 60%);
}

/* Z-Index fix to ensure content is over the background gradient */
.card-top-row, .card-icon, .card-info, .panel-header, .posts-list, .pagination, .sidebar-card > h3, .sidebar-card > div, .sidebar-card > canvas {
    position: relative;
    z-index: 2;
}

/* Card Top Row: Icon on left, Delta Badge on right */
.card-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 38px;
    margin-bottom: 12px;
}

/* Card Icons */
.card-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
    max-width: 38px !important;
    max-height: 38px !important;
    border-radius: 10px;
    flex-shrink: 0;
}

.card-icon svg {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    min-height: 20px !important;
    max-width: 20px !important;
    max-height: 20px !important;
}

.card-icon.blue { background-color: rgba(59, 130, 246, 0.1); color: var(--accent-blue); }
.card-icon.green { background-color: rgba(16, 185, 129, 0.1); color: var(--accent-green); }
.card-icon.yellow { background-color: rgba(245, 158, 11, 0.1); color: var(--accent-yellow); }
.card-icon.purple { background-color: rgba(139, 92, 246, 0.1); color: var(--accent-purple); }
.card-icon.red { background-color: rgba(239, 68, 68, 0.1); color: var(--accent-red); }
.card-icon.orange { background-color: rgba(249, 115, 22, 0.1); color: var(--accent-orange); }
.card-icon.teal { background-color: rgba(45, 212, 191, 0.1); color: #2dd4bf; }

/* Card Info / Body: Full width title, metric, and subtitle */
.card-info {
    width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.card-info h3 {
    margin: 0 0 4px 0;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    padding-right: 0;
}

/* Value */
.card-value {
    font-family: var(--font-mono);
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
    white-space: nowrap;
    margin: 0 0 4px 0;
    width: 100%;
}

.card-value-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Badges (compact, clean pill in top row) */
.card-badge {
    position: static;
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 600;
    padding: 2.5px 8px;
    border-radius: 6px;
    line-height: 1.2;
    white-space: nowrap;
    flex-shrink: 0;
}

.card-badge.badge-yellow {
    background-color: rgba(245, 158, 11, 0.12);
    color: var(--accent-yellow);
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.card-badge.badge-purple {
    background-color: rgba(139, 92, 246, 0.12);
    color: var(--accent-purple);
    border: 1px solid rgba(139, 92, 246, 0.25);
}

.card-badge.badge-red {
    background-color: rgba(239, 68, 68, 0.12);
    color: var(--accent-red);
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.card-badge.badge-teal {
    background-color: rgba(45, 212, 191, 0.12);
    color: #2dd4bf;
    border: 1px solid rgba(45, 212, 191, 0.25);
}

.card-badge.badge-green {
    background-color: rgba(16, 185, 129, 0.12);
    color: var(--accent-green);
    border: 1px solid rgba(16, 185, 129, 0.25);
}

/* SocialCrawl Plan Badge */
.sc-plan-badge {
    display: inline-block;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-green);
    vertical-align: middle;
    margin-left: 6px;
}

/* SocialCrawl Bottom Progress Bar */
.sc-bottom-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.04);
}

.sc-bottom-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-green) 0%, #059669 100%);
    width: 0%;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-max-val {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    margin-left: 4px;
    letter-spacing: 0;
}

.card-trend {
    font-size: 11.5px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
    line-height: 1.2;
}

.text-green { color: var(--accent-green); }
.text-muted { color: var(--text-muted); }
.text-orange { color: var(--accent-orange); }
.text-purple { color: var(--accent-purple); }

/* Progress bar fill colors */
.ratio-fill.bg-green { background: linear-gradient(90deg, #10b981 0%, #059669 100%); }
.ratio-fill.bg-yellow { background: linear-gradient(90deg, #eab308 0%, #ca8a04 100%); }
.ratio-fill.bg-orange { background: linear-gradient(90deg, #f97316 0%, #ea580c 100%); }
.ratio-fill.bg-red { background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%); }
.ratio-fill.bg-muted { background: rgba(148, 163, 184, 0.2); }

/* Dashboard Layout Split */
.dashboard-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
    align-items: start;
    flex-grow: 1;
}

/* Main Panel */
.main-panel {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
}

.panel-header {
    margin-bottom: 24px;
}

.panel-header h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
}

.tabs-container {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.tab-btn {
    background-color: var(--bg-oled);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition-smooth);
}

.tab-btn:hover {
    color: var(--text-primary);
    border-color: var(--text-muted);
}

.tab-btn.active {
    background-color: var(--text-primary);
    color: var(--bg-oled);
    border-color: var(--text-primary);
    font-weight: 600;
}

/* Posts List items */
.posts-list {
    min-height: 400px;
}

.post-item {
    border-bottom: 1px solid var(--border-color);
    padding: 16px 0;
    transition: var(--transition-smooth);
}

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

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 12px;
}

.post-author {
    color: var(--accent-blue);
    font-weight: 600;
    text-decoration: none;
}

.post-author:hover {
    text-decoration: underline;
}

.post-status-badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.post-status-badge.posted { background-color: rgba(16, 185, 129, 0.1); color: var(--accent-green); }
.post-status-badge.posted_cv { background-color: rgba(59, 130, 246, 0.1); color: var(--accent-blue); }
.post-status-badge.queued { background-color: rgba(139, 92, 246, 0.1); color: var(--accent-purple); }
.post-status-badge.queued_cv { background-color: rgba(139, 92, 246, 0.1); color: var(--accent-purple); }
.post-status-badge.skipped { background-color: rgba(245, 158, 11, 0.1); color: var(--accent-yellow); }
.post-status-badge.error { background-color: rgba(239, 68, 68, 0.1); color: var(--accent-red); }

.post-content {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-primary);
    white-space: pre-wrap;
    background-color: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.02);
    border-radius: 6px;
    padding: 12px;
    max-height: 120px;
    overflow-y: auto;
    margin-bottom: 8px;
}

.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: var(--text-muted);
}

.post-link {
    color: var(--text-secondary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

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

.skip-reason-label {
    background-color: rgba(255, 255, 255, 0.05);
    padding: 1px 6px;
    border-radius: 4px;
    color: var(--text-secondary);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.btn-nav {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-nav:hover:not(:disabled) {
    border-color: var(--text-secondary);
    background-color: rgba(255, 255, 255, 0.05);
}

.btn-nav:disabled {
    color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.5;
}

#page-indicator {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Sidebar Panel */
.sidebar-panel {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.sidebar-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
}

.sidebar-card h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 0;
    color: var(--text-primary);
}

.chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.today-stats-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 5px 14px;
    font-family: 'Inter', -apple-system, sans-serif;
}

.today-stat-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.today-stat-col .stat-num {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
}

.today-stat-col .stat-num.pos {
    color: #10b981;
}

.today-stat-col .stat-num.neg {
    color: #ef4444;
}

.today-stat-col .stat-lbl {
    font-size: 10px;
    font-weight: 500;
    line-height: 1.2;
    text-transform: lowercase;
}

.today-stat-col .stat-lbl.pos {
    color: #10b981;
}

.today-stat-col .stat-lbl.neg {
    color: #ef4444;
}

.chart-container {
    position: relative;
    width: 100%;
    height: 180px;
}

/* Funnel bars */
.ratio-bars {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ratio-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ratio-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.ratio-track {
    background-color: var(--bg-oled);
    height: 6px;
    border-radius: 3px;
    width: 100%;
    overflow: hidden;
}

.ratio-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease-out;
}

.analytics-period {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-oled);
    color: var(--text-secondary);
    padding: 5px 8px;
    font: inherit;
    font-size: 11px;
}

.analytics-period:focus-visible {
    outline: 2px solid var(--accent-blue);
    outline-offset: 2px;
}

.keyword-summary {
    margin-bottom: 12px;
    color: var(--text-secondary);
    font-size: 11px;
    line-height: 1.5;
}

.keyword-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    color: var(--text-secondary);
    font-size: 10px;
}

.keyword-state {
    border: 1px solid var(--border-color);
    border-radius: 999px;
    padding: 1px 6px;
    color: var(--text-secondary);
    font-size: 9px;
    text-transform: uppercase;
}

.bg-yellow { background-color: var(--accent-yellow); }
.bg-orange { background-color: var(--accent-orange); }
.bg-red { background-color: var(--accent-red); }

.loading {
    padding: 40px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
}

/* Teal theme for AI Crowd */
.g-teal {
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.08) 0%, rgba(13, 148, 136, 0.03) 100%);
    border: 1px solid rgba(20, 184, 166, 0.2);
}

.g-teal:hover {
    border-color: rgba(20, 184, 166, 0.4);
    box-shadow: 0 0 20px rgba(20, 184, 166, 0.15);
}

.card-icon.teal {
    background: rgba(20, 184, 166, 0.15);
    color: #14b8a6;
}

.badge-teal {
    background: rgba(20, 184, 166, 0.15);
    color: #2dd4bf;
    border: 1px solid rgba(20, 184, 166, 0.3);
}

/* AI Crowd Dashboard UI */
.crowd-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 16px 0;
}

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

.crowd-mini-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.crowd-mini-card h4 {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

.crowd-mini-card .val {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.crowd-table-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    overflow: hidden;
}

.crowd-table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.crowd-table-header h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.crowd-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.crowd-table th {
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-secondary);
    font-weight: 600;
    text-align: left;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
}

.crowd-table td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    vertical-align: middle;
}

.crowd-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.crowd-comment-bubble {
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid rgba(56, 189, 248, 0.18);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 12.5px;
    line-height: 1.4;
    color: #e0f2fe;
}

/* Responsive constraints */
@media (max-width: 1024px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .dashboard-layout {
        grid-template-columns: 1fr;
    }
    
    .sidebar-panel {
        order: -1; /* Place chart on top on mobile */
    }
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .nav-controls {
        width: 100%;
        justify-content: space-between;
    }
    
    .notifications-dropdown {
        right: auto;
        left: 0;
        width: calc(100vw - 48px);
    }
    
    .bento-grid {
        grid-template-columns: 1fr;
    }
    
    .tabs-container {
        max-width: 100%;
    }
}

/* SVG Layout Helper Utilities */
.w-6 {
    width: 24px !important;
}
.h-6 {
    height: 24px !important;
}
.w-8 {
    width: 32px !important;
}
.h-8 {
    height: 32px !important;
}

/* Active Query Badge next to Panel Header H2 */
.active-query-badge {
    font-size: 11px;
    font-weight: 400;
    color: var(--text-muted);
    background-color: rgba(255, 255, 255, 0.05);
    padding: 3px 10px;
    border-radius: 6px;
    margin-left: 12px;
    display: inline-block;
    vertical-align: middle;
    border: 1px solid rgba(255, 255, 255, 0.03);
    transition: background-color 0.2s, color 0.2s;
}

.active-query-badge:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

@media (max-width: 768px) {
    .active-query-badge {
        margin-left: 6px;
        font-size: 10px;
        padding: 2px 6px;
        display: block;
        margin-top: 8px;
        width: fit-content;
    }
}

/* Post Actions and Manual Queue Button */
.post-meta-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.post-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.action-btn-queue {
    background-color: rgba(59, 130, 246, 0.1);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.2);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.action-btn-queue:hover:not(:disabled) {
    background-color: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.4);
    color: #93c5fd;
}

.action-btn-queue:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 10000;
}

.toast {
    background-color: #1e293b;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 12px 20px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    font-size: 13px;
    display: flex;
    align-items: center;
    animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: opacity 0.3s, transform 0.3s;
}

.toast.success {
    border-left: 4px solid var(--accent-green);
}

.toast.error {
    border-left: 4px solid #ef4444;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* --- Hero Dual CTA Buttons --- */
.hero-tg-cta-purple {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #a855f7 0%, #7e22ce 100%);
    color: #ffffff;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.3);
    transition: all 0.2s ease;
}
.hero-tg-cta-purple:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(168, 85, 247, 0.5);
}

/* --- Hero Profession Tag Cloud & Infinite Marquee --- */
.hero-marquee-container {
    width: 100%;
    max-width: 960px;
    margin: 1.75rem auto 0;
    overflow: hidden;
    position: relative;
    mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
    padding: 0.25rem 0;
}

.marquee-track {
    display: flex;
    gap: 0.6rem;
    width: max-content;
    white-space: nowrap;
    margin-bottom: 0.65rem;
    will-change: transform;
}

.hero-tag-cloud {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
    margin-top: 1.75rem;
}
.cloud-tag {
    background: #18181b;
    color: #e4e4e7;
    border: 1px solid #27272a;
    padding: 0.4rem 0.9rem;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    flex-shrink: 0;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.cloud-tag:hover {
    background: rgba(56, 189, 248, 0.12);
    border-color: #38bdf8;
    color: #38bdf8;
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.2);
}

/* --- FAQ Accordion Smooth Expansion & Arrow Animation --- */
.faq-item {
    background: #121214;
    border: 1px solid #27272a;
    border-radius: 14px;
    padding: 1.25rem;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}
.faq-item:hover {
    border-color: #3f3f46;
    background: #18181b;
}
.faq-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: #f4f4f5;
    font-size: 1.05rem;
    list-style: none;
    user-select: none;
    cursor: pointer;
}
.faq-summary::-webkit-details-marker {
    display: none;
}
.faq-arrow {
    width: 20px;
    height: 20px;
    color: #71717a;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s ease;
    flex-shrink: 0;
    margin-left: 0.75rem;
}
.faq-item[open] .faq-arrow {
    transform: rotate(180deg);
    color: #38bdf8;
}

/* CSS Grid Smooth Height Expansion */
.faq-answer-wrapper {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.faq-item[open] .faq-answer-wrapper {
    grid-template-rows: 1fr;
}
.faq-answer-inner {
    overflow: hidden;
}
.faq-answer {
    color: #a1a1aa;
    font-size: 0.95rem;
    line-height: 1.6;
    padding-top: 0.85rem;
}

/* --- Inline Telegram Links (High Contrast & Pointer Cursor) --- */
.tg-inline-link {
    cursor: pointer !important;
    text-decoration: underline !important;
    text-underline-offset: 3px;
    font-weight: 600 !important;
    display: inline-flex;
    align-items: center;
    transition: all 0.2s ease;
}

/* --- High Contrast Tag Chips & Hashtag Badges --- */
.tag-chip,
.job-tags a,
a.tag-chip {
    color: #38bdf8 !important; /* Sky Blue */
    background: rgba(56, 189, 248, 0.12) !important;
    border: 1px solid rgba(56, 189, 248, 0.28) !important;
    padding: 0.22rem 0.65rem !important;
    border-radius: 9999px !important;
    font-size: 0.85rem !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    margin-right: 0.4rem !important;
    margin-top: 0.4rem !important;
    margin-bottom: 0.4rem !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
}

.tag-chip:hover,
.job-tags a:hover,
a.tag-chip:hover {
    color: #ffffff !important;
    background: rgba(56, 189, 248, 0.3) !important;
    border-color: #38bdf8 !important;
    box-shadow: 0 2px 10px rgba(56, 189, 248, 0.3) !important;
    transform: translateY(-1px) !important;
}
.tg-inline-link.link-blue {
    color: #38bdf8 !important;
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.25);
}
.tg-inline-link.link-blue:hover {
    color: #ffffff !important;
    background: #0088cc !important;
    border-color: #0088cc !important;
    box-shadow: 0 4px 15px rgba(0, 136, 204, 0.5);
    text-decoration: none !important;
    transform: translateY(-1px);
}

.tg-inline-link.link-purple {
    color: #c084fc !important;
    background: rgba(192, 132, 252, 0.12);
    border: 1px solid rgba(192, 132, 252, 0.25);
}
.tg-inline-link.link-purple:hover {
    color: #ffffff !important;
    background: #a855f7 !important;
    border-color: #a855f7 !important;
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.5);
    text-decoration: none !important;
    transform: translateY(-1px);
}

/* --- Discreet Header Links --- */
.nav-link-subtle {
    color: #71717a;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease, text-shadow 0.2s ease;
}
.nav-link-subtle.blue:hover {
    color: #38bdf8;
    text-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}
.nav-link-subtle.purple:hover {
    color: #c084fc;
    text-shadow: 0 0 10px rgba(192, 132, 252, 0.4);
}

/* --- Glassmorphism Category Card & Badge --- */
.category-glass-card {
    background: rgba(18, 18, 20, 0.7);
    border: 1px solid rgba(56, 189, 248, 0.25);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 16px;
    padding: 1.25rem 1.75rem;
    max-width: 720px;
    margin: 1.25rem auto 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    text-align: center;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-glass-card:hover {
    border-color: rgba(56, 189, 248, 0.4);
}

.category-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.3);
    color: #38bdf8;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.3rem 0.85rem;
    border-radius: 9999px;
    margin-bottom: 0.75rem;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 10px #10b981;
    animation: pulse 2s infinite;
}

.category-intro-text {
    color: #d4d4d8;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

/* --- Mobile UI/UX Optimization (@media max-width: 640px) --- */
@media (max-width: 640px) {
    /* Header layout & Centered Controls */
    .public-header, header.navbar {
        padding: 0.85rem 1rem !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        gap: 0.5rem !important;
    }
    .brand {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
    }
    .nav-controls {
        width: 100% !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 0.75rem !important;
    }
    .nav-link-subtle {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        font-size: 0.9rem !important;
    }

    /* Hero Typography */
    .public-hero {
        padding: 1.75rem 1rem 1.25rem !important;
    }
    .public-hero h1 {
        font-size: 1.65rem !important;
        line-height: 1.25 !important;
        margin-bottom: 0.6rem !important;
    }
    .public-hero p {
        font-size: 0.95rem !important;
        line-height: 1.5 !important;
        margin-bottom: 1.25rem !important;
    }

    /* Hero CTA Buttons on Mobile */
    .hero-tg-cta, .hero-tg-cta-purple {
        width: 100% !important;
        justify-content: center !important;
        min-height: 44px !important;
        font-size: 0.95rem !important;
        font-weight: 600 !important;
        white-space: nowrap !important;
        padding: 0.75rem 1rem !important;
    }

    /* Job Card Footer Stack on Mobile */
    .job-card-footer {
        flex-direction: column-reverse !important;
        align-items: stretch !important;
        gap: 0.75rem !important;
        padding-top: 0.85rem !important;
    }
    .job-card-footer a:not(.cta-tg-btn) {
        text-align: center !important;
        font-size: 0.9rem !important;
        white-space: nowrap !important;
    }
    .cta-tg-btn {
        width: 100% !important;
        justify-content: center !important;
        min-height: 44px !important;
        font-size: 0.95rem !important;
        font-weight: 600 !important;
        white-space: nowrap !important;
        padding: 0.75rem 1rem !important;
    }

    /* Safe Area Padding for Mobile Footers */
    footer, .public-footer {
        padding-bottom: max(3rem, env(safe-area-inset-bottom)) !important;
        text-align: center !important;
        font-size: 0.85rem !important;
    }

    /* Job Detail Page Mobile Optimization & Typography */
    .detail-card {
        padding: 1.25rem 1rem !important;
        gap: 1rem !important;
        border-radius: 16px !important;
    }
    .detail-title {
        font-size: 1.25rem !important; /* 20px instead of 24px */
        line-height: 1.35 !important;
    }
    .detail-content {
        font-size: 0.95rem !important; /* 15px instead of 17px */
        line-height: 1.6 !important;
    }
    .breadcrumbs {
        display: flex !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
        font-size: 0.85rem !important;
        padding-bottom: 0.35rem !important;
        -webkit-overflow-scrolling: touch;
    }
    .breadcrumbs::-webkit-scrollbar {
        display: none;
    }
    .detail-cta-box {
        padding: 1.25rem 0.85rem !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .detail-cta-box h3 {
        font-size: 1.05rem !important;
    }
    .detail-cta-box p {
        font-size: 0.88rem !important;
    }
    .btn-tg-primary {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0.5rem !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding: 0.8rem 0.75rem !important;
        font-size: 0.92rem !important;
        font-weight: 600 !important;
        white-space: nowrap !important;
        text-align: center !important;
        border-radius: 12px !important;
    }
    .job-detail-card, .detail-card {
        margin-bottom: 3.5rem !important;
    }
}

/* Mobile Responsive Navbar & Crowd Controls */
@media (max-width: 768px) {
    .navbar {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 12px !important;
        margin-bottom: 20px !important;
        padding-bottom: 16px !important;
    }
    
    .brand {
        flex: 1 1 auto !important;
        order: 1 !important;
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
    }

    .brand h1 {
        font-size: 17px !important;
        font-weight: 700 !important;
        letter-spacing: -0.02em !important;
        margin: 0 !important;
        white-space: nowrap !important;
    }

    .nav-controls {
        width: 100% !important;
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        justify-content: flex-end !important;
        gap: 8px !important;
        order: 2 !important;
    }

    .notifications-wrapper {
        order: 1 !important;
        margin-left: auto !important;
        margin-right: 0 !important;
        position: relative !important;
    }

    .btn-text-logout {
        order: 2 !important;
        background: transparent !important;
        border: none !important;
        color: var(--text-secondary) !important;
        font-size: 13px !important;
        font-weight: 500 !important;
        padding: 4px 6px !important;
        cursor: pointer !important;
        white-space: nowrap !important;
    }

    .notifications-dropdown {
        right: 0 !important;
        left: auto !important;
        max-width: calc(100vw - 32px) !important;
        width: 320px !important;
    }
    
    .nav-controls .btn-outline,
    .nav-controls > a.btn-outline,
    .nav-controls > button.btn-outline {
        order: 3 !important;
        flex: 1 1 calc(50% - 4px) !important;
        white-space: nowrap !important;
        padding: 8px 6px !important;
        font-size: 12px !important;
        min-height: 40px !important;
        height: auto !important;
        box-sizing: border-box !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        line-height: 1.2 !important;
    }
    
    .bento-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .crowd-table-wrapper {
        border-radius: 12px !important;
    }

    .crowd-table-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 8px !important;
        padding: 12px 16px !important;
    }

    .crowd-table-header h3 {
        font-size: 15px !important;
    }
}

/* Desktop Navbar Horizontal Layout */
@media (min-width: 769px) {
    .navbar {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
    }
    
    .navbar-top-bar {
        width: auto !important;
        display: flex !important;
        align-items: center !important;
        gap: 20px !important;
    }
    
    .nav-controls {
        display: flex !important;
        align-items: center !important;
        gap: 12px !important;
        width: auto !important;
    }
}
