/* ===========================
   QC Review System — Global Styles
   Premium Light Mode Design System
   =========================== */

/* Font */
* { font-family: 'Inter', system-ui, -apple-system, sans-serif; }

/* Body */
body.qc-body {
    background: #f1f5f9;
    overflow-x: hidden;
    min-height: 100vh;
}

/* ===== Glass Card ===== */
.glass-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.03);
    transition: all 0.3s ease;
}
.glass-card:hover {
    border-color: rgba(148, 163, 184, 0.3);
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
}
.glass-card-lift:hover {
    transform: translateY(-2px);
}

/* ===== Stat Card Top Borders ===== */
.stat-card { position: relative; overflow: hidden; }
.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    border-radius: 1rem 1rem 0 0;
}
.stat-card.blue::before   { background: linear-gradient(90deg, #3b82f6, #6366f1); }
.stat-card.green::before  { background: linear-gradient(90deg, #10b981, #34d399); }
.stat-card.red::before    { background: linear-gradient(90deg, #ef4444, #f97316); }
.stat-card.purple::before { background: linear-gradient(90deg, #8b5cf6, #a78bfa); }
.stat-card.amber::before  { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.stat-card.cyan::before   { background: linear-gradient(90deg, #06b6d4, #22d3ee); }

/* ===== Trend Badges ===== */
.badge-up      { background: rgba(16,185,129,0.12); color: #059669; }
.badge-down    { background: rgba(239,68,68,0.12); color: #dc2626; }
.badge-neutral { background: rgba(100,116,139,0.12); color: #64748b; }

/* ===== Chart Containers ===== */
.chart-sm { position: relative; height: 240px; width: 100%; }
.chart-md { position: relative; height: 320px; width: 100%; }
.chart-lg { position: relative; height: 380px; width: 100%; }

/* ===== Fade-in Animation ===== */
.fade-up {
    opacity: 0;
    transform: translateY(16px);
    animation: fadeUp 0.5s ease forwards;
}
@keyframes fadeUp {
    to { opacity: 1; transform: translateY(0); }
}
.fade-up:nth-child(1)  { animation-delay: 0.03s; }
.fade-up:nth-child(2)  { animation-delay: 0.06s; }
.fade-up:nth-child(3)  { animation-delay: 0.09s; }
.fade-up:nth-child(4)  { animation-delay: 0.12s; }
.fade-up:nth-child(5)  { animation-delay: 0.15s; }
.fade-up:nth-child(6)  { animation-delay: 0.18s; }
.fade-up:nth-child(7)  { animation-delay: 0.21s; }
.fade-up:nth-child(8)  { animation-delay: 0.24s; }

/* ===== Leaderboard / List Rows ===== */
.leader-row {
    transition: all 0.2s ease;
    border-radius: 0.75rem;
}
.leader-row:hover {
    background: rgba(99, 102, 241, 0.06);
    transform: translateX(4px);
}

/* ===== Section Title ===== */
.section-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1e293b;
}
.section-subtitle {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 0.25rem;
}

/* ===== Progress Bar ===== */
.progress-track {
    width: 100%;
    background: #e2e8f0;
    border-radius: 9999px;
    height: 6px;
}
.progress-fill {
    height: 100%;
    border-radius: 9999px;
    transition: width 1s ease;
}

/* ===== Insight Card ===== */
.insight-card {
    background: linear-gradient(135deg, rgba(99,102,241,0.06) 0%, rgba(139,92,246,0.06) 50%, rgba(236,72,153,0.06) 100%);
    border: 1px solid rgba(139,92,246,0.12);
}

/* ===== Toast ===== */
.toast {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
}

/* ===== Modal Overlay ===== */
.modal-overlay {
    backdrop-filter: blur(4px);
}

/* ===== Form Inputs ===== */
.qc-input {
    width: 100%;
    padding: 0.625rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    background: #fff;
    color: #1e293b;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}
.qc-input:focus {
    outline: none;
    border-color: #818cf8;
    box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.15);
}
.qc-input::placeholder {
    color: #94a3b8;
}

/* ===== Buttons ===== */
.btn-primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
    border: none;
    cursor: pointer;
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35);
}
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
    background: #fff;
    color: #475569;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
    cursor: pointer;
}
.btn-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #f97316);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.25);
    border: none;
    cursor: pointer;
}
.btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.35);
}

.btn-success {
    background: linear-gradient(135deg, #10b981, #34d399);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
    border: none;
    cursor: pointer;
}
.btn-success:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.35);
}

/* ===== Table ===== */
.qc-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}
.qc-table thead th {
    background: #f8fafc;
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
}
.qc-table tbody td {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: #334155;
    border-bottom: 1px solid #f1f5f9;
}
.qc-table tbody tr {
    transition: background 0.15s ease;
}
.qc-table tbody tr:hover {
    background: #f8fafc;
}

/* ===== Status Badges ===== */
.status-ok {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(16,185,129,0.1);
    color: #059669;
}
.status-nok {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(239,68,68,0.1);
    color: #dc2626;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(148,163,184,0.3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(148,163,184,0.5); }

/* ===== Pulse Animation ===== */
.pulse-dot {
    animation: pulseDot 2s ease-in-out infinite;
}
@keyframes pulseDot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}
