/* ============================================================
   ShieldPay Image Panel — Design System
   ============================================================
   Estructura del archivo:
     1. Tokens (colors, radii, shadows, transitions)
     2. Base (reset, tipografía, utilidades)
     3. Topbar (navegación superior)
     4. Containers
     5. Headings y flash messages
     6. Buttons (primary, secondary, mini, icon, big)
     7. Forms base (inputs, selects, labels)
     8. Auth pages (landing / login / register)
     9. Panel header + quota + new folder form
    10. Folder grid
    11. Empty state
    12. Uploader (drop zone, preview, progress, results)
    13. Convert stage (chips, sliders, badges)
    14. Folder toolbar (search, sort, view toggle, bulk actions)
    15. Image grid (cards, selection, quick copy)
    16. List view
    17. Modals
    18. Lightbox
    19. Undo toast
    20. Admin (stats, table, badges)
    21. Animations
    22. Responsive overrides
   ============================================================ */


/* ============================================================
   1. Tokens
   ============================================================ */
:root {
    /* Colors */
    --bg: #0b0d13;
    --bg-elev: #0f131b;
    --surface: #161a24;
    --surface-hover: #1b2130;
    --border: #232939;
    --border-strong: #303751;
    --text: #eaecf3;
    --text-2: #b1b7c5;
    --muted: #6c748a;
    --accent: #6b8fff;
    --accent-hover: #8ba9ff;
    --accent-dim: rgba(107,143,255,0.12);
    --accent-glow: rgba(107,143,255,0.28);
    --ok: #34d399;
    --warn: #fbbf24;
    --danger: #f43f5e;
    --danger-dim: rgba(244,63,94,0.12);

    /* Radii */
    --r-sm: 6px;
    --r-md: 8px;
    --r-lg: 12px;
    --r-xl: 16px;

    /* Shadows */
    --sh-sm: 0 1px 2px rgba(0,0,0,0.3);
    --sh-md: 0 4px 12px rgba(0,0,0,0.4);
    --sh-lg: 0 20px 50px rgba(0,0,0,0.6);

    /* Transitions */
    --t-fast: 120ms cubic-bezier(0.4, 0, 0.2, 1);
    --t: 180ms cubic-bezier(0.4, 0, 0.2, 1);
}


/* ============================================================
   2. Base
   ============================================================ */
* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}
body { min-height: 100vh; }

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--t-fast);
}
a:hover { color: var(--accent-hover); }

code {
    font-family: ui-monospace, "SF Mono", "Menlo", "Consolas", monospace;
    font-size: 0.88em;
    background: rgba(255,255,255,0.05);
    padding: 1px 6px;
    border-radius: 4px;
}

hr, .divider {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 32px 0;
}

.muted { color: var(--muted); }
.small { font-size: 0.82rem; }

.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

button { font-family: inherit; }

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: var(--r-sm);
}


/* ============================================================
   3. Topbar
   ============================================================ */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    background: linear-gradient(180deg, rgba(255,255,255,0.02) 0%, transparent 100%), var(--bg-elev);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 40;
    backdrop-filter: blur(8px);
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text) !important;
    letter-spacing: -0.01em;
}
.brand-dot {
    width: 10px; height: 10px;
    border-radius: 3px;
    background: linear-gradient(135deg, var(--accent), #a855f7);
    box-shadow: 0 0 12px var(--accent-glow);
}
.topbar nav {
    display: flex;
    gap: 6px;
    align-items: center;
}
.topbar-user {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-2);
    font-size: 0.88rem;
    padding: 6px 10px;
}
.avatar {
    width: 26px; height: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #a855f7);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    font-size: 0.75rem;
}
.topbar-link {
    color: var(--text-2) !important;
    padding: 6px 12px;
    border-radius: var(--r-sm);
    font-size: 0.88rem;
    font-weight: 500;
    transition: background var(--t-fast), color var(--t-fast);
}
.topbar-link:hover {
    background: var(--surface);
    color: var(--text) !important;
}
.inline { display: inline; margin: 0; }
.linkish {
    background: none;
    border: 0;
    color: var(--accent);
    cursor: pointer;
    font: inherit;
    padding: 0;
}
.linkish:hover { color: var(--accent-hover); }
.hide-sm { display: inline; }


/* ============================================================
   4. Containers
   ============================================================ */
.container {
    max-width: 720px;
    margin: 40px auto;
    padding: 0 24px;
}
.container-wide {
    max-width: 1600px;
    margin: 24px auto;
    padding: 0 32px;
}


/* ============================================================
   5. Headings y flash messages
   ============================================================ */
h1 {
    font-size: 1.75rem;
    letter-spacing: -0.02em;
    margin: 0 0 8px;
    font-weight: 600;
}
h2 {
    font-size: 1.35rem;
    letter-spacing: -0.015em;
    margin: 0 0 16px;
    font-weight: 600;
}
h3 {
    font-size: 1rem;
    margin: 0 0 12px;
    font-weight: 600;
}
.section-title {
    font-size: 1.1rem;
    margin: 0 0 16px;
    font-weight: 600;
    letter-spacing: -0.01em;
}
.breadcrumb {
    margin: 0 0 12px;
    font-size: 0.85rem;
}

.flash {
    padding: 12px 16px;
    border-radius: var(--r-md);
    margin-bottom: 20px;
    font-size: 0.9rem;
    border: 1px solid var(--border);
    background: var(--surface);
}
.flash-error {
    border-color: var(--danger);
    color: #fca5a5;
    background: var(--danger-dim);
}
.flash-ok {
    border-color: var(--ok);
    color: #86efac;
    background: rgba(52,211,153,0.08);
}
.flash-info {
    border-color: var(--accent);
    color: var(--accent-hover);
    background: var(--accent-dim);
}


/* ============================================================
   6. Buttons
   ============================================================ */
.btn-primary,
.btn-secondary,
.btn-big {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--r-md);
    cursor: pointer;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid transparent;
    transition: background var(--t-fast), border-color var(--t-fast), transform var(--t-fast);
    text-decoration: none;
}
.btn-primary {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.btn-primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}
.btn-primary:active { transform: scale(0.98); }

.btn-secondary {
    background: var(--surface);
    color: var(--text);
    border-color: var(--border);
}
.btn-secondary:hover {
    background: var(--surface-hover);
    border-color: var(--border-strong);
}

.btn-big {
    background: var(--accent);
    color: #fff;
    padding: 14px 40px;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    box-shadow: 0 4px 14px var(--accent-glow);
}
.btn-big:hover {
    background: var(--accent-hover);
    box-shadow: 0 6px 20px var(--accent-glow);
}
.btn-big:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-icon {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-2);
    padding: 6px;
    border-radius: var(--r-sm);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all var(--t-fast);
}
.btn-icon:hover {
    color: var(--text);
    border-color: var(--accent);
}
.btn-icon.danger:hover {
    color: var(--danger);
    border-color: var(--danger);
}

.btn-mini {
    background: var(--bg-elev);
    border: 1px solid var(--border);
    color: var(--text-2);
    padding: 5px 10px;
    border-radius: 5px;
    font: inherit;
    font-size: 0.78rem;
    cursor: pointer;
    transition: all var(--t-fast);
}
.btn-mini:hover {
    color: var(--text);
    border-color: var(--border-strong);
}
.btn-mini.primary {
    border-color: var(--accent);
    color: var(--accent);
}
.btn-mini.primary:hover { background: var(--accent-dim); }
.btn-mini.danger {
    border-color: transparent;
    color: var(--muted);
}
.btn-mini.danger:hover {
    border-color: var(--danger);
    color: var(--danger);
    background: var(--danger-dim);
}


/* ============================================================
   7. Forms base
   ============================================================ */
.stack {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-width: 380px;
}
.stack label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--muted);
}
.stack input,
.text-input,
select {
    background: var(--bg-elev);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 10px 12px;
    border-radius: var(--r-md);
    font: inherit;
    transition: border-color var(--t-fast), background var(--t-fast);
    width: 100%;
}
.stack input:focus,
.text-input:focus,
select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
}
select {
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236c748a' stroke-width='2'><polyline points='6 9 12 15 18 9'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}
.stack button {
    background: var(--accent);
    color: #fff;
    border: 0;
    padding: 11px 18px;
    border-radius: var(--r-md);
    cursor: pointer;
    font: inherit;
    font-weight: 500;
    transition: background var(--t-fast);
}
.stack button:hover { background: var(--accent-hover); }

.field-label {
    display: block;
    font-size: 0.85rem;
    color: var(--muted);
    margin: 12px 0 6px;
}


/* ============================================================
   8. Auth pages (landing / login / register)
   ============================================================ */
.auth-container {
    min-height: calc(100vh - 57px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    position: relative;
    overflow: hidden;
}
.auth-container::before {
    content: '';
    position: absolute;
    top: -20%;
    left: 50%;
    width: 800px; height: 800px;
    background: radial-gradient(circle, var(--accent-dim) 0%, transparent 60%);
    transform: translateX(-50%);
    pointer-events: none;
    filter: blur(60px);
    opacity: 0.6;
}
.auth-container::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 24px 24px;
    pointer-events: none;
    opacity: 0.5;
}
/* Flash arriba del card, centrado */
.auth-container > .flash {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 420px;
    margin: 0 auto 16px;
}

.auth-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    background: linear-gradient(180deg, var(--surface) 0%, var(--bg-elev) 100%);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    padding: 36px 32px 28px;
    box-shadow: var(--sh-lg), 0 0 40px rgba(107,143,255,0.06);
    animation: slideUp 320ms cubic-bezier(0.4, 0, 0.2, 1);
}
.landing-card { max-width: 480px; }

.auth-brand {
    text-align: center;
    margin-bottom: 28px;
}
.auth-brand h1 {
    font-size: 1.55rem;
    margin: 14px 0 6px;
    letter-spacing: -0.02em;
    font-weight: 600;
}
.auth-brand p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

.brand-dot-lg {
    width: 40px; height: 40px;
    border-radius: 11px;
    background: linear-gradient(135deg, var(--accent), #a855f7);
    box-shadow: 0 8px 24px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,0.2);
    display: inline-block;
    position: relative;
}
.brand-dot-lg::after {
    content: '';
    position: absolute;
    inset: 8px;
    border: 2px solid rgba(255,255,255,0.9);
    border-radius: 6px;
    border-bottom-color: transparent;
    border-right-color: transparent;
    transform: rotate(-45deg);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.auth-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.auth-label {
    font-size: 0.82rem;
    color: var(--text-2);
    font-weight: 500;
    letter-spacing: -0.005em;
}
.auth-field input {
    background: var(--bg-elev);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 11px 14px;
    border-radius: var(--r-md);
    font: inherit;
    font-size: 0.92rem;
    transition: border-color var(--t-fast), background var(--t-fast), box-shadow var(--t-fast);
}
.auth-field input:hover { border-color: var(--border-strong); }
.auth-field input:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--surface);
    box-shadow: 0 0 0 3px var(--accent-dim);
}
.auth-hint {
    font-size: 0.75rem;
    color: var(--muted);
    padding-left: 2px;
}

.auth-submit {
    margin-top: 6px;
    padding: 12px 18px;
    font-size: 0.95rem;
    font-weight: 600;
    width: 100%;
    box-shadow: 0 4px 14px var(--accent-glow);
}
.auth-submit:hover { box-shadow: 0 6px 18px var(--accent-glow); }

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 22px 0 16px;
    color: var(--muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}
.auth-divider span { padding: 0 4px; }

.auth-footer {
    text-align: center;
    margin: 0;
    font-size: 0.88rem;
    color: var(--text-2);
}
.auth-footer a { font-weight: 500; }

/* Landing extras: lista de features + CTA */
.landing-features {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 8px 0 24px;
    padding: 16px 18px;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
}
.feature {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.88rem;
    color: var(--text-2);
}
.feature svg {
    color: var(--accent);
    flex-shrink: 0;
}
.landing-cta {
    display: flex;
    gap: 10px;
}
.landing-cta .btn-primary,
.landing-cta .btn-secondary {
    flex: 1;
    justify-content: center;
    padding: 12px 20px;
}


/* ============================================================
   9. Panel header + quota + new folder form
   ============================================================ */
.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.panel-header h1 { margin: 0 0 4px; }
.panel-header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.quota-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    font-size: 0.85rem;
    color: var(--text-2);
}
.quota-chip strong {
    color: var(--text);
    font-weight: 600;
}
.quota-chip svg { color: var(--accent); }

.new-folder-form {
    display: none;
    gap: 8px;
    margin-bottom: 24px;
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    animation: fadeIn var(--t);
}
.new-folder-form.open {
    display: flex;
    flex-wrap: wrap;
}
.new-folder-form input {
    flex: 1;
    min-width: 220px;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 10px 12px;
    border-radius: var(--r-md);
    font: inherit;
}
.new-folder-form input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
}


/* ============================================================
   10. Folder grid
   ============================================================ */
.folder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}
.folder-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: border-color var(--t-fast), transform var(--t-fast);
    position: relative;
}
.folder-card:hover {
    border-color: var(--border-strong);
    transform: translateY(-1px);
}
.folder-link {
    padding: 24px 18px 20px;
    display: block;
    color: var(--text);
    text-decoration: none;
}
.folder-link:hover { color: var(--text); }
.folder-icon {
    color: var(--accent);
    margin-bottom: 12px;
}
.folder-name {
    font-weight: 500;
    margin-bottom: 4px;
    word-break: break-word;
    letter-spacing: -0.005em;
}
.folder-meta { font-size: 0.78rem; }
.folder-slug {
    font-family: ui-monospace, monospace;
    font-size: 0.72rem;
    margin-top: 6px;
    word-break: break-all;
    color: var(--muted);
}
.folder-actions {
    padding: 8px 12px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    background: rgba(0,0,0,0.15);
}


/* ============================================================
   11. Empty state
   ============================================================ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--surface);
    border: 1px dashed var(--border);
    border-radius: var(--r-md);
    color: var(--muted);
}
.empty-state svg {
    margin-bottom: 12px;
    color: var(--muted);
}
.empty-state p { margin: 4px 0; }
.empty-state strong { color: var(--text-2); }


/* ============================================================
   12. Uploader (drop zone, preview, progress, results)
   ============================================================ */
.uploader-block { margin-bottom: 32px; }

.drop-zone-full {
    border: 2px dashed var(--border);
    border-radius: var(--r-lg);
    padding: 56px 20px;
    text-align: center;
    background: linear-gradient(180deg, var(--surface) 0%, rgba(22,26,36,0.6) 100%);
    transition: all var(--t);
}
.drop-zone-full:hover { border-color: var(--border-strong); }
.drop-zone-full h2 {
    font-size: 1.25rem;
    margin: 12px 0 6px;
    font-weight: 500;
    letter-spacing: -0.01em;
}
.drop-zone-full .drop-icon {
    color: var(--accent);
    opacity: 0.8;
}
.drop-zone-full .small {
    font-size: 0.78rem;
    margin-top: 10px;
}

/* Overlay que aparece cuando arrastras un archivo a la ventana */
body.window-dragging::before {
    content: 'Suelta para subir';
    position: fixed;
    inset: 20px;
    background: rgba(107,143,255,0.12);
    border: 2.5px dashed var(--accent);
    border-radius: var(--r-lg);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-hover);
    font-size: 1.8rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    pointer-events: none;
    backdrop-filter: blur(4px);
}

/* Etapas comunes: preview / progress / results */
.preview-stage,
.progress-stage,
.results-stage {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 20px;
    animation: fadeIn var(--t);
}

/* Preview stage: cabecera + tira de miniaturas + controles */
.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.preview-header h3 {
    margin: 0;
    font-size: 0.95rem;
}
.preview-strip {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
    max-height: 380px;
    overflow-y: auto;
    padding-right: 4px;
}
.preview-item {
    position: relative;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform var(--t-fast);
}
.preview-item:hover { transform: translateY(-1px); }
.preview-item img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
    background: #000;
}
.preview-name {
    padding: 6px 8px;
    font-size: 0.72rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: ui-monospace, monospace;
}
.preview-index {
    color: var(--accent);
    font-weight: 600;
    margin-right: 2px;
}
.preview-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(0,0,0,0.8);
    color: #fff;
    border: 0;
    width: 22px; height: 22px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.72rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--t-fast), background var(--t-fast);
}
.preview-item:hover .preview-remove { opacity: 1; }
.preview-remove:hover { background: var(--danger); }

.preview-size {
    padding: 0 8px 6px;
    font-size: 0.68rem;
    color: var(--muted);
    font-family: ui-monospace, monospace;
    display: flex;
    justify-content: space-between;
    gap: 6px;
}
.preview-savings {
    color: var(--ok);
    font-weight: 600;
}

/* Badge del preview: dos variantes (nativo WebP vs convertido) */
.preview-badge {
    position: absolute;
    top: 4px;
    left: 4px;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 3px;
    letter-spacing: 0.04em;
    z-index: 1;
    backdrop-filter: blur(4px);
    display: inline-flex;
    align-items: center;
    gap: 3px;
}
.preview-badge-native {
    background: rgba(52,211,153,0.92);
    color: #0b1219;
}
.preview-badge-converted {
    background: rgba(15,19,27,0.88);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.15);
    padding: 2px 5px;
}
.preview-badge-converted .pb-from { color: var(--warn); font-weight: 700; }
.preview-badge-converted .pb-arrow { color: rgba(255,255,255,0.5); font-weight: 400; }
.preview-badge-converted .pb-to { color: var(--ok); font-weight: 700; }

.preview-warn {
    background: rgba(251,191,36,0.1);
    color: #fbbf24;
    border: 1px solid rgba(251,191,36,0.3);
    padding: 8px 12px;
    border-radius: var(--r-sm);
    margin-bottom: 12px;
    font-size: 0.85rem;
}

.upload-controls {
    display: flex;
    gap: 16px;
    align-items: flex-end;
    flex-wrap: wrap;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}
.upload-control {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-width: 260px;
}
.upload-control span {
    font-size: 0.85rem;
    color: var(--muted);
}

/* Progress stage */
.progress-stage h3 {
    margin: 0 0 12px;
    font-size: 0.95rem;
}
.progress-bar {
    background: var(--bg-elev);
    border-radius: 4px;
    height: 6px;
    overflow: hidden;
    margin-bottom: 16px;
}
.progress-fill {
    background: linear-gradient(90deg, var(--accent), var(--accent-hover));
    height: 100%;
    width: 0;
    transition: width 200ms;
}
.progress-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 300px;
    overflow-y: auto;
}
.progress-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 10px;
    background: var(--bg-elev);
    border-radius: 4px;
    font-size: 0.85rem;
}
.progress-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: ui-monospace, monospace;
}
.progress-status {
    color: var(--muted);
    flex-shrink: 0;
}
.progress-status.ok   { color: var(--ok); }
.progress-status.err  { color: var(--danger); }
.progress-status.info { color: var(--warn); }

/* Results stage */
.results-stage h3 {
    margin: 0 0 4px;
    font-size: 0.95rem;
}
.results-stage .small { margin: 0 0 16px; }
.format-row {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.format-row label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.85rem;
    color: var(--muted);
}
.format-row select { min-width: 180px; }
.results-textarea {
    width: 100%;
    min-height: 240px;
    resize: vertical;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 12px;
    border-radius: var(--r-md);
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    font-size: 0.85rem;
    line-height: 1.5;
}
.results-textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
}


/* ============================================================
   13. Convert stage (chips + sliders)
   ============================================================ */
.convert-stage {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 22px;
    margin-bottom: 24px;
    animation: fadeIn var(--t);
}
.convert-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}
.convert-header h3 {
    margin: 0 0 4px;
    font-size: 1rem;
}

/* Resumen de archivos con chips por tipo */
.file-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    max-height: 240px;
    overflow-y: auto;
    padding: 12px;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
}
.chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 0.78rem;
    color: var(--text-2);
    max-width: 100%;
    transition: border-color var(--t-fast);
}
.chip:hover { border-color: var(--border-strong); }
.chip-name {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: ui-monospace, monospace;
    font-size: 0.75rem;
}
.chip-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(52,211,153,0.15);
    color: var(--ok);
    font-weight: 700;
    font-size: 0.66rem;
    letter-spacing: 0.05em;
    padding: 2px 7px;
    border-radius: 4px;
}
.chip-badge-from {
    background: rgba(251,191,36,0.14);
    color: var(--warn);
}
.chip-arrow {
    color: var(--muted);
    font-size: 0.85rem;
    line-height: 1;
}
.chip-webp {
    border-color: rgba(52,211,153,0.25);
    background: rgba(52,211,153,0.06);
}
.chip-convert {
    border-color: rgba(251,191,36,0.22);
}

/* Píldoras de conteo en el header (X listos, Y por convertir) */
.pill-count {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    margin-left: 4px;
}
.pill-ready   { background: rgba(52,211,153,0.14); color: var(--ok); }
.pill-convert { background: rgba(251,191,36,0.14); color: var(--warn); }

/* Sección plegable "Configuración avanzada" */
.convert-advanced {
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    background: var(--bg-elev);
    overflow: hidden;
    margin-bottom: 16px;
}
.convert-advanced summary {
    padding: 12px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    color: var(--text-2);
    user-select: none;
    list-style: none;
    transition: background var(--t-fast);
}
.convert-advanced summary::-webkit-details-marker { display: none; }
.convert-advanced summary::after {
    content: '';
    margin-left: auto;
    width: 8px; height: 8px;
    border-right: 2px solid var(--muted);
    border-bottom: 2px solid var(--muted);
    transform: rotate(45deg);
    transition: transform var(--t-fast);
}
.convert-advanced[open] summary::after {
    transform: rotate(-135deg);
}
.convert-advanced summary:hover {
    background: var(--surface-hover);
    color: var(--text);
}
.convert-controls {
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    border-top: 1px solid var(--border);
}

/* Sliders custom (calidad y tamaño) */
.convert-slider {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.slider-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 0.85rem;
    color: var(--muted);
}
.slider-header strong {
    color: var(--accent);
    font-variant-numeric: tabular-nums;
    font-size: 0.95rem;
    font-weight: 600;
}
.slider-hints {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    color: var(--muted);
    margin-top: -2px;
}
.convert-slider input[type="range"] {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    outline: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
}
.convert-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px; height: 18px;
    background: var(--accent);
    border: 2px solid var(--surface);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px var(--accent-glow);
    transition: transform var(--t-fast), box-shadow var(--t-fast);
}
.convert-slider input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 3px 10px var(--accent-glow);
}
.convert-slider input[type="range"]::-moz-range-thumb {
    width: 18px; height: 18px;
    background: var(--accent);
    border: 2px solid var(--surface);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px var(--accent-glow);
}
.convert-slider input[type="range"]:focus-visible::-webkit-slider-thumb {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.convert-progress {
    margin: 16px 0;
    padding: 14px 16px;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
}
.convert-progress .progress-bar {
    background: rgba(255,255,255,0.05);
    margin-bottom: 8px;
}
.convert-progress .muted {
    font-family: ui-monospace, monospace;
    font-size: 0.78rem;
}
.convert-footer {
    display: flex;
    justify-content: flex-end;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}
.convert-footer .btn-primary {
    padding: 10px 22px;
    font-weight: 600;
}
.convert-footer .btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--muted);
    border-color: var(--muted);
    box-shadow: none;
}


/* ============================================================
   14. Folder toolbar (search, sort, view, bulk actions)
   ============================================================ */
.folder-toolbar {
    position: sticky;
    top: 56px;
    z-index: 30;
    background: var(--bg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 12px 0;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    transition: background var(--t), border-color var(--t);
}
.folder-toolbar.has-selection {
    background: linear-gradient(180deg, var(--accent-dim), var(--bg));
    border-bottom-color: var(--accent);
}
.toolbar-left {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}
.toolbar-info {
    font-size: 0.9rem;
    color: var(--muted);
}
.toolbar-info strong {
    color: var(--text);
    font-weight: 600;
}

.toolbar-search {
    position: relative;
    display: flex;
    align-items: center;
}
.toolbar-search svg {
    position: absolute;
    left: 10px;
    color: var(--muted);
    pointer-events: none;
}
.toolbar-search input {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 7px 12px 7px 32px;
    border-radius: var(--r-md);
    font: inherit;
    font-size: 0.85rem;
    width: 220px;
    transition: border-color var(--t-fast), width var(--t);
}
.toolbar-search input:focus {
    outline: none;
    border-color: var(--accent);
    width: 280px;
    box-shadow: 0 0 0 3px var(--accent-dim);
}

.toolbar-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}
.toolbar-group {
    display: flex;
    gap: 6px;
    align-items: center;
}
.toolbar-select select {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 7px 30px 7px 12px;
    border-radius: var(--r-md);
    font: inherit;
    font-size: 0.85rem;
}

.view-toggle {
    display: flex;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    overflow: hidden;
}
.view-btn {
    background: transparent;
    border: 0;
    color: var(--muted);
    padding: 8px 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: color var(--t-fast), background var(--t-fast);
}
.view-btn:hover { color: var(--text); }
.view-btn.active {
    background: var(--accent-dim);
    color: var(--accent);
}

.bulk-actions button {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-2);
    padding: 7px 12px;
    border-radius: var(--r-md);
    font: inherit;
    font-size: 0.83rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all var(--t-fast);
}
.bulk-actions button:hover {
    color: var(--text);
    border-color: var(--border-strong);
}
.bulk-actions button.primary {
    border-color: var(--accent);
    color: var(--accent);
}
.bulk-actions button.primary:hover { background: var(--accent-dim); }
.bulk-actions button.danger { color: var(--muted); }
.bulk-actions button.danger:hover {
    border-color: var(--danger);
    color: var(--danger);
    background: var(--danger-dim);
}
.bulk-actions button:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}
.bulk-actions button:disabled:hover {
    color: inherit;
    border-color: var(--border);
    background: var(--surface);
}


/* ============================================================
   15. Image grid (cards, selection, quick copy)
   ============================================================ */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
}
.image-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: all var(--t-fast);
    user-select: none;
}
.image-card:hover {
    border-color: var(--border-strong);
    transform: translateY(-1px);
    box-shadow: var(--sh-md);
}
.image-card.selected {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent) inset, var(--sh-md);
}
.image-thumb {
    aspect-ratio: 4 / 3;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: zoom-in;
}
.image-thumb img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform var(--t);
}
.image-card:hover .image-thumb img { transform: scale(1.02); }

.image-info { padding: 10px 12px; }
.image-name {
    font-size: 0.83rem;
    font-family: ui-monospace, monospace;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text);
}
.image-meta {
    font-size: 0.72rem;
    margin-top: 2px;
}
.image-expires {
    display: inline-block;
    margin-top: 4px;
    padding: 1px 8px;
    background: rgba(251,191,36,0.12);
    color: var(--warn);
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 500;
}

/* Fila de 3 botones (Copiar / Renombrar / Eliminar) siempre en línea */
.image-actions {
    padding: 8px 10px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 4px;
    justify-content: space-between;
    align-items: center;
    background: rgba(0,0,0,0.2);
    flex-wrap: nowrap;
}
.image-actions .btn-mini {
    flex: 1;
    padding: 5px 6px;
    font-size: 0.72rem;
    text-align: center;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Checkbox de selección (aparece al hover o cuando hay selección activa) */
.image-select {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    width: 22px;
    height: 22px;
    background: rgba(0,0,0,0.55);
    border: 1.5px solid rgba(255,255,255,0.45);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity var(--t-fast), background var(--t-fast);
    backdrop-filter: blur(4px);
}
.image-card:hover .image-select,
.image-card.selected .image-select,
body.has-selection .image-select {
    opacity: 1;
}
.image-select:hover { border-color: var(--accent); }
.image-card.selected .image-select {
    background: var(--accent);
    border-color: var(--accent);
}
.image-select::after {
    content: '';
    width: 10px;
    height: 5px;
    border-left: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(-45deg) translateY(-2px);
    opacity: 0;
    transition: opacity var(--t-fast);
}
.image-card.selected .image-select::after { opacity: 1; }

/* Icono de copia rápida en la esquina superior derecha */
.image-quick-copy {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    width: 26px;
    height: 26px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--t-fast), background var(--t-fast);
    backdrop-filter: blur(4px);
}
.image-card:hover .image-quick-copy { opacity: 1; }
.image-quick-copy:hover { background: var(--accent); }
.image-quick-copy.copied {
    background: var(--ok);
    opacity: 1;
}


/* ============================================================
   16. List view (alternativa al grid)
   ============================================================ */
.image-grid.view-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.view-list .image-card {
    flex-direction: row;
    align-items: stretch;
    aspect-ratio: auto;
}
.view-list .image-thumb {
    width: 72px;
    min-width: 72px;
    aspect-ratio: 1;
}
.view-list .image-info {
    flex: 1;
    padding: 8px 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}
.view-list .image-actions {
    border-top: 0;
    border-left: 1px solid var(--border);
    background: transparent;
    padding: 8px 12px;
    align-items: center;
    flex-wrap: nowrap;
}
.view-list .image-select {
    top: 50%;
    transform: translateY(-50%);
    left: 12px;
}
.view-list .image-quick-copy {
    top: 50%;
    transform: translateY(-50%);
    right: 300px;
}
.view-list .image-card:hover { transform: none; }
.view-list .image-card:hover .image-thumb img { transform: none; }


/* ============================================================
   17. Modals
   ============================================================ */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 20px;
    animation: fadeIn var(--t-fast);
    backdrop-filter: blur(6px);
}
.modal[hidden] { display: none; }
.modal-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 22px;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--sh-lg);
    animation: slideUp var(--t);
}
.modal-card-wide { max-width: 780px; }
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}
.modal-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    letter-spacing: -0.005em;
}
.modal-close {
    background: transparent;
    border: 0;
    color: var(--muted);
    width: 30px;
    height: 30px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all var(--t-fast);
}
.modal-close:hover {
    background: var(--bg-elev);
    color: var(--text);
}
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

/* Opciones de copia (usadas en modal individual y bulk) */
.copy-options {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.copy-options label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--muted);
}
.copy-row {
    display: flex;
    gap: 6px;
}
.copy-row input {
    flex: 1;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 8px 10px;
    border-radius: 6px;
    font: inherit;
    font-size: 0.85rem;
    font-family: ui-monospace, monospace;
}
.copy-row button {
    background: var(--accent);
    color: #fff;
    border: 0;
    padding: 8px 14px;
    border-radius: 6px;
    font: inherit;
    font-size: 0.85rem;
    cursor: pointer;
    min-width: 90px;
    transition: background var(--t-fast);
}
.copy-row button:hover { background: var(--accent-hover); }

/* Caja de advertencia (usada en rename modal) */
.warn-box {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-top: 12px;
    padding: 10px 12px;
    background: rgba(251,191,36,0.08);
    border: 1px solid rgba(251,191,36,0.25);
    border-radius: var(--r-sm);
    font-size: 0.82rem;
    color: #fcd34d;
}
.warn-box svg {
    flex-shrink: 0;
    margin-top: 2px;
}


/* ============================================================
   18. Lightbox
   ============================================================ */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.94);
    z-index: 150;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn var(--t);
}
.lightbox[hidden] { display: none; }
.lightbox-content {
    max-width: 92vw;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.lightbox img {
    max-width: 100%;
    max-height: 82vh;
    object-fit: contain;
    border-radius: var(--r-md);
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.lightbox-info {
    text-align: center;
    color: var(--text);
}
.lightbox-name {
    font-family: ui-monospace, monospace;
    font-size: 0.85rem;
}
.lightbox-meta { font-size: 0.75rem; }
.lightbox-close,
.lightbox-nav {
    position: absolute;
    background: rgba(255,255,255,0.08);
    color: #fff;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--t-fast);
    backdrop-filter: blur(6px);
}
.lightbox-close {
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
}
.lightbox-nav {
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
}
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }
.lightbox-close:hover,
.lightbox-nav:hover {
    background: rgba(255,255,255,0.18);
}


/* ============================================================
   19. Undo toast
   ============================================================ */
.undo-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--sh-lg);
    border-radius: var(--r-lg);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    z-index: 90;
    font-size: 0.9rem;
    animation: slideUp var(--t);
}
.undo-btn {
    background: transparent;
    border: 0;
    color: var(--accent);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
}
.undo-btn:hover { background: var(--accent-dim); }
.undo-timer {
    color: var(--muted);
    font-size: 0.8rem;
    font-variant-numeric: tabular-nums;
}


/* ============================================================
   20. Admin (stats, table, badges)
   ============================================================ */
.stats {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.stat {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 14px 20px;
    border-radius: var(--r-md);
    color: var(--muted);
    min-width: 100px;
    text-decoration: none;
    transition: border-color var(--t-fast);
}
.stat strong {
    display: block;
    font-size: 1.4rem;
    color: var(--text);
    font-weight: 600;
}
.stat:hover {
    border-color: var(--accent);
    text-decoration: none;
}
.stat-active { border-color: var(--accent); }

.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    overflow: hidden;
    font-size: 0.9rem;
}
.table th,
.table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
.table th {
    background: rgba(255,255,255,0.03);
    font-weight: 500;
    color: var(--muted);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.table tr:last-child td { border-bottom: 0; }

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.badge-admin     { background: var(--accent-dim); color: var(--accent); }
.badge-user      { background: rgba(255,255,255,0.05); color: var(--muted); }
.badge-active    { background: rgba(52,211,153,0.15); color: var(--ok); }
.badge-pending   { background: rgba(251,191,36,0.15); color: var(--warn); }
.badge-suspended { background: rgba(244,63,94,0.15); color: var(--danger); }

.actions {
    white-space: nowrap;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}


/* ============================================================
   21. Animations
   ============================================================ */
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: none; }
}


/* ============================================================
   22. Responsive overrides
   ============================================================ */
@media (max-width: 780px) {
    /* List view: ocultar copia rápida (choca con acciones) */
    .view-list .image-quick-copy { display: none; }
}

@media (max-width: 640px) {
    .container-wide,
    .container { padding: 0 16px; }
    .hide-sm { display: none; }

    /* Ajuste general del contenedor auth para móvil */
    .auth-container {
        padding: 24px 16px;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        min-height: calc(100vh - 57px);
    }
    /* Flash en móvil: siempre arriba, ancho completo del card */
    .auth-container > .flash {
        max-width: 100%;
        margin-top: 16px;
    }
    .auth-card {
        max-width: 100%;
        padding: 28px 22px 22px;
        margin-top: 16px;
    }
    /* Lightbox: navegación más pequeña en móvil */
    .lightbox-nav {
        width: 36px;
        height: 36px;
    }
    .lightbox-prev { left: 8px; }
    .lightbox-next { right: 8px; }
}

@media (max-width: 480px) {
    .auth-card { padding: 24px 18px 20px; }
    .auth-brand h1 { font-size: 1.4rem; }
    .landing-cta {
        flex-direction: column;
    }
}