/* ===== Reset & Base ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0b0e17;
    --bg-secondary: #111827;
    --bg-card: rgba(17, 24, 39, 0.6);
    --border-card: rgba(255, 255, 255, 0.06);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent-green: #22c55e;
    --accent-green-glow: rgba(34, 197, 94, 0.25);
    --accent-orange: #f59e0b;
    --accent-orange-glow: rgba(245, 158, 11, 0.25);
    --accent-gray: #334155;
    --accent-gray-text: #94a3b8;
    --accent-blue: #3b82f6;
    --accent-purple: #8b5cf6;
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --radius-bar: 10px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* ===== Background Glows ===== */
.bg-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.35;
    pointer-events: none;
    z-index: 0;
    animation: glowDrift 12s ease-in-out infinite alternate;
}

.bg-glow-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--accent-purple), transparent 70%);
    top: -10%;
    left: -5%;
}

.bg-glow-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--accent-blue), transparent 70%);
    top: 40%;
    right: -8%;
    animation-delay: -4s;
}

.bg-glow-3 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, var(--accent-green), transparent 70%);
    bottom: -5%;
    left: 30%;
    animation-delay: -8s;
}

@keyframes glowDrift {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(30px, -20px) scale(1.1);
    }
}

/* ===== Header ===== */
header {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 48px 24px 16px;
}

header h1 {
    font-size: 2.2rem;
    font-weight: 800;
    background: linear-gradient(135deg, #f1f5f9, #8b5cf6, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}



/* ===== Main Layout ===== */
main {
    position: relative;
    z-index: 1;
    max-width: 960px;
    margin: 0 auto;
    padding: 24px 20px 60px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.section-card {
    background: var(--bg-card);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    padding: 28px 30px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, opacity 0.6s ease;
    cursor: default;
}

.section-card.fade-in {
    opacity: 0;
    transform: translateY(20px);
}

.section-card.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.section-card:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
    border-color: rgba(139, 92, 246, 0.15);
}

.section-card:active {
    transform: translateY(-1px) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}




/* ===== Section Header ===== */
.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.section-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.section-icon.cat-0 {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(59, 130, 246, 0.2));
}

.section-icon.cat-1 {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(34, 197, 94, 0.2));
}

.section-icon.cat-2 {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(239, 68, 68, 0.2));
}

.section-icon.cat-3 {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.2), rgba(139, 92, 246, 0.2));
}

.section-title {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.3px;
}

/* ===== Cable Item ===== */
.cable-item {
    margin-bottom: 22px;
}

.cable-item:last-child {
    margin-bottom: 0;
}

.cable-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cable-label .length-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent-blue);
    letter-spacing: 0.5px;
}

/* ===== Progress Bar ===== */
.progress-bar-container {
    position: relative;
    width: 100%;
    height: 36px;
    background: var(--accent-gray);
    border-radius: var(--radius-bar);
    overflow: hidden;
    display: flex;
    margin-bottom: 10px;
}

.progress-segment {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 600;
    color: #fff;
    transition: width 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        filter 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.progress-segment.completed {
    background: linear-gradient(90deg, #16a34a, #22c55e);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
    z-index: 2;
    cursor: pointer;
}

.progress-segment.completed:hover {
    filter: brightness(1.25);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 0 12px rgba(34, 197, 94, 0.4);
    transform: scaleY(1.12);
}

.progress-segment.completed:active {
    filter: brightness(1.1);
    transform: scaleY(1.05);
}

.progress-segment.cutting {
    background: linear-gradient(90deg, #d97706, #f59e0b);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
    z-index: 1;
    cursor: pointer;
}

.progress-segment.cutting:hover {
    filter: brightness(1.25);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 0 12px rgba(245, 158, 11, 0.4);
    transform: scaleY(1.12);
}

.progress-segment.cutting:active {
    filter: brightness(1.1);
    transform: scaleY(1.05);
}

.progress-segment.soldering {
    background: linear-gradient(90deg, #2563eb, #3b82f6);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
    z-index: 1;
    cursor: pointer;
}

.progress-segment.soldering:hover {
    filter: brightness(1.25);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 0 12px rgba(59, 130, 246, 0.4);
    transform: scaleY(1.12);
}

.progress-segment.soldering:active {
    filter: brightness(1.1);
    transform: scaleY(1.05);
}

.progress-segment.pending {
    background: var(--accent-gray);
    color: var(--accent-gray-text);
    flex: 1;
    z-index: 0;
}

.progress-segment .seg-label {
    padding: 0 8px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    opacity: 0;
    animation: segLabelIn 0.5s ease 0.9s forwards;
}

@keyframes segLabelIn {
    to {
        opacity: 1;
    }
}

/* ===== Stats Row ===== */
.stats-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.stat-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.stat-dot.dot-pending {
    background: var(--accent-gray);
    border: 1px solid #475569;
}

.stat-dot.dot-cutting {
    background: var(--accent-orange);
    box-shadow: 0 0 4px var(--accent-orange-glow);
}

.stat-dot.dot-soldering {
    background: var(--accent-blue);
    box-shadow: 0 0 4px rgba(59, 130, 246, 0.25);
}

.stat-dot.dot-completed {
    background: var(--accent-green);
    box-shadow: 0 0 4px var(--accent-green-glow);
}

.stat-dot.dot-remaining {
    background: transparent;
    border: 1.5px dashed #ef4444;
}

.stat-dot.dot-total {
    background: transparent;
    border: 1.5px solid var(--text-muted);
}

.stat-value {
    font-weight: 600;
    color: var(--text-secondary);
}

/* ===== Footer ===== */
footer {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    font-size: 0.75rem;
    letter-spacing: 1px;
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
    header h1 {
        font-size: 1.5rem;
    }

    .section-card {
        padding: 20px 16px;
    }

    .progress-bar-container {
        height: 30px;
    }

    .progress-segment {
        font-size: 0.65rem;
    }

    .stats-row {
        font-size: 0.72rem;
    }

    main {
        padding: 16px 12px 48px;
    }
}