/* ============================================================
   HobbyFinder Portal — custom theme (no UI framework needed)
   ============================================================ */

:root {
    /* Brand */
    --hf-indigo-50:  #eef2ff;
    --hf-indigo-100: #e0e7ff;
    --hf-indigo-200: #c7d2fe;
    --hf-indigo-500: #6366f1;
    --hf-indigo-600: #4f46e5;
    --hf-indigo-700: #4338ca;

    --hf-teal-50:  #f0fdfa;
    --hf-teal-100: #ccfbf1;
    --hf-teal-400: #2dd4bf;
    --hf-teal-500: #14b8a6;
    --hf-teal-600: #0d9488;
    --hf-teal-700: #0f766e;

    /* Neutrals */
    --hf-bg:       #f6f8fb;
    --hf-surface:  #ffffff;
    --hf-border:   #e5e7eb;
    --hf-border-2: #d1d5db;
    --hf-muted:    #6b7280;
    --hf-text:     #111827;
    --hf-text-2:   #374151;

    /* Feedback */
    --hf-success:  #10b981;
    --hf-warning:  #f59e0b;
    --hf-danger:   #ef4444;
    --hf-info:     #3b82f6;

    /* Effects */
    --hf-radius-sm: 6px;
    --hf-radius:    10px;
    --hf-radius-lg: 16px;
    --hf-shadow-sm: 0 1px 2px rgba(17, 24, 39, .04), 0 1px 3px rgba(17, 24, 39, .06);
    --hf-shadow:    0 4px 6px -1px rgba(17, 24, 39, .07), 0 2px 4px -2px rgba(17, 24, 39, .06);
    --hf-shadow-lg: 0 20px 25px -5px rgba(17, 24, 39, .10), 0 8px 10px -6px rgba(17, 24, 39, .08);

    --hf-nav-w:  248px;
    --hf-nav-w-collapsed: 72px;
    --hf-header-h: 60px;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', sans-serif;
    color: var(--hf-text);
    background: var(--hf-bg);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6 { margin: 0 0 .5rem; font-weight: 600; color: var(--hf-text); }
h1 { font-size: 1.875rem; letter-spacing: -.02em; }
h2 { font-size: 1.5rem; letter-spacing: -.015em; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }
p { margin: 0 0 .75rem; }
a { color: var(--hf-indigo-600); text-decoration: none; }
a:hover { text-decoration: underline; }
hr { border: 0; border-top: 1px solid var(--hf-border); margin: 1rem 0; }

/* ---------- layout shell ---------- */
.hf-shell { display: flex; min-height: 100vh; }
.hf-sidebar {
    width: var(--hf-nav-w);
    background: linear-gradient(180deg, #1f2937 0%, #111827 100%);
    color: #cbd5e1;
    display: flex; flex-direction: column;
    position: sticky; top: 0; height: 100vh;
    flex-shrink: 0;
    transition: width .2s ease;
}
.hf-sidebar.collapsed { width: var(--hf-nav-w-collapsed); }
.hf-sidebar.collapsed .hf-brand-text,
.hf-sidebar.collapsed .hf-nav-link span { display: none; }
.hf-brand {
    padding: 18px 20px;
    display: flex; align-items: center; gap: 10px;
    color: #f9fafb;
    border-bottom: 1px solid rgba(255,255,255,.06);
}
.hf-brand-mark {
    width: 32px; height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--hf-teal-400), var(--hf-indigo-500));
    display: grid; place-items: center; color: #fff; font-weight: 700;
    flex-shrink: 0;
}
.hf-brand-text { font-weight: 600; font-size: .95rem; line-height: 1.2; }
.hf-brand-text small { display: block; color: #94a3b8; font-weight: 400; font-size: .72rem; }

.hf-nav { padding: 12px 8px; flex: 1; overflow-y: auto; }
.hf-nav-section { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em;
    color: #6b7280; padding: 14px 12px 6px; }
.hf-nav-link {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px; margin: 2px 0;
    border-radius: var(--hf-radius-sm);
    color: #cbd5e1; cursor: pointer;
    text-decoration: none; font-weight: 500;
    transition: background .15s, color .15s;
}
.hf-nav-link:hover { background: rgba(255,255,255,.05); color: #fff; text-decoration: none; }
.hf-nav-link.active {
    background: linear-gradient(90deg, rgba(20,184,166,.15), rgba(99,102,241,.15));
    color: #fff;
    box-shadow: inset 3px 0 0 var(--hf-teal-400);
}
.hf-nav-link svg { width: 18px; height: 18px; flex-shrink: 0; }

.hf-sidebar-footer {
    padding: 12px;
    border-top: 1px solid rgba(255,255,255,.06);
}
.hf-user-chip {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px; border-radius: var(--hf-radius-sm);
    color: #cbd5e1; text-decoration: none;
}
.hf-user-chip:hover { background: rgba(255,255,255,.05); color: #fff; text-decoration: none; }
.hf-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: linear-gradient(135deg, var(--hf-teal-500), var(--hf-indigo-600));
    color: white; display: grid; place-items: center; font-weight: 600; font-size: .8rem;
    flex-shrink: 0;
}

.hf-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.hf-topbar {
    height: var(--hf-header-h);
    background: var(--hf-surface);
    border-bottom: 1px solid var(--hf-border);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 24px;
    position: sticky; top: 0; z-index: 30;
}
.hf-topbar-left, .hf-topbar-right { display: flex; align-items: center; gap: 12px; }
.hf-content { padding: 24px; max-width: 1400px; width: 100%; margin: 0 auto; }

@media (max-width: 900px) {
    .hf-sidebar { position: fixed; left: -260px; z-index: 60; transition: left .2s ease; }
    .hf-sidebar.open { left: 0; box-shadow: var(--hf-shadow-lg); }
    .hf-backdrop {
        position: fixed; inset: 0; background: rgba(0,0,0,.4);
        z-index: 50; opacity: 0; pointer-events: none; transition: opacity .15s;
    }
    .hf-backdrop.open { opacity: 1; pointer-events: auto; }
}

/* ---------- buttons ---------- */
.hf-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 8px 16px;
    background: var(--hf-surface);
    border: 1px solid var(--hf-border-2);
    color: var(--hf-text-2);
    border-radius: var(--hf-radius-sm);
    font-weight: 500; font-size: .875rem;
    cursor: pointer; user-select: none;
    transition: all .15s ease; text-decoration: none;
    line-height: 1.25;
}
.hf-btn:hover { border-color: var(--hf-text-2); color: var(--hf-text); text-decoration: none; }
.hf-btn:focus-visible { outline: 2px solid var(--hf-indigo-500); outline-offset: 2px; }
.hf-btn:disabled, .hf-btn[disabled] { opacity: .5; cursor: not-allowed; }
.hf-btn svg { width: 16px; height: 16px; flex-shrink: 0; }

.hf-btn-primary {
    background: linear-gradient(135deg, var(--hf-teal-500), var(--hf-indigo-600));
    border: 1px solid transparent;
    color: #fff;
    box-shadow: var(--hf-shadow-sm);
}
.hf-btn-primary:hover {
    color: #fff;
    box-shadow: var(--hf-shadow);
    filter: brightness(1.05);
}
.hf-btn-secondary {
    background: var(--hf-indigo-50); border-color: var(--hf-indigo-100);
    color: var(--hf-indigo-700);
}
.hf-btn-secondary:hover { background: var(--hf-indigo-100); color: var(--hf-indigo-700); }
.hf-btn-danger {
    background: #fff; border-color: #fecaca; color: var(--hf-danger);
}
.hf-btn-danger:hover { background: #fef2f2; color: #b91c1c; border-color: #fca5a5; }
.hf-btn-danger-solid { background: var(--hf-danger); border-color: var(--hf-danger); color: #fff; }
.hf-btn-danger-solid:hover { background: #dc2626; border-color: #dc2626; color: #fff; }
.hf-btn-ghost { background: transparent; border-color: transparent; color: var(--hf-text-2); }
.hf-btn-ghost:hover { background: rgba(0,0,0,.05); color: var(--hf-text); border-color: transparent; }
.hf-btn-sm { padding: 5px 10px; font-size: .8rem; }
.hf-btn-lg { padding: 11px 22px; font-size: 1rem; }
.hf-btn-icon { padding: 8px; width: 36px; height: 36px; }
.hf-btn-icon.hf-btn-sm { width: 30px; height: 30px; padding: 6px; }
.hf-btn-block { width: 100%; }

/* ---------- forms ---------- */
.hf-field { margin-bottom: 14px; }
.hf-label {
    display: block; font-size: .8rem; font-weight: 500;
    color: var(--hf-text-2); margin-bottom: 4px;
}
.hf-label .req { color: var(--hf-danger); margin-left: 2px; }
.hf-input, .hf-textarea, .hf-select {
    width: 100%; padding: 9px 12px;
    background: var(--hf-surface); color: var(--hf-text);
    border: 1px solid var(--hf-border-2);
    border-radius: var(--hf-radius-sm);
    font: inherit;
    transition: border-color .15s, box-shadow .15s;
}
.hf-input:focus, .hf-textarea:focus, .hf-select:focus {
    outline: none; border-color: var(--hf-indigo-500);
    box-shadow: 0 0 0 3px rgba(99,102,241,.18);
}
.hf-input::placeholder, .hf-textarea::placeholder { color: #9ca3af; }
.hf-textarea { resize: vertical; min-height: 80px; }
.hf-input-error { border-color: var(--hf-danger); }
.hf-error-msg { color: var(--hf-danger); font-size: .78rem; margin-top: 4px; }
.hf-help { color: var(--hf-muted); font-size: .78rem; margin-top: 4px; }

.hf-checkbox {
    display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
    font-size: .875rem; color: var(--hf-text-2);
}
.hf-checkbox input[type=checkbox] {
    width: 18px; height: 18px; cursor: pointer; accent-color: var(--hf-indigo-600);
}

/* ---------- card ---------- */
.hf-card {
    background: var(--hf-surface);
    border: 1px solid var(--hf-border);
    border-radius: var(--hf-radius);
    box-shadow: var(--hf-shadow-sm);
    overflow: hidden;
    transition: border-color .15s, box-shadow .15s, transform .15s;
}
.hf-card.hf-card-hover:hover {
    border-color: var(--hf-indigo-200);
    box-shadow: var(--hf-shadow);
    transform: translateY(-2px);
}
.hf-card-body { padding: 16px; }
.hf-card-header {
    padding: 14px 16px;
    border-bottom: 1px solid var(--hf-border);
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.hf-card-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--hf-border);
    background: #fafbfc;
}
.hf-card-media {
    width: 100%; aspect-ratio: 16 / 9; object-fit: cover;
    background: var(--hf-bg);
    display: block;
}
.hf-card-media-fallback {
    width: 100%; aspect-ratio: 16 / 9;
    background: var(--hf-bg);
    border-bottom: 1px solid var(--hf-border);
    display: grid; place-items: center;
}
.hf-card-media-initial {
    font-size: 2rem; font-weight: 700; line-height: 1;
    color: var(--hf-border-2);
    user-select: none;
}

/* selectable variant */
.hf-card-selectable { cursor: pointer; }
.hf-card-selected {
    border-color: var(--hf-teal-500) !important;
    box-shadow: 0 0 0 3px rgba(20,184,166,.18), var(--hf-shadow) !important;
}

/* ---------- chips / tags ---------- */
.hf-chip {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 10px;
    background: var(--hf-indigo-50);
    color: var(--hf-indigo-700);
    border-radius: 999px;
    font-size: .78rem; font-weight: 500;
    border: 1px solid var(--hf-indigo-100);
}
.hf-chip button {
    border: 0; background: transparent; padding: 0; margin-left: 2px;
    color: inherit; cursor: pointer; line-height: 1;
    width: 16px; height: 16px; display: grid; place-items: center;
    border-radius: 50%;
}
.hf-chip button:hover { background: rgba(0,0,0,.08); }
.hf-chip-teal { background: var(--hf-teal-50); color: var(--hf-teal-700); border-color: var(--hf-teal-100); }
.hf-chip-grey { background: #f3f4f6; color: var(--hf-text-2); border-color: var(--hf-border); }

.hf-chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- badge ---------- */
.hf-badge {
    display: inline-flex; align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: .7rem; font-weight: 600;
    background: #f3f4f6; color: var(--hf-text-2);
}

/* ---------- dialog ---------- */
.hf-dialog-backdrop {
    position: fixed; inset: 0; z-index: 100;
    background: rgba(15, 23, 42, .55);
    display: grid; place-items: center; padding: 16px;
    animation: hf-fade-in .15s ease;
}
@keyframes hf-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes hf-pop-in { from { transform: scale(.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.hf-dialog {
    background: var(--hf-surface);
    border-radius: var(--hf-radius-lg);
    box-shadow: var(--hf-shadow-lg);
    max-width: 440px; width: 100%;
    animation: hf-pop-in .15s ease;
    overflow: hidden;
}
.hf-dialog-header { padding: 20px 24px 0; }
.hf-dialog-title { font-size: 1.1rem; font-weight: 600; margin: 0; }
.hf-dialog-body { padding: 12px 24px 20px; color: var(--hf-text-2); }
.hf-dialog-footer {
    padding: 12px 24px;
    background: #f9fafb;
    border-top: 1px solid var(--hf-border);
    display: flex; justify-content: flex-end; gap: 8px;
}

/* ---------- toast ---------- */
.hf-toast-container {
    position: fixed; bottom: 20px; right: 20px;
    z-index: 200;
    display: flex; flex-direction: column; gap: 8px;
    pointer-events: none;
}
.hf-toast {
    pointer-events: auto;
    min-width: 280px; max-width: 420px;
    padding: 12px 16px;
    background: var(--hf-surface);
    border-radius: var(--hf-radius);
    box-shadow: var(--hf-shadow-lg);
    border-left: 4px solid var(--hf-info);
    display: flex; align-items: flex-start; gap: 10px;
    animation: hf-toast-in .2s ease;
    font-size: .875rem;
}
@keyframes hf-toast-in {
    from { transform: translateX(20px); opacity: 0; }
    to   { transform: translateX(0);    opacity: 1; }
}
.hf-toast.success { border-left-color: var(--hf-success); }
.hf-toast.warning { border-left-color: var(--hf-warning); }
.hf-toast.danger  { border-left-color: var(--hf-danger); }
.hf-toast-icon { flex-shrink: 0; width: 20px; height: 20px; }
.hf-toast-icon.success { color: var(--hf-success); }
.hf-toast-icon.warning { color: var(--hf-warning); }
.hf-toast-icon.danger  { color: var(--hf-danger); }
.hf-toast-icon.info    { color: var(--hf-info); }
.hf-toast-body { flex: 1; }
.hf-toast-close {
    border: 0; background: transparent; cursor: pointer;
    color: var(--hf-muted); padding: 0;
}
.hf-toast-close:hover { color: var(--hf-text); }

/* ---------- spinner ---------- */
.hf-spinner {
    width: 20px; height: 20px; border-radius: 50%;
    border: 2px solid var(--hf-border-2);
    border-top-color: var(--hf-indigo-600);
    animation: hf-spin .8s linear infinite;
    display: inline-block;
}
.hf-spinner-lg { width: 36px; height: 36px; border-width: 3px; }
@keyframes hf-spin { to { transform: rotate(360deg); } }
.hf-loading-block {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 12px; padding: 60px 20px; color: var(--hf-muted);
}

/* ---------- empty state ---------- */
.hf-empty {
    border: 1px dashed var(--hf-border-2);
    border-radius: var(--hf-radius);
    padding: 40px 24px;
    text-align: center;
    background: var(--hf-surface);
}
.hf-empty h3 { color: var(--hf-text); margin-bottom: 6px; }
.hf-empty p { color: var(--hf-muted); margin-bottom: 16px; }

/* ---------- utility helpers ---------- */
.hf-row { display: flex; gap: 16px; }
.hf-row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.hf-row-center { display: flex; align-items: center; gap: 8px; }
.hf-col { flex: 1; min-width: 0; }
.hf-stack { display: flex; flex-direction: column; }
.hf-grid { display: grid; }
.hf-mt-0 { margin-top: 0 !important; }
.hf-mb-0 { margin-bottom: 0 !important; }
.hf-mb-2 { margin-bottom: .5rem; }
.hf-mb-3 { margin-bottom: 1rem; }
.hf-mb-4 { margin-bottom: 1.5rem; }
.hf-mt-3 { margin-top: 1rem; }
.hf-gap-2 { gap: .5rem; }
.hf-gap-3 { gap: 1rem; }
.hf-text-muted { color: var(--hf-muted); }
.hf-text-sm { font-size: .8rem; }
.hf-text-xs { font-size: .72rem; }
.hf-truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- page-specific: organization management ---------- */
.hf-page-header {
    display: flex; align-items: flex-end; justify-content: space-between;
    flex-wrap: wrap; gap: 12px;
    margin-bottom: 24px;
}
.hf-page-title h1 { margin-bottom: 4px; }
.hf-page-title p { color: var(--hf-muted); margin: 0; }

.hf-section-title {
    display: flex; align-items: center; justify-content: space-between;
    margin: 28px 0 14px;
}
.hf-section-title h2 { margin: 0; }

.hf-orgs-scroll {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 4px 4px 12px;
    scroll-snap-type: x proximity;
}
.hf-orgs-scroll > * {
    flex: 0 0 260px;
    scroll-snap-align: start;
}
.hf-orgs-search {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.hf-orgs-search input {
    flex: 1;
    max-width: 320px;
    padding: 8px 12px;
    border: 1px solid var(--hf-border);
    border-radius: var(--hf-radius);
    background: var(--hf-surface);
    font-size: .95rem;
}
.hf-activities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 16px;
}

/* ---------- form layout (create/edit pages) ---------- */
.hf-form-shell {
    max-width: 1100px; margin: 0 auto;
    background: var(--hf-surface);
    border: 1px solid var(--hf-border);
    border-radius: var(--hf-radius-lg);
    box-shadow: var(--hf-shadow-sm);
    overflow: hidden;
}
.hf-form-header {
    padding: 22px 28px;
    border-bottom: 1px solid var(--hf-border);
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
}
.hf-form-header h1 { margin-bottom: 4px; }
.hf-form-header p { color: var(--hf-muted); margin: 0; }
.hf-form-body { padding: 28px; }
.hf-form-footer {
    padding: 16px 28px;
    border-top: 1px solid var(--hf-border);
    background: #fafbfc;
    display: flex; justify-content: flex-end; gap: 8px;
}

.hf-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}
@media (max-width: 800px) { .hf-form-grid { grid-template-columns: 1fr; } }

.hf-fieldset { margin-bottom: 20px; }
.hf-fieldset h3 {
    font-size: .8rem; text-transform: uppercase; letter-spacing: .06em;
    color: var(--hf-muted); margin-bottom: 12px; font-weight: 600;
}
.hf-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hf-form-row-3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 12px; }

/* ---------- mapbox geocoder integration ---------- */
.hf-geocoder { margin-bottom: 12px; }
.hf-geocoder .mapboxgl-ctrl-geocoder {
    width: 100% !important; max-width: none !important;
    box-shadow: none !important;
    border: 1px solid var(--hf-border-2) !important;
    border-radius: var(--hf-radius-sm) !important;
    background: #fff;
    font: inherit;
}
.hf-geocoder .mapboxgl-ctrl-geocoder--input {
    height: 40px !important; padding-left: 40px !important;
    font: inherit !important; color: var(--hf-text) !important;
}
.hf-geocoder .mapboxgl-ctrl-geocoder--input:focus {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(99,102,241,.18) !important;
    border-radius: var(--hf-radius-sm) !important;
}

/* ---------- autocomplete (tags) ---------- */
.hf-autocomplete { position: relative; }
.hf-autocomplete-list {
    position: absolute; top: calc(100% + 4px); left: 0; right: 0;
    background: var(--hf-surface);
    border: 1px solid var(--hf-border);
    border-radius: var(--hf-radius-sm);
    box-shadow: var(--hf-shadow);
    max-height: 240px; overflow-y: auto;
    z-index: 20;
}
.hf-autocomplete-item {
    padding: 8px 12px; cursor: pointer;
    display: flex; align-items: center; gap: 8px;
}
.hf-autocomplete-item:hover, .hf-autocomplete-item.active { background: var(--hf-indigo-50); }
.hf-autocomplete-empty { padding: 10px 12px; color: var(--hf-muted); font-size: .85rem; }

/* ---------- alerts ---------- */
.hf-alert {
    padding: 12px 14px;
    border-radius: var(--hf-radius-sm);
    display: flex; align-items: flex-start; gap: 10px;
    font-size: .875rem;
}
.hf-alert-danger  { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.hf-alert-warning { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.hf-alert-info    { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }
.hf-alert-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }

/* ---------- error UI (Blazor default) ---------- */
#blazor-error-ui {
    background: lightyellow;
    bottom: 0; box-shadow: 0 -1px 2px rgba(0,0,0,.2);
    display: none; left: 0; padding: 0.6rem 1.25rem 0.7rem 1.25rem; position: fixed;
    width: 100%; z-index: 1000;
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 0.75rem; top: 0.5rem; }

/* ---------- ImagePicker ---------- */
.ip-root {
    background: var(--hf-surface);
    border: 1px solid var(--hf-border);
    border-radius: var(--hf-radius);
    overflow: hidden;
}

.ip-preview {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--hf-bg);
}
.ip-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ip-preview-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 20px;
    color: var(--hf-muted);
    font-size: .8rem;
    border-bottom: 1px solid var(--hf-border);
}
.ip-preview-empty svg { opacity: .45; }

.ip-tabs {
    display: flex;
    gap: 6px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--hf-border);
    background: var(--hf-bg);
}

.ip-panel { padding: 14px; }

.ip-file-input {
    display: block;
    width: 100%;
    padding: 8px 0;
    font: inherit;
    font-size: .875rem;
    color: var(--hf-text-2);
    cursor: pointer;
}
.ip-file-input:disabled { opacity: .5; cursor: not-allowed; }

.ip-feedback { margin-top: 10px; font-size: .82rem; }

.ip-stock-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 8px;
}
.ip-stock-thumb {
    position: relative;
    aspect-ratio: 4 / 3;
    border: 2px solid transparent;
    border-radius: var(--hf-radius-sm);
    overflow: hidden;
    padding: 0;
    cursor: pointer;
    background: var(--hf-border);
    transition: border-color .15s, box-shadow .15s;
}
.ip-stock-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.ip-stock-thumb:hover:not(:disabled) {
    border-color: var(--hf-indigo-500);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .18);
}
.ip-stock-thumb:hover:not(:disabled) img { transform: scale(1.04); }
.ip-stock-thumb:disabled { cursor: not-allowed; opacity: .75; }
.ip-stock-busy { border-color: var(--hf-teal-500); }
.ip-stock-overlay {
    position: absolute; inset: 0;
    background: rgba(0,0,0,.45);
    display: grid; place-items: center;
}

/* ---------- helpers for old account/identity bootstrap pages ---------- */
.hf-auth-shell {
    max-width: 420px; margin: 60px auto; padding: 28px;
    background: var(--hf-surface);
    border: 1px solid var(--hf-border);
    border-radius: var(--hf-radius-lg);
    box-shadow: var(--hf-shadow-sm);
}

.req { color: var(--hf-danger); margin-left: 2px; }
