/* ─── Reset & Base ─────────────────────────────────────────────────────── */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg: #06081a;
    --bg-card: rgba(15, 23, 53, 0.6);
    --bg-card-solid: #0d1129;
    --bg-card-hover: rgba(15, 23, 53, 0.75);
    --bg-input: rgba(10, 15, 40, 0.8);
    --border: rgba(99, 117, 170, 0.12);
    --border-focus: #7c5cfc;
    --text: #e8eaf6;
    --text-muted: #8a94b8;
    --text-dim: #505a78;
    --accent: #7c5cfc;
    --accent-hover: #6a4de0;
    --accent-glow: rgba(124, 92, 252, 0.15);
    --accent-gradient: linear-gradient(135deg, #7c5cfc, #00d4ff);
    --success: #00e68a;
    --success-bg: rgba(0, 230, 138, 0.08);
    --error: #ff4d6a;
    --error-bg: rgba(255, 77, 106, 0.08);
    --warning: #ffb547;
    --radius: 20px;
    --radius-sm: 12px;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --glow-accent: 0 0 20px rgba(124, 92, 252, 0.15), 0 0 60px rgba(124, 92, 252, 0.05);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    background-image:
        radial-gradient(ellipse at 20% 50%, rgba(124, 92, 252, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(0, 212, 255, 0.03) 0%, transparent 50%);
    background-attachment: fixed;
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ─── Layout ──────────────────────────────────────────────────────────── */

.container {
    max-width: 1040px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
}

/* ─── Header ──────────────────────────────────────────────────────────── */

.header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.header-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, rgba(124, 92, 252, 0.2), rgba(0, 212, 255, 0.1));
    border: 1px solid rgba(124, 92, 252, 0.2);
    border-radius: 20px;
    color: var(--accent);
    margin-bottom: 1.25rem;
    box-shadow: 0 0 30px rgba(124, 92, 252, 0.1);
}

.header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #7c5cfc, #00d4ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: var(--text-muted);
    font-size: 0.92rem;
    max-width: 540px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ─── Cards ───────────────────────────────────────────────────────────── */

.card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.03);
    transition: border-color 0.3s ease;
}

.card h2 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-error {
    border-color: rgba(255, 77, 106, 0.3);
    background: rgba(255, 77, 106, 0.06);
}

.card-error h2 {
    color: var(--error);
}

/* ─── Forms ───────────────────────────────────────────────────────────── */

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.form-group label small {
    font-weight: 400;
    text-transform: none;
    color: var(--text-dim);
    letter-spacing: 0;
}

.form-group small {
    display: block;
    color: var(--text-dim);
    font-size: 0.8rem;
    margin-top: 0.35rem;
}

.form-group small a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s;
}

.form-group small a:hover {
    color: #00d4ff;
    text-decoration: underline;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-input);
    border: 1px solid rgba(99, 117, 170, 0.15);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
    outline: none;
}

input[type="text"]:focus,
input[type="password"]:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(124, 92, 252, 0.15), 0 0 20px rgba(124, 92, 252, 0.08);
}

input[type="text"]::placeholder,
input[type="password"]::placeholder {
    color: var(--text-dim);
}

.input-group {
    position: relative;
    display: flex;
}

.input-group input {
    padding-right: 3rem;
}

.btn-icon {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    padding: 0.35rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    transition: color 0.2s, background 0.2s;
}

.btn-icon:hover {
    color: var(--accent);
    background: rgba(124, 92, 252, 0.08);
}

/* ─── Range Slider ────────────────────────────────────────────────────── */

input[type="range"] {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(90deg, rgba(124, 92, 252, 0.3), rgba(0, 212, 255, 0.3));
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 12px rgba(124, 92, 252, 0.5), 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.15s, box-shadow 0.15s;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 0 20px rgba(124, 92, 252, 0.6), 0 2px 8px rgba(0, 0, 0, 0.3);
}

input[type="range"]::-moz-range-thumb {
    width: 22px;
    height: 22px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 12px rgba(124, 92, 252, 0.5);
}

.range-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.35rem;
    font-size: 0.75rem;
    color: var(--text-dim);
}

.badge {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, rgba(124, 92, 252, 0.15), rgba(0, 212, 255, 0.1));
    color: var(--accent);
    padding: 0.15rem 0.65rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 0.25rem;
    border: 1px solid rgba(124, 92, 252, 0.15);
}

/* ─── Category Grid ───────────────────────────────────────────────────── */

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

.category-chip {
    position: relative;
}

.category-chip input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.category-chip label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.65rem 0.75rem;
    background: var(--bg-input);
    border: 1px solid rgba(99, 117, 170, 0.1);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: all 0.25s ease;
    text-transform: none;
    letter-spacing: 0;
    margin-bottom: 0;
}

.category-chip label:hover {
    border-color: rgba(124, 92, 252, 0.3);
    color: var(--text);
    box-shadow: 0 0 12px rgba(124, 92, 252, 0.08);
}

.category-chip input:checked + label {
    background: rgba(124, 92, 252, 0.12);
    border-color: rgba(124, 92, 252, 0.4);
    color: #b4a0ff;
    box-shadow: 0 0 16px rgba(124, 92, 252, 0.12), inset 0 0 20px rgba(124, 92, 252, 0.04);
}

.category-emoji {
    font-size: 1rem;
}

/* ─── Secondary Categories (expandable) ──────────────────────────────── */

.secondary-categories {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.6rem;
    margin-top: 0.6rem;
}

.btn-show-more {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    width: 100%;
    padding: 0.55rem 1rem;
    margin-top: 0.6rem;
    background: transparent;
    border: 1px dashed rgba(124, 92, 252, 0.2);
    border-radius: var(--radius-sm);
    color: var(--text-dim);
    font-size: 0.82rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.25s ease;
}

.btn-show-more:hover {
    border-color: rgba(124, 92, 252, 0.4);
    color: var(--accent);
    background: rgba(124, 92, 252, 0.04);
}

.btn-show-more.expanded {
    border-style: solid;
    border-color: rgba(124, 92, 252, 0.15);
}

/* ─── Buttons ─────────────────────────────────────────────────────────── */

.btn-primary {
    width: 100%;
    padding: 0.9rem 1.5rem;
    background: linear-gradient(135deg, #7c5cfc, #00d4ff);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #6a4de0, #00b8d9);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 0 24px rgba(124, 92, 252, 0.35), 0 8px 24px rgba(0, 0, 0, 0.3);
}

.btn-primary:hover:not(:disabled)::before {
    opacity: 1;
}

.btn-primary span, .btn-primary svg {
    position: relative;
    z-index: 1;
}

.btn-primary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.btn-primary.loading {
    pointer-events: none;
}

.btn-secondary {
    padding: 0.65rem 1.25rem;
    background: transparent;
    color: var(--text-muted);
    border: 1px solid rgba(124, 92, 252, 0.2);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.25s ease;
}

.btn-secondary:hover {
    border-color: rgba(124, 92, 252, 0.5);
    color: var(--text);
    box-shadow: 0 0 16px rgba(124, 92, 252, 0.1);
}

.btn-download {
    width: 100%;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #00e68a, #00b8d9);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1.05rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.25s ease;
    margin-bottom: 0.75rem;
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 24px rgba(0, 230, 138, 0.25), 0 8px 24px rgba(0, 0, 0, 0.3);
}

.download-section {
    margin-top: 1.5rem;
}

/* ─── Progress ────────────────────────────────────────────────────────── */

.progress-bar-container {
    width: 100%;
    height: 32px;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    overflow: hidden;
    position: relative;
    margin-bottom: 1rem;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #7c5cfc, #00d4ff);
    border-radius: var(--radius-sm);
    transition: width 0.4s ease;
    width: 0%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-width: 48px;
    box-shadow: 0 0 20px rgba(124, 92, 252, 0.3);
}

.progress-bar span {
    color: white;
    font-size: 0.8rem;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.status-line {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-line::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse 1.5s infinite;
    flex-shrink: 0;
    box-shadow: 0 0 8px rgba(124, 92, 252, 0.5);
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

/* ─── Log ─────────────────────────────────────────────────────────────── */

.log-container {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    max-height: 280px;
    overflow-y: auto;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 0.8rem;
}

.log-content {
    padding: 0.75rem 1rem;
}

.log-line {
    color: var(--text-dim);
    padding: 0.15rem 0;
    border-bottom: 1px solid rgba(99, 117, 170, 0.06);
    word-break: break-word;
}

.log-line:last-child {
    border-bottom: none;
    color: var(--text-muted);
}

.log-container::-webkit-scrollbar {
    width: 6px;
}

.log-container::-webkit-scrollbar-track {
    background: transparent;
}

.log-container::-webkit-scrollbar-thumb {
    background: rgba(124, 92, 252, 0.2);
    border-radius: 3px;
}

/* ─── Summary ─────────────────────────────────────────────────────────── */

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.summary-stat {
    background: rgba(15, 23, 53, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.85rem;
    text-align: center;
    transition: border-color 0.25s ease;
}

.summary-stat:hover {
    border-color: rgba(124, 92, 252, 0.2);
}

.summary-stat .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #7c5cfc, #00d4ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.summary-stat .stat-label {
    font-size: 0.75rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-top: 0.15rem;
}

.star {
    color: var(--warning);
}

/* ─── Footer ──────────────────────────────────────────────────────────── */

.footer {
    text-align: center;
    padding: 1.5rem 0;
    color: var(--text-dim);
    font-size: 0.8rem;
}

/* ─── Utilities ───────────────────────────────────────────────────────── */

.hidden {
    display: none !important;
}

/* ─── Responsive ──────────────────────────────────────────────────────── */

@media (max-width: 640px) {
    .container {
        padding: 1.25rem 1rem;
    }

    .card {
        padding: 1.25rem;
        border-radius: 16px;
    }

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

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

    .header h1 {
        font-size: 1.5rem;
    }

    #map {
        height: 260px;
    }
}

/* ─── Setup Guide ────────────────────────────────────────────────────── */

.setup-guide {
    border-color: rgba(124, 92, 252, 0.15);
    background: linear-gradient(135deg, rgba(15, 23, 53, 0.7), rgba(15, 23, 53, 0.4));
    border-left: 3px solid;
    border-image: linear-gradient(to bottom, #7c5cfc, #00d4ff) 1;
    border-left-width: 3px;
    border-top: 1px solid rgba(124, 92, 252, 0.15);
    border-right: 1px solid rgba(124, 92, 252, 0.15);
    border-bottom: 1px solid rgba(124, 92, 252, 0.15);
}

.setup-guide h2 {
    color: var(--accent);
    font-size: 1rem;
}

.setup-steps {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.setup-step {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #7c5cfc, #00d4ff);
    color: white;
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 0.1rem;
    box-shadow: 0 0 12px rgba(124, 92, 252, 0.25);
}

.step-content {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.step-content strong {
    font-size: 0.9rem;
    color: var(--text);
}

.step-content span {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.step-content a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s;
}

.step-content a:hover {
    color: #00d4ff;
    text-decoration: underline;
}

.api-chips {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.35rem;
    flex-wrap: wrap;
}

.api-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.75rem;
    background: rgba(124, 92, 252, 0.1);
    border: 1px solid rgba(124, 92, 252, 0.2);
    border-radius: 20px;
    color: #b4a0ff !important;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none !important;
    transition: all 0.2s ease;
}

.api-chip:hover {
    background: rgba(124, 92, 252, 0.2);
    border-color: rgba(124, 92, 252, 0.4);
    box-shadow: 0 0 12px rgba(124, 92, 252, 0.15);
}

/* ─── Remember API Key ────────────────────────────────────────────────── */

.remember-key {
    margin-top: 0.6rem;
}

.remember-key small {
    display: block;
    color: var(--text-dim);
    font-size: 0.75rem;
    margin-top: 0.25rem;
    margin-left: 1.6rem;
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--text-muted);
    text-transform: none;
    letter-spacing: 0;
    margin-bottom: 0;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
    cursor: pointer;
}

/* ─── Map Section ────────────────────────────────────────────────────── */

.map-section {
    margin-top: 1.25rem;
}

.map-section h3 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.6rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

#map {
    width: 100%;
    height: 380px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg-input);
    z-index: 1;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.2);
}

.map-marker-custom {
    background: none !important;
    border: none !important;
}

/* ─── Preview Table ──────────────────────────────────────────────────── */

.table-section {
    margin-top: 1.25rem;
}

.table-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
}

.table-header h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
}

.table-wrapper {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
}

.table-wrapper::-webkit-scrollbar {
    height: 6px;
}

.table-wrapper::-webkit-scrollbar-track {
    background: transparent;
}

.table-wrapper::-webkit-scrollbar-thumb {
    background: rgba(124, 92, 252, 0.2);
    border-radius: 3px;
}

#previewTable {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

#previewTable thead th {
    background: rgba(15, 23, 53, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.7rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 1;
}

#previewTable thead th[data-sort] {
    cursor: pointer;
    user-select: none;
    transition: color 0.2s;
}

#previewTable thead th[data-sort]:hover {
    color: var(--accent);
}

#previewTable thead th[data-sort]::after {
    content: '';
    display: inline-block;
    margin-left: 0.3rem;
    width: 0;
    height: 0;
    vertical-align: middle;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-bottom: 4px solid var(--text-dim);
    opacity: 0.3;
}

#previewTable thead th.sort-asc::after {
    border-bottom: 4px solid var(--accent);
    border-top: none;
    opacity: 1;
}

#previewTable thead th.sort-desc::after {
    border-bottom: none;
    border-top: 4px solid var(--accent);
    opacity: 1;
}

#previewTable tbody td {
    padding: 0.55rem 0.75rem;
    border-bottom: 1px solid rgba(99, 117, 170, 0.06);
    vertical-align: middle;
    color: var(--text);
}

#previewTable tbody tr {
    transition: background 0.2s ease;
}

#previewTable tbody tr:hover {
    background: rgba(124, 92, 252, 0.04);
}

#previewTable tbody tr:last-child td {
    border-bottom: none;
}

.table-photo {
    width: 48px;
    height: 36px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}

.table-photo-placeholder {
    width: 48px;
    height: 36px;
    background: rgba(99, 117, 170, 0.1);
    border-radius: 6px;
}

.table-name {
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
}

.table-cat {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
    color: var(--cat-color, var(--text-muted));
    background: color-mix(in srgb, var(--cat-color, var(--text-muted)) 12%, transparent);
    white-space: nowrap;
}

.table-link {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    transition: color 0.2s;
}

.table-link:hover {
    color: #00d4ff;
    text-decoration: underline;
}

/* ─── Spinner ─────────────────────────────────────────────────────────── */

.spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.2);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* ─── Text Button ────────────────────────────────────────────────────── */

.btn-text {
    background: none;
    border: none;
    color: var(--accent);
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: inherit;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s;
}

.btn-text:hover {
    background: rgba(124, 92, 252, 0.1);
    color: #00d4ff;
}

/* ─── Global Scrollbar ───────────────────────────────────────────────── */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(124, 92, 252, 0.15);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(124, 92, 252, 0.3);
}
