/* Custom styles for Token SMM79 */

/* SSE Log Panel */
.log-panel {
    background: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 8px;
    padding: 16px;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 13px;
    line-height: 1.6;
    max-height: 500px;
    overflow-y: auto;
    color: #94a3b8;
}

.log-panel .log-line {
    padding: 2px 0;
    animation: fadeIn 0.3s ease-in;
}

.log-panel .log-line.success {
    color: #4ade80;
}

.log-panel .log-line.error {
    color: #f87171;
}

.log-panel .log-line.warning {
    color: #fbbf24;
}

.log-panel .log-line.info {
    color: #60a5fa;
}

.log-panel .log-line.running {
    color: #c084fc;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Token display */
.token-display {
    background: #064e3b;
    border: 1px solid #059669;
    border-radius: 8px;
    padding: 16px;
    word-break: break-all;
    font-family: monospace;
    color: #6ee7b7;
    cursor: pointer;
    position: relative;
}

.token-display:hover::after {
    content: 'Click to copy';
    position: absolute;
    top: -30px;
    right: 10px;
    background: #1e293b;
    color: #e2e8f0;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

/* Progress indicator */
.progress-step {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
}

.progress-step .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #475569;
    flex-shrink: 0;
}

.progress-step .dot.active {
    background: #8b5cf6;
    animation: pulse 1s infinite;
}

.progress-step .dot.done {
    background: #4ade80;
}

.progress-step .dot.error {
    background: #f87171;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Sidebar active */
.sidebar-link.active {
    background: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
    border-right: 3px solid #8b5cf6;
}

/* Card hover effect */
.stat-card {
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
}

/* Scrollbar */
.log-panel::-webkit-scrollbar {
    width: 6px;
}

.log-panel::-webkit-scrollbar-track {
    background: #1e293b;
}

.log-panel::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 3px;
}

/* Table responsive */
.table-responsive {
    overflow-x: auto;
}

/* Toast animation */
.toast {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ==== RESPONSIVE / MOBILE ==== */

/* Sidebar open state (mobile) */
.sidebar-open {
    transform: translateX(0) !important;
}

/* Prevent body scroll when sidebar is open on mobile */
body.sidebar-active {
    overflow: hidden;
}

@media (max-width: 1023px) {
    body.sidebar-active {
        overflow: hidden;
    }
}

/* Mobile-friendly tables: card layout on small screens */
@media (max-width: 639px) {
    .mobile-cards thead {
        display: none;
    }
    .mobile-cards tbody tr {
        display: block;
        background: rgba(15, 23, 42, 0.6);
        border: 1px solid #1e293b;
        border-radius: 8px;
        padding: 12px;
        margin-bottom: 8px;
    }
    .mobile-cards tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 4px 0 !important;
        border: none !important;
    }
    .mobile-cards tbody td::before {
        content: attr(data-label);
        font-size: 0.75rem;
        color: #94a3b8;
        font-weight: 500;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        flex-shrink: 0;
        margin-right: 12px;
    }
    .mobile-cards .divide-y > * + * {
        border-top: none;
    }
}

/* Stat cards responsive text */
@media (max-width: 374px) {
    .stat-card p.text-3xl {
        font-size: 1.5rem;
    }
}

/* Token display responsive */
@media (max-width: 639px) {
    .token-display {
        font-size: 12px;
        padding: 12px;
    }
    .log-panel {
        font-size: 11px;
        max-height: 350px;
    }
}

/* Filter buttons scrollable on mobile */
.filter-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.filter-scroll::-webkit-scrollbar {
    display: none;
}
