/* ===== Viral Scripts design system ===== */

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ===== Sidebar ===== */
.sidebar {
    width: 248px;
    background: #ffffff;
    border-right: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    height: 100%;
}
.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    height: 56px;
    border-bottom: 1px solid #e2e8f0;
}
.sidebar-logo-icon {
    width: 32px;
    height: 32px;
    background: #e6435b;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.sidebar-logo-title {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.2;
}
.sidebar-logo-sub {
    font-size: 9px;
    color: #94a3b8;
    line-height: 1;
}

.sidebar-nav {
    flex: 1;
    padding: 8px;
    overflow-y: auto;
}
.nav-section-label {
    font-size: 10px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 16px 12px 4px;
    font-weight: 600;
}
.nav-link {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
    transition: all 0.15s;
    text-decoration: none;
    margin-bottom: 2px;
}
.nav-link:hover {
    background: #f1f5f9;
    color: #1e293b;
}
.nav-link.active {
    background: rgba(230,67,91,0.1);
    color: #e6435b;
    font-weight: 600;
}
.nav-icon {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    flex-shrink: 0;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    border: none;
    text-decoration: none;
}
.btn-primary { background: #e6435b; color: white; }
.btn-primary:hover { opacity: 0.9; }
.btn-secondary { background: #f1f5f9; color: #64748b; }
.btn-secondary:hover { background: #e2e8f0; }
.btn-danger { background: #FF3B30; color: white; }
.btn-danger:hover { opacity: 0.9; }

.btn-sm {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    border: none;
}
.btn-sm.btn-primary { background: #e6435b; color: white; }
.btn-sm.btn-primary:hover { opacity: 0.9; }
.btn-sm.btn-secondary { background: #f1f5f9; color: #64748b; }
.btn-sm.btn-secondary:hover { background: #e2e8f0; }
.btn-sm.btn-danger { background: rgba(255,59,48,0.1); color: #FF3B30; }
.btn-sm.btn-danger:hover { background: rgba(255,59,48,0.15); }

/* ===== Inputs ===== */
.input {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 13px;
    outline: none;
    transition: all 0.15s;
    background: #ffffff;
}
.input:focus {
    border-color: #e6435b;
    box-shadow: 0 0 0 3px rgba(230,67,91,0.15);
}

/* ===== Table ===== */
.th {
    padding: 10px 16px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.td {
    padding: 10px 16px;
    font-size: 13px;
    color: #1e293b;
}

/* ===== Status badges ===== */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
}
.status-completed { background: rgba(52,199,89,0.1); color: #34C759; }
.status-failed { background: rgba(255,59,48,0.1); color: #FF3B30; }
.status-queued { background: #f1f5f9; color: #64748b; }
.status-running { background: rgba(230,67,91,0.1); color: #e6435b; }

/* ===== Stat cards ===== */
.stat-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(226,232,240,0.6);
    transition: box-shadow 0.15s;
}
.stat-card:hover {
    box-shadow: 0 4px 12px -2px rgba(0,0,0,0.08);
}

/* ===== Tabs ===== */
.prompt-tab {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    color: #94a3b8;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
    transition: color 0.15s;
    text-decoration: none;
}
.prompt-tab:hover { color: #1e293b; }
.prompt-tab.active {
    color: #e6435b;
    border-bottom-color: #e6435b;
    font-weight: 600;
}

/* ===== Toast ===== */
.toast {
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    animation: slideIn 0.3s ease;
    max-width: 24rem;
}
.toast-success { background: #34C759; color: white; }
.toast-error { background: #FF3B30; color: white; }
.toast-info { background: #e6435b; color: white; }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ===== Line clamp ===== */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== Mobile header ===== */
.mobile-header { display: none; }

@media (max-width: 1023px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 50;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
    }
    .sidebar.open { transform: translateX(0); }
    .mobile-header { display: flex; }
}

@media (max-width: 767px) {
    .btn { padding: 10px 18px; font-size: 14px; }
    .btn-sm { padding: 6px 12px; font-size: 13px; }
    .th { padding: 8px 10px; font-size: 10px; }
    .td { padding: 8px 10px; font-size: 12px; }
}

@media (max-width: 639px) {
    .stat-card { padding: 14px; }
}
