/* ═══════════════════════════════════════════════════
   AgentMesh Dashboard — Premium Dark Theme
   ═══════════════════════════════════════════════════ */

:root {
    --bg-primary: #030712;
    --bg-secondary: #0f172a;
    --bg-card: rgba(15, 23, 42, 0.4);
    --bg-card-hover: rgba(30, 41, 59, 0.6);
    --bg-glass: rgba(255, 255, 255, 0.05);
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #475569;
    --accent-teal: #14b8a6;
    --accent-blue: #3b82f6;
    --accent-purple: #8b5cf6;
    --accent-amber: #fbbf24;
    --accent-red: #ef4444;
    --accent-green: #10b981;
    --gradient-primary: linear-gradient(135deg, #14b8a6, #3b82f6);
    --gradient-purple: linear-gradient(135deg, #8b5cf6, #ec4899);
    --gradient-warm: linear-gradient(135deg, #f59e0b, #ef4444);
    --radius: 16px;
    --radius-sm: 10px;
    --radius-lg: 20px;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 40px rgba(59, 130, 246, 0.2);
    --font: 'Inter', system-ui, -apple-system, sans-serif;
    --mono: 'JetBrains Mono', 'Fira Code', monospace;
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

/* ─── Animated Mesh Background ─── */
.mesh-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    background: radial-gradient(circle at 50% 0%, rgba(30, 41, 59, 1) 0%, rgba(3, 7, 18, 1) 100%);
}

.mesh-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        radial-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 40px 40px, 80px 80px;
    background-position: 0 0, 20px 20px;
    opacity: 0.3;
}

.mesh-dot {
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.08) 0%, transparent 60%);
    animation: float 20s ease-in-out infinite alternate;
    animation-delay: var(--delay);
    filter: blur(40px);
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1) rotate(0deg);
    }

    50% {
        transform: translate(40px, -60px) scale(1.2) rotate(180deg);
    }

    100% {
        transform: translate(-30px, 30px) scale(0.9) rotate(360deg);
    }
}

/* ─── Header ─── */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 32px;
    background: rgba(10, 14, 23, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    display: flex;
    animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {

    0%,
    100% {
        filter: drop-shadow(0 0 8px rgba(6, 214, 160, 0.3));
    }

    50% {
        filter: drop-shadow(0 0 16px rgba(6, 214, 160, 0.6));
    }
}

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

.header-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    background: rgba(139, 92, 246, 0.15);
    color: var(--accent-purple);
    border: 1px solid rgba(139, 92, 246, 0.25);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-amber);
    animation: blink 1.5s ease-in-out infinite;
}

.status-dot.online {
    background: var(--accent-green);
    animation: none;
}

.status-dot.offline {
    background: var(--accent-red);
    animation: none;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

/* ─── Stats Bar ─── */
.stats-bar {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 12px;
    padding: 20px 32px;
    overflow-x: auto;
}

.stat-card {
    flex: 1;
    min-width: 140px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: var(--transition);
}

.stat-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

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

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 22px;
    font-weight: 700;
    font-family: var(--mono);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

/* ─── Tabs ─── */
.tabs {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 4px;
    padding: 0 32px;
    border-bottom: 1px solid var(--border);
}

.tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
}

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

.tab.active {
    color: var(--accent-teal);
    border-bottom-color: var(--accent-teal);
}

.tab svg {
    opacity: 0.6;
}

.tab.active svg {
    opacity: 1;
}

/* ─── Main Content ─── */
.content {
    position: relative;
    z-index: 1;
    padding: 24px 32px 48px;
}

.panel {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-bottom: 32px;
    box-shadow: var(--shadow);
    animation: fadeIn 0.5s var(--transition);
    position: relative;
    overflow: hidden;
}

.panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, transparent 100%);
    pointer-events: none;
}

.panel.hidden {
    display: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.panel-header h2 {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

/* ─── Buttons ─── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

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

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(6, 214, 160, 0.3);
}

.btn-secondary {
    background: var(--bg-glass);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 12px;
    border-radius: 6px;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

.btn-execute {
    background: var(--gradient-purple);
    color: #fff;
}

.btn-execute:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.3);
}

.btn-bid {
    background: rgba(6, 214, 160, 0.1);
    color: var(--accent-teal);
    border: 1px solid rgba(6, 214, 160, 0.25);
}

.btn-bid:hover {
    background: rgba(6, 214, 160, 0.2);
}

.btn-wallet {
    background: rgba(153, 69, 255, 0.15);
    /* Solana Purple Hue */
    border: 1px solid rgba(153, 69, 255, 0.3);
    color: #e0e0e0;
}

.btn-wallet:hover {
    background: rgba(153, 69, 255, 0.3);
    border-color: rgba(153, 69, 255, 0.6);
    box-shadow: 0 4px 15px rgba(153, 69, 255, 0.4);
}

.btn-wallet.connected {
    background: rgba(20, 241, 149, 0.1);
    border-color: rgba(20, 241, 149, 0.3);
    color: var(--solana-green, #14f195);
}

.btn-wallet.connected:hover {
    background: rgba(20, 241, 149, 0.2);
    box-shadow: 0 4px 15px rgba(20, 241, 149, 0.2);
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
}

/* ─── Search ─── */
.search-bar {
    margin-bottom: 16px;
}

.input-search {
    width: 100%;
    max-width: 400px;
    padding: 10px 16px;
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 14px;
    transition: var(--transition);
}

.input-search:focus {
    outline: none;
    border-color: var(--accent-teal);
    box-shadow: 0 0 0 3px rgba(6, 214, 160, 0.1);
}

.input-search::placeholder {
    color: var(--text-muted);
}

/* ─── Table ─── */
.table-wrap {
    overflow-x: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg-card);
    backdrop-filter: blur(10px);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.2);
}

.data-table td {
    padding: 14px 16px;
    font-size: 14px;
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:hover td {
    background: rgba(6, 214, 160, 0.03);
}

.agent-name {
    font-weight: 600;
    color: var(--text-primary);
}

.capability-badge {
    display: inline-block;
    padding: 3px 8px;
    margin: 2px 4px 2px 0;
    font-size: 11px;
    font-weight: 500;
    border-radius: 4px;
    background: rgba(6, 214, 160, 0.1);
    color: var(--accent-teal);
    border: 1px solid rgba(6, 214, 160, 0.15);
}

.wallet-addr {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.wallet-addr:hover {
    color: var(--accent-blue);
}

.reputation-bar {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rep-track {
    width: 60px;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.rep-fill {
    height: 100%;
    border-radius: 3px;
    background: var(--gradient-primary);
    transition: width 0.5s ease;
}

.rep-score {
    font-size: 13px;
    font-family: var(--mono);
    color: var(--text-secondary);
}

/* ─── Auction Cards ─── */
.auction-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--bg-glass);
    color: var(--text-muted);
    font-family: var(--font);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover {
    color: var(--text-secondary);
    border-color: var(--border-hover);
}

.filter-btn.active {
    background: rgba(6, 214, 160, 0.1);
    color: var(--accent-teal);
    border-color: rgba(6, 214, 160, 0.3);
}

.auction-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 16px;
}

.auction-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.auction-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}

.auction-card.status-open::before {
    background: var(--gradient-primary);
}

.auction-card.status-awarded::before {
    background: var(--gradient-purple);
}

.auction-card.status-expired::before {
    background: var(--gradient-warm);
}

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

.auction-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.auction-task {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
    margin-right: 12px;
}

.auction-status {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.status-open {
    background: rgba(34, 197, 94, 0.1);
    color: var(--accent-green);
}

.status-awarded {
    background: rgba(139, 92, 246, 0.1);
    color: var(--accent-purple);
}

.status-expired {
    background: rgba(239, 68, 68, 0.1);
    color: var(--accent-red);
}

.auction-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 16px;
}

.meta-item {
    font-size: 13px;
    color: var(--text-secondary);
}

.meta-item strong {
    font-family: var(--mono);
    color: var(--text-primary);
    font-size: 14px;
}

.meta-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Countdown */
.countdown-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.countdown-bar {
    flex: 1;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.countdown-fill {
    height: 100%;
    border-radius: 2px;
    background: var(--gradient-primary);
    transition: width 1s linear;
}

.countdown-text {
    font-family: var(--mono);
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-teal);
    min-width: 40px;
    text-align: right;
}

.countdown-text.urgent {
    color: var(--accent-red);
}

/* Bids */
.bids-section {
    margin-top: 12px;
    border-top: 1px solid var(--border);
    padding-top: 12px;
}

.bids-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 8px;
}

.bid-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 4px;
    background: var(--bg-glass);
    transition: var(--transition);
}

.bid-row.winner {
    background: rgba(6, 214, 160, 0.1);
    border: 1px solid rgba(6, 214, 160, 0.2);
}

.bid-agent {
    font-weight: 500;
    color: var(--text-primary);
}

.bid-price {
    font-family: var(--mono);
    font-weight: 600;
    color: var(--accent-teal);
}

.winner-badge {
    font-size: 10px;
    padding: 2px 6px;
    background: var(--gradient-primary);
    color: #fff;
    border-radius: 4px;
    font-weight: 700;
    margin-left: 8px;
}

.auction-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.no-bids {
    font-size: 13px;
    color: var(--text-muted);
    font-style: italic;
}

/* ─── Jobs ─── */
.sub-section {
    margin-bottom: 32px;
}

.sub-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-secondary);
}

.job-ready-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 12px;
}

.ready-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.ready-card:hover {
    border-color: rgba(139, 92, 246, 0.3);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.1);
}

.ready-info h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.ready-info p {
    font-size: 12px;
    color: var(--text-muted);
}

.ready-info .winner-name {
    color: var(--accent-teal);
    font-weight: 500;
}

.jobs-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.job-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
    transition: var(--transition);
    animation: fadeIn 0.3s ease;
}

.job-card:hover {
    border-color: var(--border-hover);
}

.job-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.job-task {
    font-weight: 600;
    font-size: 14px;
}

.job-status {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.job-status.pending {
    background: rgba(245, 158, 11, 0.1);
    color: var(--accent-amber);
}

.job-status.completed {
    background: rgba(34, 197, 94, 0.1);
    color: var(--accent-green);
}

.job-status.paid {
    background: rgba(139, 92, 246, 0.1);
    color: var(--accent-purple);
}

.job-status.failed {
    background: rgba(239, 68, 68, 0.1);
    color: var(--accent-red);
}

.job-details {
    display: flex;
    gap: 24px;
    font-size: 13px;
    color: var(--text-secondary);
    flex-wrap: wrap;
}

.job-details span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.job-result {
    margin-top: 12px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-sm);
    font-family: var(--mono);
    font-size: 12px;
    color: var(--text-secondary);
    white-space: pre-wrap;
    max-height: 200px;
    overflow-y: auto;
}

.job-payment {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.job-payment a {
    color: var(--accent-blue);
    text-decoration: none;
    font-family: var(--mono);
    font-size: 12px;
}

.job-payment a:hover {
    text-decoration: underline;
}

.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
    font-size: 14px;
}

.empty-state .empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

/* ─── Modals ─── */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    animation: fadeIn 0.2s ease;
}

.modal-overlay.hidden {
    display: none;
}

.modal {
    width: 90%;
    max-width: 480px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4);
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.modal-header h3 {
    font-size: 18px;
    font-weight: 700;
}

.modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: var(--bg-glass);
    color: var(--text-muted);
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: var(--transition);
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.hint {
    font-weight: 400;
    color: var(--text-muted);
    font-size: 12px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 14px;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent-teal);
    box-shadow: 0 0 0 3px rgba(6, 214, 160, 0.1);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M8 12L2 6h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.form-group select option {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

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

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

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    box-shadow: var(--shadow);
    animation: toastIn 0.3s ease, toastOut 0.3s ease 3.7s forwards;
    max-width: 400px;
}

.toast.success {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: var(--accent-green);
}

.toast.error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--accent-red);
}

.toast.info {
    background: rgba(17, 138, 178, 0.15);
    border: 1px solid rgba(17, 138, 178, 0.3);
    color: var(--accent-blue);
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toastOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
        transform: translateY(10px);
    }
}

/* ─── Loading spinner ─── */
.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--accent-teal);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

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

/* ─── Responsive ─── */
@media (max-width: 768px) {
    .header {
        padding: 12px 16px;
    }

    .stats-bar {
        padding: 16px;
    }

    .tabs {
        padding: 0 16px;
    }

    .content {
        padding: 16px;
    }

    .auction-grid {
        grid-template-columns: 1fr;
    }

    .job-ready-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .btn-demo span {
        display: none;
    }
}

/* ─── Demo Button ─── */
.btn-demo {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border: none;
    border-radius: 20px;
    font-family: var(--font);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    color: #fff;
    background: linear-gradient(135deg, #8b5cf6, #06d6a0, #118ab2);
    background-size: 200% 200%;
    animation: demoGradient 3s ease infinite;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-demo:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
}

.btn-demo:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.btn-demo.running {
    animation: demoGradient 1s ease infinite;
}

@keyframes demoGradient {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* ─── Live Badge ─── */
.live-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--accent-red);
    text-transform: uppercase;
}

.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-red);
    animation: livePulse 1.5s ease-in-out infinite;
}

@keyframes livePulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6);
    }

    50% {
        box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
    }
}

/* ─── Activity Feed ─── */
.activity-feed {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 600px;
    overflow-y: auto;
}

.event-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: var(--transition);
    animation: slideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.event-card:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
}

.event-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.event-icon.agent {
    background: rgba(6, 214, 160, 0.12);
}

.event-icon.auction {
    background: rgba(17, 138, 178, 0.12);
}

.event-icon.bid {
    background: rgba(245, 158, 11, 0.12);
}

.event-icon.award {
    background: rgba(139, 92, 246, 0.12);
}

.event-icon.job {
    background: rgba(34, 197, 94, 0.12);
}

.event-icon.demo {
    background: rgba(239, 68, 68, 0.12);
}

.event-icon.error {
    background: rgba(239, 68, 68, 0.12);
}

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

.event-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 3px;
}

.event-detail {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
}

.event-detail code {
    font-family: var(--mono);
    font-size: 11px;
    padding: 1px 5px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    color: var(--accent-teal);
}

.event-time {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    font-family: var(--mono);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* AI Result Blocks */
.job-result {
    background: rgba(10, 15, 25, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 12px;
    margin-top: 10px;
    font-size: 0.85rem;
    color: #e2e8f0;
}

.result-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.result-badge.gemini {
    color: #a855f7;
    font-weight: 600;
}

.result-badge.mock {
    color: #94a3b8;
}

.confidence-badge {
    color: #10b981;
}

.job-result pre {
    margin: 0;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
    background: transparent;
    color: #bae6fd;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

/* Auditor Panel */
.auditor-panel {
    margin-top: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    border-left: 4px solid;
    background: rgba(10, 15, 25, 0.6);
    font-size: 0.85rem;
}

.auditor-panel.pass {
    border-color: #10b981;
}

.auditor-panel.fail {
    border-color: #ef4444;
}

.auditor-header {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    margin-bottom: 6px;
    color: #e2e8f0;
}

.auditor-header .verdict {
    letter-spacing: 0.5px;
}

.auditor-reason {
    color: #94a3b8;
    line-height: 1.4;
}

.result-badge.openai {
    color: #10b981;
    font-weight: 600;
}

/* ─── Footer ─── */
.site-footer {
    position: relative;
    z-index: 1;
    padding: 24px 32px;
    border-top: 1px solid var(--border);
    background: rgba(3, 7, 18, 0.6);
    backdrop-filter: blur(10px);
    margin-top: auto;
}

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

.footer-content strong {
    color: var(--text-secondary);
}

.footer-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 13px;
    transition: var(--transition);
}

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