/* CSS Variables */
:root {
    --background: #08080f;
    --foreground: #ffffff;        /* pure white for all main text */
    --foreground-dim: #ffffff;   /* secondary text — also white */
    --card: #12121e;
    --card-hover: #1c1c2e;
    --border: #252538;
    --primary: #7c6ff7;
    --primary-hover: #6366f1;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --muted: #d0d4e8;            /* muted text — light enough to read as white */

    /* Status Colors */
    --blue: #60a5fa;
    --purple: #c084fc;
    --cyan: #22d3ee;
    --yellow: #fbbf24;
    --orange: #fb923c;
    --green: #34d399;
    --emerald: #10b981;
    --red: #f87171;
    --gray: #9ca3af;
    --slate: #94a3b8;

    /* Typography */
    --font-heading: 'Plus Jakarta Sans', 'Inter', -apple-system, sans-serif;
    --font-body:    'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Reset & Base Styles */
* {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

html, body {
    max-width: 100vw;
    overflow-x: hidden;
}

body {
    color: var(--foreground);
    background: var(--background);
    font-family: var(--font-body);
    font-size: 0.9375rem;      /* 15px — slightly larger base */
    line-height: 1.65;
    letter-spacing: 0.01em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Smooth transitions */
* {
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--background);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--muted);
}

/* Glassmorphism effect */
.glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-hover:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

/* Layout */
.app-container {
    position: relative;   /* needed for absolute header-actions */
    min-height: 100vh;
    padding: 1.5rem 1.5rem 3rem;
}

.content-wrapper {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Header — centered layout */
.header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
    padding-top: 1.5rem;
    padding-bottom: 1rem;
}

.header-title {
    font-family: var(--font-heading);
    font-size: 3.25rem;        /* bigger, more impact */
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.1;
    /* Use a solid bright color that's always visible over the smoke */
    color: #ffffff;
    text-shadow:
        0 0 40px rgba(124, 111, 247, 0.7),
        0 0 80px rgba(192, 132, 252, 0.4);
}

.header-subtitle {
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--foreground-dim);
    letter-spacing: 0.02em;
    margin-top: 0.25rem;
}

.header-actions {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    display: flex;
    gap: 0.75rem;
}

.header-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--foreground);
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.header-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.kbd {
    padding: 0.125rem 0.375rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0.25rem;
    font-size: 0.75rem;
}

.icon {
    width: 1rem;
    height: 1rem;
}

/* Dashboard Stats */
.dashboard-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.stat-card {
    position: relative;
    overflow: hidden;
    padding: 1.5rem;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s;
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

.stat-gradient {
    position: absolute;
    inset: 0;
    opacity: 0.1;
}

.stat-content {
    position: relative;
}

.stat-title {
    color: var(--muted);
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.875rem;
    font-weight: bold;
}

.status-breakdown {
    padding: 1.5rem;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.status-breakdown h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid;
}

.status-count {
    color: var(--muted);
}

.follow-up-alert {
    padding: 1.5rem;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 4px solid var(--warning);
}

.follow-up-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.follow-up-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--warning);
}

.follow-up-text {
    color: var(--muted);
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

.follow-up-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.follow-up-item {
    font-size: 0.875rem;
    color: #ffffff;
}

/* Filter Bar */
.filter-bar {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-radius: 0.75rem;
}

.search-input {
    flex: 1;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    color: var(--foreground);
    font-size: 0.875rem;
    outline: none;
}

.search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.status-select {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    color: var(--foreground);
    font-size: 0.875rem;
    outline: none;
    cursor: pointer;
}

.status-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* View Controls */
.view-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.view-toggle {
    display: flex;
    gap: 0.5rem;
    padding: 0.25rem;
    border-radius: 0.5rem;
}

.view-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    border: none;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    transition: all 0.2s;
}

.view-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

.view-btn.active {
    background: var(--primary);
    color: white;
}

.import-export-btns {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--foreground);
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Bulk Actions */
.bulk-actions-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.selected-text {
    font-size: 0.875rem;
    color: #ffffff;
}

.bulk-actions {
    display: flex;
    gap: 0.5rem;
}

.bulk-status-select {
    padding: 0.375rem 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    color: var(--foreground);
    font-size: 0.875rem;
    cursor: pointer;
    outline: none;
}

.bulk-status-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
}

.bulk-delete-btn {
    padding: 0.375rem 1rem;
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 0.5rem;
    color: #fca5a5;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.bulk-delete-btn:hover {
    background: rgba(239, 68, 68, 0.3);
}

.clear-selection-btn {
    padding: 0.375rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    color: var(--foreground);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.clear-selection-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Table */
.table-wrapper {
    overflow-x: auto;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
}

.applications-table {
    width: 100%;
    border-collapse: collapse;
}

.applications-table thead tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.applications-table th {
    text-align: left;
    padding: 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #ffffff;
}

.applications-table td {
    padding: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.applications-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

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

.editable-cell {
    cursor: text;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    min-height: 1.5rem;
    transition: background 0.2s;
}

.editable-cell:hover {
    background: rgba(255, 255, 255, 0.05);
}

.editable-cell:focus {
    outline: 2px solid var(--primary);
    background: rgba(255, 255, 255, 0.08);
}

.cell-link {
    color: var(--primary);
    text-decoration: underline;
}

.cell-link:hover {
    color: var(--primary-hover);
}

.row-actions {
    display: flex;
    gap: 0.5rem;
}

.icon-btn {
    padding: 0.25rem;
    background: transparent;
    border: none;
    color: var(--muted);
    cursor: pointer;
    border-radius: 0.25rem;
    transition: all 0.2s;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--foreground);
}

.icon-btn.delete:hover {
    background: rgba(239, 68, 68, 0.2);
    color: var(--error);
}

.empty-state {
    padding: 3rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
}

.empty-icon {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1.5rem;
    background: linear-gradient(to bottom right, var(--primary), var(--purple));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-icon svg {
    width: 2rem;
    height: 2rem;
    color: white;
}

.empty-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    margin-bottom: 0.5rem;
}

.empty-text {
    color: var(--muted);
    margin-bottom: 1.5rem;
}

.empty-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 20rem;
    margin: 0 auto;
}

.empty-tips {
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 1.5rem;
}

.empty-tips p {
    font-size: 0.875rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.empty-tips ul {
    list-style: none;
    font-size: 0.875rem;
    color: var(--muted);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.add-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    background: var(--primary);
    border: none;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.add-btn:hover {
    background: var(--primary-hover);
    transform: scale(1.05);
}

.add-btn:active {
    transform: scale(0.95);
}

/* Kanban Board */
.kanban-board {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    overflow-x: auto;
}

.kanban-column {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    padding: 1rem;
    min-height: 400px;
}

.kanban-column-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.kanban-column-title {
    font-weight: 600;
    font-size: 0.875rem;
}

.kanban-column-count {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    color: var(--muted);
}

.kanban-cards {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-height: 200px;
}

.kanban-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    padding: 1rem;
    cursor: grab;
    transition: all 0.2s;
}

.kanban-card:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
}

.kanban-card.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

.kanban-card-company {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.kanban-card-title {
    color: var(--muted);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.kanban-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.kanban-card-date {
    font-size: 0.75rem;
    color: var(--muted);
}

.kanban-card-actions {
    display: flex;
    gap: 0.25rem;
}

/* Modals */
.modal {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: var(--card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--muted);
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.25rem;
    transition: all 0.2s;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--foreground);
}

.modal-form {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #ffffff;
}

.form-input, .form-select {
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    color: var(--foreground);
    font-size: 0.875rem;
    outline: none;
}

.form-input:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.modal-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.modal-cancel {
    flex: 1;
    padding: 0.625rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    color: var(--foreground);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-cancel:hover {
    background: rgba(255, 255, 255, 0.1);
}

.modal-submit {
    flex: 1;
    padding: 0.625rem 1rem;
    background: linear-gradient(to right, var(--primary), var(--purple));
    border: none;
    border-radius: 0.5rem;
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-submit:hover {
    opacity: 0.9;
}

.shortcuts-list {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.shortcut-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.5rem;
}

.shortcut-keys {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.shortcut-keys kbd {
    padding: 0.25rem 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-family: monospace;
}

.shortcut-desc {
    color: var(--muted);
    font-size: 0.875rem;
}

/* Floating Action Button */
.fab {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 3.5rem;
    height: 3.5rem;
    background: linear-gradient(to right, var(--primary), var(--purple));
    border: none;
    border-radius: 50%;
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.fab:hover {
    transform: scale(1.1);
}

.fab:active {
    transform: scale(0.95);
}

.fab svg {
    width: 1.5rem;
    height: 1.5rem;
    color: white;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    padding: 1rem 1.5rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 250px;
    animation: slideIn 0.3s ease-out;
}

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

.toast.success {
    border-left: 4px solid var(--success);
}

.toast.error {
    border-left: 4px solid var(--error);
}

.toast-icon {
    width: 1.25rem;
    height: 1.25rem;
}

.toast-message {
    flex: 1;
    font-size: 0.875rem;
}

/* Loading Spinner */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: var(--muted);
}

.spinner {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* Responsive */
@media (min-width: 768px) {
    .app-container {
        padding: 2rem;
    }
    
    .fab {
        display: none !important;
    }
}

@media (max-width: 767px) {
    .header-title {
        font-size: 1.75rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-bar {
        flex-direction: column;
    }
    
    .view-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .kanban-board {
        grid-template-columns: 1fr;
    }
    
    .fab {
        display: flex;
    }
    
    .kbd {
        display: none;
    }
}

/* ===== SMOKE / WEBGL BACKGROUND ===== */
#flow-field-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: var(--background);
    overflow: hidden;
}

.flow-field-canvas {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===== GLOWING BORDER EFFECT (applied to glow-card elements) ===== */
.glow-card {
    position: relative;
}

/* The pseudo-element glow lives inside .glow-card via the JS-injected .glow-inner::after */
.glow-wrapper {
    pointer-events: none;
    position: absolute;
    inset: 0;
    border-radius: inherit;
}

.glow-inner {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: inherit;
}

.glow-inner::after {
    content: "";
    position: absolute;
    inset: calc(-1 * var(--glowingeffect-border-width, 3px));
    border-radius: inherit;
    border: var(--glowingeffect-border-width, 3px) solid transparent;
    background: radial-gradient(circle, #dd7bbb 10%, #dd7bbb00 20%),
                radial-gradient(circle at 40% 40%, #d79f1e 5%, #d79f1e00 15%),
                radial-gradient(circle at 60% 60%, #5a922c 10%, #5a922c00 20%),
                radial-gradient(circle at 40% 60%, #4c7894 10%, #4c789400 20%),
                repeating-conic-gradient(
                  from calc(var(--start, 0) * 1deg) at 50% 50%,
                  #dd7bbb 0%,
                  #d79f1e calc(25% / 5),
                  #5a922c calc(50% / 5),
                  #4c7894 calc(75% / 5),
                  #dd7bbb calc(100% / 5)
                );
    background-attachment: fixed;
    opacity: var(--active, 0);
    transition: opacity 0.3s;
    -webkit-mask-image: linear-gradient(#000, #000),
                        conic-gradient(
                          from calc((var(--start, 0) - var(--spread, 40)) * 1deg),
                          #00000000 0deg,
                          #fff,
                          #00000000 calc(var(--spread, 40) * 2deg)
                        );
    -webkit-mask-clip: padding-box, border-box;
    -webkit-mask-composite: intersect;
    mask-image: linear-gradient(#000, #000),
                conic-gradient(
                  from calc((var(--start, 0) - var(--spread, 40)) * 1deg),
                  #00000000 0deg,
                  #fff,
                  #00000000 calc(var(--spread, 40) * 2deg)
                );
    mask-clip: padding-box, border-box;
    mask-composite: intersect;
}

/* ===== NEW TWO-LAYER GLOW STAT CARD ===== */
.glow-card-outer {
    position: relative;
    border-radius: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 3px;
    background: rgba(255, 255, 255, 0.04);
    min-height: 7rem;
    transition: border-color 0.2s;
}

.glow-card-outer:hover {
    border-color: rgba(255, 255, 255, 0.22);
}

.glow-card-inner {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    height: 100%;
    border-radius: 1.05rem;
    background: rgba(12, 12, 18, 0.85);
    backdrop-filter: blur(14px);
    padding: 1.25rem 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: 0 4px 32px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.glow-card-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.07);
    color: #c084fc;
}

.glow-card-icon-wrap .icon {
    width: 1.25rem;
    height: 1.25rem;
}

.glow-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.glow-card-body .stat-value {
    font-family: var(--font-heading);
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.04em;
    /* Solid color that is always visible — no gradient that can vanish */
    color: #ffffff;
    text-shadow: 0 0 20px rgba(124, 111, 247, 0.5);
    margin-bottom: 0.25rem;
}

.glow-card-body .stat-title {
    font-family: var(--font-body);
    font-size: 0.8125rem;
    color: var(--foreground-dim);  /* bumped from muted for readability */
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
