/* =============================================================================
   WORK LOG DASHBOARD - Modern UI Styles
   ============================================================================= */

/* Container */
.worklog-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* =============================================================================
   HERO BANNER
   ============================================================================= */
.worklog-hero {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(59, 130, 246, 0.08));
    border-radius: 1rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(16, 185, 129, 0.15);
}

    .worklog-hero .hero-icon {
        width: 3.5rem;
        height: 3.5rem;
        background: linear-gradient(135deg, #10b981, #3b82f6);
        border-radius: 1rem;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    }

        .worklog-hero .hero-icon .material-symbols-outlined {
            font-size: 1.75rem;
            color: #fff;
        }

    .worklog-hero .hero-text h2 {
        margin: 0 0 0.25rem;
        font-size: 1.25rem;
        font-weight: 700;
        color: var(--text-dark);
    }

    .worklog-hero .hero-text p {
        margin: 0;
        font-size: 0.9rem;
        color: var(--text-muted);
    }

/* =============================================================================
   STATS GRID
   ============================================================================= */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--surface);
    border-radius: 1rem;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

    .stat-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 4px;
        border-radius: 1rem 1rem 0 0;
    }

    .stat-card.blue::before {
        background: linear-gradient(90deg, #3b82f6, #2563eb);
    }

    .stat-card.green::before {
        background: linear-gradient(90deg, #10b981, #059669);
    }

    .stat-card.purple::before {
        background: linear-gradient(90deg, #8b5cf6, #7c3aed);
    }

    .stat-card.orange::before {
        background: linear-gradient(90deg, #f97316, #ea580c);
    }

    .stat-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    }

.stat-icon-wrapper {
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-card.blue .stat-icon-wrapper {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(59, 130, 246, 0.05));
    color: #3b82f6;
}

.stat-card.green .stat-icon-wrapper {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(16, 185, 129, 0.05));
    color: #10b981;
}

.stat-card.purple .stat-icon-wrapper {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(139, 92, 246, 0.05));
    color: #8b5cf6;
}

.stat-card.orange .stat-icon-wrapper {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.15), rgba(249, 115, 22, 0.05));
    color: #f97316;
}

.stat-icon-wrapper .material-symbols-outlined {
    font-size: 1.5rem;
}

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

.stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1.1;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* =============================================================================
   FORM CARDS
   ============================================================================= */
.form-card {
    background: var(--surface);
    border-radius: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(226, 232, 240, 0.8);
    overflow: hidden;
    transition: all 0.3s ease;
}

    .form-card:hover {
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    }

.card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.25rem 0;
}

.card-icon {
    width: 2.75rem;
    height: 2.75rem;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(37, 99, 235, 0.05));
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .card-icon .material-symbols-outlined {
        font-size: 1.4rem;
        color: var(--accent);
    }

    .card-icon.blue {
        background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(59, 130, 246, 0.05));
    }

        .card-icon.blue .material-symbols-outlined {
            color: #3b82f6;
        }

    .card-icon.green {
        background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(16, 185, 129, 0.05));
    }

        .card-icon.green .material-symbols-outlined {
            color: #10b981;
        }

    .card-icon.purple {
        background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(139, 92, 246, 0.05));
    }

        .card-icon.purple .material-symbols-outlined {
            color: #8b5cf6;
        }

    .card-icon.orange {
        background: linear-gradient(135deg, rgba(249, 115, 22, 0.15), rgba(249, 115, 22, 0.05));
    }

        .card-icon.orange .material-symbols-outlined {
            color: #f97316;
        }

.card-title {
    flex: 1;
}

    .card-title h3 {
        margin: 0;
        font-size: 1.05rem;
        font-weight: 700;
        color: var(--text-dark);
    }

    .card-title p {
        margin: 0.15rem 0 0;
        font-size: 0.85rem;
        color: var(--text-muted);
    }

.card-body {
    padding: 1.25rem;
}

    .card-body.no-padding {
        padding: 0;
    }

.collapse-btn {
    width: 2rem;
    height: 2rem;
    border: none;
    background: #f1f5f9;
    border-radius: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

    .collapse-btn:hover {
        background: #e2e8f0;
        color: var(--text-dark);
    }

    .collapse-btn.collapsed .material-symbols-outlined {
        transform: rotate(180deg);
    }

/* =============================================================================
   FORM ELEMENTS
   ============================================================================= */
.form-group {
    margin-bottom: 1rem;
}

    .form-group:last-child {
        margin-bottom: 0;
    }

    .form-group.full-width {
        grid-column: 1 / -1;
    }

    .form-group > label {
        display: flex;
        align-items: center;
        gap: 0.4rem;
        font-size: 0.85rem;
        font-weight: 600;
        color: var(--text-muted);
        margin-bottom: 0.5rem;
    }

        .form-group > label .material-symbols-outlined {
            font-size: 1.1rem;
        }

.select-wrapper {
    position: relative;
}

    .select-wrapper select {
        width: 100%;
        padding: 0.85rem 2.5rem 0.85rem 1rem;
        border: 1.5px solid #e2e8f0;
        border-radius: 0.75rem;
        font-size: 0.95rem;
        background: #fff;
        color: var(--text-dark);
        appearance: none;
        cursor: pointer;
        transition: all 0.2s ease;
    }

        .select-wrapper select:hover {
            border-color: #cbd5e1;
        }

        .select-wrapper select:focus {
            outline: none;
            border-color: var(--accent);
            box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
        }

.select-arrow {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    font-size: 1.25rem;
}

.text-input {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 0.75rem;
    font-size: 0.95rem;
    background: #fff;
    color: var(--text-dark);
    transition: all 0.2s ease;
}

    .text-input:hover {
        border-color: #cbd5e1;
    }

    .text-input:focus {
        outline: none;
        border-color: var(--accent);
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    }

.filters-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.entry-form-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.filter-actions,
.form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid #e2e8f0;
}

.form-actions {
    justify-content: flex-end;
}

/* =============================================================================
   ACTION BUTTONS
   ============================================================================= */
.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: 0.65rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}

    .action-btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

    .action-btn .material-symbols-outlined {
        font-size: 1.15rem;
    }

    .action-btn.primary {
        background: linear-gradient(135deg, var(--accent), #3b82f6);
        color: #fff;
        box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
    }

        .action-btn.primary:hover:not(:disabled) {
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
        }

    .action-btn.secondary {
        background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(37, 99, 235, 0.05));
        color: var(--accent);
        border: 1.5px solid rgba(37, 99, 235, 0.2);
    }

        .action-btn.secondary:hover:not(:disabled) {
            background: linear-gradient(135deg, rgba(37, 99, 235, 0.15), rgba(37, 99, 235, 0.08));
            border-color: var(--accent);
        }

    .action-btn.outline {
        background: transparent;
        color: var(--text-muted);
        border: 1.5px solid #e2e8f0;
    }

        .action-btn.outline:hover:not(:disabled) {
            background: #f8fafc;
            border-color: #cbd5e1;
            color: var(--text-dark);
        }

/* =============================================================================
   VIEW TABS
   ============================================================================= */
.view-tabs {
    display: flex;
    gap: 0;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    overflow-x: auto;
}

.view-tab {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 1rem 1.25rem;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    white-space: nowrap;
}

    .view-tab::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: transparent;
        border-radius: 3px 3px 0 0;
        transition: background 0.2s ease;
    }

    .view-tab:hover {
        color: var(--text-dark);
        background: rgba(37, 99, 235, 0.03);
    }

    .view-tab.active {
        color: var(--accent);
        background: #fff;
    }

        .view-tab.active::after {
            background: var(--accent);
        }

    .view-tab .material-symbols-outlined {
        font-size: 1.15rem;
    }

/* =============================================================================
   DATA TABLES
   ============================================================================= */
.data-tables-wrapper {
    background: #fff;
}

.data-view {
    display: none;
}

    .data-view.active {
        display: block;
    }

.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

    .data-table thead {
        background: #f8fafc;
    }

    .data-table th {
        padding: 0.85rem 1rem;
        text-align: left;
        font-weight: 600;
        color: var(--text-muted);
        border-bottom: 2px solid #e2e8f0;
        white-space: nowrap;
        font-size: 0.8rem;
        text-transform: uppercase;
        letter-spacing: 0.03em;
    }

        .data-table th.text-center,
        .data-table td.text-center {
            text-align: center;
        }

    .data-table td {
        padding: 0.85rem 1rem;
        border-bottom: 1px solid #e2e8f0;
        color: var(--text-dark);
    }

    .data-table tbody tr {
        transition: background 0.15s ease;
    }

        .data-table tbody tr:hover {
            background: rgba(37, 99, 235, 0.03);
        }

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

/* Table Empty State */
.table-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 3rem 1rem;
    color: #94a3b8;
}

    .table-empty .material-symbols-outlined {
        font-size: 2.5rem;
        opacity: 0.5;
    }

    .table-empty p {
        margin: 0;
        font-size: 0.9rem;
    }

/* Data Cells */
.quantity-cell {
    font-weight: 700;
    color: var(--accent);
}

.date-cell {
    white-space: nowrap;
    color: var(--text-muted);
}

.job-cell {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
}

/* Source Badge */
.source-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

    .source-badge.builder {
        background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(16, 185, 129, 0.05));
        color: #059669;
    }

    .source-badge.manual {
        background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(139, 92, 246, 0.05));
        color: #8b5cf6;
    }

    .source-badge.auto {
        background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(59, 130, 246, 0.05));
        color: #3b82f6;
    }

/* Entry Delete Button */
.entry-delete-btn {
    border: none;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    padding: 0.35rem;
    border-radius: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

    .entry-delete-btn:hover {
        color: #ef4444;
        background: rgba(239, 68, 68, 0.1);
    }

    .entry-delete-btn .material-symbols-outlined {
        font-size: 1.1rem;
    }

/* =============================================================================
   EXPORT OPTIONS
   ============================================================================= */
.export-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.export-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: left;
}

    .export-btn:hover {
        border-color: var(--accent);
        background: rgba(37, 99, 235, 0.03);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    }

.export-icon {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .export-icon.csv {
        background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(16, 185, 129, 0.05));
        color: #10b981;
    }

    .export-icon.excel {
        background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(59, 130, 246, 0.05));
        color: #3b82f6;
    }

    .export-icon.pdf {
        background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(239, 68, 68, 0.05));
        color: #ef4444;
    }

    .export-icon .material-symbols-outlined {
        font-size: 1.35rem;
    }

.export-text {
    display: flex;
    flex-direction: column;
}

.export-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-dark);
}

.export-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* =============================================================================
   STATUS TOAST
   ============================================================================= */
.status-toast {
    position: fixed;
    bottom: 6rem;
    left: 50%;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.5rem;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.95), rgba(59, 130, 246, 0.95));
    color: #fff;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.3);
    animation: slideUp 0.3s ease;
    z-index: 100;
}

    .status-toast.success {
        background: linear-gradient(135deg, rgba(16, 185, 129, 0.95), rgba(5, 150, 105, 0.95));
        box-shadow: 0 8px 24px rgba(16, 185, 129, 0.3);
    }

    .status-toast.error {
        background: linear-gradient(135deg, rgba(239, 68, 68, 0.95), rgba(220, 38, 38, 0.95));
        box-shadow: 0 8px 24px rgba(239, 68, 68, 0.3);
    }

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

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* =============================================================================
   LOADING OVERLAY
   ============================================================================= */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.loading-spinner {
    width: 3rem;
    height: 3rem;
    border: 3px solid #e2e8f0;
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.loading-text {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
}

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

/* =============================================================================
   RESPONSIVE
   ============================================================================= */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .filters-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .entry-form-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .export-options {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .worklog-hero {
        flex-direction: column;
        text-align: center;
        padding: 1.25rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .filters-grid,
    .entry-form-grid {
        grid-template-columns: 1fr;
    }

    .filter-actions,
    .form-actions {
        flex-wrap: wrap;
    }

        .filter-actions .action-btn,
        .form-actions .action-btn {
            flex: 1;
            min-width: 120px;
        }

    .view-tabs {
        padding: 0 0.5rem;
    }

    .view-tab {
        padding: 0.85rem 1rem;
    }

    .tab-text {
        display: none;
    }

    .data-table {
        font-size: 0.8rem;
    }

        .data-table th,
        .data-table td {
            padding: 0.65rem 0.75rem;
        }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: 0.85rem;
    }

    .stat-icon-wrapper {
        width: 2.5rem;
        height: 2.5rem;
    }

    .stat-value {
        font-size: 1.35rem;
    }

    .export-btn {
        padding: 0.85rem;
    }

    .export-icon {
        width: 2.25rem;
        height: 2.25rem;
    }
}

/* Code Breakdown Row */
.code-breakdown-row {
    background: #f8fafc;
}

    .code-breakdown-row td {
        padding: 0.5rem 1rem 1rem !important;
        border-bottom: 2px solid #e2e8f0;
    }

.code-breakdown {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.code-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(37, 99, 235, 0.05));
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: 999px;
    font-size: 0.8rem;
    color: #1e40af;
}

    .code-pill strong {
        font-weight: 700;
        color: #1d4ed8;
    }

.no-codes {
    color: #94a3b8;
    font-style: italic;
    font-size: 0.85rem;
}

/* Job Info Cell */
.job-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

    .job-info .job-id {
        font-family: "SF Mono", "Consolas", monospace;
        font-size: 0.8rem;
        color: var(--accent);
        font-weight: 600;
    }

    .job-info .job-name {
        font-size: 0.9rem;
        color: var(--text-dark);
        font-weight: 500;
    }

/* Code Badge */
.code-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, var(--accent), #3b82f6);
    color: #fff;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Codes List in Entries Table */
.codes-list {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Source Badges */
.source-badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

    .source-badge.builder {
        background: rgba(16, 185, 129, 0.1);
        color: #059669;
    }

    .source-badge.manual {
        background: rgba(139, 92, 246, 0.1);
        color: #7c3aed;
    }

/* Code Column Headers */
.code-column-header {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(37, 99, 235, 0.03));
    color: var(--accent);
    font-weight: 700;
}

/* Quantity Cells */
.qty-cell {
    font-size: 0.95rem;
}

    .qty-cell strong {
        color: var(--accent);
        font-weight: 700;
    }

    .qty-cell.empty {
        color: #cbd5e1;
    }

/* Total Cell */
.total-cell {
    background: rgba(16, 185, 129, 0.05);
    border-left: 2px solid rgba(16, 185, 129, 0.2);
}

    .total-cell strong {
        color: #059669;
        font-weight: 800;
    }

/* Job Filter Row */
.job-filter-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

    .job-filter-row .form-group {
        flex: 1;
    }

    .job-filter-row .action-btn {
        flex-shrink: 0;
    }

/* =============================================================================
   CODE STATS GRID
   ============================================================================= */
.code-stats-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.code-stat-card {
    flex: 1;
    min-width: 140px;
    max-width: 200px;
    background: var(--surface);
    border-radius: 1rem;
    padding: 1.25rem;
    text-align: center;
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

    .code-stat-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 4px;
        border-radius: 1rem 1rem 0 0;
    }

    .code-stat-card.blue::before {
        background: linear-gradient(90deg, #3b82f6, #2563eb);
    }

    .code-stat-card.green::before {
        background: linear-gradient(90deg, #10b981, #059669);
    }

    .code-stat-card.purple::before {
        background: linear-gradient(90deg, #8b5cf6, #7c3aed);
    }

    .code-stat-card.orange::before {
        background: linear-gradient(90deg, #f97316, #ea580c);
    }

    .code-stat-card.teal::before {
        background: linear-gradient(90deg, #14b8a6, #0d9488);
    }

    .code-stat-card.pink::before {
        background: linear-gradient(90deg, #ec4899, #db2777);
    }

    .code-stat-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    }

.code-stat-value {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.code-stat-card.blue .code-stat-value {
    color: #2563eb;
}

.code-stat-card.green .code-stat-value {
    color: #059669;
}

.code-stat-card.purple .code-stat-value {
    color: #7c3aed;
}

.code-stat-card.orange .code-stat-value {
    color: #ea580c;
}

.code-stat-card.teal .code-stat-value {
    color: #0d9488;
}

.code-stat-card.pink .code-stat-value {
    color: #db2777;
}

.code-stat-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.code-stat-empty {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 2rem;
    color: #94a3b8;
    background: #f8fafc;
    border-radius: 1rem;
    border: 1px dashed #e2e8f0;
}

    .code-stat-empty .material-symbols-outlined {
        font-size: 2rem;
        opacity: 0.5;
    }

    .code-stat-empty p {
        margin: 0;
        font-size: 0.9rem;
    }

/* Responsive */
@media (max-width: 768px) {
    .code-stats-grid {
        gap: 0.75rem;
    }

    .code-stat-card {
        min-width: 100px;
        padding: 1rem;
    }

    .code-stat-value {
        font-size: 1.75rem;
    }

    .code-stat-label {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .code-stat-card {
        min-width: calc(50% - 0.5rem);
        flex: 0 0 calc(50% - 0.5rem);
    }
}