/* Google Font Import */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    --bg-dark: #080710;
    --sidebar-bg: #090717;
    --card-bg: rgba(18, 16, 50, 0.45);
    --border-color: rgba(255, 255, 255, 0.04);
    --primary-gradient: linear-gradient(135deg, #a855f7 0%, #6366f1 100%);
    --accent-color: #a855f7;
    --accent-glow: 0 0 20px rgba(168, 85, 247, 0.25);
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --text-main: #f8fafc;
    --text-muted: #7c7796;
    --text-light: #9ca3af;
    --scrollbar-bg: rgba(255, 255, 255, 0.02);
    --scrollbar-thumb: rgba(168, 85, 247, 0.2);
}

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

body {
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(at 0% 0%, rgba(168, 85, 247, 0.08) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(99, 102, 241, 0.06) 0px, transparent 50%);
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--scrollbar-bg);
}
::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(168, 85, 247, 0.4);
}

/* Sidebar Layout */
.sidebar {
    width: 240px;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    padding: 24px 18px;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
    padding-left: 6px;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: var(--primary-gradient);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    color: white;
    box-shadow: var(--accent-glow);
}

.logo-text {
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: 0.5px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.platform-selector-container {
    margin-bottom: 24px;
    padding: 0 4px;
}

.platform-selector {
    display: flex;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 3px;
    gap: 2px;
}

.platform-btn {
    flex: 1;
    padding: 6px 2px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: center;
}

.platform-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.02);
}

.platform-btn.active {
    color: white;
    background: var(--primary-gradient);
    box-shadow: 0 2px 8px rgba(168, 85, 247, 0.2);
}

.nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-grow: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    color: var(--text-muted);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.02);
}

.nav-item.active {
    color: white;
    background: rgba(168, 85, 247, 0.15);
    border-left: 3px solid var(--accent-color);
    border-radius: 4px 8px 8px 4px;
}

.nav-item svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

.nav-item.sub-item {
    padding: 8px 14px 8px 36px;
    font-size: 0.82rem;
    border-left: none !important;
}

.nav-item.sub-item.active {
    color: white;
    background: rgba(255, 255, 255, 0.03);
    font-weight: 600;
}

.sub-menu-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sub-menu-list.open {
    max-height: 150px;
}

.nav-item-chevron {
    margin-left: auto;
    transition: transform 0.3s ease;
}

.nav-item.open .nav-item-chevron {
    transform: rotate(90deg);
}

.sidebar-footer {
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Main Content Area */
.main-content {
    margin-left: 240px;
    flex-grow: 1;
    padding: 12px 32px 8px 32px; /* Reduced vertical padding to gain screen space */
    width: calc(100% - 240px);
    display: flex;
    flex-direction: column;
}

/* Top Header Bar */
.header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding: 8px 12px;
}

.search-container {
    position: relative;
    width: 320px;
}

.search-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 36px 8px 12px;
    color: var(--text-main);
    font-size: 0.85rem;
    outline: none;
    transition: all 0.25s ease;
}

.search-input:focus {
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.04);
}

.search-shortcut {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.7rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 5px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    font-family: inherit;
}

.header-widgets {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-widget-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
}

.header-widget-item.badge-stat {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: var(--success-color);
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 600;
}

.header-widget-item.badge-status {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 600;
}

.widget-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
}

.widget-status-dot.active {
    background: var(--success-color);
    box-shadow: 0 0 8px var(--success-color);
    animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
    0% { opacity: 1; }
    50% { opacity: 0.4; }
    100% { opacity: 1; }
}

.notification-bell {
    position: relative;
    cursor: pointer;
    color: var(--text-light);
    display: flex;
    align-items: center;
}

.notification-bell svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--danger-color);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-profile-widget {
    display: flex;
    align-items: center;
    gap: 10px;
    border-left: 1px solid var(--border-color);
    padding-left: 20px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border-color);
}

.user-info-text {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 0.85rem;
    font-weight: 600;
}

.user-plan {
    font-size: 0.72rem;
    color: var(--accent-color);
    font-weight: 500;
}

/* Panels System */
.panel {
    display: none;
}

.panel.active {
    display: block;
    animation: page-fade-in 0.4s ease;
}

@keyframes page-fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Split Dashboard Grid */
.dashboard-workspace-grid {
    display: flex;
    gap: 20px;
    margin-bottom: 12px; /* Reduced to gain vertical space */
}

.workspace-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.workspace-right {
    width: 380px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 16px; /* Reduced vertical gap */
}

/* macOS Window Mock - Live Browser Stream */
.browser-window-mock {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 12px 40px rgba(0,0,0,0.5);
    backdrop-filter: blur(20px);
}

.browser-header-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.01);
    border-bottom: 1px solid var(--border-color);
}

.browser-dots {
    display: flex;
    gap: 6px;
}

.browser-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.browser-dot.red { background: #ff5f56; }
.browser-dot.yellow { background: #ffbd2e; }
.browser-dot.green { background: #27c93f; }

.browser-address-container {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.browser-address-bar {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 6px 12px;
    color: var(--text-muted);
    font-size: 0.78rem;
    text-align: center;
    font-family: inherit;
    pointer-events: none;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

.browser-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
}

.browser-header-actions svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.browser-view-viewport {
    width: 100%;
    height: 395px; /* Increased to 395px to fit the wider 100% width layout gracefully */
    background: #0a0a12;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.browser-screenshot-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.browser-watermark {
    position: absolute;
    bottom: 12px;
    right: 16px;
    font-size: 0.7rem;
    color: rgba(255,255,255,0.15);
    font-weight: 600;
    letter-spacing: 2px;
}

/* Browser Progress/Status Info Bar */
.browser-status-infobar {
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.01);
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.status-infobar-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
}

.status-infobar-job {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-main);
    font-weight: 500;
}

.status-infobar-icon {
    width: 22px;
    height: 22px;
    background: rgba(168, 85, 247, 0.1);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
}

.status-infobar-progress-text {
    color: var(--text-muted);
}

.status-progress-track {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    overflow: hidden;
}

.status-progress-fill {
    width: 0%;
    height: 100%;
    background: var(--primary-gradient);
    border-radius: 10px;
    transition: width 0.4s ease;
}

/* Horizontal Bottom Stats Grid */
.bottom-stats-horizontal-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}

.horizontal-stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.horizontal-stat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.horizontal-stat-icon-wrapper {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.02);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
}

.horizontal-stat-title {
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.horizontal-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.1;
}

.horizontal-stat-footer {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 500;
}

.stat-trend-up {
    color: var(--success-color);
}

.stat-trend-down {
    color: var(--danger-color);
}

.stat-trend-label {
    color: var(--text-muted);
}

/* Right Section Cards - AI Activity Feed */
.activity-feed-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    backdrop-filter: blur(20px);
    flex-grow: 1;
}

.activity-feed-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.activity-feed-title {
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.activity-feed-dot {
    width: 6px;
    height: 6px;
    background: var(--success-color);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--success-color);
}

.activity-feed-timeline {
    display: flex;
    flex-direction: column;
    gap: 18px;
    position: relative;
    padding-left: 20px;
    overflow-y: auto;
    max-height: 310px;
}

.activity-feed-timeline::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 6px;
    bottom: 6px;
    width: 1px;
    background: rgba(255, 255, 255, 0.05);
}

.timeline-event {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-left: 24px;
}

.timeline-event-icon-wrapper {
    position: absolute;
    left: -20px;
    top: 2px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-dark);
}

.timeline-event-icon-wrapper.applied {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success-color);
}

.timeline-event-icon-wrapper.optimized {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.timeline-event-icon-wrapper.skipped {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning-color);
}

.timeline-event-icon-wrapper.detected {
    background: rgba(168, 85, 247, 0.15);
    color: var(--accent-color);
}

.timeline-event-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.timeline-event-title {
    font-size: 0.82rem;
    font-weight: 600;
}

.timeline-event-time {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.timeline-event-detail {
    font-size: 0.76rem;
    color: var(--text-light);
}

.activity-feed-viewall-btn {
    text-align: center;
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
}

.activity-feed-viewall-btn a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    transition: color 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.activity-feed-viewall-btn a:hover {
    color: white;
}

/* Control Actions Widgets */
.controls-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-control-pause {
    background: linear-gradient(135deg, #a855f7 0%, #6366f1 100%) !important;
    color: white !important;
    border: none !important;
    box-shadow: 0 4px 20px rgba(168, 85, 247, 0.3) !important;
    padding: 12px 20px;
    border-radius: 12px;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-control-pause:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(168, 85, 247, 0.5) !important;
}

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

.btn-control-stop {
    background: rgba(239, 68, 68, 0.05) !important;
    border: 1px solid rgba(239, 68, 68, 0.25) !important;
    color: #ef4444 !important;
    padding: 12px 20px;
    border-radius: 12px;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-control-stop:hover {
    background: rgba(239, 68, 68, 0.15) !important;
    border-color: #ef4444 !important;
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.2) !important;
    transform: translateY(-2px);
}

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


/* Premium plan badge card */
.premium-plan-card {
    background: radial-gradient(circle at 100% 0%, rgba(168, 85, 247, 0.15) 0%, transparent 70%);
    border: 1px solid rgba(168, 85, 247, 0.15);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.premium-plan-icon {
    font-size: 1.3rem;
    color: var(--warning-color);
}

.premium-plan-title {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.premium-plan-desc {
    font-size: 0.76rem;
    color: var(--text-light);
}

.btn-premium-manage {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.25s ease;
    text-decoration: none;
    display: inline-block;
    margin-top: 4px;
}

.btn-premium-manage:hover {
    background: rgba(255, 255, 255, 0.06);
}

/* Standard Generic Cards (Form tabs, Tables) */
.table-card, .console-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th {
    padding: 14px 16px;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--border-color);
}

td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
    font-size: 0.88rem;
}

tr:hover td {
    background: rgba(255, 255, 255, 0.01);
}

.badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
}

.badge-success {
    background: rgba(16, 185, 129, 0.08);
    color: var(--success-color);
    border: 1px solid rgba(16, 185, 129, 0.15);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.08);
    color: var(--warning-color);
    border: 1px solid rgba(245, 158, 11, 0.15);
}

a.table-link {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
}

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

/* Config / Profile Form */
.tab-container {
    display: flex;
    gap: 10px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.tab-btn {
    padding: 8px 16px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: inherit;
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.25s ease;
}

.tab-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.02);
}

.tab-btn.active {
    color: white;
    background: rgba(168, 85, 247, 0.1);
    border: 1px solid rgba(168, 85, 247, 0.2);
}

.form-section {
    display: none;
}

.form-section.active {
    display: flex;
    flex-direction: column;
    gap: 18px;
    animation: page-fade-in 0.3s ease;
    padding-top: 10px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
}

input[type="text"],
input[type="password"],
input[type="number"],
select,
textarea {
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 14px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.88rem;
    outline: none;
    transition: all 0.25s ease;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.1);
    background: rgba(255, 255, 255, 0.03);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.85rem;
}

.checkbox-group input {
    width: 16px;
    height: 16px;
    accent-color: var(--accent-color);
}

.btn {
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.25s ease;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 25px rgba(168, 85, 247, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.06);
}

/* Console Log View Terminal */
.console-output {
    background: #020306;
    border: 1px solid rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    padding: 18px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82rem;
    color: #a7f3d0;
    height: 420px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-all;
    line-height: 1.5;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.7);
}

/* Toast */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--primary-gradient);
    color: white;
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 600;
    box-shadow: var(--accent-glow);
    display: none;
    z-index: 1000;
    animation: slide-up 0.3s ease;
    font-size: 0.85rem;
}

@keyframes slide-up {
    from { transform: translateY(80px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.resume-upload-card {
    background: rgba(255, 255, 255, 0.005);
    border: 1px dashed var(--border-color);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.25s ease;
}

.resume-upload-card:hover {
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.015);
}

.keyword-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 600;
    margin-right: 4px;
    margin-bottom: 4px;
    border: 1px solid transparent;
}

.keyword-badge.match {
    background: rgba(16, 185, 129, 0.06);
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.15);
}

.keyword-badge.missing {
    background: rgba(245, 158, 11, 0.06);
    color: #f59e0b;
    border-color: rgba(245, 158, 11, 0.15);
}

.spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--text-main);
    animation: spin 0.8s linear infinite;
}

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

/* Stepper Layout */
.stepper-step {
    display: flex;
    gap: 16px;
    position: relative;
    opacity: 0.45;
    transition: all 0.4s ease;
    margin-bottom: 24px;
}

.stepper-step:last-child {
    margin-bottom: 0;
}

.stepper-step.active {
    opacity: 1;
}

.stepper-step.completed {
    opacity: 1;
}

.stepper-icon-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.stepper-icon-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all 0.4s ease;
}

.stepper-icon-circle svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
}

.stepper-line {
    width: 2px;
    height: 60px;
    background: rgba(255, 255, 255, 0.05);
    margin-top: 8px;
    transition: all 0.4s ease;
}

.stepper-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-top: 4px;
}

.stepper-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-muted);
    transition: all 0.4s ease;
}

.stepper-detail {
    font-size: 0.78rem;
    color: var(--text-light);
    line-height: 1.4;
}

/* Stepper Active/Completed States */
.stepper-step.active .stepper-icon-circle {
    border-color: var(--accent-color);
    background: rgba(168, 85, 247, 0.15);
    color: var(--accent-color);
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.35);
    animation: stepPulse 1.8s infinite;
}

@keyframes stepPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.stepper-step.active .stepper-title {
    color: var(--text-main);
}

.stepper-step.completed .stepper-icon-circle {
    border-color: var(--success-color);
    background: rgba(16, 185, 129, 0.15);
    color: var(--success-color);
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.25);
}

.stepper-step.completed .stepper-title {
    color: var(--success-color);
}

.stepper-step.completed .stepper-line {
    background: var(--success-color);
}

/* Horizontal Stepper styles */
.activity-feed-timeline-horizontal {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 12px 20px;
    border-radius: 12px;
    margin-bottom: 16px;
    backdrop-filter: blur(10px);
}

.activity-feed-timeline-horizontal .stepper-step {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    opacity: 0.45;
    transition: all 0.4s ease;
    margin-bottom: 0 !important;
}

.activity-feed-timeline-horizontal .stepper-step.active,
.activity-feed-timeline-horizontal .stepper-step.completed {
    opacity: 1;
}

.activity-feed-timeline-horizontal .stepper-icon-circle {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 0.76rem;
    flex-shrink: 0;
    transition: all 0.4s ease;
}

.activity-feed-timeline-horizontal .stepper-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-top: 0;
    min-width: 0;
}

.activity-feed-timeline-horizontal .stepper-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    white-space: nowrap;
    transition: all 0.4s ease;
}

.activity-feed-timeline-horizontal .stepper-detail {
    font-size: 0.68rem;
    color: var(--text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
    line-height: 1.2;
}

/* Active State H */
.activity-feed-timeline-horizontal .stepper-step.active .stepper-icon-circle {
    border-color: var(--accent-color);
    background: rgba(168, 85, 247, 0.15);
    color: var(--accent-color);
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.25);
    animation: stepPulse 1.8s infinite;
}

.activity-feed-timeline-horizontal .stepper-step.active .stepper-title {
    color: var(--text-main);
}

/* Completed State H */
.activity-feed-timeline-horizontal .stepper-step.completed .stepper-icon-circle {
    border-color: var(--success-color);
    background: rgba(16, 185, 129, 0.15);
    color: var(--success-color);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.activity-feed-timeline-horizontal .stepper-step.completed .stepper-title {
    color: var(--success-color);
}

/* Connector line horizontal green active styling */
.activity-feed-timeline-horizontal .stepper-line-h {
    height: 2px;
    background: rgba(255, 255, 255, 0.05);
    flex: 0.5;
    margin: 0 12px;
    min-width: 15px;
    transition: all 0.4s ease;
}

.activity-feed-timeline-horizontal .stepper-line-h.active {
    background: var(--success-color);
    box-shadow: 0 0 6px var(--success-color);
}

.portal-card:hover {
    transform: translateY(-4px);
    border-color: rgba(168, 85, 247, 0.3) !important;
    box-shadow: 0 12px 40px rgba(168, 85, 247, 0.15) !important;
    opacity: 1 !important;
}
