/*
 * =====================================================
 *  PREMIUM V2 — Design System · Bot Forense
 *  Versão 2.5.0
 * =====================================================
 */

/* ===================================================
   TOKENS — Variáveis CSS globais
=================================================== */
:root {
    /* --- Cores principais --- */
    --primary: #0f172a;
    --primary-light: #1e293b;
    --primary-dim: #334155;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --accent-glow: rgba(37, 99, 235, 0.12);
    --danger: #ef4444;
    --success: #10b981;
    --info: #3b82f6;
    --warning: #f59e0b;

    /* --- Backgrounds --- */
    --bg-body: #ced5dd;
    --bg-card: #ffffff;
    --bg-input: #f1f5f9;
    --bg-dark-0: #0f172a;
    --bg-dark-1: #1e293b;
    --bg-dark-2: #24303e;
    --bg-dark-3: #334155;

    /* --- Texto --- */
    --text-main: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    --text-dim: #94a3b8;
    --text-light: #94a3b8;

    /* --- Bordas --- */
    --border: #c0cbd9;
    --border-color: #c0cbd9;
    --border-muted: #94a3b8;
    --border-dim: rgba(0, 0, 0, 0.06);
    --border-accent: rgba(37, 99, 235, 0.25);

    /* --- Glassmorphism --- */
    --glass-bg: rgba(255, 255, 255, 0.6);
    --glass-border: rgba(255, 255, 255, 0.35);
    --backdrop-blur: 18px;

    /* --- Sombras --- */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px -2px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 30px -4px rgba(0, 0, 0, 0.1);
    --shadow-premium: 0 20px 60px rgba(0, 0, 0, 0.12), 0 1px 0 rgba(255, 255, 255, 0.5) inset;

    /* --- Glow / estado ativo --- */
    --primary-glow: rgba(37, 99, 235, 0.08);

    /* --- Radii --- */
    --radius-xs: 4px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* --- Espaçamento --- */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 40px;

    /* --- Tipografia --- */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
}

/* ===================================================
   RESET & BASE
=================================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-sans);
    font-size: var(--text-base);
    color: var(--text-main);
    background: var(--bg-body);
    min-height: 100vh;
    line-height: 1.5;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.02em;
    line-height: 1.25;
}

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

img {
    display: block;
    max-width: 100%;
}

button {
    font-family: var(--font-sans);
    cursor: pointer;
}

/* ===================================================
   LAYOUT
=================================================== */
.main-content {
    padding: var(--space-lg) var(--space-lg) var(--space-xl);
    max-width: 1280px;
    margin: 0 auto;
    width: 100%;
}

.grid-v2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--space-lg);
}

@media (max-width: 768px) {
    .grid-v2 {
        grid-template-columns: 1fr;
    }

    .main-content {
        padding: var(--space-md) var(--space-sm) 80px;
    }
}

/* ===================================================
   TIPOGRAFIA
=================================================== */
.text-gradient {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dim) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2rem;
    font-weight: 800;
}

/* ===================================================
   UTILITÁRIOS FLEX / ESPAÇAMENTO
=================================================== */
.d-flex {
    display: flex;
}

.align-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.flex-col {
    flex-direction: column;
}

.flex-wrap {
    flex-wrap: wrap;
}

.text-center {
    text-align: center;
}

.mb-1 {
    margin-bottom: 0.25rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.mt-4 {
    margin-top: 1rem;
}

.gap-3 {
    gap: 0.75rem;
}

.gap-4 {
    gap: 1rem;
}

.gap-6 {
    gap: 1.5rem;
}

/* ===================================================
   ANIMAÇÕES
=================================================== */
@keyframes animate-fade {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade {
    animation: animate-fade 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ===================================================
   CARDS — card-v2
=================================================== */
.card-v2 {
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}

.card-v2:hover {
    box-shadow: var(--shadow-md);
    border-color: #000000;
    transform: translateY(-1px);
}

/* Ícone de card */
.card-icon-v2 {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto;
}

/* Cards legados */
.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.glass-card:hover {
    box-shadow: var(--shadow-md);
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

/* ===================================================
   BOTÕES — btn-v2
=================================================== */
.btn-v2 {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    font-weight: 700;
    letter-spacing: 0.3px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, transform 0.15s, box-shadow 0.2s, color 0.2s;
    text-decoration: none;
    line-height: 1;
}

.btn-v2:active {
    transform: translateY(0) scale(0.98);
}

.btn-v2-primary {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

.btn-v2-primary:hover {
    background: var(--primary-dim);
    border-color: var(--primary-dim);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-v2-outline {
    background: transparent;
    color: var(--text-main);
    border-color: var(--border);
}

.btn-v2-outline:hover {
    background: var(--bg-input);
    border-color: var(--border-muted);
}

.btn-v2-danger {
    background: var(--danger);
    color: #fff;
    border-color: var(--danger);
}

.btn-v2-danger:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

/* Botões legados */
.btn-primary {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: var(--text-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    font-family: var(--font-sans);
}

.btn-primary:hover {
    background: var(--primary-dim);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-full {
    width: 100%;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 10px 18px;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: var(--text-sm);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    font-family: var(--font-sans);
}

.btn-outline:hover {
    background: var(--bg-input);
    border-color: var(--primary-dim);
}

/* ===================================================
   INPUTS
=================================================== */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-size: var(--text-sm);
    font-family: var(--font-sans);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

input:focus,
select:focus,
textarea:focus {
    background: #fff;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.input-v2 {
    width: 100%;
    padding: 0.85rem 1rem;
    background: rgba(241, 245, 249, 0.8);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-size: var(--text-sm);
    font-family: var(--font-sans);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.input-v2:focus {
    background: #fff;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* ===================================================
   DROP ZONE — drop-zone-v2
=================================================== */
.drop-zone-v2 {
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem var(--space-lg);
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    background: var(--bg-body);
    position: relative;
    overflow: hidden;
}

.drop-zone-v2:hover {
    border-color: var(--accent);
    background: rgba(37, 99, 235, 0.03);
}

.scan-line {
    position: absolute;
    top: -5px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(to right, transparent, var(--accent), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.drop-zone-v2.scanning {
    border-color: var(--accent);
    background: rgba(37, 99, 235, 0.04);
    animation: scan-border-v2 2s ease-in-out infinite;
}

.drop-zone-v2.scanning .scan-line {
    opacity: 1;
    animation: scan-move 2s linear infinite;
}

@keyframes scan-border-v2 {

    0%,
    100% {
        border-color: rgba(37, 99, 235, 0.4);
    }

    50% {
        border-color: rgba(37, 99, 235, 0.9);
    }
}

@keyframes scan-move {
    from {
        top: -5px;
    }

    to {
        top: 100%;
    }
}

/* ===================================================
   BADGE / CHIPS
=================================================== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.4px;
}

.badge-success {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
}

.badge-danger {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
}

.badge-warning {
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
}

.badge-info {
    background: rgba(59, 130, 246, 0.12);
    color: #3b82f6;
}

/* Status badges (metodo_02 capture) */
.status-success {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.status-info {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.status-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.match-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 700;
}

/* ===================================================
   RESULTS GRID (metodo_02 manual capture)
=================================================== */
.results-grid-refined {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.75rem;
}

.result-card-refined {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, border-color 0.2s;
}

.result-card-refined:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.2);
}

.result-thumb-refined {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
}

.result-info-refined {
    padding: 0.4rem 0.5rem;
}

.result-name-refined {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 3px;
}

.result-meta-refined {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
}

.result-score {
    font-size: 0.72rem;
    font-weight: 700;
}

/* ===================================================
   TOAST
=================================================== */
#toast {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: var(--primary);
    color: #fff;
    padding: 12px 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    font-weight: 600;
    z-index: 99999;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-family: var(--font-sans);
}

#toast.show {
    transform: translateX(-50%) translateY(0);
}

/* ===================================================
   TABELA ADMIN
=================================================== */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.admin-table th,
.admin-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.admin-table th {
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.admin-table tr:hover td {
    background: var(--bg-input);
}

/* ===================================================
   AVATAR
=================================================== */
.avatar-container {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 0 auto 20px;
}

.avatar-preview {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    background: #e2e8f0;
}

.avatar-upload-btn {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: var(--accent);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s;
}

.avatar-upload-btn:hover {
    transform: scale(1.1);
}

/* ===================================================
   FORENSIC BADGE
=================================================== */
.forensic-badge {
    background: var(--primary);
    color: #fff;
    font-size: 0.62rem;
    padding: 3px 8px;
    border-radius: var(--radius-xs);
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 700;
}

/* ===================================================
   MODAL IMAGEM (#imageModal)
=================================================== */
#imageModal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.82);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

#imageModal.active {
    opacity: 1;
    pointer-events: all;
}

.modal-inner {
    position: relative;
    max-width: min(500px, 90vw);
    max-height: 85vh;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
    transform: scale(0.9);
    transition: transform 0.25s ease;
}

#imageModal.active .modal-inner {
    transform: scale(1);
}

.modal-inner img {
    display: block;
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
}

/* ===================================================
   BRANDING 1ª CIA IND
=================================================== */
.ciaind-brand {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    z-index: 9999;
    opacity: 0.25;
    transition: all 0.4s ease;
    pointer-events: none;
    filter: grayscale(100%);
    mix-blend-mode: multiply;
    /* Mescla com fundo se possível */
}

.ciaind-brand:hover {
    opacity: 0.9;
    filter: grayscale(0%);
    pointer-events: auto;
    mix-blend-mode: normal;
    transform: translateY(-2px);
}

.ciaind-brand img {
    height: 60px;
    width: auto;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.ciaind-brand span {
    font-size: 0.55rem;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-family: var(--font-sans);
    text-align: center;
    max-width: 180px;
    opacity: 0.8;
}

@media (max-width: 768px) {

    /* Esconder brasão em mobile */
    .ciaind-brand {
        display: none !important;
    }

    /* Mais espaço lateral (fundo visível) e compacto */
    .main-content {
        padding: 1.5rem 1.5rem 60px !important;
    }

    /* Containers compactos e espaçados verticalmente */
    .card-v2 {
        padding: 1rem !important;
        border-radius: var(--radius-lg) !important;
        margin-bottom: 1.25rem !important;
    }

    /* Título e textos menores */
    .text-gradient {
        font-size: 1.35rem !important;
        margin-bottom: 0.25rem !important;
    }

    body {
        font-size: 0.85rem !important;
    }

    h3 {
        font-size: 1.1rem !important;
        margin-top: 0.5rem !important;
    }

    .card-icon-v2 {
        width: 44px;
        height: 44px;
        font-size: 1.2rem;
        margin-bottom: 0.5rem;
    }
}

.modal-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px 14px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.65));
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.75rem;
    text-align: center;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
    font-family: var(--font-sans);
}

.modal-close:hover {
    background: rgba(239, 68, 68, 0.65);
}

/* ===================================================
   LOGO
=================================================== */
.logo-premium-transparent {
    display: block !important;
    mix-blend-mode: multiply !important;
    background: transparent !important;
    filter: contrast(1.1) brightness(1.1) !important;
    object-fit: contain;
    border: none !important;
    box-shadow: none !important;
}

/* ===================================================
   ANIMAÇÕES LEGADAS
=================================================== */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section {
    display: none;
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.section.active {
    display: block;
}

/* ===================================================
   UPLOAD BOX
=================================================== */
.upload-box {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    background: var(--bg-body);
}

.upload-box:hover {
    border-color: var(--accent);
    background: rgba(37, 99, 235, 0.03);
}

/* ===================================================
   BOTÃO MELHORAR IMAGEM — btn-enhance
=================================================== */
.btn-enhance {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1.1rem;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #000;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    border: none;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
    position: relative;
    overflow: hidden;
    font-family: var(--font-sans);
}

.btn-enhance:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.35);
}

.btn-enhance:disabled,
.btn-enhance.is-loading {
    opacity: 0.65;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-enhance.is-loading .enhance-icon {
    display: none;
}

.btn-enhance .enhance-spinner {
    display: none;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(0, 0, 0, 0.25);
    border-top-color: #000;
    border-radius: 50%;
    animation: ba-spin 0.6s linear infinite;
}

.btn-enhance.is-loading .enhance-spinner {
    display: inline-block;
}

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

/* ===================================================
   SLIDER ANTES/DEPOIS — ba-slider
=================================================== */
.ba-slider-container {
    position: relative;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
    -webkit-user-select: none;
    user-select: none;
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: ew-resize;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.ba-slider-container img {
    display: block;
    width: 100%;
    height: auto;
    pointer-events: none;
}

/* A imagem AFTER fica por cima com clip-path */
.ba-img-after {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.ba-img-after img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
}

/* Divisor central arrastável */
.ba-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 3px;
    background: rgba(255, 255, 255, 0.9);
    transform: translateX(-50%);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.25);
    z-index: 10;
    pointer-events: none;
}

.ba-handle::before {
    content: '◀ ▶';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    color: #1e293b;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.55rem;
    letter-spacing: -1px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
    line-height: 34px;
    text-align: center;
}

/* Labels */
.ba-label {
    position: absolute;
    top: 10px;
    background: rgba(0, 0, 0, 0.55);
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    pointer-events: none;
    z-index: 11;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.ba-label-before {
    left: 10px;
}

.ba-label-after {
    right: 10px;
}

/* Botão "Usar imagem tratada" */
.btn-use-enhanced {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1.1rem;
    border-radius: var(--radius-md);
    background: #10b981;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    margin-top: 0.75rem;
    transition: transform 0.2s, box-shadow 0.2s;
    font-family: var(--font-sans);
}

.btn-use-enhanced:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
}

.btn-v2.warning {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.4);
    color: #b45309;
}

.btn-v2.warning:hover {
    background: rgba(245, 158, 11, 0.22);
    color: #92400e;
}