/* ═══════════════════════════════════════════════
   Elliott's Cards — Stylesheet
   Trading Card Database & Price Tracker
   ═══════════════════════════════════════════════ */

/* ─── Reset & Variables ──────────────────────── */
:root {
    --bg: #0f1117;
    --bg-card: #1a1d27;
    --bg-card-hover: #222636;
    --bg-modal: #1a1d27;
    --bg-input: #12141c;
    --border: #2a2e3d;
    --border-focus: #5b6eef;
    --text: #e8eaed;
    --text-muted: #8b8fa3;
    --text-dim: #5d6175;
    --primary: #5b6eef;
    --primary-hover: #4a5cd4;
    --primary-bg: rgba(91, 110, 239, 0.12);
    --success: #34d399;
    --success-bg: rgba(52, 211, 153, 0.12);
    --warning: #fbbf24;
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.12);
    --shadow: 0 4px 24px rgba(0,0,0,0.3);
    --radius: 12px;
    --radius-sm: 8px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

/* ─── Header ─────────────────────────────────── */
.site-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
}

.header-content { flex: 1; min-width: 200px; }
.logo {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}
.tagline {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 2px;
}

.header-stats {
    display: flex;
    gap: 16px;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--bg);
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid var(--border);
}
.stat-value { color: var(--text); font-weight: 600; }

.header-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ─── Buttons ────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}
.btn-primary {
    background: var(--primary);
    color: white;
}
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-1px); }
.btn-secondary {
    background: var(--primary-bg);
    color: var(--primary);
    border: 1px solid transparent;
}
.btn-secondary:hover { border-color: var(--primary); }
.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
}
.btn-ghost:hover { color: var(--text); border-color: var(--text-muted); }
.btn-danger { background: var(--danger-bg); color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: white; }
.btn-sm { padding: 6px 12px; font-size: 0.8rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ─── Search & Filters ───────────────────────── */
.search-bar {
    padding: 16px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}
.search-icon {
    position: absolute;
    left: 14px;
    color: var(--text-dim);
    pointer-events: none;
}
#searchInput {
    width: 100%;
    padding: 12px 40px 12px 44px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.15s;
}
#searchInput:focus { border-color: var(--border-focus); }
#searchInput::placeholder { color: var(--text-dim); }
.search-clear {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 1.3rem;
    cursor: pointer;
    display: none;
    padding: 4px 8px;
}
.search-clear.visible { display: block; }

.filter-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.chip {
    padding: 6px 16px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.15s;
}
.chip:hover { border-color: var(--text-muted); color: var(--text); }
.chip.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* ─── Card Grid ──────────────────────────────── */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    padding: 0 24px 40px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.card-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
}
.card-item:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.card-image-wrapper {
    width: 100%;
    aspect-ratio: 3/4;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}
.card-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.card-image-placeholder {
    font-size: 3rem;
    opacity: 0.3;
}
.card-category-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(0,0,0,0.7);
    color: white;
    backdrop-filter: blur(4px);
}

.card-info {
    padding: 14px;
}
.card-name {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.card-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.card-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.card-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--success);
}
.card-price.no-price {
    color: var(--text-dim);
    font-size: 0.85rem;
    font-weight: 400;
}
.card-condition {
    font-size: 0.75rem;
    padding: 2px 8px;
    background: var(--primary-bg);
    color: var(--primary);
    border-radius: 4px;
}

/* ─── Empty State ────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 80px 24px;
    color: var(--text-muted);
}
.empty-icon { font-size: 4rem; margin-bottom: 16px; }
.empty-state h2 { font-size: 1.4rem; color: var(--text); margin-bottom: 8px; }

/* ─── Loading ────────────────────────────────── */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}
.spinner {
    width: 36px; height: 36px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Modal ──────────────────────────────────── */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    justify-content: center;
    align-items: flex-start;
    padding: 40px 16px;
    overflow-y: auto;
}
.modal-overlay.active { display: flex; }

.modal {
    background: var(--bg-modal);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    width: 100%;
    max-width: 560px;
    box-shadow: var(--shadow);
    animation: modalIn 0.2s ease;
}
.modal-large { max-width: 800px; }
.modal-small { max-width: 400px; }

@keyframes modalIn {
    from { opacity: 0; transform: translateY(-12px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
}
.modal-header h2 { font-size: 1.15rem; }
.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}
.modal-close:hover { color: var(--text); }

/* ─── Forms ──────────────────────────────────── */
.form-section { padding: 16px 20px; }
.form-section + .form-section { border-top: 1px solid var(--border); }

.form-row { display: flex; gap: 12px; }
.form-group { margin-bottom: 14px; flex: 1; }
.flex-1 { flex: 1; }
.flex-2 { flex: 2; }

.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.form-hint {
    font-size: 0.78rem;
    color: var(--text-dim);
    margin-top: 6px;
}
.api-key-row {
    display: flex;
    gap: 8px;
}
.api-key-row input { flex: 1; }

input[type="text"], input[type="password"], textarea, select {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s;
}
input[type="text"]:focus, input[type="password"]:focus, textarea:focus, select:focus { border-color: var(--border-focus); }
input::placeholder, textarea::placeholder { color: var(--text-dim); }
input[type="password"]::placeholder { color: var(--text-dim); }
select { cursor: pointer; }

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 20px;
    border-top: 1px solid var(--border);
}

/* ─── Upload Area ────────────────────────────── */
.upload-area {
    position: relative;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s;
    margin-bottom: 10px;
    overflow: hidden;
}
.upload-area:hover { border-color: var(--primary); }
.upload-area input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}
.upload-placeholder { color: var(--text-dim); }
.upload-placeholder p { margin-top: 8px; font-size: 0.9rem; }
.upload-hint { font-size: 0.78rem !important; }
.image-preview {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    object-fit: contain;
}

/* ─── Dual Upload (Front/Back) ───────────────── */
.upload-row {
    display: flex;
    gap: 12px;
    margin-bottom: 10px;
}
.upload-col {
    flex: 1;
    min-width: 0;
}
.upload-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.upload-optional {
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: var(--text-dim);
    font-size: 0.75rem;
}
.upload-area-half {
    padding: 16px 10px;
    margin-bottom: 0;
}
.upload-area-half .upload-placeholder p { font-size: 0.8rem; }
.upload-area-half .image-preview {
    max-height: 180px;
}
.btn-remove-image {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: none;
    background: var(--danger);
    color: white;
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    opacity: 0.85;
    transition: opacity 0.15s;
}
.btn-remove-image:hover { opacity: 1; }

/* Detail images side-by-side (when both front and back exist) */
.detail-images {
    display: flex;
    gap: 12px;
    grid-column: 1 / -1;
    margin-bottom: 8px;
}
.detail-images + .detail-info {
    grid-column: 1 / -1;
}
.detail-images .detail-image {
    flex: 1;
    min-width: 0;
}
.detail-images .detail-image img {
    width: 100%;
    border-radius: var(--radius-sm);
}
.detail-image-label {
    font-size: 0.7rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
    text-align: center;
}

.ocr-result {
    margin-top: 10px;
    padding: 10px;
    background: var(--bg);
    border-radius: var(--radius-sm);
}
.ocr-result textarea {
    font-family: monospace;
    font-size: 0.8rem;
    resize: vertical;
}

/* ─── Card Detail ────────────────────────────── */
.detail-content {
    padding: 20px;
}
.detail-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
.detail-image {
    width: 100%;
    border-radius: var(--radius-sm);
    background: var(--bg);
}
.detail-image img {
    width: 100%;
    border-radius: var(--radius-sm);
}
.detail-image-placeholder {
    aspect-ratio: 3/4;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    opacity: 0.3;
    background: var(--bg);
    border-radius: var(--radius-sm);
}
.detail-info { display: flex; flex-direction: column; gap: 12px; }

.detail-field {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.detail-field-label {
    font-size: 0.75rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.detail-field-value { font-size: 0.95rem; }

.detail-price-main {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--success);
    margin: 4px 0;
}

.detail-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
}

/* Price History */
.price-history {
    margin-top: 20px;
    border-top: 1px solid var(--border);
    padding-top: 16px;
}
.price-history h3 {
    font-size: 1rem;
    margin-bottom: 12px;
}
.price-chart-container {
    margin-bottom: 16px;
    background: rgba(0,0,0,0.2);
    border-radius: var(--radius-sm);
    padding: 8px 0;
    overflow: hidden;
}
.price-chart-container canvas {
    display: block;
    width: 100%;
}
.price-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
.price-table th {
    text-align: left;
    padding: 8px 10px;
    color: var(--text-dim);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--border);
}
.price-table td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--border);
}
.price-table tr:last-child td { border-bottom: none; }
.price-table a {
    color: var(--primary);
    text-decoration: none;
}
.price-table a:hover { text-decoration: underline; }
.price-value { font-weight: 600; color: var(--success); }
.price-value.search-link { color: var(--primary); font-weight: 400; }

/* ─── Toast ──────────────────────────────────── */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.toast {
    padding: 12px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.9rem;
    box-shadow: var(--shadow);
    animation: toastIn 0.3s ease;
    max-width: 360px;
}
.toast.success { border-left: 3px solid var(--success); }
.toast.error { border-left: 3px solid var(--danger); }
.toast.info { border-left: 3px solid var(--primary); }

@keyframes toastIn {
    from { opacity: 0; transform: translateX(24px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ─── Image Lightbox / Zoom ──────────────────── */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    cursor: zoom-out;
}
.lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}
.lightbox-container {
    position: relative;
    max-width: 95vw;
    max-height: 95vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
}
.lightbox-img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
    cursor: zoom-in;
    user-select: none;
    -webkit-user-select: none;
    will-change: transform;
    transform-origin: center center;
}
.lightbox-img.animating {
    transition: transform 0.25s ease-out;
}
.lightbox-img.dragging {
    cursor: grabbing;
}
.lightbox-close {
    position: fixed;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    font-size: 1.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    backdrop-filter: blur(4px);
    transition: background 0.15s;
}
.lightbox-close:hover { background: rgba(255,255,255,0.3); }
.lightbox-rotate-controls {
    position: fixed;
    top: 16px;
    left: 16px;
    display: flex;
    gap: 8px;
    z-index: 10001;
}
.lightbox-rotate-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    transition: background 0.15s;
}
.lightbox-rotate-btn:hover { background: rgba(255,255,255,0.3); }
.lightbox-label {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.7);
    font-size: 0.85rem;
    background: rgba(0,0,0,0.5);
    padding: 6px 16px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
    z-index: 10001;
}
.lightbox-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    border: none;
    color: #fff;
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    backdrop-filter: blur(4px);
    transition: background 0.15s;
}
.lightbox-nav:hover { background: rgba(255,255,255,0.25); }
.lightbox-nav.prev { left: 16px; }
.lightbox-nav.next { right: 16px; }
.lightbox-zoom-hint {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.5);
    font-size: 0.75rem;
    z-index: 10001;
    pointer-events: none;
    transition: opacity 0.3s;
}

/* Make detail images clickable */
.detail-image img,
.detail-images .detail-image img {
    cursor: zoom-in;
    transition: opacity 0.15s;
}
.detail-image img:hover,
.detail-images .detail-image img:hover {
    opacity: 0.85;
}


/* ─── Auth Pages (Login / Setup) ─────────────── */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
}
.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px 32px;
    width: 100%;
    max-width: 400px;
    text-align: center;
    box-shadow: var(--shadow);
}
.auth-logo {
    font-size: 3.5rem;
    margin-bottom: 12px;
}
.auth-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 4px;
}
.auth-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 24px;
}
.auth-field {
    text-align: left;
    margin-bottom: 16px;
}
.auth-field label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.auth-field input {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.15s;
}
.auth-field input:focus {
    border-color: var(--border-focus);
}
.auth-submit {
    width: 100%;
    margin-top: 8px;
    padding: 12px;
    font-size: 1rem;
}
.auth-error {
    margin-top: 14px;
    padding: 10px 14px;
    background: var(--danger-bg);
    border: 1px solid var(--danger);
    border-radius: var(--radius-sm);
    color: var(--danger);
    font-size: 0.85rem;
    text-align: left;
}

/* ─── User Menu in Header ───────────────────── */
.user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
}
.user-name {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}
.admin-badge {
    display: inline-block;
    padding: 1px 7px;
    border-radius: 10px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: var(--primary-bg);
    color: var(--primary);
    vertical-align: middle;
    margin-left: 4px;
}

/* ─── Admin Panel ───────────────────────────── */
.admin-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    padding: 0 20px;
}
.admin-tab {
    padding: 12px 20px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}
.admin-tab:hover { color: var(--text); }
.admin-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}
.admin-tab-content {
    /* display controlled by JS */
}

/* Users List */
.users-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.user-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    gap: 12px;
}
.user-row-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.user-row-name {
    font-weight: 600;
    font-size: 0.9rem;
}
.user-row-meta {
    font-size: 0.78rem;
    color: var(--text-dim);
}
.user-row-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

/* Admin Stats Grid */
.admin-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
.admin-stat-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 20px;
    text-align: center;
}
.admin-stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary);
}
.admin-stat-label {
    font-size: 0.78rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 4px;
}

/* ─── Responsive ─────────────────────────────── */
@media (max-width: 768px) {
    .site-header { padding: 16px; gap: 12px; }
    .logo { font-size: 1.3rem; }
    .header-stats { display: none; }
    .search-bar { padding: 12px 16px; }
    .card-grid { padding: 0 16px 24px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
    .card-info { padding: 10px; }
    .card-name { font-size: 0.9rem; }
    .form-row { flex-direction: column; gap: 0; }
    .upload-row { flex-direction: column; gap: 8px; }
    .detail-layout { grid-template-columns: 1fr; }
    .detail-images { flex-direction: column; }
    .modal { margin-top: 16px; }
}

@media (max-width: 480px) {
    .header-actions { width: 100%; flex-wrap: wrap; }
    .header-actions .btn { flex: 1; justify-content: center; font-size: 0.8rem; padding: 8px 10px; }
    .user-menu { width: 100%; justify-content: space-between; }
    .card-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .auth-card { padding: 28px 20px; }
    .admin-stat-grid { grid-template-columns: 1fr; }
    .user-row { flex-direction: column; align-items: flex-start; }
    .user-row-actions { width: 100%; }
}

/* ─── Image Source Picker Modal ─────────────── */
.modal-small { max-width: 320px; }
.image-source-options {
    display: flex;
    gap: 16px;
    padding: 20px;
    justify-content: center;
}
.image-source-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 24px;
    border: 2px solid var(--border);
    border-radius: 12px;
    background: var(--card-bg);
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
    flex: 1;
}
.image-source-btn:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}
.image-source-btn svg {
    color: var(--primary);
}

/* ─── Blur Warning ──────────────────────────── */
.blur-warning {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 8px 12px;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.4);
    border-radius: 8px;
    font-size: 0.8rem;
    color: #f59e0b;
    flex-wrap: wrap;
}
.blur-icon { font-size: 1rem; flex-shrink: 0; }
.blur-text { flex: 1; min-width: 150px; }
.btn-retake {
    padding: 4px 12px;
    border: 1px solid #f59e0b;
    border-radius: 6px;
    background: transparent;
    color: #f59e0b;
    font-size: 0.75rem;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}
.btn-retake:hover {
    background: #f59e0b;
    color: #000;
}
